/* ==========================================================================
   Shaya Fire — global stylesheet v2 · compact wholesale trade-catalogue theme
   No frameworks, no webfonts. One file, one request.
   Palette: ink #14161b · ember #e23a24 · amber #f2a93b · warm paper #f6f2ea
   ========================================================================== */

:root {
    --ink: #14161b;
    --ink-2: #1c1f27;
    --ink-3: #262a35;
    --ember: #e23a24;
    --ember-dark: #b92c1a;
    --ember-bright: #ef4a33;
    --ember-tint: #fdece9;
    --amber: #f2a93b;
    --amber-tint: #fdf3e0;
    --paper: #f6f2ea;
    --card: #ffffff;
    --line: #e4ddcf;
    --line-soft: #eee8db;
    --text: #292c33;
    --muted: #6d7280;
    --ok: #1e8e4f;
    --ok-tint: #e6f4ec;
    --err: #c22434;
    --err-tint: #fbe9eb;
    --radius: 10px;
    --radius-sm: 6px;
    --shadow-sm: 0 1px 2px rgba(20, 22, 27, .06), 0 1px 6px rgba(20, 22, 27, .05);
    --shadow-md: 0 6px 18px rgba(20, 22, 27, .10), 0 14px 34px rgba(20, 22, 27, .10);
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --header-h: 64px;
}

/* --- Base ------------------------------------------------------------------ */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: .95rem;
    line-height: 1.55;
    color: var(--text);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 { line-height: 1.15; color: var(--ink); margin: 0 0 .5em; }
h1 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.2rem, 2.2vw, 1.5rem); letter-spacing: -.01em; }
h3 { font-size: 1.05rem; }

p { margin: 0 0 .85em; }
p:last-child { margin-bottom: 0; }

a { color: var(--ember); text-decoration: none; }
a:hover { color: var(--ember-dark); text-decoration: underline; }

ul, ol { margin: 0 0 .9em; padding-left: 1.2em; }
li { margin-bottom: .25em; }

strong { color: var(--ink); }

small { font-size: .84em; }

:focus-visible {
    outline: 3px solid var(--amber);
    outline-offset: 2px;
    border-radius: 4px;
}

