/* ==========================================================================
   Blessing Your Scalp — Shop Redesign
   External stylesheet for /shop
   Design tokens: see DESIGN_SYSTEM.md
   ========================================================================== */

/* ─── Design tokens ──────────────────────────────────────────────────────── */
.bys-shop {
    --rose:         #be6d76;
    --rose-deep:    #a85961;
    --rose-rgb:     190, 109, 118;
    --cream:        #fbf4f0;
    --blush:        #f5e6e0;
    --white:        #ffffff;
    --charcoal:     #35312f;
    --espresso:     #302c2a;
    --stone:        #8a8582;
    --divider:      #e3e3e3;
    --shadow-card:  0 5px 20px rgba(0, 0, 0, 0.10);
    --shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.16);
    --shadow-btn:   0 4px 15px rgba(190, 109, 118, 0.32);
    font-family: 'Jost', sans-serif;
    color: var(--charcoal);
    background: var(--white);
}

/* ─── Flash messages ─────────────────────────────────────────────────────── */
.bys-flash {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 24px;
    animation: bys-fade-in 0.25s ease;
}
.bys-flash--success {
    background: rgba(34, 197, 94, 0.08);
    color: #166534;
    border: 1px solid rgba(34, 197, 94, 0.25);
}
.bys-flash--error {
    background: rgba(190, 109, 118, 0.08);
    color: #a85961;
    border: 1px solid rgba(190, 109, 118, 0.25);
}
.bys-flash__close {
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: inherit;
    opacity: 0.6;
    padding: 0 4px;
}
.bys-flash__close:hover { opacity: 1; }

/* ─── Active filter pills ────────────────────────────────────────────────── */
.bys-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    align-items: center;
}
.bys-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px 5px 14px;
    background: var(--blush);
    color: var(--charcoal);
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}
.bys-filter-pill__remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: var(--charcoal);
    font-size: 0.75rem;
    line-height: 1;
    transition: background 0.15s, color 0.15s;
    padding: 0;
}
.bys-filter-pill__remove:hover {
    background: var(--rose);
    color: white;
}
.bys-clear-all {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--rose);
    font-size: 0.8rem;
    font-weight: 600;
    font-family: 'Jost', sans-serif;
    padding: 5px 0;
    text-decoration: underline;
    text-underline-offset: 3px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    align-self: center;
}
.bys-clear-all:hover { color: var(--rose-deep); }

/* ─── Layout shell ───────────────────────────────────────────────────────── */
.bys-shop-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 40px;
    align-items: start;
    padding: 0 0 80px;
}
@media (max-width: 991px) {
    .bys-shop-layout { grid-template-columns: 1fr; }
}

/* ─── Sidebar ────────────────────────────────────────────────────────────── */
.bys-sidebar {
    position: sticky;
    top: 96px;
    background: var(--cream);
    border-radius: 12px;
    padding: 28px 24px;
}
@media (max-width: 991px) {
    .bys-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(340px, 92vw);
        /* Above .footer-mobile (z-index 1000), which otherwise covered the
           sticky "Show N products" button. Still below the cart drawer (1050),
           which is the higher-level overlay. */
        z-index: 1010;
        overflow-y: auto;
        overscroll-behavior: contain;
        transform: translateX(-110%);
        transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
        border-radius: 0 16px 16px 0;
        box-shadow: 4px 0 32px rgba(0, 0, 0, 0.18);
    }
    .bys-sidebar.is-open { transform: translateX(0); }
}

.bys-sidebar__backdrop {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    /* Must also cover the bottom nav so it cannot be tapped behind the sheet. */
    z-index: 1005;
}

@media (prefers-reduced-motion: reduce) {
    .bys-sidebar { transition: none; }
}
@media (max-width: 991px) {
    .bys-sidebar__backdrop.is-open { display: block; }
}

.bys-sidebar__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--divider);
}
.bys-sidebar__title {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--charcoal);
    margin: 0;
}
.bys-sidebar__close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--stone);
    line-height: 1;
    display: none;
    padding: 6px;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
}
@media (max-width: 991px) { .bys-sidebar__close { display: flex; } }
.bys-sidebar__close:hover { color: var(--charcoal); background: var(--blush); }

