/* ===========================================================================
   Kringle Toy Company — storefront
   A heritage toy-emporium identity: warm paper, deep Kringle red, ink, with
   holly-green and brass as restrained accents. Display: Fraunces. Body: Mulish.
   =========================================================================== */
:root {
    --paper: #faf6ef;
    --surface: #ffffff;
    --ink: #2b2320;
    --ink-soft: #574c45;
    --muted: #938577;
    --brand: #c1272d;
    --brand-deep: #9c1f24;
    --brand-tint: #f8ebe7;
    --holly: #236b48;
    --brass: #a9802f;
    --brass-soft: #cdb079;
    --line: #ece2d3;
    --line-strong: #ddd0bd;
    --charcoal: #221a1a;
    --charcoal-2: #2e2422;
    --r: 12px;
    --r-sm: 8px;
    --r-pill: 999px;
    --shadow: 0 1px 2px rgba(43,35,32,.04), 0 10px 34px rgba(43,35,32,.07);
    --shadow-hover: 0 2px 6px rgba(43,35,32,.06), 0 22px 50px rgba(43,35,32,.12);
    --maxw: 1200px;
    --serif: "Fraunces", Georgia, "Times New Roman", serif;
    --sans: "Mulish", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0; font-family: var(--sans); color: var(--ink);
    background: var(--paper); line-height: 1.6; font-size: 16.5px;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-deep); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.01em; color: var(--ink); }
svg { display: block; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 780px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.free { color: var(--holly); font-weight: 700; }
.right { text-align: right; }
.center { text-align: center; }

/* Eyebrow — the structural signature: brass, spaced, with a short rule */
.eyebrow {
    font-family: var(--sans); font-weight: 700; font-size: .72rem;
    text-transform: uppercase; letter-spacing: .18em; color: var(--brass);
    display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--brass-soft); }

