/* Products listing (templates/products.html). Scoped to .shop-* ; colours follow design.md */

.shop-page { color: #333; }

.shop-hero { background: #FFF8DC; border-bottom: 1px solid #f5e7a3; padding: 36px 0 28px; }
.shop-hero h1 { color: #511616; font-weight: 700; font-size: clamp(1.7rem, 3.2vw, 2.3rem); margin: 0 0 .35rem; }
.shop-hero p { margin: 0; color: #333; }

.shop-main { padding: 28px 0 72px; }

/* toolbar: one form. Desktop = inline row + chips; mobile = compact bar + bottom-sheet filters */
.shop-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; margin-bottom: 1rem; }
.shop-search { position: relative; flex: 1 1 260px; order: 1; }
.shop-search i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #6b7280; }
.shop-search .form-control { padding-left: 2.4rem; min-height: 44px; border-radius: 999px; font-size: 16px; }
.shop-check { display: inline-flex; align-items: center; gap: .5rem; margin: 0; font-size: .92rem; cursor: pointer; }
.shop-check input { width: 1.1rem; height: 1.1rem; accent-color: #FACC15; }
.shop-sort { display: inline-flex; align-items: center; gap: .5rem; order: 3; }
.shop-sort label { margin: 0; font-size: .9rem; color: #4b5563; white-space: nowrap; }
.shop-sort .form-select { min-height: 42px; border-radius: 10px; width: auto; max-width: 100%; }
.shop-toolbar .form-control:focus, .shop-toolbar .form-select:focus { border-color: #FACC15; box-shadow: 0 0 0 .2rem rgba(250, 204, 21, .35); }

.shop-apply {
    background: #0a0a0a; color: #fff; border: 0; border-radius: 999px; padding: .5rem 1.25rem; font-weight: 600; order: 4;
}
.shop-apply:hover, .shop-apply:focus { background: #511616; color: #fff; }

/* category chips */
.shop-chips { display: flex; gap: .5rem; overflow-x: auto; padding: .15rem .1rem .6rem; -webkit-overflow-scrolling: touch;
    scrollbar-width: thin; scrollbar-color: #FACC15 #FFF6D6; }
.shop-chips::-webkit-scrollbar { height: 8px; }
.shop-chips::-webkit-scrollbar-track { background: #FFF6D6; border-radius: 999px; }
.shop-chips::-webkit-scrollbar-thumb { background: #FACC15; border-radius: 999px; border: 2px solid #FFF6D6; }
.shop-chips::-webkit-scrollbar-thumb:hover { background: #EAB308; }
.shop-chip {
    position: relative; flex: 0 0 auto; margin: 0; border: 1px solid #d1d5db; background: #fff; color: #333; border-radius: 999px;
    padding: .4rem 1rem; font-size: .9rem; font-weight: 500; cursor: pointer; transition: background-color .2s, border-color .2s;
}
.shop-chip input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; }
.shop-chip:hover { border-color: #FACC15; background: #FFF6D6; }
.shop-chip.is-active, .shop-chip:has(input:checked) { background: #FACC15; border-color: #FACC15; color: #0a0a0a; font-weight: 600; }
/* .shop-chip:focus-within, .shop-apply:focus-visible { outline: 2px solid #0a0a0a; outline-offset: 2px; } */

/* mobile-only pieces are hidden on desktop */
.shop-filter-toggle, .shop-backdrop, .shop-drawer-head, .shop-drawer-foot, .shop-drawer-section h3 { display: none; }

/* desktop (>= 768px): the drawer dissolves into the toolbar row, layout as before */
@media (min-width: 768px) {
    .shop-drawer, .shop-drawer-body, .shop-drawer-section { display: contents; }
    .shop-avail .shop-check { order: 2; }
    .shop-cats .shop-chips { order: 5; flex: 1 1 100%; }
}

.shop-count { margin: .25rem 0 1.25rem; font-size: .92rem; color: #4b5563; }
.shop-clear { margin-left: .75rem; color: #511616; font-weight: 600; text-decoration: underline; }

/* cards */
.shop-card {
    display: flex; flex-direction: column; background: #fff; border: 1px solid #e5e7eb; border-radius: 16px;
    overflow: hidden; transition: box-shadow .2s, border-color .2s, transform .2s;
}
.shop-card:hover { border-color: #FACC15; box-shadow: 0 8px 22px rgba(0, 0, 0, .07); transform: translateY(-2px); }
.shop-media { position: relative; aspect-ratio: 1 / 1; background: #f8f9fa; overflow: hidden; }
.shop-media-link { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; }
.shop-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.shop-card:hover .shop-media img { transform: scale(1.04); }
.shop-noimg { color: #c4c7cc; font-size: 2.2rem; }
.shop-badge {
    position: absolute; top: .6rem; left: .6rem; background: #511616; color: #fff;
    font-size: .72rem; font-weight: 600; padding: .2rem .55rem; border-radius: 999px;
}
.shop-wish { position: absolute; top: .5rem; right: .5rem; margin: 0; }
.shop-wish button {
    width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92); color: #511616;
    display: grid; place-items: center; cursor: pointer; transition: background-color .2s, color .2s;
}
.shop-wish button:hover { background: #FACC15; color: #0a0a0a; }
.shop-wish button:focus-visible { outline: 2px solid #0a0a0a; outline-offset: 2px; }

.shop-body { display: flex; flex-direction: column; gap: .5rem; padding: .9rem; flex: 1; }
.shop-title { font-size: .95rem; font-weight: 600; line-height: 1.35; margin: 0; min-height: 2.7em; }
.shop-title a {
    color: #511616; text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.shop-title a:hover { text-decoration: underline; }
.shop-price { margin: 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: .1rem .55rem; }
.shop-price strong { font-size: 1.05rem; color: #0a0a0a; }
.shop-price s { font-size: .85rem; color: #6b7280; }
.shop-body form { margin: auto 0 0; }
.shop-btn {
    display: block; width: 100%; margin-top: auto; padding: .55rem .75rem; border: 0; border-radius: 999px;
    background: #FACC15; color: #0a0a0a; font-weight: 600; font-size: .92rem; text-align: center; transition: background-color .2s;
}
.shop-btn:hover, .shop-btn:focus { background: #E6B800; color: #0a0a0a; }
.shop-btn:focus-visible { outline: 2px solid #0a0a0a; outline-offset: 2px; box-shadow: none; }
.shop-btn-disabled, .shop-btn-disabled:hover { background: #e5e7eb; color: #6b7280; cursor: not-allowed; }
.shop-btn-inline { display: inline-block; width: auto; padding: .65rem 1.75rem; margin-top: 0; }

/* mobile (< 768px): compact bar + bottom-sheet filters */
@media (max-width: 767.98px) {
    .shop-toolbar { gap: .6rem; }
    .shop-search { flex: 1 1 100%; }
    .shop-filter-toggle {
        display: inline-flex; align-items: center; gap: .5rem; order: 2; flex: 0 0 auto; min-height: 42px;
        padding: 0 1rem; border: 1px solid #d1d5db; border-radius: 999px; background: #fff; color: #0a0a0a; font-weight: 600; font-size: .92rem;
    }
    .shop-filter-toggle:hover { border-color: #FACC15; background: #FFF6D6; }
    .shop-filter-toggle:focus-visible { outline: 2px solid #0a0a0a; outline-offset: 2px; }
    .shop-filter-count {
        display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 .35rem;
        border-radius: 999px; background: #FACC15; color: #0a0a0a; font-size: .75rem; font-weight: 700;
    }
    .shop-sort { order: 3; flex: 1 1 0; min-width: 0; }
    .shop-sort label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .shop-sort .form-select { width: 100%; min-height: 42px; border-radius: 999px; font-size: .92rem; }
    .shop-apply-desktop { display: none; }

    .shop-backdrop { display: block; position: fixed; inset: 0; z-index: 1060; background: rgba(17, 17, 17, .5); }
    .shop-backdrop[hidden] { display: none; }
    .shop-drawer {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 1070; display: flex; flex-direction: column;
        max-height: 85vh; background: #fff; border-radius: 18px 18px 0 0; box-shadow: 0 -10px 30px rgba(0, 0, 0, .2);
        transform: translateY(100%); visibility: hidden; transition: transform .25s ease, visibility 0s linear .25s;
    }
    .shop-drawer.is-open { transform: translateY(0); visibility: visible; transition: transform .25s ease; }
    .shop-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.1rem .5rem; }
    .shop-drawer-head h2 { margin: 0; font-size: 1.15rem; font-weight: 700; color: #511616; }
    .shop-drawer-close {
        width: 40px; height: 40px; border: 0; border-radius: 50%; background: #f3f4f6; color: #333; cursor: pointer;
    }
    .shop-drawer-close:focus-visible { outline: 2px solid #0a0a0a; outline-offset: 2px; }
    .shop-drawer-body { overflow-y: auto; padding: .25rem 1.1rem 1rem; display: block; flex: 1 1 auto; -webkit-overflow-scrolling: touch; }
    .shop-drawer-section { display: block; padding: .9rem 0; border-top: 1px solid #f1f1f1; }
    .shop-drawer-section h3 { display: block; margin: 0 0 .65rem; font-size: .85rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: #6b7280; }
    .shop-drawer .shop-chips { flex-wrap: wrap; overflow: visible; padding: 0; }
    .shop-drawer-foot {
        display: flex; align-items: center; gap: 1rem; padding: .85rem 1.1rem calc(.85rem + env(safe-area-inset-bottom));
        border-top: 1px solid #eee; background: #fff;
    }
    .shop-reset { color: #511616; font-weight: 600; text-decoration: underline; white-space: nowrap; }
    .shop-apply-mobile { flex: 1; margin: 0; }
    body.shop-drawer-open { overflow: hidden; }
}

/* pagination */
/* square 10px-radius controls like the site's inputs; yellow active page, soft hover, muted disabled arrows */
.shop-pagination { margin-top: 2.5rem; }
.shop-pagination .pagination { gap: .45rem; margin: 0; }
.shop-pagination .pagination .page-item .page-link {
    display: flex; align-items: center; justify-content: center; min-width: 42px; height: 42px; padding: 0 .75rem; margin: 0;
    border: 1px solid #e5e7eb; border-radius: 10px; background: #fff; color: #333; font-size: .92rem; font-weight: 500; line-height: 1;
    box-shadow: none; transition: background-color .2s, border-color .2s, color .2s, transform .2s;
}
.shop-pagination .pagination .page-item .page-link:hover { background: #FFF6D6; border-color: #FACC15; color: #0a0a0a; transform: translateY(-1px); }
.shop-pagination .pagination .page-item .page-link:focus-visible { outline: 2px solid #0a0a0a; outline-offset: 2px; box-shadow: none; }
.shop-pagination .pagination .page-item.active .page-link { background: #FACC15; border-color: #FACC15; color: #0a0a0a; font-weight: 600; transform: none; cursor: default; }
.shop-pagination .pagination .page-item.disabled .page-link { background: #f9fafb; border-color: #e5e7eb; color: #b8bcc4; cursor: not-allowed; transform: none; }
@media (max-width: 575.98px) {
    .shop-pagination { margin-top: 2rem; }
    .shop-pagination .pagination { gap: .35rem; }
    .shop-pagination .pagination .page-item .page-link { min-width: 38px; height: 38px; padding: 0 .55rem; font-size: .85rem; }
}
@media (prefers-reduced-motion: reduce) { .shop-pagination .pagination .page-item .page-link { transition: none; } .shop-pagination .pagination .page-item .page-link:hover { transform: none; } }

/* empty */
.shop-empty { max-width: 520px; margin: 24px auto; text-align: center; padding: 2.5rem 1.5rem; background: #fff; border: 1px solid #e5e7eb; border-radius: 16px; }
.shop-empty-icon {
    width: 88px; height: 88px; margin: 0 auto 1.25rem; display: grid; place-items: center;
    border-radius: 50%; background: #FFF6D6; color: #b8860b; font-size: 2.2rem;
}
.shop-empty h2 { font-size: 1.4rem; font-weight: 700; color: #511616; margin-bottom: .5rem; }
.shop-empty p { color: #4b5563; margin-bottom: 1.25rem; }

@media (max-width: 575.98px) {
    .shop-hero { padding: 26px 0 20px; }
    .shop-main { padding: 20px 0 52px; }
    .shop-body { padding: .7rem; }
    .shop-title { font-size: .88rem; }
    .shop-btn { font-size: .85rem; padding: .5rem .5rem; }
}
@media (prefers-reduced-motion: reduce) {
    .shop-card, .shop-media img, .shop-drawer { transition: none !important; }
    .shop-card:hover, .shop-card:hover .shop-media img { transform: none; }
}


/* ---- refined card: category label, short description, package-size chips, tidier price and button ---- */
.shop-card { background: #fff; border-color: #EAE6DA; border-radius: 16px; box-shadow: 0 2px 8px -2px rgba(36, 36, 36, .04); }
.shop-card:hover { border-color: #EAE6DA; box-shadow: 0 8px 24px -6px rgba(36, 36, 36, .09); }
.shop-media { background: #FAF7EF; border-bottom: 1px solid #F1EDE0; }
.shop-body { gap: .35rem; padding: 1rem; }
.shop-cat { font-size: .68rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #68655E; }
.shop-title { min-height: 0; font-size: 1rem; line-height: 1.35; margin: 0; }
.shop-title a, .shop-title > span { color: #242424; }
.shop-title > span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.shop-desc { margin: 0; font-size: .82rem; line-height: 1.45; color: #68655E; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.shop-price { margin-top: .35rem; }
.shop-price strong { font-size: 1.15rem; color: #242424; }
.shop-body form { margin-top: auto; padding-top: .55rem; }
.shop-btn {
    display: flex; align-items: center; justify-content: center; gap: .45rem; margin-top: auto;
    height: 42px; padding: 0 .75rem; border-radius: 8px; background: #F4C430; color: #242424; font-weight: 600; font-size: .88rem;
}
.shop-body > .shop-btn { margin-top: .55rem; }
.shop-btn:hover, .shop-btn:focus { background: #E5B522; color: #242424; }
.shop-btn-disabled, .shop-btn-disabled:hover { background: #F1EEE6; color: #68655E; }

.shop-tags { display: flex; flex-wrap: wrap; gap: .3rem; }
.shop-tag { padding: .12rem .55rem; border-radius: 999px; background: #FAF7EF; border: 1px solid #EAE6DA; color: #68655E; font-size: .68rem; font-weight: 600; letter-spacing: .03em; line-height: 1.5; }
.shop-tag-type { background: rgba(244, 196, 48, .2); border-color: rgba(244, 196, 48, .45); color: #5a4500; }
.shop-badge { background: #242424; color: #fff; letter-spacing: .03em; }

@media (max-width: 575.98px) {
    .shop-body { padding: .75rem; }
    .shop-title { font-size: .9rem; }
    .shop-desc { -webkit-line-clamp: 2; font-size: .78rem; }
    .shop-btn { height: 40px; font-size: .82rem; }
}


/* ---- card refinements: no title underline, name/price hierarchy, static weight labels ---- */
.shop-title a, .shop-title a:hover, .shop-title a:focus, .shop-card:hover .shop-title a { text-decoration: none; }
.shop-title { font-size: .95rem; font-weight: 500; line-height: 1.35; }
.shop-title a { color: #242424; }
.shop-price { margin-top: .15rem; }
.shop-price strong { font-size: 1.3rem; font-weight: 700; line-height: 1.2; }
.shop-price s { font-size: .85rem; }
.shop-weights { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .2rem; pointer-events: none; user-select: none; }
.shop-weights span { padding: .1rem .5rem; border-radius: 6px; background: #FAF7EF; border: 1px solid #EAE6DA; color: #68655E; font-size: .7rem; font-weight: 500; line-height: 1.5; }
@media (max-width: 575.98px) {
    .shop-title { font-size: .88rem; }
    .shop-price strong { font-size: 1.15rem; }
    .shop-weights span { font-size: .66rem; padding: .08rem .42rem; }
}

/* ===== Product card: homepagedesign reference (white card, square tile, price left / Add right) ===== */
.shop-card { padding: 1rem; background: #FFFFFF; border: 1px solid #EAE6DA; border-radius: 16px; overflow: visible;
    box-shadow: 0 2px 8px -2px rgba(36, 36, 36, .04), 0 4px 16px -4px rgba(104, 101, 94, .06);
    transition: box-shadow .3s ease, transform .2s cubic-bezier(.16, 1, .3, 1); }
.shop-card:hover { transform: translateY(-2px); border-color: #EAE6DA; box-shadow: 0 8px 24px -6px rgba(36, 36, 36, .06), 0 16px 32px -8px rgba(104, 101, 94, .08); }
.shop-media { border: 0; border-radius: 12px; background: #F6F3EB; aspect-ratio: 1 / 1; overflow: hidden; margin-bottom: 1rem; }
.shop-media img { transition: transform .3s ease; }
.shop-card:hover .shop-media img { transform: scale(1.05); }
.shop-badge { top: .75rem; left: .75rem; background: #242424; color: #fff; font-size: .68rem; font-weight: 600; padding: .22rem .6rem; border-radius: 999px; }
.shop-wish { top: .75rem; right: .75rem; }
.shop-wish button { width: 36px; height: 36px; background: rgba(252, 249, 241, .92); box-shadow: 0 1px 3px rgba(36, 36, 36, .12); }

.shop-tags { position: absolute; left: .75rem; bottom: .75rem; right: .75rem; z-index: 2; display: flex; flex-wrap: wrap; gap: .3rem; pointer-events: none; }
.shop-tag { padding: .2rem .65rem; border-radius: 999px; background: rgba(252, 249, 241, .95); border: 0; color: #68655E; font-size: .66rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; line-height: 1.5; }
.shop-tag-type { background: rgba(252, 249, 241, .95); color: #242424; }

.shop-body { padding: 0; gap: 0; display: flex; flex-direction: column; flex: 1; }
.shop-info { flex: 1; }
.shop-title { min-height: 0; margin: 0; font-size: 1rem; font-weight: 600; line-height: 1.35; letter-spacing: -.01em; }
.shop-title a { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; color: #242424; text-decoration: none; transition: color .2s; }
.shop-card:hover .shop-title a { color: #755b00; text-decoration: none; }
.shop-desc { margin: .25rem 0 0; font-size: .82rem; line-height: 1.45; color: #68655E; -webkit-line-clamp: 2; }

.shop-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: .75rem; padding-top: 1rem; margin-top: 1rem; }
.shop-pricebox { min-width: 0; }
.shop-price { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .4rem; }
.shop-price strong { font-size: 1.3rem; font-weight: 700; color: #242424; line-height: 1.2; }
.shop-price s { font-size: .8rem; color: #68655E; }
.shop-weights { margin-top: .25rem; gap: .25rem; }
.shop-add { margin: 0 !important; padding: 0 !important; flex: 0 0 auto; }
.shop-body .shop-btn, .shop-add .shop-btn { width: auto; height: 40px; padding: 0 1rem; margin: 0; border-radius: 8px; background: #F4C430; color: #242424; font-size: .85rem; font-weight: 600; display: inline-flex; align-items: center; gap: .4rem; flex: 0 0 auto; box-shadow: 0 1px 2px rgba(36, 36, 36, .1); transition: background-color .2s; }
.shop-body .shop-btn:hover, .shop-add .shop-btn:hover { background: #E5B522; color: #242424; }
.shop-body > .shop-btn { margin-top: 0; }
.shop-btn-disabled, .shop-btn-disabled:hover { background: #F1EEE6 !important; color: #68655E !important; box-shadow: none !important; }

@media (max-width: 575.98px) {
    .shop-card { padding: .75rem; }
    .shop-media { margin-bottom: .75rem; }
    .shop-title { font-size: .92rem; }
    .shop-price strong { font-size: 1.12rem; }
    .shop-foot { padding-top: .75rem; margin-top: .75rem; }
    .shop-body .shop-btn, .shop-add .shop-btn { height: 38px; padding: 0 .7rem; }
    .shop-tag { font-size: .6rem; padding: .15rem .5rem; }
}


/* package-size radios on the product page */
.pd-variants { display: flex; flex-direction: column; gap: .5rem; }
.pd-variant-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
