/*
 * HomaFood AJAX Filter — Stylesheet
 * Brand palette: Deep Red #c0392b · Gold #c9a84c · Cream #fdf6ec · Dark #1a1a1a
 * All selectors are scoped to .homa-filter-wrapper to prevent theme conflicts.
 */

/* ─────────────────────────────────────────────────────────────────────────────
   CSS CUSTOM PROPERTIES  (scoped — no global leakage)
───────────────────────────────────────────────────────────────────────────── */
.homa-filter-wrapper {
    --hf-red:         #c0392b;
    --hf-red-dark:    #962d22;
    --hf-red-light:   #e74c3c;
    --hf-gold:        #c9a84c;
    --hf-gold-light:  #e4c474;
    --hf-gold-pale:   #f5e9c8;
    --hf-cream:       #fdf6ec;
    --hf-cream-dark:  #f0e6d3;
    --hf-dark:        #1a1a1a;
    --hf-dark-mid:    #2c2c2c;
    --hf-dark-soft:   #444444;
    --hf-muted:       #888888;
    --hf-border:      #e8ddd0;
    --hf-white:       #ffffff;
    --hf-shadow-sm:   0 2px 8px rgba(26,26,26,.07);
    --hf-shadow-md:   0 4px 18px rgba(26,26,26,.11);
    --hf-shadow-lg:   0 8px 32px rgba(26,26,26,.15);
    --hf-radius-sm:   6px;
    --hf-radius-md:   12px;
    --hf-radius-lg:   18px;
    --hf-font:        inherit;
    --hf-transition:  .22s cubic-bezier(.4,0,.2,1);
    --hf-grid-cols:   3;

    font-family:      var(--hf-font);
    color:            var(--hf-dark);
    width:            100%;
    margin:           0 auto;
    box-sizing:       border-box;
}
.homa-filter-wrapper *, .homa-filter-wrapper *::before, .homa-filter-wrapper *::after {
    box-sizing: border-box;
}


/* ─────────────────────────────────────────────────────────────────────────────
   TOP BAR
───────────────────────────────────────────────────────────────────────────── */
.homa-filter-wrapper .homa-top-bar {
    display:         flex;
    align-items:     center;
    gap:             14px;
    margin-bottom:   20px;
    flex-wrap:       wrap;
}

/* Search box */
.homa-filter-wrapper .homa-search-box {
    flex:            1 1 260px;
    position:        relative;
    display:         flex;
    align-items:     center;
}
.homa-filter-wrapper .homa-search-icon {
    position:        absolute;
    left:            14px;
    color:           var(--hf-muted);
    display:         flex;
    pointer-events:  none;
    transition:      color var(--hf-transition);
}
.homa-filter-wrapper .homa-search-input {
    width:           100%;
    padding:         10px 40px 10px 42px;
    border:          1.5px solid var(--hf-border);
    border-radius:   var(--hf-radius-md);
    background:      var(--hf-white);
    font-size:       .9rem;
    color:           var(--hf-dark);
    outline:         none;
    transition:      border-color var(--hf-transition), box-shadow var(--hf-transition);
    -webkit-appearance: none;
}
.homa-filter-wrapper .homa-search-input:focus {
    border-color:    var(--hf-red);
    box-shadow:      0 0 0 3px rgba(192,57,43,.12);
}
.homa-filter-wrapper .homa-search-input:focus + .homa-search-icon,
.homa-filter-wrapper .homa-search-input:focus ~ .homa-search-icon {
    color:           var(--hf-red);
}
.homa-filter-wrapper .homa-search-input::placeholder { color: var(--hf-muted); }
.homa-filter-wrapper .homa-search-clear {
    position:        absolute;
    right:           12px;
    background:      none;
    border:          none;
    cursor:          pointer;
    color:           var(--hf-muted);
    padding:         4px;
    border-radius:   50%;
    display:         flex;
    align-items:     center;
    justify-content: center;
    transition:      color var(--hf-transition), background var(--hf-transition);
    line-height:     1;
}
.homa-filter-wrapper .homa-search-clear:hover { color: var(--hf-red); background: rgba(192,57,43,.08); }

/* Sort box */
.homa-filter-wrapper .homa-sort-box {
    flex:            0 0 auto;
    display:         flex;
    align-items:     center;
    gap:             8px;
    background:      var(--hf-white);
    border:          1.5px solid var(--hf-border);
    border-radius:   var(--hf-radius-md);
    padding:         9px 14px;
    position:        relative;
    transition:      border-color var(--hf-transition);
}
.homa-filter-wrapper .homa-sort-box:focus-within { border-color: var(--hf-red); }
.homa-filter-wrapper .homa-sort-label {
    font-size:       .8rem;
    font-weight:     600;
    color:           var(--hf-muted);
    white-space:     nowrap;
    display:         flex;
    align-items:     center;
    gap:             5px;
    pointer-events:  none;
}
.homa-filter-wrapper .homa-sort-select {
    border:          none;
    background:      transparent;
    font-size:       .88rem;
    font-weight:     600;
    color:           var(--hf-dark);
    cursor:          pointer;
    outline:         none;
    -webkit-appearance: none;
    padding-right:   20px;
}
.homa-filter-wrapper .homa-sort-arrow {
    position:        absolute;
    right:           12px;
    color:           var(--hf-muted);
    pointer-events:  none;
    display:         flex;
}


