/* ==========================================================================
   Shop / catalogue — mobile first
   Brand tokens come from style.css (--qu-*).
   ========================================================================== */

:root {
    --sh-primary: var(--qu-primary, #1E3A8A);
    --sh-primary-deep: #16295E;
    --sh-accent: var(--qu-accent, #3B82F6);
    --sh-tint: var(--qu-badge-bg, #EFF6FF);
    --sh-ink: var(--qu-text-dark, #111827);
    --sh-muted: var(--qu-text-muted, #6B7280);
    --sh-border: var(--qu-border-color, #E5E7EB);
    --sh-radius: var(--qu-radius, 20px);
    --sh-radius-sm: var(--qu-radius-sm, 12px);
    --sh-success: #059669;
    --sh-danger: #DC2626;
}

.shop-page { overflow-x: clip; }

/* ==========================================================================
   Hero — self-contained, does not depend on the shared .geo-page-header
   class (that class is defined twice in style.css with colliding rules).
   ========================================================================== */
/* Same background photo used on every other page header (about, checkout,
   my-orders…), just with its own overlay/eyebrow treatment on top. */
.shop-hero {
    position: relative;
    overflow: hidden;
    padding: 3rem 0;
    min-height: clamp(13rem, 26vw, 22rem);
    display: flex;
    align-items: center;
    background-image: url('/assets/images/slide11.png');
    background-color: var(--sh-primary-deep);
    background-size: cover;
    background-position: center right;
    background-repeat: no-repeat;
    color: #fff;
}
.shop-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(640px 260px at 8% -30%, rgba(59, 130, 246, .35), transparent 62%),
        linear-gradient(155deg, rgba(22, 41, 94, .90) 0%, rgba(30, 58, 138, .82) 55%, rgba(16, 26, 54, .92) 100%);
}
.shop-hero-glow {
    position: absolute;
    inset: 0;
    z-index: 1;
    background-image:
        radial-gradient(circle, rgba(255, 255, 255, .5) 1px, transparent 1.5px);
    background-size: 26px 26px;
    opacity: .08;
    pointer-events: none;
}
.shop-hero-inner { position: relative; z-index: 2; }

.shop-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .35rem .75rem;
    margin-bottom: .9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .2);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .02em;
    color: #fff;
}
.shop-hero-eyebrow i { color: #93C5FD; }

.shop-hero-title {
    font-family: var(--font-display, 'Outfit', sans-serif);
    font-size: clamp(1.7rem, 5vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.15;
    margin: 0 0 .5rem;
    color: #fff;
}
.shop-hero-sub {
    margin: 0 0 1.1rem;
    max-width: 48ch;
    font-size: .92rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, .72);
}

.shop-hero-crumbs {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .78rem;
    color: rgba(255, 255, 255, .5);
}
.shop-hero-crumbs a { color: rgba(255, 255, 255, .78); text-decoration: none; }
.shop-hero-crumbs a:hover { color: #fff; text-decoration: underline; }
.shop-hero-crumbs .is-current { color: #93C5FD; font-weight: 700; }

/* ==========================================================================
   Filters
   ========================================================================== */
.shop-filter-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
    width: 100%;
    min-height: 48px;
    padding: .7rem .95rem;
    margin-bottom: .25rem;
    border: 1.5px solid var(--sh-border);
    border-radius: var(--sh-radius-sm);
    background: #fff;
    color: var(--sh-ink);
    font-size: .9rem;
    font-weight: 700;
    cursor: pointer;
}
.shop-filter-toggle i { color: var(--sh-primary); margin-right: .35rem; }
.shop-filter-toggle:hover { border-color: var(--sh-accent); }
.shop-filter-count {
    min-width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 .4rem;
    border-radius: 999px;
    background: var(--sh-primary);
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
}

.shop-filters .offcanvas-header { border-bottom: 1px solid var(--sh-border); }
.shop-filters .offcanvas-body { padding: 0; }

.shop-filters-inner { padding: 1.1rem; }

/* Header strip echoes the hero gradient for brand cohesion, and bleeds to
   the panel edges via negative margin so it reads as a card header. */
.shop-filters-head {
    align-items: center;
    gap: .75rem;
    margin: -1.1rem -1.1rem 1.2rem;
    padding: 1.1rem;
    background:
        radial-gradient(220px 90px at 100% -30%, rgba(59, 130, 246, .4), transparent 65%),
        linear-gradient(135deg, var(--sh-primary) 0%, var(--sh-primary-deep) 100%);
}
.shop-filters-head-icon {
    flex: none;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .24);
    color: #fff;
    font-size: 1.05rem;
}
.shop-filters-head h5 {
    margin: 0;
    font-size: .95rem;
    font-weight: 800;
    color: #fff;
}
.shop-filters-head small {
    font-size: .72rem;
    color: rgba(255, 255, 255, .68);
}

.shop-filter-group {
    padding-bottom: 1.1rem;
    margin-bottom: 1.1rem;
    border-bottom: 1px dashed var(--sh-border);
}
.shop-filter-group:last-of-type { border-bottom: none; margin-bottom: .3rem; padding-bottom: 0; }
.shop-filter-group > label {
    display: flex;
    align-items: center;
    gap: .4rem;
    margin-bottom: .5rem;
    font-size: .76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--sh-muted);
}
.shop-filter-group > label i { color: var(--sh-primary); font-size: .9rem; }
.shop-req {
    text-transform: none;
    letter-spacing: 0;
    font-size: .66rem;
    font-weight: 700;
    color: var(--sh-primary);
    background: var(--sh-tint);
    border-radius: 999px;
    padding: .1rem .4rem;
}
.shop-filter-hint {
    display: block;
    margin-top: .3rem;
    font-size: .72rem;
    color: #9CA3AF;
}

.shop-search-field { position: relative; }
.shop-search-field i {
    position: absolute;
    left: .8rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9CA3AF;
    font-size: .95rem;
    pointer-events: none;
}
.shop-search-field .form-control {
    padding-left: 2.3rem;
    min-height: 46px;
    border-radius: 10px;
    border: 1.5px solid var(--sh-border);
    font-size: 16px; /* stops iOS Safari zooming on focus */
}
.shop-search-field .form-control:focus {
    border-color: var(--sh-accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .14);
}

/* Scoped select2 overrides — the global rules in style.css use !important,
   so matching specificity here needs the same. */
.shop-filters .select2-container--default .select2-selection--single {
    border: 1.5px solid var(--sh-border) !important;
    border-radius: 10px !important;
    transition: border-color .16s ease, box-shadow .16s ease;
}
.shop-filters .select2-container--default .select2-selection--single .select2-selection__rendered {
    border: none !important;
    font-size: .85rem !important;
    font-weight: 600 !important;
}
.shop-filters .select2-container--open .select2-selection--single {
    border-color: var(--sh-accent) !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .14);
}

.shop-filter-reset {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--sh-border);
    border-radius: 10px;
    background: #F9FAFB;
    color: var(--sh-muted);
    font-size: .83rem;
    font-weight: 600;
    text-decoration: none;
}
.shop-filter-reset:hover {
    background: var(--sh-tint);
    border-color: var(--sh-accent);
    color: var(--sh-primary);
}

/* ==========================================================================
   Results bar
   ========================================================================== */
.shop-resultbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .75rem;
    padding: .8rem .95rem;
    margin-bottom: 1rem;
    background: #fff;
    border: 1px solid var(--sh-border);
    border-radius: var(--sh-radius-sm);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .03);
}
.shop-resultbar-count {
    margin: 0;
    font-size: .85rem;
    color: var(--sh-muted);
}
.shop-resultbar-count strong {
    color: var(--sh-ink);
    font-size: 1.05rem;
    font-weight: 800;
    margin-right: .2rem;
}

