/* ═══════════════════════════════════════════════════════════════════════
   LAYER 4 — COMPONENTS
   The reusable vocabulary: buttons, form fields, chips, badges, cards,
   the product card, price block, rating markup, skeleton, toast, drawer,
   modal, tabs, accordion, breadcrumb, pagination, empty state, alert.
   Every one of these is demonstrated in all its states on
   /design-system.html. Nothing here is page-specific — layout.css and the
   pages compose these, never redeclare them.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Button ──────────────────────────────────────────────────────────────
   .btn is the canonical primitive: variant (primary/secondary/ghost/
   danger) × size (sm/md/lg) × state (disabled/.is-loading). The three
   storefront call-sites (hero CTA, filter submit, add-to-cart overlay)
   are documented aliases built ON TOP of .btn so today's markup keeps
   working unchanged while the style guide shows the canonical system. ── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    max-width: 100%;
    border: 1px solid transparent;
    border-radius: var(--btn-radius, var(--radius-full));
    font: inherit;
    font-weight: var(--weight-bold);
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background var(--duration-fast) var(--ease-standard),
                border-color var(--duration-fast) var(--ease-standard),
                color var(--duration-fast) var(--ease-standard),
                transform var(--duration-fast) var(--ease-standard),
                box-shadow var(--duration-fast) var(--ease-standard);
}
.btn:disabled,
.btn[aria-disabled="true"] { cursor: not-allowed; opacity: .55; }

/* sizes — min 44px tap target on sm/md/lg alike (WCAG 2.5.5) */
.btn--sm { min-height: 36px; padding: .45rem .9rem; font-size: var(--text-sm); }
.btn--md { min-height: 44px; padding: .65rem 1.35rem; font-size: var(--text-base); }
.btn--lg { min-height: 50px; padding: .8rem 1.75rem; font-size: var(--text-md); }

/* variants */
.btn--primary { background: var(--brand); color: var(--brand-text); }
.btn--primary:hover:not(:disabled) { background: var(--brand-deep); }
.btn--primary:active:not(:disabled) { transform: translateY(1px); }

.btn--secondary { background: var(--paper); color: var(--ink); border-color: var(--line-strong); }
.btn--secondary:hover:not(:disabled) { background: var(--paper-muted); border-color: var(--ink-soft); }

.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover:not(:disabled) { background: var(--paper-muted); }

.btn--danger { background: var(--danger-base); color: var(--danger-on); }
.btn--danger:hover:not(:disabled) { background: color-mix(in srgb, var(--danger-base) 85%, black); }

/* loading — spinner replaces the label without reflow; label kept for
   screen readers via aria-live on the trigger, not duplicated here */
.btn.is-loading { color: transparent; pointer-events: none; position: relative; }
.btn.is-loading::after {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid currentColor;
    border-inline-end-color: transparent;
    color: inherit;
    -webkit-mask-image: radial-gradient(closest-side, transparent 55%, #000 56%);
    animation: btn-spin 700ms linear infinite;
}
.btn--primary.is-loading::after,
.btn--danger.is-loading::after { color: var(--brand-text); }
@keyframes btn-spin { to { transform: rotate(360deg); } }

/* legacy storefront aliases — same computed look as before the refactor */
.btn--cta {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: #fff;
    color: var(--brand-deep);
    padding: .75rem 1.75rem;
    border-radius: var(--radius-full);
    font-weight: var(--weight-bold);
    text-decoration: none;
    transition: transform var(--duration-fast) var(--ease-standard),
                box-shadow var(--duration-fast) var(--ease-standard);
}
.btn--cta:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(0, 0, 0, .25); }

.btn--filters {
    width: 100%;
    background: var(--ink);
    color: #fff;
    border: 0;
    border-radius: var(--radius-sm);
    padding: .65rem 1rem;
    font: inherit;
    font-weight: var(--weight-bold);
    font-size: var(--text-base);
    cursor: pointer;
    transition: background var(--duration-fast) var(--ease-standard);
}
.btn--filters:hover { background: var(--brand-deep); }