/* ─────────────────────────────────────────────────────────────────────────────
   FILTER PANEL
───────────────────────────────────────────────────────────────────────────── */
.homa-filter-wrapper .homa-filter-panel {
    background:      var(--hf-cream);
    border:          1.5px solid var(--hf-border);
    border-radius:   var(--hf-radius-lg);
    padding:         22px 26px 18px;
    margin-bottom:   26px;
    box-shadow:      var(--hf-shadow-sm);
}

.homa-filter-wrapper .homa-filter-section-title {
    font-size:       .72rem;
    font-weight:     700;
    letter-spacing:  .08em;
    text-transform:  uppercase;
    color:           var(--hf-muted);
    margin:          0 0 10px;
    display:         flex;
    align-items:     center;
    gap:             5px;
}

/* ── Category tabs ── */
.homa-filter-wrapper .homa-categories-section { margin-bottom: 18px; }
.homa-filter-wrapper .homa-category-tabs {
    display:         flex;
    flex-wrap:       wrap;
    gap:             7px;
}

/* Base filter button */
.homa-filter-wrapper .homa-filter-btn {
    display:         inline-flex;
    align-items:     center;
    gap:             5px;
    padding:         7px 16px;
    border:          1.5px solid var(--hf-border);
    border-radius:   50px;
    background:      var(--hf-white);
    font-size:       .84rem;
    font-weight:     500;
    color:           var(--hf-dark-soft);
    cursor:          pointer;
    white-space:     nowrap;
    transition:
        background     var(--hf-transition),
        border-color   var(--hf-transition),
        color          var(--hf-transition),
        box-shadow     var(--hf-transition),
        transform      var(--hf-transition);
    outline:         none;
    -webkit-tap-highlight-color: transparent;
    user-select:     none;
}
.homa-filter-wrapper .homa-filter-btn:hover {
    border-color:    var(--hf-red);
    color:           var(--hf-red);
    background:      rgba(192,57,43,.04);
    transform:       translateY(-1px);
    box-shadow:      var(--hf-shadow-sm);
}
.homa-filter-wrapper .homa-filter-btn.active {
    background:      var(--hf-red);
    border-color:    var(--hf-red);
    color:           var(--hf-white);
    box-shadow:      0 3px 12px rgba(192,57,43,.35);
}
.homa-filter-wrapper .homa-filter-btn.active:hover {
    background:      var(--hf-red-dark);
    transform:       translateY(-1px);
}
.homa-filter-wrapper .homa-filter-btn:disabled,
.homa-filter-wrapper .homa-filter-btn.is-loading {
    opacity:         .55;
    cursor:          not-allowed;
    pointer-events:  none;
}

/* ── Filters row ── */
.homa-filter-wrapper .homa-filter-row {
    display:         grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap:             20px;
    padding-top:     18px;
    border-top:      1px solid var(--hf-border);
}

/* ── Price slider ── */
.homa-filter-wrapper .homa-price-slider-wrap { padding: 6px 4px 0; }
.homa-filter-wrapper .homa-price-slider {
    margin:          0 6px 12px;
}
/* noUISlider overrides — scoped */
.homa-filter-wrapper .noUi-target {
    background:      var(--hf-cream-dark);
    border:          none;
    box-shadow:      none;
    height:          4px;
    border-radius:   50px;
}
.homa-filter-wrapper .noUi-connect {
    background:      var(--hf-red);
}
.homa-filter-wrapper .noUi-handle {
    width:           18px !important;
    height:          18px !important;
    border-radius:   50% !important;
    background:      var(--hf-white) !important;
    border:          2px solid var(--hf-red) !important;
    box-shadow:      0 2px 8px rgba(192,57,43,.25) !important;
    cursor:          pointer;
    top:             -7px !important;
    right:           -9px !important;
    transition:      transform var(--hf-transition);
}
.homa-filter-wrapper .noUi-handle:hover {
    transform:       scale(1.15);
}
.homa-filter-wrapper .noUi-handle::before,
.homa-filter-wrapper .noUi-handle::after { display: none !important; }
.homa-filter-wrapper .homa-price-display {
    display:         flex;
    align-items:     center;
    gap:             6px;
    font-size:       .84rem;
    font-weight:     600;
    color:           var(--hf-dark);
}
.homa-filter-wrapper .homa-price-sep { color: var(--hf-muted); }