/* ─── Filter sections ────────────────────────────────────────────────────── */
.bys-filter-section {
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--divider);
}
.bys-filter-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.bys-filter-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: none;
    border: none;
    cursor: pointer;
    width: 100%;
    text-align: left;
    padding: 0 0 14px;
    font-family: 'Jost', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--charcoal);
}
.bys-filter-toggle__icon {
    flex-shrink: 0;
    transition: transform 0.2s ease;
}
.bys-filter-toggle[aria-expanded="false"] .bys-filter-toggle__icon {
    transform: rotate(180deg);
}

.bys-filter-body { overflow: hidden; }

/* ─── Category list ──────────────────────────────────────────────────────── */
.bys-cat-list { list-style: none; padding: 0; margin: 0; }
.bys-cat-list li + li { margin-top: 2px; }

.bys-cat-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    padding: 8px 12px;
    border-radius: 6px;
    font-family: 'Jost', sans-serif;
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--stone);
    transition: background 0.18s ease, color 0.18s ease;
}
.bys-cat-btn:hover {
    background: var(--blush);
    color: var(--charcoal);
}
.bys-cat-btn.is-active {
    background: var(--rose);
    color: white;
    font-weight: 600;
}
.bys-cat-count {
    font-size: 0.75rem;
    opacity: 0.7;
    flex-shrink: 0;
    margin-left: 6px;
}
.bys-cat-btn.is-active .bys-cat-count { opacity: 0.9; }

/* ─── Toggle switch ──────────────────────────────────────────────────────── */
.bys-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
}
.bys-toggle-row + .bys-toggle-row { margin-top: 8px; }

.bys-toggle-label {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--charcoal);
    cursor: pointer;
    user-select: none;
}

.bys-toggle {
    position: relative;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
}
.bys-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}
.bys-toggle__track {
    display: block;
    width: 100%;
    height: 100%;
    background: var(--divider);
    border-radius: 11px;
    cursor: pointer;
    transition: background 0.2s ease;
}
.bys-toggle input:checked ~ .bys-toggle__track {
    background: var(--rose);
}
.bys-toggle__thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s ease;
    pointer-events: none;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}
.bys-toggle input:checked ~ .bys-toggle__thumb {
    transform: translateX(18px);
}

/* ─── Price range (dual handle) ──────────────────────────────────────────────
   Two native range inputs share one track. Both are transparent and sized to
   the full width; only their thumbs are painted, so the pair reads as a single
   control while each input keeps native keyboard support and ARIA.

   `pointer-events` is the trick that makes them coexist: the inputs ignore
   pointer events, and only the thumbs accept them, so a click on the track
   never yanks whichever input happens to be on top.
   -------------------------------------------------------------------------- */
.bys-price {
    --thumb: 22px;
    --track-h: 4px;
}

.bys-price__slider {
    position: relative;
    /* Tall enough that the whole strip is a comfortable drag area, not just
       the 4px track. */
    height: 44px;
    margin: 6px 0 18px;
}

.bys-price__track,
.bys-price__fill {
    position: absolute;
    top: 50%;
    height: var(--track-h);
    border-radius: 999px;
    transform: translateY(-50%);
    pointer-events: none;
}

.bys-price__track {
    left: 0;
    right: 0;
    background: var(--divider);
}

/* A native thumb travels between half-a-thumb inside each end of the track, so
   a plain `left: 40%` would drift away from the handle it is meant to follow.
   The calc maps the percentage onto that shorter travel and re-centres it. */
.bys-price__fill {
    left: calc(var(--min-pct, 0) * (100% - var(--thumb)) / 100 + var(--thumb) / 2);
    right: calc((100 - var(--max-pct, 100)) * (100% - var(--thumb)) / 100 + var(--thumb) / 2);
    background: var(--rose);
}

.bys-price__input {
    -webkit-appearance: none;
    appearance: none;
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: var(--thumb);
    margin: 0;
    transform: translateY(-50%);
    background: none;
    /* Re-enabled on the thumbs below. */
    pointer-events: none;
}