::selection { background: var(--ember); color: #fff; }

.container {
    width: 100%;
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: clamp(14px, 3.5vw, 26px);
}

/* Section headings get a branded ember tick — wholesale-catalogue identity.
   Scoped to classless h2s in main so component headings (footer, reading
   cards, CTA band) keep their own treatment. */
.site-main h2:not([class]) {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin-top: 2.4rem;
}
.site-main h2:not([class])::before {
    content: "";
    flex: 0 0 auto;
    width: 24px;
    height: 4px;
    border-radius: 2px;
    background: var(--ember);
}

/* Exceptions: centered band heading + panel headings stay tick-free/top-flush */
.cta-band h2 { display: block; }
.cta-band h2::before { content: none; }
.panel h2:first-child, .panel h3:first-child { margin-top: 0; }

/* --- Utilities -------------------------------------------------------------- */

.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.text-muted { color: var(--muted); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
[hidden] { display: none !important; }

.lead {
    font-size: clamp(.97rem, 1.4vw, 1.08rem);
    line-height: 1.65;
    color: #43464e;
    max-width: 78ch;
}

.eyebrow {
    display: inline-block;
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
    padding: .32em .85em;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    margin-bottom: 1rem;
}
.eyebrow--amber { background: var(--amber); color: var(--ink); }

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 200;
    background: var(--ink);
    color: #fff;
    padding: .7em 1.2em;
    border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; color: #fff; }

.page-title { margin-bottom: .35em; }

/* --- Buttons ----------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5em;
    padding: .58em 1.25em;
    font: inherit;
    font-weight: 700;
    font-size: .9rem;
    line-height: 1.2;
    color: #fff;
    background: linear-gradient(180deg, var(--ember-bright), var(--ember) 55%, var(--ember-dark));
    border: 1px solid var(--ember-dark);
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-align: center;
    white-space: nowrap;
    transition: filter .15s ease, transform .15s ease, box-shadow .15s ease, background .15s ease;
    box-shadow: 0 1px 3px rgba(226, 58, 36, .30), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.btn:hover {
    color: #fff;
    text-decoration: none;
    filter: brightness(1.07);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(226, 58, 36, .35);
}
.btn:active { transform: translateY(0); filter: brightness(.97); }

.btn--secondary {
    background: var(--card);
    color: var(--ink);
    border-color: #c9c2b2;
    box-shadow: var(--shadow-sm);
}
.btn--secondary:hover {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
    filter: none;
}

.btn--danger {
    background: linear-gradient(180deg, #d43a4c, var(--err) 55%, #9c1c2a);
    border-color: #9c1c2a;
    box-shadow: 0 1px 3px rgba(194, 36, 52, .30);
}

.btn--sm { padding: .42em .85em; font-size: .82rem; }

/* --- Header -------------------------------------------------------------------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(20, 22, 27, .97);
    backdrop-filter: blur(8px);
    border-bottom: 3px solid var(--ember);
}

.site-header__inner {
    display: flex;
    align-items: center;
    gap: .9rem;
    min-height: var(--header-h);
}

.site-logo {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    border-radius: var(--radius-sm);
}
.site-logo img { width: 148px; height: 42px; object-fit: contain; }

.site-nav {
    display: flex;
    align-items: center;
    gap: .15rem;
    margin-left: auto;
}
.site-nav a {
    display: block;
    padding: .45em .85em;
    border-radius: var(--radius-sm);
    border-bottom: 2px solid transparent;
    color: #dedad1;
    font-weight: 600;
    font-size: .92rem;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.site-nav a:hover { background: var(--ink-3); color: #fff; text-decoration: none; }
.site-nav a.is-active { background: var(--ember); color: #fff; }

.site-header__actions {
    display: flex;
    align-items: center;
    gap: .8rem;
    margin-left: .4rem;
    padding-left: .8rem;
    border-left: 1px solid rgba(255, 255, 255, .14);
}

.header-auth { display: inline-flex; align-items: center; gap: .75rem; }
.header-link { color: #d3cfc6; font-weight: 600; font-size: .86rem; }
.header-link:hover { color: var(--amber); text-decoration: none; }
.header-greeting {
    color: var(--amber);
    font-weight: 700;
    font-size: .86rem;
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cart-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    color: #fff;
    background: var(--ink-3);
    border: 1px solid rgba(255, 255, 255, .08);
    transition: background .15s ease, transform .15s ease;
}
.cart-link:hover { background: var(--ember); color: #fff; text-decoration: none; transform: translateY(-1px); }

.cart-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 19px;
    height: 19px;
    padding: 0 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .7rem;
    font-weight: 800;
    color: var(--ink);
    background: var(--amber);
    border-radius: 999px;
    border: 2px solid var(--ink);
}

/* Hamburger — mobile only */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 10px;
    margin-left: auto;
    background: transparent;
    border: 1px solid var(--ink-3);
    border-radius: var(--radius-sm);
    cursor: pointer;
}
.nav-toggle__bar {
    display: block;
    height: 2.5px;
    width: 100%;
    background: #fff;
    border-radius: 2px;
    transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle.is-active .nav-toggle__bar:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle.is-active .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle.is-active .nav-toggle__bar:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* --- Hero ----------------------------------------------------------------------- */

.hero {
    position: relative;
    color: #fff;
    background:
        linear-gradient(90deg, rgba(13, 14, 18, .95) 0%, rgba(13, 14, 18, .82) 40%, rgba(13, 14, 18, .35) 78%, rgba(13, 14, 18, .25) 100%),
        url("/assets/img/hero-fire.jpg") center 30% / cover no-repeat,
        var(--ink);
}

.hero__inner {
    padding-block: clamp(2.6rem, 7vw, 4.8rem);
    max-width: 1200px;
}

.hero h1 {
    color: #fff;
    max-width: 17ch;
    margin-bottom: .45em;
    text-shadow: 0 2px 20px rgba(0, 0, 0, .55);
}

.hero p {
    max-width: 58ch;
    font-size: clamp(.97rem, 1.6vw, 1.1rem);
    color: #efe9df;
    text-shadow: 0 1px 10px rgba(0, 0, 0, .6);
    margin-bottom: 1.4em;
}

.hero .btn--secondary {
    color: #fff;
    border-color: rgba(255, 255, 255, .7);
    background: rgba(20, 22, 27, .35);
    backdrop-filter: blur(2px);
}
.hero .btn--secondary:hover { background: #fff; border-color: #fff; color: var(--ink); }

.trust-chips {
    list-style: none;
    margin: 1.8em 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}
.trust-chips li {
    margin: 0;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .02em;
    color: var(--amber);
    background: rgba(20, 22, 27, .55);
    border: 1px solid rgba(242, 169, 59, .4);
    padding: .32em .85em;
    border-radius: 999px;
    backdrop-filter: blur(3px);
}

/* --- Main layout ------------------------------------------------------------------ */

.site-main { min-height: 60vh; padding-bottom: clamp(2rem, 5vw, 3.5rem); }
.site-main > .container { padding-top: clamp(1.3rem, 3vw, 2.2rem); }

/* --- Panels ------------------------------------------------------------------------- */

.panel {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: clamp(1rem, 2.5vw, 1.4rem);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.3rem;
}

.panel--dark {
    background:
        linear-gradient(135deg, rgba(226, 58, 36, .06), transparent 45%),
        var(--ink);
    border-color: var(--ink);
    color: #d9d5cc;
}
.panel--dark h2, .panel--dark h3, .panel--dark strong { color: #fff; }
.panel--dark a { color: var(--amber); }
.panel--dark a:hover { color: #ffc35c; }

/* --- Service cards -------------------------------------------------------------------- */

.services-section { margin-block: 2rem; }

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 1.1rem;
    margin-bottom: 1.3rem;
}

.service-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform .18s ease, box-shadow .18s ease;
}
.service-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.service-card__img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.service-card__body { padding: 1rem 1.15rem 1.15rem; }

/* --- Chips ----------------------------------------------------------------------------- */

.chip-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}
.chip {
    margin: 0;
    background: var(--paper);
    border: 1px solid var(--line);
    border-left: 3px solid var(--ember);
    border-radius: var(--radius-sm);
    padding: .4em .85em;
    font-size: .88rem;
    font-weight: 600;
    color: var(--ink);
}

/* --- Category cards ----------------------------------------------------------------------- */

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.1rem;
    margin-block: 1.2rem 2rem;
}

.category-card {
    position: relative;
    display: block;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--ink);
    min-height: 165px;
    box-shadow: var(--shadow-sm);
    transition: transform .18s ease, box-shadow .18s ease;
}
.category-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); text-decoration: none; }

