/* ============================================================================
   INKWELL & CO. — stationery & paper goods storefront design system
   "Paper worth writing on." Paper-ecru + sage-ink + clay, ruled-line geometry.
   Distinct identity (NOT a recolor of any sibling): light paper-first canvas,
   ruled-notebook motifs, index-card cards that FLIP to a ruled spec face,
   a self-writing "pen-stroke" hero word, washi-tape tab labels.
   Self-contained: tokens, base, components, >=760 layer, reduced-motion kill.
   Prefix: .iw-   |  Machinery contract preserved; chips restyled per-theme.
============================================================================ */

/* ---------------------------------------------------------------- TOKENS -- */
:root {
    --iw-bg: var(--tk-bg, #FAF6EE);            /* paper ecru canvas */
    --iw-bg-2: color-mix(in srgb, var(--tk-bg, #FAF6EE) 94%, var(--tk-text, #2B2620) 6%);  /* kraft band */
    --iw-panel: #FFFFFF;         /* fresh sheet */
    --iw-ink: var(--tk-text, #2B2620);           /* ink brown — primary text */
    --iw-ink-soft: color-mix(in srgb, var(--tk-text, #2B2620) 84%, var(--tk-bg, #FAF6EE) 16%);
    --iw-muted: color-mix(in srgb, var(--tk-text, #2B2620) 54%, var(--tk-bg, #FAF6EE) 46%);
    --iw-accent: var(--tk-primary, #3E6B5A);        /* sage ink — primary accent */
    --iw-accent-deep: color-mix(in srgb, var(--tk-primary, #3E6B5A) 78%, #000 22%);
    --iw-clay: var(--tk-secondary, #D98B6A);          /* clay — secondary accent */
    --iw-clay-soft: color-mix(in srgb, var(--tk-secondary, #D98B6A) 36%, #fff 64%);
    --iw-line: color-mix(in srgb, var(--tk-bg, #FAF6EE) 91%, var(--tk-text, #2B2620) 9%);
    --iw-rule: color-mix(in srgb, var(--tk-bg, #FAF6EE) 80%, var(--tk-text, #2B2620) 20%);
    --iw-sage-tint: color-mix(in srgb, var(--tk-primary, #3E6B5A) 16%, #fff 84%);
    --iw-sage-tint-2: color-mix(in srgb, var(--tk-primary, #3E6B5A) 24%, #fff 76%);
    --iw-font-d: var(--tk-font-header, 'Fraunces'), 'Amiri', Georgia, 'Times New Roman', serif;
    --iw-font-b: var(--tk-font-content, 'Inter'), 'Amiri', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --iw-font-script: 'Caveat', 'Fraunces', cursive;
    --iw-font-ar: 'Amiri', 'Fraunces', Georgia, serif;
    --iw-r-card: 6px;
    --iw-r-pill: 999px;
    --iw-sh-1: 0 1px 0 rgb(from var(--tk-text, #2B2620) r g b /.04), 0 2px 6px rgb(from var(--tk-text, #2B2620) r g b /.05);
    --iw-sh-2: 0 1px 0 rgb(from var(--tk-text, #2B2620) r g b /.05), 0 10px 26px -10px rgb(from var(--tk-text, #2B2620) r g b /.18);
    --iw-sh-lift: 0 2px 0 rgb(from var(--tk-text, #2B2620) r g b /.06), 0 20px 40px -16px rgb(from var(--tk-text, #2B2620) r g b /.26);
    --iw-catch: inset 0 1px 0 rgba(255,255,255,.7);
    --iw-shell: 1180px;
    --iw-pad: 18px;
    --iw-gap: 18px;
    --iw-ease: cubic-bezier(.22,.61,.36,1);
}

/* ------------------------------------------------------------- CONTAINMENT - */
/* GLOBAL CONTAINMENT BASELINE — no diagonal wiggle at 375/520/RTL */
html, body { max-width: 100%; overflow-x: clip; }
*, *::before, *::after { box-sizing: border-box; min-width: 0; }
.iw-page, .iw-main, .iw-shell, .iw-section { max-width: 100%; overflow-x: clip; }
img, svg, video { max-width: 100%; height: auto; }

/* ------------------------------------------------------------------- BASE - */
body {
    margin: 0;
    background: var(--iw-bg);
    color: var(--iw-ink);
    font-family: var(--iw-font-b);
    font-size: 15.5px;
    line-height: 1.6;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    /* faint paper wash on the whole canvas (very subtle, GPU-cheap, static) */
    background-image:
        radial-gradient(circle at 15% -10%, rgb(from var(--tk-primary, #3E6B5A) r g b / .05), transparent 40%),
        radial-gradient(circle at 100% 0%, rgb(from var(--tk-secondary, #D98B6A) r g b / .05), transparent 38%);
    background-attachment: fixed;
}
[dir="rtl"] body { font-family: var(--iw-font-ar); }

a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-family: var(--iw-font-d); font-weight: 600; line-height: 1.12; letter-spacing: -.01em; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4 { font-family: var(--iw-font-ar); letter-spacing: 0; }
p { margin: 0; }

.iw-shell { width: 100%; max-width: var(--iw-shell); margin-inline: auto; padding-inline: var(--iw-pad); }
.iw-page { min-height: 100vh; display: flex; flex-direction: column; }
.iw-main { flex: 1; padding-bottom: 96px; }
.iw-section { margin-top: 40px; }

/* prices/discounts must never bidi-reorder */
.iw-price, .iw-price-old, .iw-product-price, .iw-cart-item-price, .iw-cart-total-num {
    unicode-bidi: isolate;
}

/* preloader */
.preloader-wrapper {
    position: fixed; inset: 0; z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    background: var(--iw-bg);
}
.iw-loader {
    width: 38px; height: 38px; border-radius: 50%;
    border: 2px solid var(--iw-line);
    border-top-color: var(--iw-accent);
    animation: iw-spin .8s linear infinite;
}
@keyframes iw-spin { to { transform: rotate(360deg); } }

/* session notes */
.iw-note { margin-top: 18px; padding: 12px 16px; border-radius: 8px; font-size: 14px; font-weight: 600; }
.iw-note-success { background: var(--iw-sage-tint); color: var(--iw-accent-deep); border: 1px solid var(--iw-sage-tint-2); }
.iw-note-danger { background: var(--iw-clay-soft); color: var(--tk-danger, #9c4f31); border: 1px solid #ecc3b0; }

/* shared eyebrow — ruled tab style */
.iw-eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--iw-font-b);
    font-size: 11.5px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
    color: var(--iw-accent);
}
.iw-eyebrow .dash { width: 22px; height: 2px; background: var(--iw-clay); display: inline-block; border-radius: 2px; }
[dir="rtl"] .iw-eyebrow { letter-spacing: .06em; }

.iw-display { font-size: clamp(26px, 6vw, 40px); color: var(--iw-ink); }

/* ============================================================ TOPBAR ===== */
.iw-topbar {
    position: sticky; top: 0; z-index: 200;
    background: color-mix(in srgb, var(--iw-bg) 88%, transparent);
    backdrop-filter: saturate(1.1) blur(8px);
    border-bottom: 1px solid var(--iw-line);
    box-shadow: var(--iw-catch);
}
.iw-topbar-in {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; padding-block: 12px;
}
.iw-brand { display: inline-flex; align-items: center; gap: 11px; min-width: 0; }
.iw-brand-logo {
    width: 40px; height: 40px; border-radius: 6px; object-fit: cover;
    border: 1px solid var(--iw-line); background: var(--iw-panel);
    box-shadow: var(--iw-sh-1);
}
.iw-brand-name {
    font-family: var(--iw-font-d); font-weight: 600; font-size: 19px;
    letter-spacing: -.01em; color: var(--iw-ink);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
[dir="rtl"] .iw-brand-name { font-family: var(--iw-font-ar); }
.iw-topbar-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.iw-cart-trigger {
    position: relative; display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; border-radius: 50%;
    background: var(--iw-panel); color: var(--iw-ink);
    border: 1px solid var(--iw-line); box-shadow: var(--iw-sh-1);
    transition: transform .18s var(--iw-ease), box-shadow .18s var(--iw-ease);
}
.iw-cart-trigger:hover { transform: translateY(-1px); box-shadow: var(--iw-sh-2); }
.iw-cart-badge {
    position: absolute; top: -5px; inset-inline-end: -5px;
    min-width: 19px; height: 19px; padding: 0 5px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--iw-clay); color: #fff;
    font-family: var(--iw-font-b); font-size: 11px; font-weight: 700;
    border-radius: 999px; border: 2px solid var(--iw-bg);
}

/* language switcher (shared component) softened */
.iw-topbar-actions .dropdown .btn,
.iw-topbar-actions .rounded-btn {
    border-radius: 999px !important;
    border: 1px solid var(--iw-line) !important;
    background: var(--iw-panel) !important;
    color: var(--iw-ink) !important;
}

/* ============================================================== BUTTONS === */
.iw-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-family: var(--iw-font-b); font-weight: 600; font-size: 14px; letter-spacing: .01em;
    padding: 11px 22px; border-radius: var(--iw-r-pill);
    cursor: pointer; border: 1px solid transparent; line-height: 1;
    transition: transform .16s var(--iw-ease), box-shadow .16s var(--iw-ease), background-color .16s, color .16s;
    white-space: nowrap;
}
.iw-btn i { font-size: 17px; }
.iw-btn-ink { background: var(--iw-accent); color: #fff; box-shadow: var(--iw-sh-1); }
.iw-btn-ink:hover { background: var(--iw-accent-deep); transform: translateY(-1px); box-shadow: var(--iw-sh-2); color: #fff; }
.iw-btn-clay { background: var(--iw-clay); color: #fff; box-shadow: var(--iw-sh-1); }
.iw-btn-clay:hover { transform: translateY(-1px); box-shadow: var(--iw-sh-2); filter: saturate(1.05) brightness(.98); color: #fff; }
.iw-btn-paper {
    background: var(--iw-panel); color: var(--iw-ink);
    border-color: var(--iw-line); box-shadow: var(--iw-sh-1);
}
.iw-btn-paper:hover { transform: translateY(-1px); box-shadow: var(--iw-sh-2); border-color: var(--iw-rule); color: var(--iw-ink); }
.iw-btn-ghost {
    background: transparent; color: var(--iw-ink-soft);
    border-color: var(--iw-rule);
}
.iw-btn-ghost:hover { background: var(--iw-bg-2); color: var(--iw-ink-soft); }
.iw-btn-block { width: 100%; }

/* ================================================================ HERO ==== */
.iw-hero {
    position: relative; margin-top: 22px;
    border-radius: 12px; overflow: hidden;
    background: var(--iw-panel);
    border: 1px solid var(--iw-line);
    box-shadow: var(--iw-sh-2), var(--iw-catch);
    display: grid; grid-template-columns: 1fr; align-items: stretch;
}
.iw-hero-copy {
    position: relative; z-index: 2; padding: 30px 22px 28px;
    display: flex; flex-direction: column; gap: 14px;
    /* faint ruled lines behind the copy — the "notebook page" */
    background-image: repeating-linear-gradient(
        to bottom, transparent, transparent 31px, var(--iw-line) 31px, var(--iw-line) 32px);
    background-position: 0 64px;
}
/* clay margin rule on the page edge (like a notebook margin line) */
.iw-hero-copy::before {
    content: ""; position: absolute; inset-block: 18px; inset-inline-start: 14px;
    width: 2px; background: var(--iw-clay-soft); border-radius: 2px;
}
.iw-hero-title {
    font-size: clamp(30px, 8.5vw, 54px); line-height: 1.04; color: var(--iw-ink);
    letter-spacing: -.02em; padding-inline-start: 6px;
}
/* the self-writing pen-stroke word — real handwritten "writing" in Caveat
   that draws itself (stroke first, ink fills in), then a hand-drawn underline */
.iw-penword {
    position: relative; display: inline-block; vertical-align: baseline;
    line-height: 0;
}
.iw-penword svg {
    display: block; height: 1.18em; width: auto; overflow: visible;
    transform: rotate(-2deg); transform-origin: left center;
}
[dir="rtl"] .iw-penword svg { transform: rotate(-2deg) scaleX(1); transform-origin: right center; }
.iw-penword-txt {
    font-family: var(--iw-font-script, 'Caveat'), cursive;
    font-weight: 700;
    font-size: 104px;
    fill: var(--iw-accent);
    stroke: var(--iw-accent);
    stroke-width: 1.4;
    stroke-linecap: round; stroke-linejoin: round;
    /* draw: outline first (fill hidden), then ink fades in */
    fill-opacity: 0;
    stroke-dasharray: 760; stroke-dashoffset: 760;
    animation: iw-write 1.15s var(--iw-ease) .35s forwards,
               iw-ink .5s ease-out 1.15s forwards;
}
@keyframes iw-write { to { stroke-dashoffset: 0; } }
@keyframes iw-ink   { to { fill-opacity: 1; } }
/* hand-drawn underline swoosh under the word */
.iw-penword-underline {
    position: absolute; left: 2px; right: 6px; bottom: -2px; height: 7px;
    background: var(--iw-clay); border-radius: 6px;
    transform-origin: left center; transform: scaleX(0) rotate(-1.5deg);
    animation: iw-underline .55s var(--iw-ease) 1.35s forwards;
    opacity: .9;
}
[dir="rtl"] .iw-penword-underline { left: 6px; right: 2px; transform-origin: right center; }
@keyframes iw-underline { to { transform: scaleX(1) rotate(-1.5deg); } }
.iw-hero-sub { font-size: 15.5px; color: var(--iw-muted); max-width: 46ch; padding-inline-start: 6px; }
.iw-hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; padding-inline-start: 6px; }

.iw-hero-media { position: relative; min-height: 200px; }
.iw-hero-media img {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; display: block;
}
.iw-hero-media::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgb(from var(--tk-text, #2B2620) r g b /.04));
    pointer-events: none;
}
/* corner dog-ear on the hero media (paper fold) */
.iw-dogear {
    position: absolute; top: 0; inset-inline-end: 0; z-index: 3;
    width: 0; height: 0;
    border-block-start: 30px solid color-mix(in srgb, var(--iw-bg-2) 96%, #000 4%);
    border-inline-start: 30px solid transparent;
    filter: drop-shadow(-1px 1px 1px rgb(from var(--tk-text, #2B2620) r g b /.12));
}

/* ====================================================== USE FILTER ======= */
.iw-usefilter {
    margin-top: 18px;
    display: flex; flex-wrap: wrap; gap: 9px; justify-content: center;
}
.iw-use-chip {
    display: inline-flex; align-items: center; gap: 7px;
    font-family: var(--iw-font-b); font-size: 13px; font-weight: 600;
    padding: 9px 16px; border-radius: var(--iw-r-pill);
    background: var(--iw-panel); color: var(--iw-ink-soft);
    border: 1px dashed var(--iw-rule);
    box-shadow: var(--iw-sh-1);
    transition: transform .16s var(--iw-ease), background-color .16s, color .16s, border-color .16s;
}
.iw-use-chip i { color: var(--iw-clay); font-size: 16px; }
.iw-use-chip:hover { transform: translateY(-1px); background: var(--iw-sage-tint); color: var(--iw-accent-deep); border-color: var(--iw-accent); }
.iw-use-chip:hover i { color: var(--iw-accent-deep); }
.iw-use-chip.is-active { background: var(--iw-accent); color: #fff; border-style: solid; border-color: var(--iw-accent); }
.iw-use-chip.is-active i { color: #fff; }

/* ===================================================== SECTION HEAD ====== */
.iw-sechead { margin-bottom: 18px; }
.iw-sechead-row {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 14px; margin-top: 8px;
    border-bottom: 2px solid var(--iw-line); padding-bottom: 10px;
}
.iw-sechead-link {
    font-family: var(--iw-font-b); font-size: 13px; font-weight: 600;
    color: var(--iw-accent); white-space: nowrap;
    display: inline-flex; align-items: center; gap: 5px;
}
.iw-sechead-link i { transition: transform .16s var(--iw-ease); }
.iw-sechead-link:hover i { transform: translateX(3px); }
[dir="rtl"] .iw-sechead-link:hover i { transform: translateX(-3px); }
.iw-count {
    font-family: var(--iw-font-b); font-size: 12.5px; font-weight: 600;
    color: var(--iw-muted); white-space: nowrap;
}

/* ================================================== TRUST STRIP ========== */
.iw-trust {
    margin-top: 18px;
    display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px;
    padding: 14px var(--iw-pad);
    background: var(--iw-bg-2);
    border: 1px solid var(--iw-line); border-radius: 8px;
}
.iw-trust-item {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 13px; font-weight: 600; color: var(--iw-ink-soft);
}
.iw-trust-item i { color: var(--iw-accent); font-size: 18px; }

/* ================================================ CATEGORY GRID ========== */
/* ruled "index card" tiles with washi-tape tab labels */
.iw-catgrid {
    display: grid; gap: var(--iw-gap);
    grid-template-columns: repeat(2, 1fr);
}
.iw-cattile {
    position: relative; display: block;
    border-radius: var(--iw-r-card); overflow: hidden;
    background: var(--iw-panel);
    border: 1px solid var(--iw-line);
    box-shadow: var(--iw-sh-1);
    transition: transform .2s var(--iw-ease), box-shadow .2s var(--iw-ease);
}
.iw-cattile:hover { transform: translateY(-3px); box-shadow: var(--iw-sh-lift); }
.iw-cattile-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.iw-cattile-img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s var(--iw-ease); }
.iw-cattile:hover .iw-cattile-img { transform: scale(1.05); }
.iw-cattile-scrim {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgb(from var(--tk-text, #2B2620) r g b /.42));
}
/* washi-tape tab on the tile */
.iw-cattile-tape {
    position: absolute; top: 12px; inset-inline-start: -6px; z-index: 2;
    font-family: var(--iw-font-b); font-size: 10.5px; font-weight: 700;
    letter-spacing: .12em; text-transform: uppercase;
    color: var(--iw-ink); background: var(--iw-clay-soft);
    padding: 4px 12px;
    box-shadow: 0 2px 6px rgb(from var(--tk-text, #2B2620) r g b /.14);
    transform: rotate(-3deg);
}
.iw-cattile-cap {
    position: absolute; inset-inline: 14px; bottom: 12px; z-index: 2;
    display: flex; flex-direction: column; gap: 3px;
}
.iw-cattile-name {
    font-family: var(--iw-font-d); font-weight: 600; font-size: 19px; color: #fff;
    text-shadow: 0 1px 8px rgb(from var(--tk-text, #2B2620) r g b /.4);
}
[dir="rtl"] .iw-cattile-name { font-family: var(--iw-font-ar); }
.iw-cattile-cta {
    display: inline-flex; align-items: center; gap: 5px;
    font-family: var(--iw-font-b); font-size: 12px; font-weight: 600; color: var(--iw-clay-soft);
}
.iw-cattile-cta i { transition: transform .16s var(--iw-ease); }
.iw-cattile:hover .iw-cattile-cta i { transform: translateX(3px); }
[dir="rtl"] .iw-cattile:hover .iw-cattile-cta i { transform: translateX(-3px); }

/* category rail (horizontal scroller — category view header) */
.iw-cathead { margin-top: 22px; }
.iw-cat-rail {
    display: flex; gap: 9px; margin-top: 14px;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; padding-bottom: 4px; scroll-snap-type: x proximity;
}
.iw-cat-rail::-webkit-scrollbar { display: none; }
.iw-cat-link {
    display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0;
    padding: 7px 14px 7px 7px; border-radius: var(--iw-r-pill);
    background: var(--iw-panel); border: 1px solid var(--iw-line);
    font-family: var(--iw-font-b); font-size: 13px; font-weight: 600; color: var(--iw-ink-soft);
    box-shadow: var(--iw-sh-1); scroll-snap-align: start;
    transition: background-color .16s, color .16s, border-color .16s;
}
[dir="rtl"] .iw-cat-link { padding: 7px 7px 7px 14px; }
.iw-cat-link img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.iw-cat-link.is-active { background: var(--iw-accent); color: #fff; border-color: var(--iw-accent); }

/* ================================================= PRODUCT RAIL/GRID ===== */
.iw-prodrail {
    display: flex; gap: var(--iw-gap);
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; padding-bottom: 6px; scroll-snap-type: x proximity;
    scroll-padding-inline: var(--iw-pad);
}
.iw-prodrail::-webkit-scrollbar { display: none; }
.iw-prodrail .iw-card { flex: 0 0 76%; max-width: 280px; scroll-snap-align: start; }

.iw-grid {
    display: grid; gap: var(--iw-gap);
    grid-template-columns: repeat(2, 1fr);
}

/* INDEX-CARD product card — flips to a ruled "spec" face on hover */
.iw-card {
    position: relative;
    background: var(--iw-panel);
    border: 1px solid var(--iw-line);
    border-radius: var(--iw-r-card);
    box-shadow: var(--iw-sh-1);
    overflow: hidden;
    transition: transform .2s var(--iw-ease), box-shadow .2s var(--iw-ease);
}
.iw-card:hover { transform: translateY(-3px); box-shadow: var(--iw-sh-lift); }
/* binding-tape strip across the card top (signature geometry) */
.iw-card::before {
    content: ""; position: absolute; top: 0; inset-inline: 0; height: 3px; z-index: 6;
    background: linear-gradient(90deg, var(--iw-accent), var(--iw-clay));
    opacity: .9;
}

/* media holds a flip: front = product photo, back = ruled spec card */
.iw-card-media {
    position: relative; display: block;
    aspect-ratio: 1 / 1; overflow: hidden;
    perspective: 900px;
}
.iw-flip {
    position: absolute; inset: 0;
    transform-style: preserve-3d;
    transition: transform .55s var(--iw-ease);
    will-change: transform;
}
.iw-card:hover .iw-flip { transform: rotateY(180deg); }
[dir="rtl"] .iw-card:hover .iw-flip { transform: rotateY(-180deg); }
.iw-flip-face {
    position: absolute; inset: 0;
    backface-visibility: hidden; -webkit-backface-visibility: hidden;
    overflow: hidden;
}
.iw-flip-front img { width: 100%; height: 100%; object-fit: cover; display: block; }
.iw-flip-back {
    transform: rotateY(180deg);
    background: var(--iw-panel);
    /* ruled paper face */
    background-image: repeating-linear-gradient(
        to bottom, transparent, transparent 21px, var(--iw-line) 21px, var(--iw-line) 22px);
    background-position: 0 24px;
    padding: 16px 16px 16px 22px;
    display: flex; flex-direction: column; justify-content: center; gap: 9px;
}
.iw-flip-back::before {
    content: ""; position: absolute; inset-block: 14px; inset-inline-start: 13px;
    width: 2px; background: var(--iw-clay-soft);
}
[dir="rtl"] .iw-flip-back { padding: 16px 22px 16px 16px; }
.iw-spec-title {
    font-family: var(--iw-font-d); font-size: 13px; font-weight: 600;
    color: var(--iw-accent); letter-spacing: .02em;
    display: inline-flex; align-items: center; gap: 6px;
}
.iw-spec-row {
    display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
    font-family: var(--iw-font-b); font-size: 13px; color: var(--iw-ink-soft);
}
.iw-spec-row span:last-child { font-weight: 700; color: var(--iw-ink); }

/* flags / badges on card */
.iw-flag {
    position: absolute; top: 12px; inset-inline-start: 12px; z-index: 7;
    display: inline-flex; align-items: center; gap: 5px;
    font-family: var(--iw-font-b); font-size: 11px; font-weight: 700; letter-spacing: .04em;
    padding: 5px 11px; border-radius: var(--iw-r-pill);
    background: var(--iw-accent); color: #fff;
    box-shadow: 0 4px 10px rgb(from var(--tk-primary, #3E6B5A) r g b / .28);
}
.iw-flag-out { background: var(--iw-muted); }

.iw-card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; }
.iw-card-link { display: block; color: inherit; }
.iw-card-name {
    font-family: var(--iw-font-d); font-weight: 600; font-size: 16.5px; color: var(--iw-ink);
    line-height: 1.2;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
[dir="rtl"] .iw-card-name { font-family: var(--iw-font-ar); }
.iw-card-meta {
    font-size: 12.5px; color: var(--iw-muted); margin-top: 2px;
    display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.iw-card-foot {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--iw-line);
}
.iw-price-wrap { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.iw-price { font-family: var(--iw-font-d); font-weight: 600; font-size: 17px; color: var(--iw-ink); }
.iw-price-old { font-size: 13px; color: var(--iw-muted); text-decoration: line-through; }
.iw-add {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
    background: var(--iw-sage-tint); color: var(--iw-accent-deep);
    border: 1px solid var(--iw-sage-tint-2); cursor: pointer;
    transition: transform .16s var(--iw-ease), background-color .16s, color .16s;
}
.iw-add:hover { background: var(--iw-accent); color: #fff; transform: translateY(-1px) rotate(-6deg); }
.iw-add i { font-size: 19px; }

/* ===================================================== TOOLBAR =========== */
.iw-toolbar {
    display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
    margin-bottom: 18px;
}
.iw-search, .iw-pricef { display: flex; gap: 8px; flex: 1 1 240px; min-width: 0; }
.iw-pricef { flex: 1 1 200px; }
.iw-input {
    flex: 1; min-width: 0; width: 100%;
    font-family: var(--iw-font-b); font-size: 14px; color: var(--iw-ink);
    padding: 10px 14px; border-radius: 8px;
    background: var(--iw-panel); border: 1px solid var(--iw-line);
    box-shadow: var(--iw-catch);
}
.iw-input::placeholder { color: var(--iw-muted); }
.iw-input:focus { outline: none; border-color: var(--iw-accent); box-shadow: 0 0 0 3px var(--iw-sage-tint); }
.iw-select {
    font-family: var(--iw-font-b); font-size: 14px; color: var(--iw-ink);
    padding: 10px 38px 10px 14px; border-radius: 8px;
    background-color: var(--iw-panel); border: 1px solid var(--iw-line);
    box-shadow: var(--iw-catch); cursor: pointer; flex: 0 0 auto;
    appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237C7468' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6l6 -6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 13px center;
}
[dir="rtl"] .iw-select { padding: 10px 14px 10px 38px; background-position: left 13px center; }
.iw-select:focus { outline: none; border-color: var(--iw-accent); }

/* ===================================================== PAGINATION ======== */
.iw-pagination { margin-top: 30px; display: flex; justify-content: center; }
.iw-pagination .pagination { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0; flex-wrap: wrap; }
.iw-pagination .page-item .page-link {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 38px; height: 38px; padding: 0 10px; border-radius: 8px;
    background: var(--iw-panel); border: 1px solid var(--iw-line); color: var(--iw-ink-soft);
    font-family: var(--iw-font-b); font-weight: 600; font-size: 13px; box-shadow: var(--iw-sh-1);
}
.iw-pagination .page-item.active .page-link { background: var(--iw-accent); border-color: var(--iw-accent); color: #fff; }
.iw-pagination .page-item.disabled .page-link { opacity: .5; }

/* ===================================================== EMPTY STATES ====== */
.iw-empty {
    text-align: center; padding: 48px 20px;
    background: var(--iw-panel); border: 1px dashed var(--iw-rule); border-radius: 10px;
}
.iw-empty-mark {
    display: inline-flex; align-items: center; justify-content: center;
    width: 62px; height: 62px; border-radius: 50%; margin-bottom: 14px;
    background: var(--iw-bg-2); border: 1px solid var(--iw-line);
    position: relative;
}
.iw-empty-mark::before {
    content: "\270D"; /* writing hand */
    font-size: 26px; color: var(--iw-accent); transform: rotate(-8deg);
}
.iw-empty-mark-light { background: var(--iw-bg-2); }
.iw-empty-title { font-family: var(--iw-font-d); font-size: 20px; color: var(--iw-ink); margin-bottom: 6px; }
.iw-empty-sub { font-size: 13.5px; color: var(--iw-muted); margin-bottom: 16px; }

/* ===================================================== PRODUCT PAGE ====== */
.iw-crumb {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    font-family: var(--iw-font-b); font-size: 12.5px; color: var(--iw-muted);
    margin: 22px 0 16px;
}
.iw-crumb a { color: var(--iw-accent); font-weight: 600; }
.iw-crumb-sep { color: var(--iw-rule); }
.iw-crumb-cur { color: var(--iw-ink-soft); }

.iw-product { display: grid; grid-template-columns: 1fr; gap: 26px; }
.iw-gallery { display: flex; flex-direction: column; gap: 12px; }
.iw-gallery-main {
    display: block; border-radius: 10px; overflow: hidden;
    background: var(--iw-panel); border: 1px solid var(--iw-line);
    box-shadow: var(--iw-sh-2); aspect-ratio: 1 / 1;
    position: relative;
}
.iw-gallery-main::after {
    content: ""; position: absolute; top: 0; inset-inline: 0; height: 3px;
    background: linear-gradient(90deg, var(--iw-accent), var(--iw-clay)); z-index: 2;
}
.iw-gallery-main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.iw-thumb-rail {
    display: flex; gap: 9px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px;
}
.iw-thumb-rail::-webkit-scrollbar { display: none; }
.iw-thumb {
    flex: 0 0 auto; width: 68px; height: 68px; border-radius: 7px; overflow: hidden;
    border: 1px solid var(--iw-line); box-shadow: var(--iw-sh-1); cursor: pointer;
}
.iw-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.iw-product-info { display: flex; flex-direction: column; gap: 13px; }
.iw-product-name { font-family: var(--iw-font-d); font-size: clamp(24px, 6vw, 34px); color: var(--iw-ink); line-height: 1.1; }
[dir="rtl"] .iw-product-name { font-family: var(--iw-font-ar); }
.iw-product-sub { font-size: 15px; color: var(--iw-muted); }
.iw-product-price { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.iw-product-price .iw-price { font-size: 26px; }
.iw-product-price .iw-price-old { font-size: 16px; }

/* spec chips (GSM, dot/lined/blank) */
.iw-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.iw-chip {
    display: inline-flex; align-items: center; gap: 6px;
    font-family: var(--iw-font-b); font-size: 12.5px; font-weight: 600;
    padding: 6px 13px; border-radius: var(--iw-r-pill);
    background: var(--iw-bg-2); color: var(--iw-ink-soft);
    border: 1px solid var(--iw-line);
}
.iw-chip i { color: var(--iw-clay); font-size: 14px; }
.iw-chip-accent { background: var(--iw-sage-tint); color: var(--iw-accent-deep); border-color: var(--iw-sage-tint-2); }

.iw-concierge-hint {
    display: flex; align-items: flex-start; gap: 9px;
    font-size: 12.5px; color: var(--iw-muted); line-height: 1.5;
    padding: 12px 14px; border-radius: 8px;
    background: var(--iw-bg-2); border: 1px solid var(--iw-line);
}
.iw-concierge-hint i { color: var(--iw-accent); font-size: 17px; margin-top: 1px; flex-shrink: 0; }

.iw-prose { color: var(--iw-ink-soft); font-size: 15px; line-height: 1.75; }
.iw-prose h1, .iw-prose h2, .iw-prose h3 { margin: 22px 0 10px; color: var(--iw-ink); }
.iw-prose p { margin-bottom: 12px; }
.iw-prose ul, .iw-prose ol { margin: 0 0 12px; padding-inline-start: 22px; }
.iw-prose a { color: var(--iw-accent); text-decoration: underline; }
.iw-prose img { border-radius: 8px; }

/* policy page */
.iw-policy { max-width: 820px; margin-top: 26px; }
.iw-policy .iw-display { margin: 10px 0 18px; }

/* ===================================================== VARIANT CHIPS ===== */
/* restyle of the shared sm-variant picker to Inkwell (ruled-tab chips) */
.iw-product-info .sm-variants { margin: 6px 0 4px; gap: 14px; }
.iw-product-info .sm-variant-label {
    font-family: var(--iw-font-d); font-size: 14px; font-weight: 600;
    color: var(--iw-ink); opacity: 1; letter-spacing: 0;
    display: inline-flex; align-items: center; gap: 7px;
}
.iw-product-info .sm-variant-label::before {
    content: ""; width: 14px; height: 2px; background: var(--iw-clay); border-radius: 2px;
}
.iw-product-info .sm-variant-opt {
    border: 1px solid var(--iw-rule); border-radius: var(--iw-r-pill);
    padding: 8px 16px; font-family: var(--iw-font-b); font-size: 13px; font-weight: 600;
    background: var(--iw-panel); color: var(--iw-ink-soft); opacity: 1;
    box-shadow: var(--iw-sh-1);
    transition: transform .14s var(--iw-ease), background-color .14s, color .14s, border-color .14s;
}
.iw-product-info .sm-variant-opt:hover { transform: translateY(-1px); border-color: var(--iw-accent); color: var(--iw-accent-deep); }
.iw-product-info .sm-variant-opt.is-selected {
    background: var(--iw-accent); color: #fff; border-color: var(--iw-accent); border-width: 1px;
}
.iw-product-info .sm-variant-opt:focus-visible { outline: 2px solid var(--iw-accent); outline-offset: 2px; }

/* ===================================================== CART DRAWER ======= */
.iw-drawer {
    background: var(--iw-bg); color: var(--iw-ink);
    border-inline-start: 1px solid var(--iw-line);
    width: min(420px, 92vw);
}
.iw-drawer .offcanvas-header { border-bottom: 1px solid var(--iw-line); padding: 16px 18px; }
.iw-drawer-title { font-family: var(--iw-font-d); font-size: 20px; color: var(--iw-ink); }
.iw-drawer .offcanvas-body { padding: 14px 18px; }
.iw-drawer .btn-close { filter: none; opacity: .6; }

.iw-cart-item {
    display: flex; gap: 12px; padding: 13px 0;
    border-bottom: 1px dashed var(--iw-line);
}
.iw-cart-item-img {
    width: 64px; height: 64px; border-radius: 7px; object-fit: cover; flex-shrink: 0;
    border: 1px solid var(--iw-line); background: var(--iw-panel);
}
.iw-cart-item-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.iw-cart-item-name { font-family: var(--iw-font-d); font-size: 15px; font-weight: 600; color: var(--iw-ink); line-height: 1.25; }
[dir="rtl"] .iw-cart-item-name { font-family: var(--iw-font-ar); }
.iw-cart-item-sub { font-family: var(--iw-font-b); font-size: 11.5px; color: var(--iw-muted); }
.sm-cart-variants { color: var(--iw-accent); font-weight: 600; }
.iw-cart-item-price { font-family: var(--iw-font-d); font-size: 15px; font-weight: 600; color: var(--iw-accent-deep); margin-top: 2px; }
.iw-cart-item-actions { display: flex; align-items: center; gap: 6px; margin-top: 7px; }
.iw-qty-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; border-radius: 7px;
    background: var(--iw-panel); border: 1px solid var(--iw-line); color: var(--iw-ink-soft);
    cursor: pointer; transition: background-color .14s, color .14s;
}
.iw-qty-btn svg { width: 16px; height: 16px; }
.iw-qty-btn:hover { background: var(--iw-bg-2); }
.iw-qty-remove:hover { background: #fbeae3; color: var(--iw-clay); border-color: var(--iw-clay-soft); }
.iw-qty-num { font-family: var(--iw-font-b); font-weight: 700; font-size: 14px; min-width: 22px; text-align: center; }

.iw-cart-empty { text-align: center; padding: 40px 16px; display: none; }
.iw-cart-empty-text { color: var(--iw-muted); font-size: 14px; margin: 0 0 16px; }

.iw-drawer-foot { padding: 16px 18px; border-top: 1px solid var(--iw-line); background: var(--iw-panel); }
.iw-cart-total {
    display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
    margin: 0 0 12px; font-family: var(--iw-font-d); font-size: 16px; color: var(--iw-ink);
}
.iw-cart-total-num { font-size: 21px; font-weight: 600; color: var(--iw-accent-deep); }
.iw-place-order {
    width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 13px; border-radius: var(--iw-r-pill); cursor: pointer;
    background: var(--iw-accent); color: #fff;
    font-family: var(--iw-font-b); font-weight: 700; font-size: 15px;
    box-shadow: var(--iw-sh-2); transition: background-color .16s, transform .16s var(--iw-ease);
}
.iw-place-order:hover { background: var(--iw-accent-deep); transform: translateY(-1px); color: #fff; }
.iw-place-order i { font-size: 19px; }

/* ===================================================== ORDER MODAL ======= */
.iw-modal .modal-content {
    position: relative;
    border: 1px solid var(--iw-line); border-radius: 12px;
    background: var(--iw-panel); box-shadow: var(--iw-sh-lift); overflow: hidden;
}
.iw-modal .modal-content::before {
    content: ""; position: absolute; top: 0; inset-inline: 0; height: 4px;
    background: linear-gradient(90deg, var(--iw-accent), var(--iw-clay));
}
.iw-modal .modal-header { border-bottom: 1px solid var(--iw-line); padding: 18px 20px; align-items: flex-start; }
.iw-modal .modal-title { font-family: var(--iw-font-d); font-size: 20px; color: var(--iw-ink); }
.iw-modal-sub { display: block; color: var(--iw-muted); font-size: 12.5px; margin-top: 3px; }
.iw-modal .modal-body { padding: 18px 20px; }
.iw-modal .modal-footer { border-top: 1px solid var(--iw-line); padding: 14px 20px; gap: 8px; }
.iw-modal .form-label { font-family: var(--iw-font-b); font-weight: 600; font-size: 13.5px; color: var(--iw-ink-soft); margin-bottom: 5px; }
.iw-modal .form-control {
    font-family: var(--iw-font-b); font-size: 14px; color: var(--iw-ink);
    padding: 11px 14px; border-radius: 8px;
    background: var(--iw-bg); border: 1px solid var(--iw-line);
}
.iw-modal .form-control::placeholder { color: var(--iw-muted); }
.iw-modal .form-control:focus { outline: none; border-color: var(--iw-accent); box-shadow: 0 0 0 3px var(--iw-sage-tint); background: var(--iw-panel); }
.iw-modal .form-check-input:checked { background-color: var(--iw-accent); border-color: var(--iw-accent); }
.iw-modal .form-check-label { font-size: 14px; color: var(--iw-ink-soft); }
.iw-modal .btn-close { position: relative; opacity: .6; }

/* ===================================================== MOBILE DOCK ======= */
.iw-dock {
    position: fixed; inset-inline: 0; bottom: 0; z-index: 180;
    display: flex; align-items: stretch; justify-content: space-around;
    background: color-mix(in srgb, var(--iw-panel) 94%, transparent);
    backdrop-filter: blur(8px);
    border-top: 1px solid var(--iw-line);
    box-shadow: 0 -6px 20px -10px rgb(from var(--tk-text, #2B2620) r g b /.2);
    padding-bottom: env(safe-area-inset-bottom, 0);
}
.iw-dock a {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    padding: 9px 0; color: var(--iw-muted);
    font-family: var(--iw-font-b); font-size: 10.5px; font-weight: 600;
}
.iw-dock a i { font-size: 21px; }
.iw-dock a.is-active { color: var(--iw-accent); }

/* ===================================================== FOOTER ============ */
.iw-footer {
    margin-top: 50px; background: var(--iw-ink); color: #E9E2D6;
    /* ruled lines on the dark footer (paper feel inverted) */
    background-image: repeating-linear-gradient(
        to bottom, transparent, transparent 33px, rgba(255,255,255,.035) 33px, rgba(255,255,255,.035) 34px);
}
.iw-footer .iw-shell { padding-block: 34px; }
.iw-footer-top {
    display: flex; flex-direction: column; gap: 18px;
    padding-bottom: 22px; border-bottom: 1px solid rgba(255,255,255,.12);
}
.iw-footer-brand { display: flex; flex-direction: column; gap: 0; min-width: 0; }
.iw-footer-wordmark { font-family: var(--iw-font-d); font-size: 24px; font-weight: 600; color: #fff; display: block; }
[dir="rtl"] .iw-footer-wordmark { font-family: var(--iw-font-ar); }
.iw-footer-tag { color: #B7AE9E; font-size: 13.5px; margin-top: 5px; }
.iw-social { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.iw-social a {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(255,255,255,.07); color: #E9E2D6; border: 1px solid rgba(255,255,255,.1);
    transition: background-color .16s, transform .16s var(--iw-ease), color .16s;
}
.iw-social a:hover { background: var(--iw-clay); color: #fff; transform: translateY(-2px); }
.iw-social a i { font-size: 18px; }
.iw-footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 20px 0; }
.iw-footer-links a { color: #C9C0B0; font-size: 13px; transition: color .16s; }
.iw-footer-links a:hover { color: #fff; }
.iw-footer-base {
    display: flex; flex-direction: column; gap: 8px;
    padding-top: 18px; border-top: 1px solid rgba(255,255,255,.12);
    font-size: 12.5px; color: #9C9384;
}
.iw-footer-base a { color: #C9C0B0; }
.iw-footer-base a:hover { color: #fff; }
.iw-footer-base i { color: var(--iw-clay); }

/* ============================================================ >= 760 ===== */
@media (min-width: 760px) {
    :root { --iw-pad: 26px; --iw-gap: 22px; }
    .iw-main { padding-bottom: 0; }
    .iw-section { margin-top: 56px; }

    .iw-hero {
        grid-template-columns: 1.05fr .95fr;
        margin-top: 30px;
    }
    .iw-hero-copy { padding: 52px 44px; justify-content: center; }
    .iw-hero-copy::before { inset-inline-start: 26px; }
    .iw-hero-title, .iw-hero-sub, .iw-hero-cta { padding-inline-start: 14px; }
    .iw-hero-media { min-height: 420px; }

    .iw-catgrid { grid-template-columns: repeat(3, 1fr); }
    .iw-catgrid .iw-cattile:first-child { grid-column: span 2; }
    .iw-catgrid .iw-cattile:first-child .iw-cattile-media { aspect-ratio: 16 / 9; }

    .iw-grid { grid-template-columns: repeat(4, 1fr); }
    .iw-prodrail .iw-card { flex-basis: 280px; }

    .iw-product { grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
    .iw-gallery { position: sticky; top: 86px; }

    .iw-dock { display: none; }
    .iw-footer-top { flex-direction: row; align-items: center; justify-content: space-between; }
    .iw-footer-base { flex-direction: row; align-items: center; justify-content: space-between; }
}

/* ====================================== REDUCED-MOTION KILL LAYER ======== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
    /* show the finished pen-stroke word, no drawing */
    .iw-penword-txt { stroke-dashoffset: 0 !important; fill-opacity: 1 !important; }
    .iw-penword-underline { transform: scaleX(1) rotate(-1.5deg) !important; }
    /* no flip — keep the photo face up */
    .iw-card:hover .iw-flip { transform: none !important; }
    .iw-loader { animation: none !important; border-top-color: var(--iw-accent); }
}

/* ============================== TOAST PILL (founder lesson #1) ============ */
/* Compact PILL, top-center, auto width (~360px) — NEVER a full-screen panel.
   Self-contained so it never depends on the purged/shared app store.css. */
.alert-float {
    position: fixed !important;
    top: 18px !important;
    bottom: auto !important;
    inset-block-end: auto !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) translateY(-14px);
    width: auto !important;
    max-width: min(360px, calc(100vw - 28px)) !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 11px 20px !important;
    border-radius: 999px !important;
    border: 1px solid transparent !important;
    box-shadow: var(--iw-sh-lift) !important;
    font-family: var(--iw-font-b) !important;
    font-size: 14px !important; font-weight: 600 !important;
    text-align: center !important;
    z-index: 12000 !important;
    display: none;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s var(--iw-ease), transform .25s var(--iw-ease);
}
.alert-float.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.alert-float.alert-success { background: var(--iw-accent) !important; border-color: var(--iw-accent-deep) !important; color: #fff !important; }
.alert-float.alert-danger { background: var(--iw-clay) !important; border-color: #c4755a !important; color: #fff !important; }
.alert-float #errorAlertMessage, .alert-float #successAlertMessage { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