/* ── Rating dropdown ── */
.homa-filter-wrapper .homa-rating-dropdown {
    position:        relative;
}
/* Trigger button */
.homa-filter-wrapper .homa-rating-trigger {
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    gap:             8px;
    width:           100%;
    padding:         8px 12px;
    background:      var(--hf-white);
    border:          1.5px solid var(--hf-border);
    border-radius:   var(--hf-radius-sm);
    cursor:          pointer;
    transition:      border-color var(--hf-transition), box-shadow var(--hf-transition);
    outline:         none;
}
.homa-filter-wrapper .homa-rating-trigger:hover,
.homa-filter-wrapper .homa-rating-dropdown.is-open .homa-rating-trigger {
    border-color:    var(--hf-red);
    box-shadow:      0 0 0 3px rgba(192,57,43,.10);
}
.homa-filter-wrapper .homa-rating-trigger-stars {
    display:         flex;
    align-items:     center;
    gap:             3px;
    font-size:       .82rem;
    font-weight:     600;
    color:           var(--hf-dark);
}
.homa-filter-wrapper .homa-rating-trigger-stars svg { color: var(--hf-gold); }
.homa-filter-wrapper .homa-rating-caret {
    flex-shrink:     0;
    color:           var(--hf-muted);
    transition:      transform var(--hf-transition);
}
.homa-filter-wrapper .homa-rating-dropdown.is-open .homa-rating-caret {
    transform:       rotate(180deg);
}
/* Dropdown menu */
.homa-filter-wrapper .homa-rating-menu {
    position:        absolute;
    top:             calc(100% + 4px);
    left:            0;
    right:           0;
    background:      var(--hf-white);
    border:          1.5px solid var(--hf-border);
    border-radius:   var(--hf-radius-sm);
    box-shadow:      var(--hf-shadow-md);
    list-style:      none;
    margin:          0;
    padding:         4px 0;
    z-index:         50;
    opacity:         0;
    transform:       translateY(-6px);
    pointer-events:  none;
    transition:      opacity var(--hf-transition), transform var(--hf-transition);
}
.homa-filter-wrapper .homa-rating-dropdown.is-open .homa-rating-menu {
    opacity:         1;
    transform:       translateY(0);
    pointer-events:  auto;
}
/* Menu items */
.homa-filter-wrapper .homa-rating-option {
    display:         flex;
    align-items:     center;
    gap:             6px;
    padding:         8px 14px;
    cursor:          pointer;
    transition:      background var(--hf-transition);
    font-size:       .82rem;
    font-weight:     500;
    color:           var(--hf-dark-soft);
    position:        relative;
}
.homa-filter-wrapper .homa-rating-option:hover {
    background:      var(--hf-cream);
    color:           var(--hf-dark);
}
.homa-filter-wrapper .homa-rating-option.is-selected {
    color:           var(--hf-red);
    font-weight:     700;
    background:      rgba(192,57,43,.05);
}
.homa-filter-wrapper .homa-rating-opt-stars {
    display:         flex;
    align-items:     center;
    gap:             2px;
    color:           var(--hf-gold);
}
.homa-filter-wrapper .homa-rating-opt-label {
    margin-left:     2px;
    white-space:     nowrap;
}
.homa-filter-wrapper .homa-rating-check {
    margin-left:     auto;
    color:           var(--hf-red);
    flex-shrink:     0;
    opacity:         0;
}
.homa-filter-wrapper .homa-rating-option.is-selected .homa-rating-check { opacity: 1; }

/* ── Toggle switch ── */
.homa-filter-wrapper .homa-toggle-switch {
    display:         flex;
    align-items:     center;
    gap:             10px;
    cursor:          pointer;
    user-select:     none;
}
.homa-filter-wrapper .homa-toggle-input { position: absolute; opacity: 0; width: 0; height: 0; }
.homa-filter-wrapper .homa-toggle-track {
    width:           42px;
    height:          24px;
    background:      var(--hf-border);
    border-radius:   50px;
    position:        relative;
    transition:      background var(--hf-transition);
    flex-shrink:     0;
}
.homa-filter-wrapper .homa-toggle-thumb {
    position:        absolute;
    top:             3px;
    left:            3px;
    width:           18px;
    height:          18px;
    border-radius:   50%;
    background:      var(--hf-white);
    box-shadow:      0 1px 4px rgba(0,0,0,.2);
    transition:      transform var(--hf-transition);
}
.homa-filter-wrapper .homa-toggle-input:checked ~ .homa-toggle-track,
.homa-filter-wrapper .homa-toggle-switch:has(.homa-toggle-input:checked) .homa-toggle-track {
    background: var(--hf-red);
}
.homa-filter-wrapper .homa-toggle-input:checked ~ .homa-toggle-track .homa-toggle-thumb,
.homa-filter-wrapper .homa-toggle-switch:has(.homa-toggle-input:checked) .homa-toggle-thumb {
    transform: translateX(18px);
}
.homa-filter-wrapper .homa-toggle-text {
    font-size:       .85rem;
    font-weight:     500;
    color:           var(--hf-dark-soft);
}