.category-card--media .category-card__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}
.category-card--media:hover .category-card__img { transform: scale(1.05); }

.category-card__body {
    position: absolute;
    inset: auto 0 0 0;
    padding: 2rem 1rem .95rem;
    background: linear-gradient(transparent, rgba(13, 14, 18, .93) 55%);
    display: flex;
    flex-direction: column;
    gap: 0;
}
.category-card__name {
    color: #fff;
    font-weight: 800;
    font-size: 1.08rem;
    letter-spacing: .01em;
}
.category-card__count { color: var(--amber); font-size: .8rem; font-weight: 700; }

/* Plain (non-media) category card fallback */
.category-card:not(.category-card--media) {
    background: var(--card);
    border: 1px solid var(--line);
    padding: 1.2rem;
    min-height: 0;
}
.category-card:not(.category-card--media) .category-card__body { position: static; background: none; padding: 0; }
.category-card:not(.category-card--media) .category-card__name { color: var(--ink); }
.category-card:not(.category-card--media) .category-card__count { color: var(--muted); }

/* --- Product cards --------------------------------------------------------------------------- */

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(205px, 1fr));
    gap: 1rem;
    margin-block: 1.2rem 2rem;
}

.product-card {
    display: flex;
    flex-direction: column;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.product-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: rgba(226, 58, 36, .5);
}