.icon-btn {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid transparent;
    color: var(--ink-soft);
    cursor: pointer;
    transition: background var(--duration-fast) var(--ease-standard),
                color var(--duration-fast) var(--ease-standard);
}
.icon-btn:hover { background: var(--neutral-100); color: var(--ink); }

/* WCAG 2.5.5 Target Size at handheld widths: the 40px circle above reads
   fine to a pointer but is under the 44px touch minimum. Growing it via
   width/height would make the shape itself inconsistent with desktop, so
   instead width/height are dropped to auto (shrinking to the icon's own
   20px) and padding does the growing — 20 + 2×11 padding + 2×1 border =
   44px exactly, met without ever changing the visual icon size. */
@media (max-width: 900px) {
    .icon-btn {
        width: auto;
        height: auto;
        padding: 11px;
    }
}

/* ── Form fields — input / select / checkbox / radio ────────────────────── */

.field { display: flex; flex-direction: column; gap: .4rem; }
.field__label { font-size: var(--text-base); font-weight: var(--weight-semibold); color: var(--ink); }
.field__hint { font-size: var(--text-sm); color: var(--ink-soft); }
.field__error { font-size: var(--text-sm); color: var(--danger-base); }

.input,
.select {
    width: 100%;
    min-height: 44px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line-strong);
    background: var(--paper);
    padding-inline: var(--space-3);
    font: inherit;
    font-size: var(--text-base);
    color: var(--ink);
    transition: border-color var(--duration-fast) var(--ease-standard),
                box-shadow var(--duration-fast) var(--ease-standard);
}
.input::placeholder { color: var(--ink-faint); }
.input:focus,
.select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
.input[aria-invalid="true"] { border-color: var(--danger-base); }
.input:disabled,
.select:disabled { background: var(--paper-muted); color: var(--ink-faint); cursor: not-allowed; }

.select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6270' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left .75rem center;
    background-size: 16px;
    padding-inline-start: 2.25rem;
}
[dir="rtl"] .select { background-position: right .75rem center; padding-inline-start: var(--space-3); padding-inline-end: 2.25rem; }

.checkbox,
.radio {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: var(--text-base);
    color: var(--ink);
    cursor: pointer;
}
.checkbox input,
.radio input {
    accent-color: var(--brand);
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}
/* The <label> — not the 18px box — is the real target (clicking the text
   toggles the input too), so touch sizing belongs on the row, not the
   glyph. Desktop keeps the dense list; a coarse pointer gets a full-height
   tap row without the checkbox itself growing oversized. */
@media (pointer: coarse) {
    .checkbox,
    .radio { min-height: 44px; }
}

/* ── Country-variable form hooks ─────────────────────────────────────────
   LAYOUT ONLY. One backend serves every country; this system never learns
   which fields Saudi Arabia, Kuwait or anywhere else needs — that field
   set, its labels, and its validation are core-supplied content. What
   varies here is purely the shape a variable-length field set is laid
   into, so a screen never has to invent its own grid:

     .form-grid     — CSS Grid, auto-fits whatever count of .field elements
                       the core sends (2 fields or 8), each column never
                       narrower than --form-field-min.
     .phone-field    — a two-slot flex row (a "code" slot + a "number"
                       slot); which country codes populate the first slot
                       is core data, not a CSS list.
   Tax wording, delivery wording, and any other country-shaped label render
   through the existing generic .badge / .alert / .field__hint components
   above — content supplied, never chosen here. ─────────────────────────── */

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(var(--form-field-min), 1fr));
    gap: var(--space-4) var(--space-5);
}
.form-grid .field--full { grid-column: 1 / -1; }

.phone-field {
    display: flex;
    align-items: stretch;
    gap: var(--space-2);
}
.phone-field__code { flex: 0 1 auto; min-width: 5.5em; } /* grows for a longer core-supplied label, never clips */
.phone-field__number { flex: 1 1 auto; min-width: 0; }

/* ── Chip ─────────────────────────────────────────────────────────────────── */