.shop-sort {
    display: flex;
    align-items: center;
    gap: .5rem;
}
.shop-sort label {
    margin: 0;
    font-size: .76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--sh-muted);
    white-space: nowrap;
}
.shop-sort .form-select {
    min-height: 40px;
    width: auto;
    min-width: 168px;
    border-radius: 9px;
    border: 1.5px solid var(--sh-border);
    font-size: .84rem;
    font-weight: 600;
    color: var(--sh-ink);
    cursor: pointer;
}
.shop-sort .form-select:focus {
    border-color: var(--sh-accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .14);
}

/* ==========================================================================
   Grid + loader
   ========================================================================== */
.shop-grid-wrap { position: relative; min-height: 200px; }
.shop-loader {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .72);
    backdrop-filter: blur(2px);
    border-radius: var(--sh-radius-sm);
}
.shop-loader .spinner-border { color: var(--sh-primary); }

/* ==========================================================================
   Product card
   ========================================================================== */
.shop-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border: 1px solid var(--sh-border);
    border-radius: var(--sh-radius-sm);
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
    animation: shop-card-in .38s cubic-bezier(.22, .8, .32, 1) both;
}
/* Stagger the first row or two so cards don't all pop in at once. */
.col-6:nth-child(1) .shop-card, .col-md-4:nth-child(1) .shop-card, .col-xl-3:nth-child(1) .shop-card { animation-delay: 0ms; }
.col-6:nth-child(2) .shop-card, .col-md-4:nth-child(2) .shop-card, .col-xl-3:nth-child(2) .shop-card { animation-delay: 40ms; }
.col-6:nth-child(3) .shop-card, .col-md-4:nth-child(3) .shop-card, .col-xl-3:nth-child(3) .shop-card { animation-delay: 80ms; }
.col-6:nth-child(4) .shop-card, .col-md-4:nth-child(4) .shop-card, .col-xl-3:nth-child(4) .shop-card { animation-delay: 120ms; }
.col-6:nth-child(5) .shop-card, .col-md-4:nth-child(5) .shop-card, .col-xl-3:nth-child(5) .shop-card { animation-delay: 160ms; }
.col-6:nth-child(6) .shop-card, .col-md-4:nth-child(6) .shop-card, .col-xl-3:nth-child(6) .shop-card { animation-delay: 200ms; }
.col-6:nth-child(7) .shop-card, .col-md-4:nth-child(7) .shop-card, .col-xl-3:nth-child(7) .shop-card { animation-delay: 240ms; }
.col-6:nth-child(8) .shop-card, .col-md-4:nth-child(8) .shop-card, .col-xl-3:nth-child(8) .shop-card { animation-delay: 280ms; }

