/* =====================================================================
   ZAKH — category page below the banner (zakh-category-preview.html):
   filter card (a bottom sheet on phones), sub-category pills, sticky sort
   bar, active-filter chips, product grid, empty state and Load More.
   Markup: resources/views/livewire/shop-page-filter.blade.php.

   Loaded after home-new.css, which brings the tokens (--hn-*), the .hn
   resets, the product card (.hn-pc), buttons, the Load More bar and the
   size picker. Classes here are cp- / cf- prefixed and scoped under .cp:
   the theme styles plain element names (section, h2, select, input …).

   --cp-top is the bottom edge of the site header, kept up to date by
   category-page.js, so sticky parts sit just under it whatever the
   header does (fixed, hidden on scroll, promo bar on/off).
   ===================================================================== */

.cp { padding-bottom: 80px; }

/* ---------------------------------------------------------------------
   Hero (zakh-category-preview.html). The designed hero is the design's box
   (--cp-hero-h tall). An admin banner image takes the same width and radius
   but keeps its own shape (see below).
   --------------------------------------------------------------------- */
.cp { --cp-hero-h: 600px; }
.cp-top { padding-top: 22px; }
.cp .cp-hero {
    position: relative; overflow: hidden; isolation: isolate; border-radius: 34px; min-height: var(--cp-hero-h);
    padding: 50px 44px 44px; color: #fff; display: flex; flex-direction: column; justify-content: space-between;
    background: linear-gradient(120deg, #17171b 0%, #2a1015 55%, #7a0f1b 100%);
}
.cp .cp-hero::before {
    content: ""; position: absolute; z-index: -1; right: -120px; top: -140px; width: 560px; height: 560px; border-radius: 50%;
    background: radial-gradient(circle, rgba(225, 29, 46, .55), transparent 65%); animation: hn-glow 6s ease-in-out infinite alternate;
}
/* the premium (highest-value) combo's page: the design in gold, as its
   ticket on the home page */
.cp .cp-hero--gold { background: linear-gradient(120deg, #17171b 0%, #2b2412 55%, #8a6512 100%); }
.cp .cp-hero--gold::before { background: radial-gradient(circle, rgba(212, 175, 55, .5), transparent 65%); }
.cp .cp-hero--gold .cp-hero-t small { color: #f3d98b; }
.cp .cp-hero--gold .cp-hero-t h1 em { -webkit-text-stroke-color: #f3d98b; }

/* the admin's image, shown whole. A made banner has its text and tiles out
   to the edges; cropped to the design's 520px-tall phone box, only its
   middle third showed. The <img> carries the file's size, so the box is the
   right height before it loads. Only an unusually tall upload is cut, at
   --cp-hero-h. */
.cp .cp-hero.cp-hero--img { display: block; padding: 0; min-height: 0; background: #f1ede8; }
.cp .cp-hero--img::before { display: none; }
.cp .cp-hero--img img {
    display: block; width: 100%; height: auto; max-height: var(--cp-hero-h); object-fit: cover; object-position: center;
}

.cp .cp-hero-t { position: relative; text-align: center; margin-bottom: 34px; }
.cp .cp-hero-t small { display: block; letter-spacing: 6px; font-size: 12px; font-weight: 600; line-height: 1.5; color: #ffb3ba; animation: hn-up .8s both; }
.cp .cp-hero-t h1 {
    font-family: var(--hn-head); font-size: clamp(44px, 7vw, 96px); line-height: .95; font-weight: 800; letter-spacing: 0;
    color: #fff; margin: 10px 0 12px; animation: hn-up .8s .1s both;
}
.cp .cp-hero-t h1 em { font-style: normal; color: transparent; -webkit-text-stroke: 2px #fff; }
.cp .cp-hero-t p {
    color: #d6d6dc; max-width: 560px; margin: 0 auto; font-size: 15px; line-height: 1.6; animation: hn-up .8s .2s both;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
}

.cp .cp-tiles { position: relative; display: grid; grid-template-columns: repeat(var(--n, 6), minmax(0, 190px)); justify-content: center; gap: 18px; align-items: end; }
.cp .cp-tile {
    position: relative; height: 250px; border-radius: 999px 999px 22px 22px; overflow: hidden;
    background: linear-gradient(170deg, var(--a), var(--b)); display: flex; flex-direction: column; align-items: center;
    justify-content: flex-end; padding: 16px 10px; text-align: center; color: #fff; border: 2px solid rgba(255, 255, 255, .18);
    transition: transform .4s var(--hn-ease), border-color .3s, box-shadow .3s; animation: hn-up .8s both; cursor: pointer;
}
.cp .cp-tile:nth-child(odd) { height: 285px; }
.cp .cp-tile:first-child { transform: rotate(-3deg); }
.cp .cp-tile:last-child:not(:first-child) { transform: rotate(3deg); }
.cp .cp-tile:hover, .cp .cp-tile.on, .cp .cp-tile:focus-visible { transform: translateY(-10px) rotate(0); border-color: #fff; box-shadow: 0 22px 40px rgba(0, 0, 0, .4); color: #fff; }
.cp .cp-tile:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.cp .cp-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.cp .cp-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 45%, rgba(0, 0, 0, .55)); pointer-events: none; }
.cp .cp-tile b, .cp .cp-tile small { position: relative; z-index: 1; }
.cp .cp-tile b {
    font-size: 14px; line-height: 1.3; letter-spacing: 1.5px; text-transform: uppercase; font-weight: 700; color: #fff;
    background: rgba(0, 0, 0, .45); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); padding: 7px 14px; border-radius: 12px;
}
.cp .cp-tile small { font-size: 12px; line-height: 1.4; margin-top: 6px; opacity: .9; color: #fff; }
.cp-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 34px; padding-top: 36px; align-items: start; }
.cp-main { min-width: 0; }

/* ---------------------------------------------------------------------
   Filter card
   --------------------------------------------------------------------- */
.cp .cp-filters {
    position: sticky; top: calc(var(--cp-top, 0px) + 20px); z-index: 5;
    display: flex; flex-direction: column; max-height: calc(100vh - var(--cp-top, 0px) - 40px);
    margin: 0; background: #fff; border: 1px solid var(--hn-line); border-radius: 24px; overflow: hidden;
}
.cf-head { display: flex; align-items: center; gap: 12px; padding: 22px 24px 16px; border-bottom: 1px solid var(--hn-line); }
.cp .cf-head h2 { margin-right: auto; font-size: 20px; font-weight: 800; line-height: 1.5; }
.cp .cf-x {
    display: none; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 50%;
    background: #f1f1f4; font-size: 16px; line-height: 1; transition: background .2s, transform .2s;
}
.cp .cf-x:hover { background: #e6e6ea; transform: rotate(90deg); }
.cf-body { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 24px 12px; scrollbar-width: thin; overscroll-behavior: contain; }

.cp .cf { margin: 0; padding: 6px 0; border: 0; border-bottom: 1px solid var(--hn-line); }
.cp .cf:last-child { border-bottom: 0; }
.cp .cf summary {
    display: flex; justify-content: space-between; align-items: center; padding: 14px 0; list-style: none;
    font-size: 12.5px; font-weight: 700; line-height: 1.5; letter-spacing: 2px; text-transform: uppercase;
    color: var(--hn-mut); cursor: pointer; user-select: none;
}
.cp .cf summary::-webkit-details-marker { display: none; }
.cp .cf summary::marker { content: ""; }
.cp .cf summary::after {
    content: ""; width: 9px; height: 9px; margin-right: 4px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
    transform: rotate(45deg); transition: transform .25s;
}
.cp .cf[open] summary::after { transform: rotate(-135deg); }
.cp .cf > div { padding-bottom: 16px; animation: hn-up .35s both; }

/* category radios (links: crawlable, Livewire swaps the page in place) */
.cf-radios { display: flex; flex-direction: column; gap: 6px; }
.cp .cf-radio {
    display: flex; align-items: center; gap: 12px; padding: 9px 6px; border-radius: 12px; cursor: pointer;
    font-size: 14.5px; font-weight: 600; line-height: 1.5; text-transform: uppercase; color: var(--hn-ink); transition: background .2s;
}
.cp .cf-radio:hover, .cp .cf-radio:focus-visible { background: #f6f3f1; color: var(--hn-ink); }
.cf-radio i { position: relative; flex: none; width: 20px; height: 20px; border: 2px solid #c9c7c5; border-radius: 50%; transition: border-color .2s; }
.cf-radio.on i { border-color: var(--hn-ink); }
.cf-radio.on i::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--hn-ink); animation: hn-pop .3s; }
.cf-radio span {
    min-width: 40px; margin-left: auto; padding: 5px 10px; border-radius: 50px; background: #f0eeec; color: var(--hn-mut);
    font-size: 13px; line-height: 1.5; text-align: center; transition: background .2s, color .2s;
}
.cf-radio.on span { background: var(--hn-ink); color: #fff; }

/* colour swatches */
.cf-sw { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.cp .cf-sw button {
    position: relative; aspect-ratio: 1; width: 100%; min-width: 0; height: auto; padding: 0; border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, .15); transition: transform .25s, box-shadow .25s;
}
.cp .cf-sw button:hover { transform: scale(1.14); }
.cf-sw button::after {
    content: "\2713"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 15px; font-weight: 800; line-height: 1;
    color: #fff; mix-blend-mode: difference; transform: scale(0); transition: transform .25s cubic-bezier(.3, 1.6, .5, 1);
}
.cp .cf-sw button[aria-pressed="true"] { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--hn-ink); }
.cf-sw button[aria-pressed="true"]::after { transform: scale(1); }

/* chips: sizes, discount, rating */
.cf-chips { display: flex; flex-wrap: wrap; gap: 9px; }
.cp .cf-chips button {
    min-width: 46px; padding: 9px 14px; border: 1.5px solid var(--hn-line); border-radius: 12px; background: #fff;
    font-size: 13.5px; font-weight: 600; line-height: 1.5; color: var(--hn-ink); transition: all .2s;
}
.cp .cf-chips button:hover { border-color: var(--hn-ink); }
.cp .cf-chips button[aria-pressed="true"] { background: var(--hn-ink); border-color: var(--hn-ink); color: #fff; transform: scale(1.04); }
.cp .cf-chips button:disabled { opacity: .35; cursor: not-allowed; text-decoration: line-through; border-color: var(--hn-line); transform: none; }

/* price slider */
.cp .cf-price b { display: block; margin-bottom: 16px; font-size: 15px; line-height: 1.5; }
.cf-range { position: relative; height: 22px; }
.cf-range::before { content: ""; position: absolute; left: 0; right: 0; top: 9px; height: 4px; border-radius: 4px; background: #e8e4e1; }
.cf-range i { position: absolute; top: 9px; left: var(--l, 0%); right: var(--r, 0%); height: 4px; border-radius: 4px; background: var(--hn-red); }
.cp .cf-range input[type="range"] {
    position: absolute; left: 0; top: 0; width: 100%; height: 22px; margin: 0; padding: 0; border: 0; border-radius: 0;
    background: none; box-shadow: none; outline: 0; pointer-events: none; -webkit-appearance: none; appearance: none;
}
.cp .cf-range input[type="range"]::-webkit-slider-runnable-track { height: 22px; background: none; border: 0; }
.cp .cf-range input[type="range"]::-moz-range-track { height: 22px; background: none; border: 0; }
.cp .cf-range input[type="range"]::-webkit-slider-thumb {
    pointer-events: auto; -webkit-appearance: none; appearance: none; width: 22px; height: 22px; margin: 0; border-radius: 50%;
    background: #fff; border: 3px solid var(--hn-red); box-shadow: 0 2px 8px rgba(0, 0, 0, .2); cursor: grab; transition: transform .2s;
}
.cp .cf-range input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.2); }
.cp .cf-range input[type="range"]:active::-webkit-slider-thumb { cursor: grabbing; }
.cp .cf-range input[type="range"]::-moz-range-thumb {
    pointer-events: auto; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid var(--hn-red);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .2); cursor: grab;
}
.cp .cf-range input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(225, 29, 46, .25); }
.cp .cf-range input[type="range"]:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 4px rgba(225, 29, 46, .25); }
.cf-ends { display: flex; justify-content: space-between; margin-top: 8px; color: var(--hn-mut); font-size: 12.5px; line-height: 1.5; }

.cf-foot { display: none; padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--hn-line); box-shadow: 0 -10px 30px rgba(0, 0, 0, .06); }

/* phone sheet backdrop (made by category-page.js, outside Livewire) */
.cp-overlay {
    position: fixed; inset: 0; z-index: 1000; background: rgba(10, 10, 12, .55);
    -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); opacity: 0; visibility: hidden;
    transition: opacity .3s, visibility 0s .3s;
}
.cp-overlay.is-open { opacity: 1; visibility: visible; transition: opacity .3s; }

/* ---------------------------------------------------------------------
   Sub-category pills
   --------------------------------------------------------------------- */
.cp .cp-pills {
    position: relative; display: flex; gap: 10px; margin: 0; padding: 8px; overflow-x: auto;
    background: #fff; border: 1px solid var(--hn-line); border-radius: 20px; scrollbar-width: none;
}
.cp-pills::-webkit-scrollbar { display: none; }
.cp-pills.is-drag { cursor: grabbing; user-select: none; }
.cp-pills.is-drag a { pointer-events: none; }
.cp .cp-pills a {
    position: relative; flex: none; padding: 11px 22px; border-radius: 14px; overflow: hidden;
    font-size: 14px; font-weight: 600; line-height: 1.5; letter-spacing: .5px; text-transform: uppercase; color: #444;
    -webkit-user-drag: none; transition: all .25s;
}
.cp .cp-pills a:hover { background: #f4f2f0; color: #444; }
.cp .cp-pills a.on, .cp .cp-pills a.on:hover { background: var(--hn-ink); color: #fff; box-shadow: 0 8px 18px rgba(0, 0, 0, .18); }
.cp-pills sup { top: -.5em; margin-left: 4px; font-size: 10.5px; opacity: .6; }

/* ---------------------------------------------------------------------
   Sort bar
   --------------------------------------------------------------------- */
.cp-bar {
    position: sticky; top: var(--cp-top, 0px); z-index: 30; display: flex; align-items: center; gap: 16px;
    margin-top: 6px; padding: 14px 0; background: rgba(250, 248, 246, .9);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.cp .cp-bar p { margin-right: auto; color: var(--hn-mut); font-size: 14px; line-height: 1.5; }
.cp .cp-bar p b { color: var(--hn-ink); }
.cp .cp-sort { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--hn-mut); font-size: 14px; font-weight: 400; line-height: 1.5; }
.cp .cp-sort select {
    width: auto; height: auto; min-height: 0; margin: 0; padding: 10px 36px 10px 16px;
    border: 1.5px solid var(--hn-line); border-radius: 50px; box-shadow: none; outline: 0;
    background-color: #fff; color: var(--hn-ink); font: inherit; font-weight: 600; line-height: 1.5; cursor: pointer;
    -webkit-appearance: none; appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #121214 50%), linear-gradient(135deg, #121214 50%, transparent 50%);
    background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat;
}
.cp .cp-sort select:focus { border-color: var(--hn-red); outline: 0; }
.cp .cp-fbtn {
    position: relative; display: none; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 50px;
    background: var(--hn-ink); color: #fff; font-size: 14px; font-weight: 700; line-height: 1.5;
}
.cp-fbtn svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; }
.cp .cp-fbtn em {
    display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
    background: var(--hn-red); font-size: 11px; font-style: normal; line-height: 1;
}

/* ---------------------------------------------------------------------
   Active-filter chips
   --------------------------------------------------------------------- */
.cp-active { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.cp .cp-active button {
    display: flex; align-items: center; gap: 8px; padding: 7px 14px; border: 1px solid #f6d0d4; border-radius: 50px;
    background: #fff6f6; font-size: 13px; font-weight: 600; line-height: 1.5; color: var(--hn-ink);
    animation: hn-pop .35s both; transition: background .2s, color .2s, border-color .2s;
}
.cp .cp-active button:hover { background: var(--hn-red); border-color: var(--hn-red); color: #fff; }
.cp .cp-active .clr, .cp .cp-active .clr:hover { background: transparent; border-color: transparent; color: var(--hn-mut); text-decoration: underline; }
.cp .cp-active .clr:hover { color: var(--hn-red); }

/* ---------------------------------------------------------------------
   Grid, empty state, Load More
   --------------------------------------------------------------------- */
.cp-grid {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 20px; min-height: 300px;
    scroll-margin-top: calc(var(--cp-top, 0px) + 84px); transition: opacity .25s;
}
.cp-grid.is-loading { opacity: .45; pointer-events: none; }
/* The design's cards and buttons inherit line-height 1.5 (home-new.css
   pins 1.2–1.4 for the home page; kept there, overridden only here). */
.cp :is(.hn-pc-name, .hn-pc-meta, .hn-pc-badge, .hn-pc-add, .hn-btn) { line-height: 1.5; }
.hn-pc-dots { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 9px; }
.hn-pc-dots i { width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .15); }
.hn-pc-dots small { color: var(--hn-mut); font-size: 11.5px; font-weight: 600; line-height: 1; }

.cp-empty { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 70px 20px; text-align: center; animation: hn-up .5s both; }
.cp-empty-ic { font-size: 60px; line-height: 1.5; animation: hn-float 3s ease-in-out infinite; }
.cp .cp-empty h3 { font-size: 20px; font-weight: 700; line-height: 1.5; }
.cp .cp-empty p { margin-bottom: 10px; color: var(--hn-mut); }

.cp .cp-lm { margin-top: 44px; }

/* ripple box for buttons Livewire redraws (category-page.js) */
.cp-rip-box { position: fixed; z-index: 1003; overflow: hidden; pointer-events: none; }
.cp-rip-box .hn-rip.is-dark { background: rgba(225, 29, 46, .3); }

/* ---------------------------------------------------------------------
   Responsive
   --------------------------------------------------------------------- */
@media (max-width: 1280px) {
    .cp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1000px) {
    .cp-layout { grid-template-columns: minmax(0, 1fr); padding-top: 22px; }
    .cp .cp-filters {
        position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 1001; max-height: 88vh;
        border: 0; border-radius: 28px 28px 0 0; box-shadow: 0 -20px 60px rgba(0, 0, 0, .25);
        transform: translateY(105%); visibility: hidden;
        transition: transform .45s cubic-bezier(.2, .8, .2, 1), visibility 0s .45s;
    }
    .cp .cp-filters.open { transform: none; visibility: visible; transition: transform .45s cubic-bezier(.2, .8, .2, 1); }
    .cp .cf-x { display: grid; }
    .cf-foot { display: block; }
    .cp .cp-fbtn { display: flex; }
    .cp-bar { gap: 10px; }
    .cp .cp-sort span { display: none; }

    .cp { --cp-hero-h: 500px; }
    .cp .cp-hero { padding: 34px 22px 30px; border-radius: 26px; }
    .cp .cp-tiles { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 14px; padding: 10px 4px 16px; scrollbar-width: none; align-items: flex-end; }
    .cp .cp-tiles::-webkit-scrollbar { display: none; }
    .cp .cp-tile { flex: none; width: 150px; height: 220px !important; scroll-snap-align: center; transform: none !important; }
    .cp .cp-tile.on { transform: translateY(-6px) !important; }
}

@media (max-width: 700px) {
    .cp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 12px; }
    .cp .cp-bar p { display: none; }
    .cp .cp-sort { margin-left: auto; }
    .cp .cp-sort select { padding: 10px 30px 10px 14px; font-size: 13px; }
    .cp .cp-pills { padding: 6px; border-radius: 16px; }
    .cp .cp-pills a { padding: 10px 16px; font-size: 13px; }
    .cp .cp-lm .hn-lm-btn { width: 100%; }

    .cp { --cp-hero-h: 520px; }
    .cp-top { padding-top: 14px; }
    .cp .cp-hero-t { margin-bottom: 22px; }
    .cp .cp-hero.cp-hero--img { border-radius: 18px; }
}

@media (prefers-reduced-motion: reduce) {
    .cp .cp-filters, .cp-overlay { transition-duration: .01ms !important; }
    .cp .cp-hero::before, .cp .cp-hero-t *, .cp .cp-tile { animation: none !important; }
}