.bys-price__input::-webkit-slider-runnable-track {
    height: var(--thumb);
    background: none;
    border: none;
}

.bys-price__input::-moz-range-track {
    height: var(--thumb);
    background: none;
    border: none;
}

.bys-price__input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: var(--thumb);
    height: var(--thumb);
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--rose);
    box-shadow: 0 2px 8px rgba(var(--rose-rgb), 0.45);
    cursor: grab;
    pointer-events: auto;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.bys-price__input::-moz-range-thumb {
    width: var(--thumb);
    height: var(--thumb);
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--rose);
    box-shadow: 0 2px 8px rgba(var(--rose-rgb), 0.45);
    cursor: grab;
    pointer-events: auto;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.bys-price__input:hover::-webkit-slider-thumb,
.bys-price__input:focus-visible::-webkit-slider-thumb {
    transform: scale(1.12);
    box-shadow: 0 3px 12px rgba(var(--rose-rgb), 0.6);
}

.bys-price__input:hover::-moz-range-thumb,
.bys-price__input:focus-visible::-moz-range-thumb {
    transform: scale(1.12);
    box-shadow: 0 3px 12px rgba(var(--rose-rgb), 0.6);
}

.bys-price__input:active::-webkit-slider-thumb {
    cursor: grabbing;
}

/* The keyboard ring belongs on the thumb, not the invisible full-width input. */
.bys-price__input:focus {
    outline: none;
}

.bys-price__input:focus-visible::-webkit-slider-thumb {
    outline: 2px solid var(--charcoal);
    outline-offset: 2px;
}

.bys-price__input:focus-visible::-moz-range-thumb {
    outline: 2px solid var(--charcoal);
    outline-offset: 2px;
}