.product-card__image {
    display: block;
    background: #fdfcfa;
    border-bottom: 1px solid var(--line-soft);
}
.product-card__image img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    padding: .55rem;
    transition: transform .25s ease;
}
.product-card:hover .product-card__image img { transform: scale(1.05); }

.product-card__image--placeholder {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--paper);
    color: var(--muted);
    font-weight: 700;
}

.product-card__body {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    padding: .8rem .9rem .9rem;
    flex: 1;
}

.product-card__name {
    font-size: .92rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
    /* clamp to two lines for a tidy grid */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.4em;
}
.product-card__name a { color: var(--ink); }
.product-card__name a:hover { color: var(--ember); text-decoration: none; }

.product-card__price {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--ember);
    letter-spacing: -.01em;
}
.product-card__price--poa { color: var(--muted); font-weight: 600; font-style: italic; font-size: .95rem; }

/* Wholesale quick-order row: View + Add side by side, full width */
.product-card__actions {
    margin-top: auto;
    padding-top: .45rem;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: .45rem;
    align-items: stretch;
}
.product-card__actions form { display: flex; }
.product-card__actions .btn { width: 100%; }

/* --- Product detail page ------------------------------------------------------------------------ */

.breadcrumbs { margin-bottom: .9rem; font-size: .88rem; }
.breadcrumbs ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    align-items: center;
}
.breadcrumbs li { margin: 0; display: inline-flex; align-items: center; gap: .35rem; }
.breadcrumbs li + li::before { content: "›"; color: var(--muted); }
.breadcrumbs a { color: var(--muted); font-weight: 600; }
.breadcrumbs a:hover { color: var(--ember); }
.breadcrumbs [aria-current] { color: var(--ink); font-weight: 700; }

.product-detail {
    display: grid;
    grid-template-columns: minmax(260px, 430px) 1fr;
    gap: clamp(1.4rem, 3.5vw, 2.6rem);
    align-items: start;
    margin-top: 1.2rem;
}

.product-detail__image {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1rem;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: calc(var(--header-h) + 14px);
}
.product-detail__image img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    cursor: zoom-in;
    border-radius: var(--radius-sm);
}

.product-detail__price {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--ember);
    margin: .3em 0 .7em;
    letter-spacing: -.01em;
}
.product-detail__price small { font-size: .55em; font-weight: 600; }
.product-detail__price--poa { color: var(--muted); font-style: italic; font-size: 1.25rem; }

.product-detail__description {
    background: var(--card);
    border: 1px solid var(--line);
    border-left: 4px solid var(--amber);
    border-radius: var(--radius);
    padding: 1rem 1.2rem;
    box-shadow: var(--shadow-sm);
    margin: 1.1rem 0 1.3rem;
    color: #43464e;
}

/* --- Quantity stepper ------------------------------------------------------------------------------ */