.chip {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    height: 30px;
    padding-inline: .8rem;
    border-radius: var(--radius-full);
    background: var(--paper-muted);
    border: 1px solid var(--line);
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    color: var(--ink);
}
.chip--active { background: var(--brand-tint); border-color: var(--brand); color: var(--brand-deep); }
.chip__remove {
    position: relative; /* anchors the invisible touch-target expansion below */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: none;
    border: 0;
    color: inherit;
    cursor: pointer;
    opacity: .7;
}
.chip__remove:hover { opacity: 1; }
/* The visible glyph stays 16px (a bigger × would overpower the chip's own
   text) — the tappable area grows to 44px via an invisible hit-zone instead
   of the icon itself, so a fingertip on a touch device still lands
   reliably (WCAG 2.5.8) without changing the chip's compact look on a
   mouse-driven desktop. */
@media (pointer: coarse) {
    .chip__remove::before {
        content: "";
        position: absolute;
        inset-block: -14px;
        inset-inline: -14px;
    }
}

/* ── Badge ────────────────────────────────────────────────────────────────── */

.badge {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding-inline: .55rem;
    border-radius: 6px;
    font-size: var(--text-xs);
    font-weight: var(--weight-bold);
}
.badge--success { background: var(--success-tint); color: var(--success-base); }
.badge--warning { background: var(--warning-tint); color: var(--warning-base); }
.badge--danger  { background: var(--danger-tint);  color: var(--danger-base); }
.badge--info    { background: var(--info-tint);    color: var(--info-base); }
.badge--neutral { background: var(--paper-muted);  color: var(--ink-soft); }

.badge-unavailable {
    position: absolute;
    top: .7rem;
    inset-inline-start: .7rem;
    background: rgba(20, 23, 28, .85);
    color: #fff;
    font-size: .68rem;
    font-weight: var(--weight-semibold);
    padding: .3rem .6rem;
    border-radius: var(--radius-full);
}
.badge-discount {
    position: absolute;
    top: var(--space-2);
    inset-inline-start: var(--space-2);
    z-index: 3;
    background: var(--gold);
    color: var(--neutral-900); /* white-on-gold measured 2.80:1 — fails AA (Q46) */
    font-size: var(--text-xs);
    font-weight: var(--weight-bold);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
}

/* ── Card (generic) ──────────────────────────────────────────────────────── */

.card {
    background: var(--paper);
    border: var(--card-border, 1px solid var(--line));
    border-radius: var(--card-radius, var(--radius-md));
    box-shadow: var(--card-shadow, none);
    padding: var(--space-5);
    transition: box-shadow var(--duration-fast) var(--ease-standard),
                border-color var(--duration-fast) var(--ease-standard);
}
.card:hover { box-shadow: var(--card-shadow-hover, none); }

/* ── Product card ─────────────────────────────────────────────────────────── */

.product-card {
    position: relative; /* anchors .product-card__link's stretched overlay below */
    background: var(--neutral-0);
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-md);
    padding: var(--space-3);
    display: flex;
    flex-direction: column;
    transition: box-shadow var(--duration-base) var(--ease-standard),
                transform var(--duration-base) var(--ease-standard);
}
.product-card:hover {
    box-shadow: var(--shadow-card);
    transform: translateY(-2px);
}

/* ── Wishlist heart pin (top inset-inline-end) — overrides wishlist.css's
   generic .wish-heart by selector specificity (two classes beat one,
   regardless of stylesheet load order). The toggle behaviour/JS hook
   (data-wish-toggle, is-active/is-loading/is-pulsing states) stays owned
   by wishlist.css; this only repositions + recolors the default state
   for the product-card placement per the founder's comp. ── */
.product-card__wishlist.wish-heart {
    position: absolute;
    top: var(--space-2);
    inset-inline-end: var(--space-2);
    z-index: 3;
    width: 32px;
    height: 32px;
    background: var(--neutral-0);
    border: 1px solid var(--neutral-200);
    color: var(--neutral-600);
    pointer-events: auto;
}
.product-card__wishlist.wish-heart:hover { border-color: var(--brand); color: var(--neutral-600); }
.product-card__wishlist.wish-heart .icon { width: 16px; height: 16px; }