/* Numeric fields */
.bys-price__fields {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.bys-price__field {
    flex: 1 1 0;
    min-width: 0;
}

.bys-price__label {
    display: block;
    margin-bottom: 5px;
    color: var(--stone);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.bys-price__input-wrap {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 0 10px;
    border: 1px solid var(--divider);
    border-radius: 8px;
    background: var(--white);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.bys-price__input-wrap:focus-within {
    border-color: var(--rose);
    box-shadow: 0 0 0 3px rgba(var(--rose-rgb), 0.15);
}

.bys-price__currency {
    color: var(--stone);
    font-size: 0.9rem;
    font-weight: 500;
}

.bys-price__number {
    width: 100%;
    min-width: 0;
    /* 44px keeps the field a comfortable tap target. */
    height: 44px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--charcoal);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
}

.bys-price__number:focus {
    outline: none;
}

/* The spinners are useless at this size and steal width. */
.bys-price__number::-webkit-outer-spin-button,
.bys-price__number::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.bys-price__number {
    -moz-appearance: textfield;
    appearance: textfield;
}

.bys-price__dash {
    width: 10px;
    height: 1px;
    margin-bottom: 22px;
    background: var(--divider);
    flex: 0 0 auto;
}

.bys-price__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
}

.bys-price__hint {
    margin: 0;
    color: var(--stone);
    font-size: 0.78rem;
    line-height: 1.4;
}

.bys-price__hint strong {
    color: var(--charcoal);
    font-weight: 600;
}

.bys-price__reset {
    flex: 0 0 auto;
    min-height: 32px;
    padding: 6px 12px;
    border: 1px solid var(--divider);
    border-radius: 999px;
    background: none;
    color: var(--charcoal);
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.bys-price__reset:hover,
.bys-price__reset:focus-visible {
    border-color: var(--rose);
    background: var(--cream);
    color: var(--rose-deep);
}

/* Bigger everything on touch screens, where the sheet has room to spare. */
@media (max-width: 991px) {
    .bys-price {
        --thumb: 28px;
        --track-h: 6px;
    }

    .bys-price__slider {
        height: 52px;
    }

    .bys-price__number {
        height: 48px;
        font-size: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bys-price__input::-webkit-slider-thumb,
    .bys-price__input::-moz-range-thumb {
        transition: none;
    }
}

/* ─── Sidebar search ─────────────────────────────────────────────────────── */
.bys-search-field {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    border: 1.5px solid var(--divider);
    border-radius: 8px;
    padding: 0 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
/* The whole field lights up, matching .bys-price__input-wrap. */
.bys-search-field:focus-within {
    border-color: var(--rose);
    box-shadow: 0 0 0 3px rgba(var(--rose-rgb), 0.15);
}
.bys-search-field svg { color: var(--stone); flex-shrink: 0; }
.bys-search-field input {
    border: none;
    background: none;
    padding: 11px 0;
    font-family: 'Jost', sans-serif;
    font-size: 0.9rem;
    color: var(--charcoal);
    width: 100%;
    outline: none;
}
.bys-search-field input::placeholder { color: var(--stone); }

/* ─── Toolbar ────────────────────────────────────────────────────────────── */
.bys-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}
.bys-toolbar__left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.bys-filter-trigger {
    display: none;
    align-items: center;
    gap: 8px;
    background: none;
    border: 1.5px solid var(--divider);
    border-radius: 8px;
    padding: 9px 16px;
    font-family: 'Jost', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--charcoal);
    transition: border-color 0.2s, color 0.2s;
}
.bys-filter-trigger:hover { border-color: var(--rose); color: var(--rose); }
@media (max-width: 991px) { .bys-filter-trigger { display: flex; } }

.bys-results-count {
    font-size: 0.85rem;
    color: var(--stone);
    font-weight: 500;
    margin: 0;
}
.bys-results-count strong { color: var(--charcoal); }

.bys-toolbar__right { display: flex; align-items: center; gap: 12px; }

.bys-sort-select {
    background-color: var(--cream);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M5.572 7.119C5.805 7.352 6.195 7.352 6.429 7.119L11.823 1.739C12.059 1.502 12.059 1.119 11.823.884 11.587.648 11.203.648 10.967.884L6 5.837 1.034.883C.797.647.414.647.177.883-.059 1.119-.059 1.502.177 1.738L5.572 7.119Z' fill='%238a8582'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    border: 1.5px solid var(--divider);
    border-radius: 8px;
    padding: 9px 36px 9px 14px;
    font-family: 'Jost', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--charcoal);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    transition: border-color 0.2s;
    min-width: 180px;
}
.bys-sort-select:focus { border-color: var(--rose); }

.bys-view-toggles { display: flex; gap: 4px; }

.bys-view-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cream);
    border: 1.5px solid var(--divider);
    border-radius: 6px;
    cursor: pointer;
    color: var(--stone);
    transition: background 0.18s, border-color 0.18s, color 0.18s;
}
.bys-view-btn:hover,
.bys-view-btn.is-active {
    background: var(--charcoal);
    border-color: var(--charcoal);
    color: white;
}

/* ─── Products grid ──────────────────────────────────────────────────────── */
.bys-grid {
    display: grid;
    gap: 28px;
    grid-template-columns: repeat(3, 1fr);
}
.bys-grid.is-list { grid-template-columns: 1fr; }

@media (max-width: 1200px) {
    .bys-grid:not(.is-list) { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .bys-grid:not(.is-list) { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}
/* Was 380px, which pushed 375px — one of the most common phone widths — down
   to a single column and left half the screen empty. 360px and up now keep two
   columns; below that the cards get too narrow for the price and button to sit
   comfortably. Applies to the shop grid and the search results alike. */
@media (max-width: 359px) {
    .bys-grid:not(.is-list) { grid-template-columns: 1fr; }
}

/* ─── Product card ───────────────────────────────────────────────────────── */
.bys-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}
.bys-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

/* List layout overrides */
.bys-grid.is-list .bys-card {
    flex-direction: row;
    transform: none !important;
}
.bys-grid.is-list .bys-card:hover { box-shadow: var(--shadow-hover); }
.bys-grid.is-list .bys-card__img-wrap {
    width: 220px;
    flex-shrink: 0;
}
@media (max-width: 640px) {
    .bys-grid.is-list .bys-card { flex-direction: column; }
    .bys-grid.is-list .bys-card__img-wrap { width: 100%; }
}

/* Image wrapper */
.bys-card__img-wrap {
    position: relative;
    overflow: hidden;
    background: var(--cream);
    aspect-ratio: 4 / 5;
}
.bys-grid.is-list .bys-card__img-wrap { aspect-ratio: 3 / 4; }

.bys-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}
.bys-card:hover .bys-card__img { transform: scale(1.05); }

