/* Storefront shop pages: category chips, search, product grid, product page. Loaded after storefront.css. */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.shop-section {
    padding-top: 28px;
}

/* Category chips */

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.chip {
    padding: 9px 16px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--paper);
    color: var(--plum);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}

.chip:hover {
    transform: translateY(-1px);
    border-color: var(--plum-soft);
}

.chip.is-active {
    background: linear-gradient(135deg, var(--plum), var(--plum-soft));
    border-color: transparent;
    color: var(--paper);
}

/* Search */

.search-form {
    display: flex;
    gap: 8px;
    margin-bottom: 28px;
}

.search-form input {
    flex: 1;
    min-width: 0;
    min-height: 50px;
    border-radius: 999px;
    border: 1px solid #dccfd6;
    padding: 0 20px;
    font: inherit;
    background: var(--paper);
    color: var(--ink);
    box-shadow: var(--shadow-sm);
}

.search-form input:focus {
    outline: none;
    border-color: var(--rose);
    box-shadow: 0 0 0 4px rgba(181, 80, 122, 0.12);
}

/* Product grid */

.product-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 760px) {
    .product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 24px;
    }
}

@media (min-width: 1040px) {
    .product-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.product-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.product-media {
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f6eef2;
}

.product-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease);
}

.product-card:hover .product-media img {
    transform: scale(1.05);
}

.product-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
    color: var(--plum);
    font-family: "Playfair Display", serif;
    font-size: 1.1rem;
    background: radial-gradient(circle at 30% 20%, #fbeef3, #efd3de 70%);
}

.product-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px 16px 18px;
}

.product-body h3 {
    font-size: 1.05rem;
    line-height: 1.35;
    margin: 0;
}

.product-body h3 a {
    color: var(--plum);
    text-decoration: none;
}

.product-body h3 a:hover {
    color: var(--rose);
}

.product-cat {
    color: var(--gold);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin: 0;
}

.product-price {
    margin: 6px 0 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--plum);
}

.product-price s {
    color: var(--muted);
    font-weight: 400;
    margin-left: 6px;
    font-size: 0.88em;
}

.stock-out {
    display: inline-block;
    align-self: flex-start;
    margin: 6px 0 0;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--danger-bg);
    color: var(--danger);
    font-size: 0.8rem;
    font-weight: 600;
}

.pager {
    display: flex;
    justify-content: space-between;
    margin-top: 32px;
}

.pager a {
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--paper);
    text-decoration: none;
    color: var(--plum);
    font-weight: 600;
}

.empty-state {
    color: var(--muted);
    padding: 56px 0;
    text-align: center;
}

/* Product page */

.crumbs {
    font-size: 0.9rem;
    color: var(--muted);
    margin: 28px 0 16px;
}

.detail-grid {
    display: grid;
    gap: 28px;
    grid-template-columns: minmax(0, 1fr);
    padding-bottom: 24px;
}

@media (min-width: 860px) {
    .detail-grid {
        grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
        gap: 56px;
        align-items: start;
    }

    .product-info {
        position: sticky;
        top: 110px;
    }
}

.gallery-main {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 28px;
    object-fit: cover;
    background: #f6eef2;
    box-shadow: var(--shadow-sm);
}

.gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.gallery-thumbs img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid var(--line);
}

.product-info h1 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    margin: 4px 0 12px;
}

.detail-price {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--plum);
    margin: 0;
}

.detail-price s {
    color: var(--muted);
    font-weight: 400;
    margin-left: 10px;
    font-size: 0.7em;
}

.stock-line {
    display: inline-block;
    margin: 12px 0 4px;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--ok-bg, #e7f4ec);
    color: var(--ok, #2f7d4f);
    font-size: 0.9rem;
    font-weight: 600;
}

.stock-line.is-out {
    background: var(--danger-bg);
    color: var(--danger);
}

.product-info .lead {
    margin-top: 14px;
}

.product-info .btn {
    margin-top: 10px;
}

.description {
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
    color: var(--ink);
}

/* Home: category tiles and featured row */

.section-tight {
    padding-top: 48px;
    padding-bottom: 0;
}

.section-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px 16px;
    margin-bottom: 22px;
}

.section-row h2 {
    margin: 0;
}

.text-link {
    color: var(--rose);
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.text-link:hover {
    text-decoration: underline;
}

.category-tiles {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 760px) {
    .category-tiles {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 18px;
    }
}

.category-tile {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
    min-height: 110px;
    padding: 18px 20px;
    border-radius: var(--radius);
    text-decoration: none;
    background: linear-gradient(150deg, #ffffff 0%, var(--rose-pale) 100%);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.category-tile:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.category-tile-name {
    font-family: "Playfair Display", serif;
    font-size: 1.2rem;
    color: var(--plum);
    line-height: 1.2;
}

.category-tile-count {
    font-size: 0.85rem;
    color: var(--muted);
}

/* Sections that also use .container keep the side gutter */
.container.section {
    padding-left: var(--gutter);
    padding-right: var(--gutter);
}

/* Placeholder cards: no link underline */
.product-media,
.product-placeholder {
    text-decoration: none;
}