/* "Stretched link" pattern — the WHOLE card opens the product page, while the
   add-to-cart button (positioned after this in the DOM, so it paints on top at
   the same stacking level) stays independently clickable. Carries the card's
   accessible name; screen readers announce one link per card, not a duplicate
   of the title text inside it. */
.product-card__link {
    position: absolute;
    inset: 0;
    z-index: 1;
}
.product-card__media,
.product-card__body { position: relative; z-index: 2; pointer-events: none; }
.product-card__cta { pointer-events: auto; }

.product-card__brand {
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    color: var(--brand);
    margin: 0;
}
.product-card__variants {
    font-size: var(--text-sm);
    color: var(--ink-soft);
    margin: 0;
}

.product-card__media {
    position: relative;
    height: 150px;
    background: var(--neutral-0);
    margin-block: var(--space-3);
}
.product-card__media img { width: 100%; height: 100%; object-fit: contain; }
.product-card.is-unavailable .product-card__media img { opacity: .55; filter: grayscale(.4); }

.product-card__cta {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3);
    min-height: 44px;
    background: var(--brand);
    color: var(--brand-text);
    border: 0;
    border-radius: var(--radius-sm);
    font: inherit;
    font-weight: var(--weight-semibold);
    font-size: var(--text-sm);
    cursor: pointer;
    margin-top: var(--space-2);
    transition: background var(--duration-fast) var(--ease-standard);
}
.product-card__cta:hover { background: var(--brand-deep); }
.product-card__cta:disabled { background: var(--neutral-200); color: var(--neutral-600); cursor: not-allowed; }

/* ── Baseline alignment across a row ─────────────────────────────────────────
   Cards in one grid row carry different content: a title may wrap to one line
   or two, and «N خيارات» exists only for variable products. Left alone, each
   card sizes to its own content and the CTAs land at different heights across
   the row — visible in the founder's own screenshot and the first thing that
   reads as amateur in a product grid.
   Fix: the card fills its grid cell, the body flexes, the title reserves two
   lines whether it needs them or not, and the CTA is pushed to the bottom with
   margin-block-start:auto. Every button in a row then sits on one baseline
   regardless of what is above it. */
.product-card { height: 100%; }
.product-card__body {
    padding: 0;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    gap: var(--space-1);
    text-align: center;
}
.product-card__cta { margin-block-start: auto; }
.product-card__category { font-size: var(--text-sm); color: var(--ink-soft); margin: 0; }
.product-card__title {
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    color: var(--ink);
    text-align: center;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
    line-height: var(--leading-snug);
}
.product-card__price-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: var(--space-1) var(--space-2); margin-top: var(--space-1); }

/* ── Price block ──────────────────────────────────────────────────────────── */

.price { display: inline-flex; align-items: baseline; }
/* Current price = brand navy per the founder's comp — NOT gold. The previous rule set
   --gold here; that was wrong (corrected, store-redesign S1, Q46). */
.price__whole { font-family: var(--font-display); font-size: var(--text-lg); font-weight: var(--weight-bold); color: var(--brand); }
.price__fraction { font-family: var(--font-display); font-size: var(--text-xs); font-weight: var(--weight-bold); color: var(--brand); vertical-align: super; margin-inline-start: 1px; }
.price__currency { font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--ink-soft); margin-inline-start: .3rem; }
.price__unit { font-size: var(--text-xs); color: var(--ink-soft); }
/* Compare-at price — rendered ONLY when ErpProductDto.CompareAtPrice has a value
   (Catalog/ErpProductDto.cs:52-53, itself derived only from real OnlinePrice/SalePrice
   fields, never a fabricated "was" price — Q42/Q46). The <s> tag in the markup carries
   the strike semantically; this rule only styles its colour and size. Sits inline beside
   the current price inside .product-card__price-row (founder comp), not on its own line. */