.bys-card__img-alt {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.4s ease;
}
.bys-card:hover .bys-card__img-alt { opacity: 1; }

/* Badges */
.bys-card__badges {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 2;
}
.bys-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.bys-badge--new { background: var(--charcoal); color: white; }
.bys-badge--sale { background: var(--rose); color: white; }

/* Quick action overlay (grid hover) */
.bys-card__actions {
    position: absolute;
    bottom: 12px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
    transform: translateY(16px);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
    z-index: 3;
}
.bys-card:hover .bys-card__actions {
    transform: translateY(0);
    opacity: 1;
}

.bys-card__atc {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--charcoal);
    color: white;
    border: none;
    border-radius: 30px;
    font-family: 'Jost', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s ease;
    white-space: nowrap;
}
.bys-card__atc:hover { background: var(--rose); }
.bys-card__atc:disabled { opacity: 0.6; cursor: not-allowed; }

.bys-card__quick {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: var(--charcoal);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    transition: background 0.2s ease, color 0.2s ease;
    text-decoration: none;
    flex-shrink: 0;
}
.bys-card__quick:hover { background: var(--rose); color: white; }

/* Card info */
.bys-card__info {
    padding: 16px 18px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.bys-grid.is-list .bys-card__info { padding: 20px 24px; }

.bys-card__category {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--rose);
    margin: 0 0 6px;
}
.bys-card__name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--charcoal);
    margin: 0 0 10px;
    line-height: 1.35;
}
.bys-grid.is-list .bys-card__name { font-size: 1.1rem; }
.bys-card__name a {
    color: inherit;
    text-decoration: none;
    transition: color 0.18s;
}
.bys-card__name a:hover { color: var(--rose); }

.bys-card__desc {
    display: none;
    font-size: 0.88rem;
    color: var(--stone);
    line-height: 1.65;
    margin-bottom: 16px;
    max-width: 55ch;
}
.bys-grid.is-list .bys-card__desc { display: block; }

.bys-card__price {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-top: auto;
}
.bys-card__price-current {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--charcoal);
}
.bys-card__price-old {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--stone);
    text-decoration: line-through;
}
.bys-card__price-sale {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--rose);
}

/* Color swatches */
.bys-card__swatches {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    flex-wrap: wrap;
    align-items: center;
}
.bys-swatch {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.08);
    display: block;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease;
    text-decoration: none;
    flex-shrink: 0;
}
.bys-swatch:hover { transform: scale(1.25); border-color: var(--charcoal); }
.bys-swatch-more {
    font-size: 0.72rem;
    color: var(--stone);
    align-self: center;
    text-decoration: none;
    font-weight: 600;
}

/* List mode ATC (always visible) */
.bys-card__list-atc {
    display: none;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    padding: 11px 24px;
    background: var(--rose);
    color: white;
    border: none;
    border-radius: 30px;
    font-family: 'Jost', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: var(--shadow-btn);
    transition: background 0.2s;
    width: fit-content;
}
.bys-card__list-atc:hover { background: var(--rose-deep); }
.bys-card__list-atc:disabled { opacity: 0.6; cursor: not-allowed; }
.bys-grid.is-list .bys-card__list-atc { display: inline-flex; }
.bys-grid.is-list .bys-card__actions { display: none; }

/* ─── Empty state ────────────────────────────────────────────────────────── */
.bys-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
}
.bys-empty__icon {
    width: 64px;
    height: 64px;
    background: var(--blush);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--rose);
}
.bys-empty__title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--charcoal);
    margin: 0 0 10px;
}
.bys-empty__text {
    font-size: 0.95rem;
    color: var(--stone);
    margin: 0 0 24px;
}
.bys-empty__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: var(--rose);
    color: white;
    border: none;
    border-radius: 30px;
    font-family: 'Jost', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: var(--shadow-btn);
    transition: background 0.2s;
}
.bys-empty__btn:hover { background: var(--rose-deep); }