/* ── Active filter tags ── */
.homa-filter-wrapper .homa-active-filters {
    display:         flex;
    align-items:     center;
    flex-wrap:       wrap;
    gap:             8px;
    padding-top:     14px;
    margin-top:      14px;
    border-top:      1px dashed var(--hf-border);
}
.homa-filter-wrapper .homa-active-filters-label {
    font-size:       .75rem;
    font-weight:     700;
    text-transform:  uppercase;
    letter-spacing:  .06em;
    color:           var(--hf-muted);
    white-space:     nowrap;
}
.homa-filter-wrapper .homa-active-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.homa-filter-wrapper .homa-tag {
    display:         inline-flex;
    align-items:     center;
    gap:             5px;
    padding:         4px 10px 4px 12px;
    background:      var(--hf-gold-pale);
    border:          1px solid var(--hf-gold);
    border-radius:   50px;
    font-size:       .78rem;
    font-weight:     600;
    color:           var(--hf-dark);
    animation:       homaTagIn .2s ease;
}
.homa-filter-wrapper .homa-tag-remove {
    background:      none;
    border:          none;
    cursor:          pointer;
    color:           var(--hf-muted);
    padding:         0;
    display:         flex;
    align-items:     center;
    border-radius:   50%;
    width:           16px;
    height:          16px;
    justify-content: center;
    transition:      background var(--hf-transition), color var(--hf-transition);
}
.homa-filter-wrapper .homa-tag-remove:hover { background: var(--hf-red); color: #fff; }
.homa-filter-wrapper .homa-clear-all {
    display:         inline-flex;
    align-items:     center;
    gap:             5px;
    padding:         5px 12px;
    border:          1.5px solid var(--hf-red);
    border-radius:   50px;
    background:      transparent;
    font-size:       .78rem;
    font-weight:     700;
    color:           var(--hf-red);
    cursor:          pointer;
    transition:      background var(--hf-transition), color var(--hf-transition);
    margin-left:     auto;
}
.homa-filter-wrapper .homa-clear-all:hover { background: var(--hf-red); color: #fff; }

/* Mobile toggle button (hidden on desktop) */
.homa-filter-wrapper .homa-mobile-filter-toggle { display: none; }


/* ─────────────────────────────────────────────────────────────────────────────
   RESULTS BAR
───────────────────────────────────────────────────────────────────────────── */
.homa-filter-wrapper .homa-results-bar {
    display:         flex;
    justify-content: space-between;
    align-items:     center;
    margin-bottom:   16px;
    min-height:      22px;
}
.homa-filter-wrapper .homa-results-count {
    font-size:       .82rem;
    color:           var(--hf-muted);
    font-weight:     500;
}


/* ─────────────────────────────────────────────────────────────────────────────
   PRODUCT GRID
───────────────────────────────────────────────────────────────────────────── */
.homa-filter-wrapper .homa-products-grid {
    display:         grid;
    grid-template-columns: repeat(var(--hf-grid-cols), 1fr);
    gap:             22px;
    min-height:      300px;
    position:        relative;
}


/* ─────────────────────────────────────────────────────────────────────────────
   PRODUCT CARD
───────────────────────────────────────────────────────────────────────────── */
.homa-filter-wrapper .homa-product-card {
    background:      var(--hf-white);
    border:          1.5px solid var(--hf-border);
    border-radius:   var(--hf-radius-md);
    overflow:        hidden;
    display:         flex;
    flex-direction:  column;
    box-shadow:      var(--hf-shadow-sm);
    transition:
        transform      var(--hf-transition),
        box-shadow     var(--hf-transition),
        border-color   var(--hf-transition);
    animation:       homaCardIn .35s ease both;
    will-change:     transform;
}
.homa-filter-wrapper .homa-product-card:hover {
    transform:       translateY(-4px);
    box-shadow:      var(--hf-shadow-lg);
    border-color:    var(--hf-gold);
}

/* ═══════════════════════════════════════════════════════════════════════
   PRODUCT CARD — DAY 4-5 REDESIGN
   1. 1px #e3d6b9 border · 8px radius · hover lifts 4px shadow
   2. Equal heights: grid auto-rows on parent
   3. Sale badge: % off pill, maroon, top-left
   4. Category eyebrow: saffron uppercase
   5. Stars: always visible, saffron, count in parens
   6. Price: Playfair Display 18px maroon; sale = strikethrough + bold
   7. Image bg: cream gradient
   8. Sold-out: 50% opacity photo + centered pill, card clickable
═══════════════════════════════════════════════════════════════════════ */

/* ── 2. Equal card heights via grid auto-rows ── */
.homa-filter-wrapper .homa-products-grid {
    grid-auto-rows: 1fr;
}

/* ── 1. Card container ── */
.homa-filter-wrapper .homa-product-card {
    border:          1px solid #e3d6b9 !important;   /* spec: 1px #e3d6b9 */
    border-radius:   8px !important;                  /* spec: 8px radius  */
    box-shadow:      0 1px 4px rgba(26,26,26,.06);
}
.homa-filter-wrapper .homa-product-card:hover {
    transform:       translateY(-4px);                /* spec: lifts 4px  */
    box-shadow:      0 8px 28px rgba(26,26,26,.16);
    border-color:    var(--hf-gold) !important;
}

/* ── 7. Image wrap — cream gradient background ── */
.homa-filter-wrapper .homa-card-image-wrap {
    position:        relative;
    overflow:        hidden;
    aspect-ratio:    1 / 1;
    /* spec: cream gradient on image containers */
    background:      linear-gradient(145deg, #fdf6ec 0%, #f0e6d3 100%);
    border-radius:   8px 8px 0 0;
}
.homa-filter-wrapper .homa-card-image {
    width:           100%;
    height:          100%;
    object-fit:      cover;
    display:         block;
    transition:      transform .45s cubic-bezier(.4,0,.2,1), opacity .3s ease;
}
.homa-filter-wrapper .homa-product-card:hover .homa-card-image {
    transform:       scale(1.06);
}

/* ── 8. Sold-out: 50% opacity image ── */
.homa-filter-wrapper .homa-card-image.is-soldout-img {
    opacity:         0.50;
}
/* Sold-out centered pill overlay — card link still works */
.homa-filter-wrapper .homa-soldout-overlay {
    position:        absolute;
    inset:           0;
    display:         flex;
    align-items:     center;
    justify-content: center;
    pointer-events:  none;   /* click passes through to the <a> */
    z-index:         3;
}
.homa-filter-wrapper .homa-soldout-pill {
    background:      rgba(26,26,26,.82);
    color:           #ffffff;
    font-size:       .75rem;
    font-weight:     800;
    letter-spacing:  .1em;
    text-transform:  uppercase;
    padding:         7px 18px;
    border-radius:   50px;
    backdrop-filter: blur(2px);
    border:          1.5px solid rgba(255,255,255,.18);
}

.homa-filter-wrapper .homa-card-no-image {
    width:           100%;
    height:          100%;
    display:         flex;
    align-items:     center;
    justify-content: center;
    color:           var(--hf-border);
}

/* ── 3. Sale % badge — maroon pill, top-left ── */
.homa-filter-wrapper .homa-badge-sale-pct {
    position:        absolute;
    top:             10px;
    left:            10px;
    z-index:         4;
    display:         inline-block;
    background:      #8B1E1E;               /* Heritage Maroon */
    color:           #ffffff;
    font-size:       .68rem;
    font-weight:     800;
    letter-spacing:  .04em;
    text-transform:  uppercase;
    padding:         4px 10px;
    border-radius:   50px;                  /* pill shape */
    line-height:     1;
    white-space:     nowrap;
    box-shadow:      0 2px 8px rgba(123,30,30,.35);
}

/* Hover overlay */
.homa-filter-wrapper .homa-card-overlay {
    position:        absolute;
    inset:           0;
    background:      rgba(26,26,26,.38);
    display:         flex;
    align-items:     center;
    justify-content: center;
    opacity:         0;
    transition:      opacity var(--hf-transition);
    z-index:         2;
}
.homa-filter-wrapper .homa-product-card:hover .homa-card-overlay { opacity: 1; }
.homa-filter-wrapper .homa-overlay-view-btn {
    display:         inline-flex;
    align-items:     center;
    gap:             7px;
    padding:         9px 20px;
    background:      var(--hf-white);
    border-radius:   50px;
    font-size:       .82rem;
    font-weight:     700;
    color:           var(--hf-dark);
    text-decoration: none;
    transform:       translateY(8px);
    transition:      transform var(--hf-transition), background var(--hf-transition), color var(--hf-transition);
}
.homa-filter-wrapper .homa-product-card:hover .homa-overlay-view-btn {
    transform:       translateY(0);
}
.homa-filter-wrapper .homa-overlay-view-btn:hover {
    background:      var(--hf-red);
    color:           var(--hf-white);
}

/* ── Card body ── */
.homa-filter-wrapper .homa-card-body {
    padding:         14px 16px 10px;
    flex:            1;
    display:         flex;
    flex-direction:  column;
}

/* ── 4. Category eyebrow — saffron uppercase ── */
.homa-filter-wrapper .homa-card-eyebrow {
    display:         block;
    font-size:       .68rem;
    font-weight:     700;
    text-transform:  uppercase;
    letter-spacing:  .1em;
    color:           var(--hf-gold);         /* saffron / gold */
    margin-bottom:   5px;
    line-height:     1;
}

/* Card title — Heritage Maroon #8B1E1E */
.homa-filter-wrapper .homa-card-title {
    font-size:       .95rem;
    font-weight:     700;
    line-height:     1.4;
    margin:          0 0 9px;
    color:           #8B1E1E;
    flex-grow:       1;
}
.homa-filter-wrapper .homa-card-title a {
    color:           #8B1E1E;
    text-decoration: none;
    transition:      color var(--hf-transition);
}
/* Hover: Saffron Gold #D4A24C */
.homa-filter-wrapper .homa-card-title a:hover { color: #D4A24C; }

/* ── 5. Star ratings — always visible, saffron stars + review count ── */
.homa-filter-wrapper .homa-card-rating {
    display:         flex;
    align-items:     center;
    gap:             4px;
    margin-bottom:   9px;
}
/* Stars use saffron/gold colour */
.homa-filter-wrapper .homa-stars {
    display:         inline-flex;
    align-items:     center;
    gap:             1px;
    color:           var(--hf-gold);         /* saffron stars */
}
.homa-filter-wrapper .homa-card-review-count {
    font-size:       .72rem;
    color:           var(--hf-muted);
    margin-left:     2px;
    line-height:     1;
}
.homa-filter-wrapper .homa-no-reviews {
    font-size:       .7rem;
    color:           #bbb;
    font-style:      italic;
}

/* ── 6. Price — Playfair Display 18px Heritage Maroon ── */
.homa-filter-wrapper .homa-card-price {
    font-family:     'Playfair Display', 'Georgia', serif;
    font-size:       18px;
    font-weight:     700;
    color:           #8B1E1E;               /* Heritage Maroon */
    line-height:     1.2;
    margin-top:      auto;
    padding-top:     4px;
}
/* Sale: strikethrough old price */
.homa-filter-wrapper .homa-card-price .homa-price-regular,
.homa-filter-wrapper .homa-card-price del,
.homa-filter-wrapper .homa-card-price del bdi {
    font-size:       13px !important;
    font-weight:     400 !important;
    color:           var(--hf-muted) !important;
    text-decoration: line-through !important;
    margin-right:    5px;
    font-family:     inherit;
}
/* Sale: bold Heritage Maroon new price */
.homa-filter-wrapper .homa-card-price .homa-price-sale,
.homa-filter-wrapper .homa-card-price ins,
.homa-filter-wrapper .homa-card-price ins bdi {
    text-decoration: none !important;
    color:           #8B1E1E !important;
    font-weight:     800 !important;
    font-size:       18px !important;
    font-family:     'Playfair Display', 'Georgia', serif !important;
}
/* Remove WC's default colour override on amount spans */
.homa-filter-wrapper .homa-card-price .woocommerce-Price-amount { color: inherit; }

/* ── Card footer / ATC ── */
.homa-filter-wrapper .homa-card-footer {
    padding:         10px 16px 14px;
    border-top:      1px solid #e3d6b9;
}
.homa-filter-wrapper .homa-atc-btn {
    display:         flex;
    align-items:     center;
    justify-content: center;
    gap:             7px;
    width:           100%;
    padding:         9px 16px;
    border-radius:   var(--hf-radius-sm);
    font-size:       .84rem;
    font-weight:     700;
    cursor:          pointer;
    border:          none;
    text-decoration: none;
    transition:      background var(--hf-transition), transform var(--hf-transition), box-shadow var(--hf-transition), color var(--hf-transition);
    line-height:     1;
}
/* Add to Table — Heritage Maroon bg, Cream text */
.homa-filter-wrapper .homa-atc-simple {
    background:      #8B1E1E;
    color:           #FAF3E3;
    border:          none;
}
/* Hover — Saffron Gold bg, Dark text */
.homa-filter-wrapper .homa-atc-simple:hover {
    background:      #D4A24C;
    color:           #2A2421;
    transform:       translateY(-1px);
    box-shadow:      0 4px 14px rgba(212,162,76,.40);
}
.homa-filter-wrapper .homa-atc-simple.is-added {
    background:      #27ae60;
    color:           #ffffff;
    cursor:          pointer;
}
.homa-filter-wrapper .homa-atc-simple.is-added:hover {
    background:      #219a52;
    color:           #ffffff;
    transform:       translateY(-1px);
    box-shadow:      0 4px 14px rgba(39,174,96,.35);
}
/* Variable product — same maroon base */
.homa-filter-wrapper .homa-atc-variable {
    background:      #8B1E1E;
    color:           #FAF3E3;
    border:          none;
}
.homa-filter-wrapper .homa-atc-variable:hover {
    background:      #D4A24C;
    color:           #2A2421;
    transform:       translateY(-1px);
    box-shadow:      0 4px 14px rgba(212,162,76,.40);
}
/* Out-of-stock: link to product page instead of disabled btn */
.homa-filter-wrapper .homa-atc-oos {
    background:      transparent;
    color:           var(--hf-muted);
    border:          1.5px dashed #d0c4b0;
    font-weight:     600;
}
.homa-filter-wrapper .homa-atc-oos:hover {
    border-color:    var(--hf-dark-soft);
    color:           var(--hf-dark);
}
/* ── 8 cont. Out-of-stock card — no full opacity override, opacity on image only ── */
.homa-filter-wrapper .is-out-of-stock { opacity: 1; }


/* ─────────────────────────────────────────────────────────────────────────────
   SKELETON / SHIMMER
───────────────────────────────────────────────────────────────────────────── */
.homa-filter-wrapper .homa-skeleton-card {
    background:      var(--hf-white);
    border:          1.5px solid var(--hf-border);
    border-radius:   var(--hf-radius-md);
    overflow:        hidden;
}
.homa-filter-wrapper .homa-skeleton {
    background:      linear-gradient(90deg, var(--hf-cream) 25%, var(--hf-cream-dark) 50%, var(--hf-cream) 75%);
    background-size: 200% 100%;
    animation:       homaShimmer 1.5s infinite;
    border-radius:   4px;
}
.homa-filter-wrapper .homa-skeleton-image {
    width:           100%;
    aspect-ratio:    1 / 1;
    border-radius:   0;
}
.homa-filter-wrapper .homa-skeleton-body { padding: 14px 16px; }
.homa-filter-wrapper .homa-skeleton-line {
    height:          12px;
    margin-bottom:   8px;
}
.homa-filter-wrapper .homa-skeleton-line.short  { width: 45%; }
.homa-filter-wrapper .homa-skeleton-line.medium { width: 70%; }
.homa-filter-wrapper .homa-skeleton-line.long   { width: 90%; }
.homa-filter-wrapper .homa-skeleton-btn {
    height:          36px;
    margin-top:      12px;
    border-radius:   var(--hf-radius-sm);
}


/* ─────────────────────────────────────────────────────────────────────────────
   EMPTY STATE
───────────────────────────────────────────────────────────────────────────── */
.homa-filter-wrapper .homa-empty-state {
    text-align:      center;
    padding:         60px 20px;
    animation:       homaFadeIn .35s ease;
}
.homa-filter-wrapper .homa-empty-icon {
    color:           var(--hf-border);
    margin-bottom:   18px;
}
.homa-filter-wrapper .homa-empty-title {
    font-size:       1.25rem;
    font-weight:     700;
    color:           var(--hf-dark);
    margin:          0 0 10px;
}
.homa-filter-wrapper .homa-empty-message {
    font-size:       .9rem;
    color:           var(--hf-muted);
    max-width:       380px;
    margin:          0 auto 22px;
    line-height:     1.6;
}
.homa-filter-wrapper .homa-btn-primary {
    display:         inline-flex;
    align-items:     center;
    gap:             7px;
    padding:         11px 28px;
    background:      var(--hf-red);
    color:           var(--hf-white);
    border:          none;
    border-radius:   50px;
    font-size:       .9rem;
    font-weight:     700;
    cursor:          pointer;
    transition:      background var(--hf-transition), transform var(--hf-transition), box-shadow var(--hf-transition);
}
.homa-filter-wrapper .homa-btn-primary:hover {
    background:      var(--hf-red-dark);
    transform:       translateY(-2px);
    box-shadow:      0 6px 18px rgba(192,57,43,.35);
}


/* ─────────────────────────────────────────────────────────────────────────────
   PAGINATION
───────────────────────────────────────────────────────────────────────────── */
.homa-filter-wrapper .homa-pagination {
    display:         flex;
    justify-content: center;
    align-items:     center;
    gap:             6px;
    margin-top:      34px;
    flex-wrap:       wrap;
}
.homa-filter-wrapper .homa-page-btn {
    min-width:       38px;
    height:          38px;
    padding:         0 10px;
    border:          1.5px solid var(--hf-border);
    border-radius:   var(--hf-radius-sm);
    background:      var(--hf-white);
    font-size:       .84rem;
    font-weight:     600;
    color:           var(--hf-dark-soft);
    cursor:          pointer;
    display:         inline-flex;
    align-items:     center;
    justify-content: center;
    transition:      background var(--hf-transition), border-color var(--hf-transition), color var(--hf-transition);
}
.homa-filter-wrapper .homa-page-btn:hover {
    border-color:    var(--hf-red);
    color:           var(--hf-red);
}
.homa-filter-wrapper .homa-page-btn.active {
    background:      var(--hf-red);
    border-color:    var(--hf-red);
    color:           var(--hf-white);
}
.homa-filter-wrapper .homa-page-btn:disabled {
    opacity:         .4;
    cursor:          not-allowed;
    pointer-events:  none;
}


/* ─────────────────────────────────────────────────────────────────────────────
   LOADING OVERLAY
───────────────────────────────────────────────────────────────────────────── */
.homa-filter-wrapper .homa-products-grid.is-loading {
    pointer-events:  none;
}
.homa-filter-wrapper .homa-products-grid.is-loading .homa-product-card {
    opacity:         .45;
    transition:      opacity .2s ease;
}


/* ─────────────────────────────────────────────────────────────────────────────
   ANIMATIONS
───────────────────────────────────────────────────────────────────────────── */
@keyframes homaCardIn {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes homaFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes homaTagIn {
    from { opacity: 0; transform: scale(.85); }
    to   { opacity: 1; transform: scale(1); }
}
@keyframes homaShimmer {
    from { background-position: 200% 0; }
    to   { background-position: -200% 0; }
}

/* Stagger card animations */
.homa-filter-wrapper .homa-products-grid .homa-product-card:nth-child(1)  { animation-delay: .04s; }
.homa-filter-wrapper .homa-products-grid .homa-product-card:nth-child(2)  { animation-delay: .08s; }
.homa-filter-wrapper .homa-products-grid .homa-product-card:nth-child(3)  { animation-delay: .12s; }
.homa-filter-wrapper .homa-products-grid .homa-product-card:nth-child(4)  { animation-delay: .16s; }
.homa-filter-wrapper .homa-products-grid .homa-product-card:nth-child(5)  { animation-delay: .20s; }
.homa-filter-wrapper .homa-products-grid .homa-product-card:nth-child(6)  { animation-delay: .24s; }
.homa-filter-wrapper .homa-products-grid .homa-product-card:nth-child(7)  { animation-delay: .28s; }
.homa-filter-wrapper .homa-products-grid .homa-product-card:nth-child(8)  { animation-delay: .32s; }
.homa-filter-wrapper .homa-products-grid .homa-product-card:nth-child(n+9){ animation-delay: .36s; }


/* ─────────────────────────────────────────────────────────────────────────────
   RESPONSIVE — Tablet (≤ 900px)
───────────────────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .homa-filter-wrapper { --hf-grid-cols: 2; }
    .homa-filter-wrapper .homa-filter-row {
        grid-template-columns: 1fr 1fr;
    }
    .homa-filter-wrapper .homa-deals-section {
        grid-column: 1 / -1;
    }
}


/* ─────────────────────────────────────────────────────────────────────────────
   RESPONSIVE — Mobile (≤ 600px)
───────────────────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .homa-filter-wrapper { --hf-grid-cols: 2; }

    .homa-filter-wrapper .homa-filter-panel {
        padding: 0;
        border:  none;
        background: transparent;
        box-shadow: none;
    }

    /* Show mobile toggle button */
    .homa-filter-wrapper .homa-mobile-filter-toggle {
        display:         flex;
        align-items:     center;
        gap:             8px;
        width:           100%;
        padding:         12px 18px;
        background:      var(--hf-cream);
        border:          1.5px solid var(--hf-border);
        border-radius:   var(--hf-radius-md);
        font-size:       .9rem;
        font-weight:     700;
        color:           var(--hf-dark);
        cursor:          pointer;
        justify-content: center;
        position:        relative;
        transition:      background var(--hf-transition);
        margin-bottom:   14px;
    }
    .homa-filter-wrapper .homa-mobile-filter-toggle:hover { background: var(--hf-gold-pale); }

    .homa-filter-wrapper .homa-filter-badge {
        position:        absolute;
        top:             -6px;
        right:           -6px;
        width:           20px;
        height:          20px;
        border-radius:   50%;
        background:      var(--hf-red);
        color:           var(--hf-white);
        font-size:       .68rem;
        font-weight:     800;
        display:         flex;
        align-items:     center;
        justify-content: center;
    }

    /* Hide panels by default on mobile */
    .homa-filter-wrapper .homa-categories-section,
    .homa-filter-wrapper .homa-filter-row {
        display:         none;
        padding:         14px;
        background:      var(--hf-cream);
        border:          1.5px solid var(--hf-border);
        border-radius:   var(--hf-radius-md);
        margin-bottom:   10px;
    }
    .homa-filter-wrapper .homa-filter-panel.is-open .homa-categories-section,
    .homa-filter-wrapper .homa-filter-panel.is-open .homa-filter-row {
        display:         block;
        animation:       homaFadeIn .22s ease;
    }
    .homa-filter-wrapper .homa-filter-panel.is-open .homa-filter-row {
        grid-template-columns: 1fr;
        display:         grid;
    }

    /* Active filters visible always */
    .homa-filter-wrapper .homa-active-filters {
        padding-top:  10px;
        margin-top:   10px;
        border-top:   none;
        padding:      10px 4px 0;
    }

    .homa-filter-wrapper .homa-top-bar {
        flex-direction: column;
        align-items:    stretch;
    }
    .homa-filter-wrapper .homa-sort-box {
        justify-content: space-between;
    }

    .homa-filter-wrapper .homa-products-grid { gap: 12px; }
}

/* ─────────────────────────────────────────────────────────────────────────────
   RESPONSIVE — Small mobile (≤ 380px)
───────────────────────────────────────────────────────────────────────────── */
@media (max-width: 380px) {
    .homa-filter-wrapper { --hf-grid-cols: 1; }
}