.price__compare { font-size: var(--text-sm); margin: 0; }
.price__compare s { color: var(--neutral-500); }

/* ── Rating (markup only — no rating data exists yet) ───────────────────── */

.rating {
    display: inline-flex;
    align-items: center;
    gap: .2rem;
    color: var(--gold);
}
.rating__star { width: 16px; height: 16px; fill: currentColor; stroke: none; }
.rating__star--empty { color: var(--line-strong); }
.rating__count { font-size: var(--text-sm); color: var(--ink-soft); margin-inline-start: .3rem; }

/* ── Skeleton (§63 — loading placeholder family) ─────────────────────────
   Every page-/section-level loading state renders shapes that mirror the
   content about to land, never a lone central spinner (§63 mandate) — a
   spinner says "something is happening"; a skeleton says WHERE, so the
   layout does not jump when the real data arrives. */

.skeleton {
    background: linear-gradient(90deg,
        var(--neutral-100) 25%,
        var(--neutral-200) 37%,
        var(--neutral-100) 63%);
    background-size: 400% 100%;
    background-position: 100% 0;
    border: 1px solid var(--line);  /* --neutral-100 vs --paper alone is too close to read as a shape
                                        in the dark presets (luxury: ~1.1:1) — the border guarantees the
                                        placeholder is perceivable (WCAG 1.4.11) under every preset. */
    border-radius: var(--radius-sm);
    animation: skeleton-shimmer 1.2s linear infinite;
}
[dir="rtl"] .skeleton { animation-direction: reverse; }
@keyframes skeleton-shimmer { to { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) {
    /* base.css already zeroes animation-duration/-iteration-count for every
       element (WCAG 2.3.3) — that alone would leave a single ~0ms flash of
       the gradient mid-sweep. Freeze it explicitly on its flattest frame
       instead, same defensive pattern the pre-existing rule here used. */
    .skeleton { animation: none; background-position: 50% 0; }
}

/* Shape modifiers — compose onto .skeleton (<div class="skeleton skeleton--text">),
   never replace it. */
.skeleton--text  { height: 1em; border-radius: .6em; }
.skeleton--title { height: 1.4em; border-radius: .6em; }
.skeleton--media { aspect-ratio: var(--ratio-square); }
.skeleton--btn   { height: 44px; }
.skeleton--line-sm { width: 60%; }
.skeleton--line-lg { width: 90%; }

/* .skeleton-card — composed placeholder for one loading slot in a
   .product-grid. Padding/media-height/border/radius are read verbatim off
   .product-card (line ~340 above) so a loading grid does not visibly
   reflow when real cards replace it. Intended inner shape (markup owned by
   the consuming page, not this stylesheet):
     .skeleton-card > .skeleton.skeleton-card__media               (media — fixed 150px, NOT
                                                                      skeleton--media/square: the
                                                                      real .product-card__media is
                                                                      a fixed height, not 1:1)
                    > .skeleton.skeleton--text.skeleton--line-lg   (title, line 1)
                    > .skeleton.skeleton--text.skeleton--line-sm   (title, line 2)
                    > .skeleton.skeleton--text.skeleton--line-sm   (price)
                    > .skeleton.skeleton--btn.skeleton-card__cta   (add-to-cart) */
.skeleton-card {
    height: 100%;
    background: var(--neutral-0);
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-md);
    padding: var(--space-3);
    display: flex;
    flex-direction: column;
}
.skeleton-card__media { height: 150px; margin-block: var(--space-3); }
.skeleton-card__body { display: flex; flex-direction: column; gap: var(--space-1); flex: 1 1 auto; }
.skeleton-card__cta { margin-block-start: auto; }

/* ── Toast (honest, non-blocking notice — Q42) ──────────────────────────── */