/* ─── Pagination ─────────────────────────────────────────────────────────── */
.bys-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 48px;
}
.bys-page-btn {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cream);
    border: 1.5px solid var(--divider);
    border-radius: 8px;
    font-family: 'Jost', sans-serif;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--charcoal);
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
    text-decoration: none;
    padding: 0 10px;
}
.bys-page-btn:hover { background: var(--blush); border-color: var(--rose); color: var(--rose); }
.bys-page-btn.is-active { background: var(--rose); border-color: var(--rose); color: white; font-weight: 700; }
.bys-page-btn.is-disabled { opacity: 0.35; cursor: not-allowed; pointer-events: none; }

.bys-page-ellipsis {
    color: var(--stone);
    font-size: 0.88rem;
    padding: 0 4px;
    user-select: none;
}

/* ─── Spinner ────────────────────────────────────────────────────────────── */
.bys-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: white;
    border-radius: 50%;
    animation: bys-spin 0.6s linear infinite;
    display: inline-block;
    vertical-align: middle;
}

/* ─── Keyframes ──────────────────────────────────────────────────────────── */
@keyframes bys-fade-in {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes bys-spin {
    to { transform: rotate(360deg); }
}

/* ─── Focus accessibility ────────────────────────────────────────────────── */
.bys-shop *:focus-visible {
    outline: 2px solid var(--rose);
    outline-offset: 2px;
}

/* Opt-outs for inputs that sit inside a bordered wrapper.
   The blanket rule above (specificity 0,2,0) beat their own `outline: none`
   and drew a square ring around the borderless inner <input>, which spilled
   outside the wrapper's rounded corners. These selectors are 0,3,1 so they
   win, and the focus indicator moves to the wrapper via :focus-within below —
   the control is still clearly focused, just drawn on the right box. */
.bys-shop .bys-search-field input:focus-visible,
.bys-shop .bys-price__number:focus-visible {
    outline: none;
}

/* ─── Shop hero ──────────────────────────────────────────────────────────── */
.bys-shop-hero {
    position: relative;
    overflow: hidden;
    background: #fbf4f0;
    min-height: 320px;
    display: flex;
    align-items: center;
}
@media (min-width: 768px) { .bys-shop-hero { min-height: 400px; } }

.bys-shop-hero__bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
    opacity: 0.32;
}
.bys-shop-hero__overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(251, 244, 240, 0.96) 0%,
        rgba(245, 230, 224, 0.80) 50%,
        rgba(190, 109, 118, 0.15) 100%
    );
}
.bys-shop-hero__content {
    position: relative;
    width: 100%;
    padding: 60px 0;
    text-align: center;
}
@media (min-width: 768px) { .bys-shop-hero__content { padding: 80px 0; } }

.bys-shop-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: 'Jost', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #be6d76;
    margin-bottom: 16px;
}
.bys-shop-hero__eyebrow::before,
.bys-shop-hero__eyebrow::after {
    content: '';
    display: block;
    width: 28px;
    height: 1px;
    background: #be6d76;
    opacity: 0.6;
}

.bys-shop-hero__title {
    font-family: 'Jost', sans-serif;
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 400;
    color: #35312f;
    letter-spacing: -0.01em;
    line-height: 1.15;
    margin: 0 0 14px;
}
.bys-shop-hero__title em {
    font-family: 'Parisienne', cursive;
    font-style: normal;
    color: #be6d76;
    font-size: 1.15em;
}

.bys-shop-hero__sub {
    font-family: 'Jost', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    color: #8a8582;
    max-width: 46ch;
    margin: 0 auto 28px;
    line-height: 1.7;
}