@keyframes shop-card-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
.shop-card:hover {
    border-color: transparent;
    box-shadow: 0 16px 34px -8px rgba(15, 23, 42, .18), 0 0 0 1px var(--sh-accent) inset;
    transform: translateY(-3px);
}

/* Media */
.shop-card-media {
    position: relative;
    aspect-ratio: 1 / 1;
    background: linear-gradient(155deg, #F3F6FB 0%, #E9EEF6 100%);
    overflow: hidden;
    cursor: pointer;
}
.shop-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}
.shop-card:hover .shop-card-img { transform: scale(1.06); }

/* A missing product photo falls back to the generic placeholder — shown
   contained and muted so it reads as "no photo yet", not as a broken page. */
.shop-card-img.is-fallback {
    object-fit: contain;
    padding: 18%;
    opacity: .38;
    filter: grayscale(.4);
    transition: none;
}
.shop-card:hover .shop-card-img.is-fallback { transform: none; }

.shop-card-tags {
    position: absolute;
    top: .5rem;
    left: .5rem;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .3rem;
}
.shop-tag {
    font-size: .64rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
    border-radius: 6px;
    padding: .22rem .45rem;
    line-height: 1.2;
    box-shadow: 0 2px 6px rgba(15, 23, 42, .14);
}
.shop-tag.is-official {
    background: linear-gradient(135deg, var(--sh-primary), var(--sh-primary-deep));
    color: #fff;
}
.shop-tag.is-save {
    background: linear-gradient(135deg, #10B981, var(--sh-success));
    color: #fff;
}

.shop-card-wish {
    position: absolute;
    top: .5rem;
    right: .5rem;
    z-index: 3;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, .94);
    color: var(--sh-muted);
    box-shadow: 0 2px 6px rgba(15, 23, 42, .16);
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: color .16s ease, background-color .16s ease, transform .16s ease;
}
.shop-card-wish:hover { color: var(--sh-danger); background: #fff; transform: scale(1.08); }
.shop-card-wish:active { transform: scale(.94); }
.shop-card-wish.is-active,
.shop-card-wish.active { color: var(--sh-danger); }
.shop-card-wish.is-active .wishlist-heart-svg,
.shop-card-wish.active .wishlist-heart-svg { fill: var(--sh-danger); }

.shop-card-quick {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding: .55rem;
    text-align: center;
    font-size: .78rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0), rgba(15, 23, 42, .82));
    opacity: 0;
    transform: translateY(100%);
    transition: opacity .2s ease, transform .2s ease;
}
.shop-card:hover .shop-card-quick,
.shop-card-media:focus-visible .shop-card-quick {
    opacity: 1;
    transform: translateY(0);
}

.shop-card-veil {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .72);
}
.shop-card-veil span {
    font-size: .74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--sh-danger);
    background: #fff;
    border: 1px solid #FECACA;
    border-radius: 999px;
    padding: .3rem .7rem;
}