.toast {
    position: fixed;
    bottom: var(--space-6);
    inset-inline: 0;
    margin-inline: auto;
    width: max-content;
    max-width: min(90vw, 420px);
    background: var(--ink);
    color: #fff;
    padding: .85rem 1.4rem;
    border-radius: var(--radius-full);
    font-size: var(--text-base);
    text-align: center;
    box-shadow: var(--shadow-pop);
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: opacity var(--duration-base) var(--ease-standard),
                transform var(--duration-base) var(--ease-standard);
    z-index: var(--z-toast);
}
.toast.is-visible { opacity: 1; transform: translateY(0); }

/* ── Drawer ───────────────────────────────────────────────────────────────── */

.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 23, 28, .45);
    z-index: var(--z-overlay);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--duration-base) var(--ease-standard);
}
.drawer-overlay.is-open { opacity: 1; pointer-events: auto; }

.drawer {
    position: fixed;
    top: 0;
    inset-inline-end: 0;
    height: 100%;
    width: min(380px, 90vw);
    background: var(--paper);
    box-shadow: var(--shadow-pop);
    z-index: var(--z-drawer);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform var(--duration-slow) var(--ease-decelerate);
}
[dir="rtl"] .drawer { transform: translateX(-100%); }
.drawer.is-open { transform: translateX(0); }
.drawer__header { display: flex; align-items: center; justify-content: space-between; padding: var(--space-5); border-bottom: 1px solid var(--line); }
.drawer__title { font-size: var(--text-lg); font-weight: var(--weight-bold); }
.drawer__body { padding: var(--space-5); overflow-y: auto; flex: 1; }
.drawer__footer { padding: var(--space-5); border-top: 1px solid var(--line); }

/* ── Modal ────────────────────────────────────────────────────────────────── */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 23, 28, .45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
    z-index: var(--z-modal);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--duration-base) var(--ease-standard);
}
.modal-overlay.is-open { opacity: 1; pointer-events: auto; }
.modal {
    width: min(480px, 100%);
    background: var(--paper);
    border-radius: var(--card-radius, var(--radius-md));
    box-shadow: var(--shadow-pop);
    transform: translateY(12px) scale(.98);
    transition: transform var(--duration-base) var(--ease-decelerate);
}
.modal-overlay.is-open .modal { transform: translateY(0) scale(1); }
.modal__header { display: flex; align-items: center; justify-content: space-between; padding: var(--space-5); border-bottom: 1px solid var(--line); }
.modal__title { font-size: var(--text-lg); font-weight: var(--weight-bold); }
.modal__body { padding: var(--space-5); color: var(--ink-soft); line-height: var(--leading-relaxed); }
.modal__footer { padding: var(--space-5); border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: .6rem; }

/* ── Tabs ─────────────────────────────────────────────────────────────────── */

.tabs__list { display: flex; gap: var(--space-5); border-bottom: 1px solid var(--line); }
.tabs__tab {
    background: none;
    border: 0;
    padding-block: .75rem;
    font: inherit;
    font-size: var(--text-base);
    font-weight: var(--weight-semibold);
    color: var(--ink-soft);
    border-bottom: 2px solid transparent;
    cursor: pointer;
    margin-bottom: -1px;
    transition: color var(--duration-fast) var(--ease-standard), border-color var(--duration-fast) var(--ease-standard);
}
.tabs__tab:hover { color: var(--ink); }
.tabs__tab[aria-selected="true"] { color: var(--brand); border-color: var(--brand); }
.tabs__panel { padding-block: var(--space-4); color: var(--ink-soft); }

/* ── Accordion ────────────────────────────────────────────────────────────── */

.accordion__item { border-bottom: 1px solid var(--line); }
.accordion__trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: none;
    border: 0;
    padding-block: var(--space-4);
    font: inherit;
    font-size: var(--text-md);
    font-weight: var(--weight-semibold);
    color: var(--ink);
    cursor: pointer;
    text-align: start;
}
.accordion__chevron { transition: transform var(--duration-fast) var(--ease-standard); }
.accordion__trigger[aria-expanded="true"] .accordion__chevron { transform: rotate(180deg); }
.accordion__panel {
    overflow: hidden;
    max-height: 0;
    transition: max-height var(--duration-slow) var(--ease-standard);
}
.accordion__panel.is-open { max-height: 240px; }
.accordion__panel-inner { padding-bottom: var(--space-4); color: var(--ink-soft); line-height: var(--leading-relaxed); }