.bys-shop-hero__breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Jost', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    color: #8a8582;
}
.bys-shop-hero__breadcrumb a { color: #35312f; text-decoration: none; transition: color 0.18s; }
.bys-shop-hero__breadcrumb a:hover { color: #be6d76; }
.bys-shop-hero__breadcrumb span { color: #be6d76; }

/* ─── Trust strip ────────────────────────────────────────────────────────── */
.bys-trust-strip {
    background: #35312f;
    padding: 14px 0;
}
.bys-trust-strip__inner {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex-wrap: nowrap;
}
.bys-trust-strip__inner::-webkit-scrollbar { display: none; }

.bys-trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 28px;
    white-space: nowrap;
    flex-shrink: 0;
}
.bys-trust-item + .bys-trust-item { border-left: 1px solid rgba(255, 255, 255, 0.12); }
.bys-trust-item svg { color: #be6d76; flex-shrink: 0; }
.bys-trust-item__text {
    font-family: 'Jost', sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
@media (max-width: 640px) {
    .bys-trust-item { padding: 0 18px; }
    .bys-trust-item__text { font-size: 0.7rem; }
}

/* ─── Shop section spacing ───────────────────────────────────────────────── */
.bys-shop-section {
    padding-top: 48px;
}
@media (min-width: 992px) { .bys-shop-section { padding-top: 64px; } }

/* ─── Filter sheet footer ────────────────────────────────────────────────────
   Sticky on mobile so "Show N products" is always reachable without scrolling
   back up, and doubles as the deliberate close action for the sheet.
   -------------------------------------------------------------------------- */
.bys-sidebar__foot {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--divider);
}

.bys-sidebar__reset {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex: 0 0 auto;
    min-height: 44px;
    padding: 10px 16px;
    border: 1px solid var(--divider);
    border-radius: 999px;
    background: none;
    color: var(--charcoal);
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.bys-sidebar__reset:hover,
.bys-sidebar__reset:focus-visible {
    border-color: var(--rose);
    background: var(--cream);
    color: var(--rose-deep);
}

/* Desktop keeps a live sidebar, so an explicit "apply" would be a lie —
   the count is shown in the toolbar instead. */
.bys-sidebar__apply {
    display: none;
}

@media (max-width: 991px) {
    .bys-sidebar__foot {
        position: sticky;
        bottom: 0;
        margin: 20px -20px 0;
        padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
        background: var(--cream);
        box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.08);
    }

    .bys-sidebar__apply {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 1 1 auto;
        min-width: 0;
        min-height: 48px;
        padding: 12px 16px;
        border: 0;
        border-radius: 999px;
        background: var(--rose);
        box-shadow: var(--shadow-btn);
        color: #fff;
        font-family: inherit;
        font-size: 0.78rem;
        font-weight: 600;
        letter-spacing: 0.03em;
        text-transform: uppercase;
        /* Two lines of "Show N products" made the sticky bar jump in height. */
        white-space: nowrap;
        cursor: pointer;
        transition: background-color 0.25s ease;
    }

    .bys-sidebar__apply:hover:not(:disabled),
    .bys-sidebar__apply:focus-visible {
        background: var(--charcoal);
    }

    .bys-sidebar__apply:disabled {
        opacity: 0.7;
        cursor: wait;
    }
}

/* ─── Active-filter badge on the mobile trigger ──────────────────────────── */
.bys-filter-trigger__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 19px;
    height: 19px;
    margin-left: 2px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--rose);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
}

/* ─── Grid loading state ─────────────────────────────────────────────────────
   Replaces a `wire:loading.class="opacity-50"` that pointed at a class the
   shop stylesheet never defined, so refiltering gave no feedback whatsoever.
   The grid keeps its height while loading, so nothing shifts underneath.
   -------------------------------------------------------------------------- */
.bys-grid-wrap {
    position: relative;
}

.bys-grid.is-loading {
    opacity: 0.4;
    /* Stops a second click landing on a card that is about to be replaced. */
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.bys-grid-loader {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 2;
    align-items: flex-start;
    justify-content: center;
    /* Sits just below the sticky header rather than in the middle of a very
       tall grid, where it would be scrolled out of sight. */
    padding-top: 80px;
    pointer-events: none;
}

.bys-spinner--lg {
    width: 34px;
    height: 34px;
    border-width: 3px;
    border-color: rgba(var(--rose-rgb), 0.25);
    border-top-color: var(--rose);
}

@media (prefers-reduced-motion: reduce) {
    .bys-spinner,
    .bys-spinner--lg {
        animation-duration: 1.6s;
    }

    .bys-grid.is-loading {
        transition: none;
    }
}