/* Body */
.shop-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: .7rem .75rem .8rem;
}
.shop-card-cat {
    display: block;
    font-size: .66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--sh-primary);
    margin-bottom: .25rem;
}
.shop-card-title {
    margin: 0 0 .35rem;
    font-size: .85rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--sh-ink);
    cursor: pointer;
    /* Keep every card the same height regardless of title length. */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.shop-card-title:hover { color: var(--sh-primary); }

.shop-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem .6rem;
    margin-bottom: .6rem;
    font-size: .7rem;
    color: var(--sh-muted);
}
.shop-card-meta i { font-size: .8rem; vertical-align: -1px; }
.shop-card-meta .is-low { color: #B45309; font-weight: 600; }

.shop-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    margin-top: auto;
    padding-top: .6rem;
    border-top: 1px dashed var(--sh-border);
}
.shop-card-price {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}
.shop-card-price .now {
    font-size: 1.02rem;
    font-weight: 800;
    color: var(--sh-ink);
}
.shop-card-price .was {
    font-size: .72rem;
    color: #9CA3AF;
    text-decoration: line-through;
}

.shop-card-cta {
    flex: none;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--sh-primary), var(--sh-primary-deep));
    color: #fff;
    font-size: 1.05rem;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(30, 58, 138, .22);
    transition: box-shadow .16s ease, transform .12s ease;
}
.shop-card-cta:hover:not(:disabled) {
    box-shadow: 0 6px 16px rgba(30, 58, 138, .32);
    transform: translateY(-1px);
}
.shop-card-cta:active:not(:disabled) { transform: scale(.94); }
.shop-card-cta:disabled { background: #CBD5E1; box-shadow: none; cursor: not-allowed; }

/* ==========================================================================
   Empty state + pagination
   ========================================================================== */
.shop-empty {
    text-align: center;
    padding: 2.5rem 1.25rem;
    background: #fff;
    border: 1px dashed var(--sh-border);
    border-radius: var(--sh-radius);
}
.shop-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    margin-bottom: .85rem;
    border-radius: 50%;
    background: var(--sh-tint);
    color: var(--sh-primary);
    font-size: 1.6rem;
}
.shop-empty h4 {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--sh-ink);
    margin-bottom: .35rem;
}
.shop-empty p {
    margin: 0 auto;
    max-width: 42ch;
    font-size: .85rem;
    color: var(--sh-muted);
}

.shop-pagination {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
}
.shop-pagination .pagination { margin: 0; flex-wrap: wrap; gap: .25rem; }
.shop-pagination .page-link {
    border-radius: 9px;
    border: 1px solid var(--sh-border);
    color: var(--sh-ink);
    font-size: .85rem;
    font-weight: 600;
    min-width: 38px;
    text-align: center;
}
.shop-pagination .page-item.active .page-link {
    background: var(--sh-primary);
    border-color: var(--sh-primary);
    color: #fff;
}
.shop-pagination .page-item.disabled .page-link { color: #CBD5E1; }

/* ==========================================================================
   Quick view modal (swiper)
   ========================================================================== */
.quick-view-swiper {
    width: 100%;
    height: 100%;
    aspect-ratio: 1/1;
}
.quick-view-swiper .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
}
.quick-view-swiper .swiper-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.quick-view-swiper .swiper-button-next,
.quick-view-swiper .swiper-button-prev { color: var(--sh-primary); }
.quick-view-swiper .swiper-pagination-bullet-active { background: var(--sh-primary); }

/* ==========================================================================
   >= 576px
   ========================================================================== */
@media (min-width: 576px) {
    .shop-card-body { padding: .85rem .9rem .95rem; }
    .shop-card-title { font-size: .9rem; }
    .shop-card-price .now { font-size: 1.05rem; }
    .shop-card-cta { width: 40px; height: 40px; }
}

/* ==========================================================================
   >= 992px — sidebar renders inline
   ========================================================================== */
@media (min-width: 992px) {
    .shop-filters {
        position: sticky;
        top: 96px;
        background: #fff;
        border: 1px solid var(--sh-border);
        border-radius: var(--sh-radius);
        overflow: hidden;
    }
    .shop-filters-inner { padding: 1.15rem; }
    .shop-card-title { min-height: 2.4em; }
}

@media (prefers-reduced-motion: reduce) {
    .shop-card,
    .shop-card-img,
    .shop-card-quick,
    .shop-card-cta,
    .shop-card-wish { transition: none !important; animation: none !important; }
    .shop-card:hover .shop-card-img { transform: none; }
}