/* ── Breadcrumb ───────────────────────────────────────────────────────────── */

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem;
    font-size: var(--text-sm);
    color: var(--ink-soft);
    padding-block: var(--space-4) .25rem;
}
.breadcrumb a { color: var(--ink-soft); text-decoration: none; }
.breadcrumb a:hover { color: var(--brand); text-decoration: underline; }
.breadcrumb__sep { color: var(--ink-faint); }
.breadcrumb__current { color: var(--ink); font-weight: var(--weight-semibold); }

/* ── Pagination ───────────────────────────────────────────────────────────── */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    margin-top: var(--space-10);
}
.pagination__btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: .55rem 1.25rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--line);
    color: var(--ink);
    text-decoration: none;
    font-size: var(--text-base);
    font-weight: var(--weight-semibold);
    transition: background var(--duration-fast) var(--ease-standard), border-color var(--duration-fast) var(--ease-standard);
}
.pagination__btn:hover { border-color: var(--brand); background: var(--brand-tint); }
.pagination__btn.is-disabled { color: var(--ink-faint); opacity: .6; pointer-events: none; border-style: dashed; }
.pagination__status { font-size: var(--text-sm); color: var(--ink-soft); }

/* ── Empty state / Alert (status banners) ────────────────────────────────── */

.state-banner,
.alert,
.empty-state {
    border-radius: var(--card-radius, var(--radius-md));
    padding: var(--space-5) var(--space-6);
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    font-size: var(--text-md);
    line-height: var(--leading-relaxed);
}
.state-banner--error,
.alert--danger { background: var(--danger-tint); color: var(--danger-base); border: 1px solid var(--danger-line); }
.alert--success { background: var(--success-tint); color: var(--success-base); border: 1px solid var(--success-line); }
.alert--warning { background: var(--warning-tint); color: var(--warning-base); border: 1px solid var(--warning-line); }
.alert--info { background: var(--info-tint); color: var(--info-base); border: 1px solid var(--info-line); }
.state-banner--empty,
.empty-state {
    background: var(--paper-muted);
    color: var(--ink-soft);
    border: 1px solid var(--line);
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: .5rem;
    padding-block: var(--space-10);
}
/* The markup carries width="40"/"32"/"28" per-page (page-by-page drift —
   unify-icons audit, 2026-08-25), but those SVG presentation attributes
   were ALREADY dead: .icon's CSS width/height (base.css) always wins over
   an <svg> attribute regardless of source order, so every empty-state icon
   was silently rendering at 20px no matter what the markup claimed. One
   real size for the whole family — 40px, the majority value and the one
   used on every full-page empty state (cart/wishlist/orders/recent/…).
   Colour is --ink-faint, which the active preset resolves to exactly
   --neutral-500 (theme.css --preset-ink-faint) — same token the §62 spec
   asks for, reached through the semantic alias so it still adapts per
   merchant theme preset instead of a value frozen to one preset. */
.empty-state__icon { width: 40px; height: 40px; color: var(--ink-faint); }
.empty-state__title { color: var(--ink); font-weight: var(--weight-bold); font-size: var(--text-lg); }
/* Description — the plain <p> every consumer places right after
   .empty-state__title (Cart/Wishlist/Orders/Recent/Search/…). Capped so a
   full-width section never stretches a one-line sentence edge to edge, and
   a step down from the heading per the §62 rhythm (ink-soft = --neutral-600,
   same reasoning as the icon above). */
.empty-state > p:not(.empty-state__title) {
    max-width: 420px;
    font-size: var(--text-sm);
    color: var(--ink-soft);
    margin: 0;
}
/* CTA — generous, deliberate space above it, on top of .empty-state's own
   .5rem inter-child gap, so the action reads as a distinct final step
   rather than just the next line of text (§62 rhythm). */
.empty-state > .btn { margin-top: var(--space-4); }