/* --- Buttons ------------------------------------------------------------ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5em;
    font-family: var(--sans); font-weight: 700; font-size: .94rem; letter-spacing: .01em;
    background: var(--brand); color: #fff; border: 1px solid var(--brand);
    padding: 12px 22px; border-radius: var(--r-sm); cursor: pointer; transition: .18s; line-height: 1;
}
.btn:hover { background: var(--brand-deep); border-color: var(--brand-deep); color: #fff; transform: translateY(-1px); }
.btn svg { width: 18px; height: 18px; }
.btn-lg { padding: 15px 30px; font-size: 1rem; }
.btn-sm { padding: 8px 14px; font-size: .82rem; }
.btn-block { display: flex; width: 100%; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: #fff; border-color: var(--ink); color: var(--ink); }
.btn-muted { background: #efe9df; color: var(--muted); border-color: transparent; cursor: not-allowed; }
.btn-muted:hover { transform: none; background: #efe9df; color: var(--muted); }
.btn-on-dark { background: #fff; color: var(--ink); border-color: #fff; }
.btn-on-dark:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.btn-outline-light:hover { background: rgba(255,255,255,.1); color: #fff; border-color: #fff; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

/* --- Header ------------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(250,246,239,.92); backdrop-filter: saturate(150%) blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 22px; height: 76px; }
.brand { display: inline-flex; flex-direction: column; line-height: 1; gap: 3px; }
.brand:hover { color: inherit; }
.brand-name { font-family: var(--serif); font-weight: 600; font-size: 1.5rem; color: var(--brand); letter-spacing: -.01em; }
.brand-sub { font-family: var(--sans); font-weight: 700; font-size: .58rem; letter-spacing: .34em; text-transform: uppercase; color: var(--ink-soft); padding-left: 2px; }
.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav > a, .nav-dropdown > a { padding: 9px 13px; border-radius: var(--r-sm); color: var(--ink); font-weight: 600; font-size: .92rem; display: inline-flex; align-items: center; gap: 5px; }
.main-nav > a:hover, .nav-dropdown > a:hover { background: rgba(193,39,45,.06); color: var(--brand); }
.nav-dropdown { position: relative; }
.nav-dropdown > a svg { width: 15px; height: 15px; }
.nav-dropdown-menu { position: absolute; top: 100%; left: 0; min-width: 220px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 8px; display: none; flex-direction: column; gap: 2px; }
.nav-dropdown:hover .nav-dropdown-menu { display: flex; }
.nav-dropdown-menu a { padding: 9px 12px; border-radius: var(--r-sm); color: var(--ink); font-size: .9rem; font-weight: 500; }
.nav-dropdown-menu a:hover { background: var(--brand-tint); color: var(--brand-deep); }
.header-search { margin-left: auto; display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line-strong); border-radius: var(--r-pill); padding: 8px 8px 8px 16px; }
.header-search svg { color: var(--muted); width: 18px; height: 18px; }
.header-search input { border: 0; background: transparent; outline: none; font-size: .9rem; width: 168px; font-family: var(--sans); color: var(--ink); }
.header-search button { border: 0; background: transparent; padding: 0; cursor: pointer; color: var(--muted); display: flex; }
.header-actions { display: flex; align-items: center; gap: 2px; }
.icon-link { position: relative; padding: 9px; border-radius: var(--r-sm); color: var(--ink); display: flex; }
.icon-link:hover { background: rgba(193,39,45,.06); color: var(--brand); }
.cart-badge { position: absolute; top: 2px; right: 1px; background: var(--brand); color: #fff; font-size: .62rem; font-weight: 800; min-width: 16px; height: 16px; border-radius: var(--r-pill); display: flex; align-items: center; justify-content: center; padding: 0 4px; font-family: var(--sans); }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; color: var(--ink); padding: 6px; }

/* --- Flash -------------------------------------------------------------- */
.flash-wrap { margin-top: 18px; }
.flash { padding: 13px 18px; border-radius: var(--r-sm); margin-bottom: 10px; font-size: .92rem; border: 1px solid transparent; border-left-width: 3px; }
.flash-success { background: #edf6f0; color: #1c5e3f; border-color: #cbe7d8; border-left-color: var(--holly); }
.flash-error { background: var(--brand-tint); color: var(--brand-deep); border-color: #f1cfcb; border-left-color: var(--brand); }
.flash-info { background: #f4f0e6; color: #6b5a2a; border-color: #e7dcc2; border-left-color: var(--brass); }

/* --- Hero — the signature: logo glows on a deep toy-box charcoal --------- */
.hero { background: radial-gradient(120% 130% at 50% 0%, #3a2c2a 0%, var(--charcoal) 55%, #1a1414 100%); color: #f3ece2; position: relative; overflow: hidden; border-bottom: 3px solid var(--brand); }
.hero::after { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 55% at 50% 38%, rgba(201,160,90,.16), transparent 70%); pointer-events: none; }
.hero-inner { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 64px 24px 72px; }
.hero-logo { width: min(560px, 82%); height: auto; margin-bottom: 8px; filter: drop-shadow(0 18px 40px rgba(0,0,0,.45)); }
.hero-tagline { font-family: var(--serif); font-size: clamp(2rem, 4.5vw, 3.1rem); font-weight: 500; color: #fff; margin: 14px 0 0; max-width: 16ch; line-height: 1.08; }
.hero-sub { font-family: var(--sans); color: #d9cfc2; font-size: 1.08rem; max-width: 52ch; margin: 16px auto 0; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 30px; }
.hero-note { margin-top: 22px; font-size: .82rem; letter-spacing: .04em; color: #b9ab9b; }
.hero-note strong { color: var(--brass-soft); }

/* --- Sections ----------------------------------------------------------- */
.section { padding: 72px 24px; }
.section + .section { padding-top: 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 34px; gap: 20px; }
.section-head h2 { font-size: 2rem; margin: 8px 0 0; }
.section-head .eyebrow { margin-bottom: 2px; }
.link-more { font-family: var(--sans); font-weight: 700; font-size: .85rem; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; color: var(--ink); }
.link-more:hover { color: var(--brand); }
.link-more svg { width: 16px; height: 16px; }
.page-title { font-size: 2.3rem; margin: 30px 0 8px; }
.page-head { padding-top: 26px; }

/* --- Product grid + cards ----------------------------------------------- */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
.product-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; transition: .2s; }
.product-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-4px); border-color: var(--line-strong); }
.product-card-media { position: relative; display: block; aspect-ratio: 4/5; background: #f3ede2; }
.product-card-media img { width: 100%; height: 100%; object-fit: cover; }
.badge { position: absolute; top: 12px; font-family: var(--sans); font-size: .64rem; font-weight: 800; padding: 5px 10px; border-radius: var(--r-pill); text-transform: uppercase; letter-spacing: .1em; }
.badge-sale { left: 12px; background: var(--brand); color: #fff; }
.badge-out { right: 12px; background: rgba(34,26,26,.82); color: #fff; }
.product-card-body { padding: 16px 17px 8px; flex: 1; }
.product-card-cat { font-family: var(--sans); font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; color: var(--brass); font-weight: 700; margin-bottom: 5px; }
.product-card-title { display: block; font-family: var(--serif); font-weight: 500; color: var(--ink); font-size: 1.08rem; margin-bottom: 7px; line-height: 1.2; }
.product-card-title:hover { color: var(--brand); }
.product-card-price { display: flex; align-items: baseline; gap: 9px; }
.price-now { font-family: var(--sans); font-weight: 800; font-size: 1.05rem; color: var(--ink); }
.price-was { color: var(--muted); text-decoration: line-through; font-size: .85rem; }
.card-add-form { padding: 0 17px 17px; }

/* --- Category cards ----------------------------------------------------- */
.category-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.category-tile { position: relative; border-radius: var(--r); overflow: hidden; display: block; aspect-ratio: 3/4; background: var(--charcoal); transition: .2s; border: 1px solid var(--line); }
.category-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.category-tile img { width: 100%; height: 100%; object-fit: cover; opacity: .9; transition: .3s; }
.category-tile:hover img { opacity: 1; transform: scale(1.04); }
.category-tile-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 14px 14px; background: linear-gradient(transparent, rgba(28,20,20,.82)); color: #fff; }
.category-tile-name { display: block; font-family: var(--serif); font-weight: 600; font-size: 1.05rem; color: #fff; }
.category-tile-count { display: block; font-family: var(--sans); color: rgba(255,255,255,.75); font-size: .74rem; letter-spacing: .04em; margin-top: 2px; }

/* --- Value strip -------------------------------------------------------- */
.value-strip { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.value-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 34px 24px; }
.value-item { display: flex; align-items: center; gap: 14px; padding: 0 8px; }
.value-item .vi-icon { flex-shrink: 0; width: 42px; height: 42px; border-radius: 50%; background: var(--brand-tint); color: var(--brand); display: flex; align-items: center; justify-content: center; }
.value-item strong { font-family: var(--sans); font-weight: 700; font-size: .92rem; }
.value-item .muted { font-size: .82rem; }
.value-item + .value-item { border-left: 1px solid var(--line); }

/* --- Breadcrumb --------------------------------------------------------- */
.breadcrumb { font-size: .83rem; color: var(--muted); padding: 20px 0 4px; font-family: var(--sans); }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--brand); }

/* --- Catalog ------------------------------------------------------------ */
.catalog-layout { display: grid; grid-template-columns: 256px 1fr; gap: 38px; padding: 10px 24px 72px; align-items: start; }
.catalog-filters { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; position: sticky; top: 92px; }
.filter-block { margin-bottom: 20px; }
.filter-label { display: block; font-family: var(--sans); font-weight: 700; font-size: .72rem; margin-bottom: 9px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-soft); }
.filter-row { display: flex; gap: 8px; }
.catalog-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.catalog-toolbar .muted { font-family: var(--sans); }
.sort-form { display: flex; align-items: center; gap: 10px; font-size: .85rem; }
.sort-form label { color: var(--muted); }

/* --- Forms -------------------------------------------------------------- */
input, select, textarea {
    width: 100%; padding: 11px 13px; border: 1px solid var(--line-strong); border-radius: var(--r-sm);
    font-size: .94rem; font-family: var(--sans); background: #fff; color: var(--ink); outline: none; transition: .14s;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
textarea { resize: vertical; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-family: var(--sans); font-weight: 700; font-size: .82rem; margin-bottom: 7px; color: var(--ink-soft); }
.form-row { display: flex; gap: 16px; }
.form-row .form-group { flex: 1; }
.checkbox { display: flex; align-items: center; gap: 9px; font-weight: 500; font-size: .9rem; cursor: pointer; }
.checkbox input { width: auto; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 26px; box-shadow: var(--shadow); margin-bottom: 24px; }
.card h3 { font-size: 1.15rem; }

/* --- Product detail ----------------------------------------------------- */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 52px; padding: 10px 24px 64px; align-items: start; }
.product-gallery-main { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; aspect-ratio: 1; }
.product-gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.product-thumbs { display: flex; gap: 12px; margin-top: 14px; }
.thumb { width: 76px; height: 76px; border-radius: var(--r-sm); overflow: hidden; border: 2px solid var(--line); padding: 0; cursor: pointer; background: #fff; }
.thumb:hover { border-color: var(--brass); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-eyebrow { font-family: var(--sans); font-size: .74rem; text-transform: uppercase; letter-spacing: .12em; color: var(--brass); font-weight: 700; }
.product-info h1 { font-size: 2.4rem; margin: 8px 0 16px; }
.product-price { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.product-price .price-now { font-size: 1.7rem; }
.product-lede { font-size: 1.08rem; color: var(--ink-soft); margin-bottom: 20px; }
.product-stock { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.stock-pill { font-family: var(--sans); font-size: .85rem; font-weight: 700; display: inline-flex; align-items: center; gap: 7px; }
.stock-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.stock-in { color: var(--holly); }
.stock-low { color: var(--brass); }
.stock-out { color: var(--brand); }
.sku { font-size: .82rem; font-family: var(--sans); }
.product-buy { display: flex; flex-direction: column; gap: 16px; margin-bottom: 30px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: var(--r-sm); overflow: hidden; width: max-content; }
.qty-control input { width: 56px; text-align: center; border: 0; border-radius: 0; font-weight: 700; }
.qty-btn { width: 42px; height: 44px; border: 0; background: #faf6ef; color: var(--ink); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.qty-btn:hover { background: var(--brand-tint); color: var(--brand); }
.product-buy-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.product-desc { border-top: 1px solid var(--line); padding-top: 24px; }
.product-desc h3 { font-size: 1.2rem; }
.product-desc p { color: var(--ink-soft); }

/* --- Cart --------------------------------------------------------------- */
.cart-layout { display: grid; grid-template-columns: 1fr 360px; gap: 36px; padding-bottom: 64px; align-items: start; }
.cart-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.cart-table th { text-align: left; font-family: var(--sans); font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); padding: 16px; border-bottom: 1px solid var(--line); font-weight: 700; }
.cart-table td { padding: 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.cart-table tr:last-child td { border-bottom: 0; }
.cart-thumb img { width: 64px; height: 64px; object-fit: cover; border-radius: var(--r-sm); }
.cart-name { font-family: var(--serif); font-weight: 500; color: var(--ink); font-size: 1.02rem; }
.cart-qty { width: 66px; }
.cart-line-total { font-weight: 800; font-family: var(--sans); }
.link-remove { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 4px; display: inline-flex; }
.link-remove:hover { color: var(--brand); }
.cart-actions { display: flex; justify-content: space-between; margin-top: 18px; }
.hidden-form { display: none; }
.cart-summary { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 26px; box-shadow: var(--shadow); position: sticky; top: 92px; }
.cart-summary h3 { font-size: 1.2rem; }
.coupon-form { display: flex; gap: 8px; margin-bottom: 18px; }
.coupon-applied { display: flex; align-items: center; justify-content: space-between; background: var(--brand-tint); border-radius: var(--r-sm); padding: 11px 15px; margin-bottom: 18px; font-size: .9rem; color: var(--brand-deep); }
.coupon-applied .link-remove { font-size: .8rem; color: var(--brand-deep); text-decoration: underline; }
.summary-lines { margin: 0 0 14px; }
.summary-lines > div { display: flex; justify-content: space-between; padding: 6px 0; font-size: .94rem; color: var(--ink-soft); }
.summary-lines dt, .summary-lines dd { margin: 0; }
.summary-discount { color: var(--holly) !important; }
.summary-total { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--serif); font-size: 1.3rem; font-weight: 600; padding: 16px 0; border-top: 2px solid var(--ink); margin-bottom: 18px; }
.secure-note { display: flex; align-items: center; justify-content: center; gap: 7px; text-align: center; font-size: .8rem; margin: 14px 0 0; color: var(--muted); }
.secure-note svg { width: 15px; height: 15px; }

/* --- Checkout ----------------------------------------------------------- */
.checkout-layout { display: grid; grid-template-columns: 1fr 390px; gap: 36px; padding-bottom: 64px; align-items: start; }
.checkout-summary .card { position: sticky; top: 92px; }
.checkout-items { list-style: none; margin: 0 0 18px; padding: 0; }
.checkout-items li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.checkout-items img { width: 48px; height: 48px; object-fit: cover; border-radius: var(--r-sm); }
.checkout-items .ci-name { flex: 1; }
.link-back { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; font-size: .9rem; color: var(--ink); }
.link-back:hover { color: var(--brand); }

/* --- Success / cancel --------------------------------------------------- */
.success-hero { text-align: center; padding: 56px 0 32px; }
.success-check, .cancel-mark { width: 84px; height: 84px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 22px; }
.success-check { background: #edf6f0; color: var(--holly); }
.success-check svg { width: 40px; height: 40px; stroke-width: 2.2; }
.cancel-mark { background: var(--brand-tint); color: var(--brand); }
.cancel-mark svg { width: 38px; height: 38px; }
.success-hero h1 { font-size: 2.3rem; }
.success-actions { display: flex; gap: 14px; justify-content: center; margin: 28px 0 64px; flex-wrap: wrap; }

/* --- Account ------------------------------------------------------------ */
.auth-wrap { display: flex; justify-content: center; padding: 56px 24px; }
.auth-card { width: 100%; max-width: 460px; }
.auth-card h1 { font-size: 1.9rem; }
.auth-links { display: flex; justify-content: space-between; margin-top: 20px; font-size: .9rem; }
.account-layout { display: grid; grid-template-columns: 256px 1fr; gap: 36px; padding: 30px 24px 64px; align-items: start; }
.account-nav { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.account-greeting { display: flex; align-items: center; gap: 13px; padding-bottom: 18px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.account-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--brand-tint); color: var(--brand); display: flex; align-items: center; justify-content: center; }
.account-nav nav { display: flex; flex-direction: column; gap: 2px; }
.account-nav nav a { padding: 10px 13px; border-radius: var(--r-sm); color: var(--ink); font-weight: 600; font-size: .91rem; }
.account-nav nav a:hover { background: rgba(193,39,45,.06); color: var(--brand); }
.account-nav nav a.active { background: var(--brand-tint); color: var(--brand-deep); }
.account-logout { text-align: left; background: none; border: 0; color: var(--brand); padding: 10px 13px; cursor: pointer; font-size: .91rem; font-weight: 600; width: 100%; border-radius: var(--r-sm); font-family: var(--sans); }
.account-logout:hover { background: var(--brand-tint); }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 22px 0 32px; }
.stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; display: flex; flex-direction: column; justify-content: center; }
.stat-num { font-family: var(--serif); font-size: 2.1rem; font-weight: 600; }
.stat-label { color: var(--muted); font-size: .85rem; }

/* --- Tables ------------------------------------------------------------- */
.data-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.data-table th { text-align: left; font-family: var(--sans); font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); padding: 14px 16px; border-bottom: 1px solid var(--line); font-weight: 700; }
.data-table td { padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: .92rem; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table.compact td { padding: 10px 0; }
.order-cols { display: grid; grid-template-columns: 1fr 340px; gap: 26px; }
.order-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 18px; }
.order-head-badges { display: flex; gap: 8px; }
address { font-style: normal; line-height: 1.7; }

/* --- Badges ------------------------------------------------------------- */
.badge-status, .badge-pay { font-family: var(--sans); font-size: .72rem; font-weight: 800; padding: 4px 11px; border-radius: var(--r-pill); white-space: nowrap; display: inline-block; letter-spacing: .02em; }
.badge-pending { background: #f4f0e6; color: #6b5a2a; }
.badge-processing { background: #eaf0f7; color: #2d567f; }
.badge-shipped { background: #e9f1fb; color: #285ca0; }
.badge-delivered { background: #edf6f0; color: #1c5e3f; }
.badge-cancelled { background: #f0ece6; color: #6b5d52; }
.badge-pay-paid { background: #edf6f0; color: #1c5e3f; }
.badge-pay-unpaid { background: #f4f0e6; color: #6b5a2a; }
.badge-pay-refunded, .badge-pay-partially_refunded, .badge-pay-failed { background: var(--brand-tint); color: var(--brand-deep); }

/* --- Pagination --------------------------------------------------------- */
.pagination { display: flex; gap: 6px; justify-content: center; margin: 40px 0; flex-wrap: wrap; }
.page-link { padding: 9px 14px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); color: var(--ink); background: #fff; font-size: .9rem; font-family: var(--sans); font-weight: 600; }
.page-link:hover { border-color: var(--brand); color: var(--brand); }
.page-link.active { background: var(--brand); color: #fff; border-color: var(--brand); }

/* --- Empty state -------------------------------------------------------- */
.empty-state { text-align: center; padding: 64px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.empty-state .es-icon { width: 56px; height: 56px; border-radius: 50%; background: var(--brand-tint); color: var(--brand); display: flex; align-items: center; justify-content: center; margin: 0 auto 18px; }
.empty-state p { font-size: 1.1rem; margin-bottom: 20px; color: var(--ink-soft); }
.empty-state.small { padding: 40px 24px; }

/* --- Contact ------------------------------------------------------------ */
.contact-grid { display: grid; grid-template-columns: 1fr 320px; gap: 26px; }
.contact-info p { margin: 10px 0; display: flex; align-items: center; gap: 10px; }
.contact-info svg { width: 18px; height: 18px; color: var(--brand); flex-shrink: 0; }

/* --- Footer ------------------------------------------------------------- */
.site-footer { background: var(--charcoal); color: #cdc2b5; margin-top: 0; border-top: 3px solid var(--brand); }
.footer-inner { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 32px; padding: 56px 24px 36px; }
.footer-logo { width: 190px; margin-bottom: 16px; }
.footer-col h4 { font-family: var(--sans); font-size: .74rem; text-transform: uppercase; letter-spacing: .14em; color: var(--brass-soft); margin-bottom: 14px; font-weight: 700; }
.footer-col a { display: block; color: #d8cdc0; font-size: .9rem; padding: 5px 0; }
.footer-col a:hover { color: #fff; }
.footer-col p { color: #a99c8d; font-size: .88rem; margin: 5px 0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 20px 24px; font-size: .82rem; color: #a99c8d; }

/* --- Error -------------------------------------------------------------- */
.error-page { min-height: 78vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.error-card { text-align: center; max-width: 440px; }
.error-code { font-family: var(--serif); font-size: 5.5rem; font-weight: 600; color: var(--brand); line-height: 1; }
.error-card h1 { font-size: 1.7rem; margin: 8px 0 14px; }
.error-card p { margin-bottom: 26px; color: var(--ink-soft); }

/* --- Responsive --------------------------------------------------------- */
@media (max-width: 1024px) {
    .product-grid { grid-template-columns: repeat(3, 1fr); }
    .category-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 880px) {
    .nav-toggle { display: block; order: 3; margin-left: auto; }
    .main-nav { display: none; position: absolute; top: 76px; left: 0; right: 0; background: var(--surface); flex-direction: column; align-items: stretch; padding: 12px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
    body.nav-open .main-nav { display: flex; }
    .nav-dropdown-menu { position: static; display: flex; box-shadow: none; border: 0; padding-left: 14px; }
    .header-search { display: none; }
    .catalog-layout, .cart-layout, .checkout-layout, .product-detail, .account-layout, .order-cols, .contact-grid { grid-template-columns: 1fr; }
    .catalog-filters, .cart-summary, .checkout-summary .card, .account-nav { position: static; }
    .value-grid { grid-template-columns: repeat(2, 1fr); }
    .value-item:nth-child(3) { border-left: 0; }
    .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .category-grid { grid-template-columns: repeat(2, 1fr); }
    .stat-row { grid-template-columns: 1fr; }
    .value-grid { grid-template-columns: 1fr; }
    .value-item { border-left: 0 !important; }
    .footer-inner { grid-template-columns: 1fr; }
    .form-row { flex-direction: column; gap: 0; }
    .cart-table thead { display: none; }
    .section { padding: 48px 24px; }
}