.qty-control {
    display: inline-flex;
    align-items: stretch;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--card);
    box-shadow: var(--shadow-sm);
}
.qty-control button {
    width: 38px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ink);
    background: var(--paper);
    border: 0;
    cursor: pointer;
    transition: background .12s ease, color .12s ease;
}
.qty-control button:hover { background: var(--ember); color: #fff; }
.qty-control input {
    width: 56px;
    text-align: center;
    font: inherit;
    font-weight: 700;
    border: 0;
    border-inline: 1px solid var(--line);
    padding: .4em 0;
    -moz-appearance: textfield;
    appearance: textfield;
}
.qty-control input::-webkit-outer-spin-button,
.qty-control input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* --- CTA band ----------------------------------------------------------------------------------------- */

.cta-band {
    position: relative;
    color: #fff;
    background:
        linear-gradient(rgba(15, 16, 21, .88), rgba(15, 16, 21, .88)),
        url("/assets/img/bg-embers.jpg") center / cover no-repeat,
        var(--ink);
    margin-top: clamp(2rem, 5vw, 3.2rem);
}
.cta-band .container { padding-block: clamp(2.4rem, 5.5vw, 3.8rem); text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { max-width: 56ch; margin-inline: auto; color: #e5e0d6; font-size: 1.02rem; }
.cta-band__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .7rem;
    justify-content: center;
    margin-top: 1.4rem;
}
.cta-band .btn--secondary { color: #fff; border-color: rgba(255, 255, 255, .65); background: rgba(20, 22, 27, .3); }
.cta-band .btn--secondary:hover { background: #fff; border-color: #fff; color: var(--ink); }

/* --- Footer ---------------------------------------------------------------------------------------------- */

.site-footer {
    color: #c9c5bc;
    background:
        linear-gradient(rgba(15, 16, 20, .84), rgba(15, 16, 20, .84)),
        url("/assets/img/bg-embers.jpg") center / cover no-repeat,
        var(--ink);
    font-size: .92rem;
}

.site-footer__grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 1.8rem;
    padding-block: clamp(2rem, 4vw, 3rem) 1.4rem;
}

.site-footer__logo { margin-bottom: .9rem; filter: brightness(1.6) contrast(1.1); }
.site-footer__tagline { color: var(--amber); font-weight: 600; }
.site-footer__heading {
    color: #fff;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .11em;
    text-transform: uppercase;
    margin-bottom: .8rem;
}
.site-footer a { color: #d9d5cc; }
.site-footer a:hover { color: var(--amber); text-decoration: none; }
.site-footer p { margin-bottom: .5em; }
.site-footer__address { font-size: .88rem; line-height: 1.5; }

.site-footer__base {
    border-top: 1px solid rgba(255, 255, 255, .12);
    padding-block: 1rem 1.3rem;
    font-size: .82rem;
    color: #9b978e;
}

/* --- Forms ------------------------------------------------------------------------------------------------- */

.form { max-width: 500px; }
.form--wide { max-width: 720px; }

.form-group { margin-bottom: 1rem; }
.form-group label {
    display: block;
    font-weight: 700;
    font-size: .9rem;
    color: var(--ink);
    margin-bottom: .3em;
}

.form input[type="text"],
.form input[type="email"],
.form input[type="password"],
.form input[type="tel"],
.form input[type="number"],
.form input[type="search"],
.form input[type="url"],
.form select,
.form textarea {
    width: 100%;
    font: inherit;
    font-size: .93rem;
    color: var(--text);
    background: var(--card);
    border: 1px solid #cdc6b6;
    border-radius: var(--radius-sm);
    padding: .55em .8em;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.form input:focus,
.form select:focus,
.form textarea:focus {
    outline: none;
    border-color: var(--ember);
    box-shadow: 0 0 0 3px rgba(226, 58, 36, .16);
}

.form textarea { min-height: 110px; resize: vertical; }

.form-hint {
    font-size: .82rem;
    color: var(--muted);
    margin-top: .25em;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    align-items: center;
    margin-top: 1.2rem;
}

/* --- Filter bar (catalogue) ----------------------------------------------------------------------------------- */

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    align-items: center;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: .7rem .85rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1rem;
}
.filter-bar input[type="search"] {
    flex: 1 1 200px;
    font: inherit;
    font-size: .93rem;
    padding: .55em .85em;
    border: 1px solid #cdc6b6;
    border-radius: var(--radius-sm);
}
.filter-bar select {
    font: inherit;
    font-size: .9rem;
    padding: .55em .7em;
    border: 1px solid #cdc6b6;
    border-radius: var(--radius-sm);
    background: var(--card);
    max-width: 250px;
}
.filter-bar input:focus, .filter-bar select:focus {
    outline: none;
    border-color: var(--ember);
    box-shadow: 0 0 0 3px rgba(226, 58, 36, .16);
}

/* --- Alerts ------------------------------------------------------------------------------------------------------ */

.alert {
    border-radius: var(--radius-sm);
    border: 1px solid;
    padding: .7em 1em;
    margin-bottom: 1.1rem;
    font-weight: 600;
    font-size: .92rem;
}
.alert--success { background: var(--ok-tint); border-color: #b5dfc6; color: #14663a; }
.alert--error { background: var(--err-tint); border-color: #f0c4ca; color: #8f1a28; }

/* --- Tables (order-form density) ------------------------------------------------------------------------------------ */

.table-wrap {
    overflow-x: auto;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.4rem;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
}
.table th {
    text-align: left;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #fff;
    background: var(--ink);
    padding: .65em .9em;
    white-space: nowrap;
}
.table td {
    padding: .6em .9em;
    border-bottom: 1px solid var(--line-soft);
    vertical-align: middle;
}
.table tbody tr:nth-child(even) { background: #fbf8f2; }
.table tbody tr:hover { background: var(--amber-tint); }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; }
.table strong { font-weight: 700; }

/* --- Pagination ------------------------------------------------------------------------------------------------------- */

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    list-style: none;
    margin: 1.2rem 0;
    padding: 0;
}
.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 .65em;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--card);
    color: var(--ink);
    font-weight: 700;
    font-size: .9rem;
}
.pagination a:hover { border-color: var(--ember); color: var(--ember); text-decoration: none; }
.pagination .is-current, .pagination [aria-current] {
    background: var(--ember);
    border-color: var(--ember);
    color: #fff;
}

/* --- Badges -------------------------------------------------------------------------------------------------------------- */

.badge {
    display: inline-block;
    padding: .22em .7em;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    background: var(--ink-3);
    color: #fff;
}
.badge--pending { background: var(--amber); color: var(--ink); }
.badge--confirmed { background: #2b6cb0; color: #fff; }
.badge--completed { background: var(--ok); color: #fff; }
.badge--cancelled { background: var(--err); color: #fff; }
.badge--admin { background: var(--ember); color: #fff; }
.badge--customer { background: #2b6cb0; color: #fff; }
.badge--active { background: var(--ok); color: #fff; }
.badge--inactive { background: var(--muted); color: #fff; }

/* --- Reading (articles) page ------------------------------------------------------------------------------------------------ */

.reading-toc {
    background: var(--card);
    border: 1px solid var(--line);
    border-left: 4px solid var(--ember);
    border-radius: var(--radius);
    padding: 1rem 1.2rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.8rem;
}
.reading-toc ol { margin: 0; padding-left: 1.2em; }
.reading-toc a { font-weight: 700; }

.reading-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: clamp(1.1rem, 2.5vw, 1.6rem);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
    scroll-margin-top: calc(var(--header-h) + 14px);
}
.reading-card__title {
    display: flex;
    align-items: center;
    gap: .7rem;
    margin-bottom: .8em;
}
.reading-card__num {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--ember);
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
}
.reading-card__body { max-width: 78ch; }
.reading-card__top { margin-top: 1rem; font-size: .88rem; }

/* --- About page --------------------------------------------------------------------------------------------------------------- */

.about-feature {
    display: grid;
    grid-template-columns: minmax(250px, 440px) 1fr;
    gap: clamp(1.2rem, 3vw, 2rem);
    align-items: start;
    margin-block: 1.2rem 2rem;
}
.about-feature__media {
    margin: 0;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: calc(var(--header-h) + 14px);
}
.about-feature__img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.about-feature .panel { margin-bottom: 0; }

/* --- Checklist ------------------------------------------------------------------------------------------------------------------- */

.checklist {
    list-style: none;
    margin: 0 0 .9em;
    padding: 0;
}
.checklist li {
    position: relative;
    padding-left: 1.6em;
    margin-bottom: .4em;
}
.checklist li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--ember);
    font-weight: 800;
}

/* --- Admin -------------------------------------------------------------------------------------------------------------------------- */

.admin-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: clamp(1.2rem, 2.5vw, 2rem);
    align-items: start;
}

.admin-nav {
    background: var(--ink);
    border-radius: var(--radius);
    padding: .7rem;
    position: sticky;
    top: calc(var(--header-h) + 14px);
    box-shadow: var(--shadow-sm);
}
.admin-nav ul { list-style: none; margin: 0; padding: 0; }
.admin-nav li { margin: 0 0 .15rem; }
.admin-nav a {
    display: block;
    padding: .5em .8em;
    border-radius: var(--radius-sm);
    color: #d5d1c8;
    font-weight: 600;
    font-size: .9rem;
}
.admin-nav a:hover { background: var(--ink-3); color: #fff; text-decoration: none; }
.admin-nav a.is-current { background: var(--ember); color: #fff; }
.admin-nav__section {
    margin: .7rem .45rem .25rem !important;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .11em;
    text-transform: uppercase;
    color: var(--amber);
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: .9rem;
    margin-block: 1rem 1.5rem;
}
.stat-card {
    background: var(--ink);
    color: #fff;
    border-radius: var(--radius);
    padding: 1rem 1.15rem;
    border-left: 4px solid var(--ember);
    box-shadow: var(--shadow-sm);
}
.stat-card__value {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--amber);
    letter-spacing: -.02em;
}
.stat-card__label { font-size: .82rem; font-weight: 700; color: #d5d1c8; margin-top: .15rem; }

/* --- Lightbox (created by app.js) ----------------------------------------------------------------------------------------------------- */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1rem, 4vw, 3rem);
    background: rgba(13, 14, 18, .93);
    cursor: zoom-out;
    animation: lb-in .18s ease;
}
.lightbox img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: var(--radius);
    box-shadow: 0 20px 80px rgba(0, 0, 0, .6);
    background: #fff;
}
.lightbox__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .5);
    background: rgba(20, 22, 27, .7);
    color: #fff;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}
.lightbox__close:hover { background: var(--ember); border-color: var(--ember); }

@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }

/* --- Responsive ------------------------------------------------------------------------------------------------------------------------- */

@media (max-width: 940px) {
    .nav-toggle { display: inline-flex; }

    .site-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        margin: 0;
        padding: .5rem clamp(14px, 3.5vw, 26px) .9rem;
        background: var(--ink);
        border-bottom: 3px solid var(--ember);
        box-shadow: 0 24px 32px rgba(0, 0, 0, .35);
        display: none;
    }
    .site-nav.is-open { display: flex; }
    .site-nav a { padding: .8em 1em; font-size: .97rem; }

    .site-header__actions { margin-left: 0; padding-left: .6rem; }
    .header-auth { gap: .55rem; }
    .header-link { font-size: .82rem; }
    .header-greeting { display: none; }

    .product-detail { grid-template-columns: 1fr; }
    .product-detail__image { position: static; max-width: 440px; }

    .about-feature { grid-template-columns: 1fr; }
    .about-feature__media { position: static; }

    .admin-layout { grid-template-columns: 1fr; }
    .admin-nav { position: static; }
    .admin-nav ul { display: flex; flex-wrap: wrap; gap: .25rem; }
    .admin-nav li { margin: 0; }
    .admin-nav__section { width: 100%; margin-top: .5rem !important; }

    .site-footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
    .site-logo img { width: 126px; height: 36px; }

    .product-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .7rem; }
    .product-card__body { padding: .65rem .7rem .75rem; }
    .product-card__name { font-size: .86rem; }
    .product-card__actions { grid-template-columns: 1fr; }
    .product-card__actions .btn { padding: .5em .6em; }

    .category-grid { grid-template-columns: 1fr; }

    .form-actions .btn { flex: 1 1 100%; }

    .filter-bar { flex-direction: column; align-items: stretch; }
    .filter-bar select { max-width: none; width: 100%; }
    .filter-bar .btn { width: 100%; }

    .site-footer__grid { grid-template-columns: 1fr; gap: 1.4rem; }

    .stat-grid { grid-template-columns: repeat(2, 1fr); }

    .table { font-size: .85rem; }
    .table th, .table td { padding: .55em .6em; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
    html { scroll-behavior: auto; }
}
