/* =====================================================================
   Nusa Weave Studio - custom stylesheet
   Palette: indigo (batik) + warm gold + silver + cream
   ===================================================================== */

:root {
    --indigo: #1f2a44;
    --indigo-700: #2b3a5e;
    --gold: #b08d57;
    --gold-dark: #957441;
    --cream: #faf7f2;
    --cream-200: #f1ebe1;
    --ink: #24242a;
    --muted: #6b6b76;
    --line: #e4ddd1;
    --silver: #c7ccd2;
    --white: #ffffff;
    --danger: #b23b3b;
    --success: #2e7d52;

    --radius: 12px;
    --radius-sm: 8px;
    --shadow-sm: 0 1px 3px rgba(31, 42, 68, .08);
    --shadow: 0 10px 30px rgba(31, 42, 68, .10);
    --container: 1200px;

    --font-head: Georgia, "Times New Roman", "Noto Serif", serif;
    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

html { scroll-behavior: smooth; color-scheme: light; }

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--cream);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }
a:hover { color: var(--gold-dark); }

h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; line-height: 1.2; color: var(--indigo); margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 1.25rem; }

.muted { color: var(--muted); }

/* ----------------------------- Buttons ----------------------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .8rem 1.5rem; border: 1px solid transparent; border-radius: var(--radius-sm);
    font-size: .95rem; font-weight: 600; cursor: pointer; transition: all .18s ease;
    background: none; font-family: var(--font-body); line-height: 1;
}
.btn-primary { background: var(--indigo); color: var(--white); }
.btn-primary:hover { background: var(--indigo-700); color: var(--white); }
.btn-primary:disabled { background: var(--silver); cursor: not-allowed; }
.btn-ghost { border-color: var(--indigo); color: var(--indigo); }
.btn-ghost:hover { background: var(--indigo); color: var(--white); }
.btn-small { padding: .5rem .9rem; font-size: .85rem; }
.btn-block { width: 100%; }

/* ----------------------------- Header ------------------------------ */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(250, 247, 242, .96);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}
.header-inner {
    display: flex; align-items: center; gap: 1.25rem;
    min-height: 72px; padding-top: .5rem; padding-bottom: .5rem;
}
.brand { display: flex; align-items: center; gap: .55rem; margin-right: auto; min-width: 0; }
.brand-logo { flex: 0 0 auto; height: 44px; width: auto; max-width: 200px; display: block; padding: 6px; background: var(--indigo); border-radius: 9px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; justify-content: center; line-height: 1.2; min-width: 0; padding: 3px 0; }
.brand-name { font-family: var(--font-head); font-size: clamp(1rem, 4vw, 1.3rem); font-weight: 700; color: var(--indigo); letter-spacing: .3px; line-height: 1.3; }
.brand-tag { font-size: .68rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold-dark); line-height: 1.3; }

.main-nav { display: flex; gap: 1.4rem; align-items: center; }
.main-nav a { font-size: .92rem; font-weight: 500; color: var(--ink); position: relative; }
.main-nav a::after {
    content: ""; position: absolute; left: 0; bottom: -6px; width: 0; height: 2px;
    background: var(--gold); transition: width .2s ease;
}
.main-nav a:hover { color: var(--indigo); }
.main-nav a:hover::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 1rem; }

.search-form { display: flex; align-items: center; background: var(--white); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.search-form input { border: 0; outline: 0; padding: .55rem .9rem; font-size: .88rem; width: 180px; background: transparent; color: var(--ink); }
.search-form button { border: 0; background: transparent; padding: 0 .8rem 0 .2rem; color: var(--muted); cursor: pointer; display: flex; align-items: center; }
.search-form button:hover { color: var(--gold-dark); }

.icon-link { font-size: .9rem; font-weight: 500; white-space: nowrap; }

.cart-link { position: relative; color: var(--indigo); display: inline-flex; }
.cart-badge {
    position: absolute; top: -8px; right: -10px; min-width: 18px; height: 18px;
    padding: 0 5px; border-radius: 999px; background: var(--gold); color: #fff;
    font-size: .68rem; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.cart-badge[hidden] { display: none; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--indigo); border-radius: 2px; transition: .2s; }

/* ------------------------------ Hero ------------------------------- */
.hero {
    position: relative;
    overflow: hidden;
    background:
        url("../images/hero-pattern.svg") repeat,
        radial-gradient(120% 120% at 100% 0%, rgba(176,141,87,.22), transparent 55%),
        linear-gradient(160deg, var(--indigo) 0%, var(--indigo-700) 100%);
    color: #fff;
}
.hero-inner {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    align-items: center;
    gap: 3rem;
    padding: clamp(3rem, 7vw, 5.5rem) 1.25rem;
}
.hero-copy { max-width: 560px; }
.hero .eyebrow { letter-spacing: .25em; text-transform: uppercase; font-size: .75rem; color: var(--gold); margin: 0 0 1rem; }
.hero h1 { color: #fff; margin-bottom: 1rem; }
.hero-sub { font-size: 1.1rem; color: rgba(255,255,255,.85); max-width: 540px; margin: 0 0 2rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero .btn-ghost { border-color: rgba(255,255,255,.6); color: #fff; }
.hero .btn-ghost:hover { background: #fff; color: var(--indigo); }

/* Hero image collage */
.hero-media { position: relative; min-height: 420px; }
.hero-tile {
    position: absolute; margin: 0; overflow: hidden;
    border-radius: 16px; border: 5px solid rgba(255,255,255,.92);
    background: var(--cream-200); box-shadow: 0 24px 50px rgba(0,0,0,.38);
}
.hero-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-tile-1 { width: 56%; aspect-ratio: 3/4; top: 0;    left: 8%;  transform: rotate(-5deg); z-index: 2; }
.hero-tile-2 { width: 44%; aspect-ratio: 1/1; bottom: 4%; right: 2%; transform: rotate(6deg);  z-index: 3; }
.hero-tile-3 { width: 40%; aspect-ratio: 1/1; bottom: 8%; left: 0;   transform: rotate(4deg);  z-index: 1; }
.hero-tile:hover { transform: rotate(0) scale(1.02); transition: transform .3s ease; z-index: 4; }

/* ---------------------------- Sections ----------------------------- */
.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section-alt { background: var(--cream-200); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.75rem; }
.section-head h2 { margin: 0; }
.link-more { color: var(--gold-dark); font-weight: 600; font-size: .92rem; white-space: nowrap; }

/* ------------------------- Category grid --------------------------- */
.category-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; }
.category-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease; }
.category-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.category-card-media { aspect-ratio: 16 / 10; overflow: hidden; }
.category-card-media img { width: 100%; height: 100%; object-fit: cover; }
.category-card-body { padding: 1.1rem 1.25rem; display: flex; align-items: center; justify-content: space-between; }
.category-card-body h3 { margin: 0; font-size: 1.15rem; }

/* -------------------------- Product grid --------------------------- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.5rem; }
.product-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease; }
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.product-card-media { position: relative; aspect-ratio: 1 / 1; overflow: hidden; display: block; background: var(--cream-200); }
.product-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.product-card:hover .product-card-media img { transform: scale(1.05); }
.product-card-body { padding: 1rem 1.1rem 1.15rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.product-card-cat { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-dark); }
.product-card-title { font-size: 1.02rem; margin: 0; line-height: 1.3; }
.product-card-title a:hover { color: var(--gold-dark); }
.product-card-foot { margin-top: auto; padding-top: .5rem; display: flex; align-items: center; justify-content: space-between; }
.price { font-weight: 700; color: var(--indigo); font-size: 1.05rem; }

.badge { position: absolute; top: .7rem; left: .7rem; background: var(--gold); color: #fff; font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: .25rem .55rem; border-radius: 999px; }
.badge-muted { background: var(--muted); }
.badge-sale { background: var(--danger); }
/* Strikethrough sale pricing (cards + product page) */
.price-original { text-decoration: line-through; color: var(--muted); font-weight: 400; font-size: .82em; margin-right: .35em; }
.price-sale { color: var(--danger); font-weight: 700; }

/* ----------------------------- Features ---------------------------- */
.features { background: var(--indigo); color: #fff; padding: clamp(2.5rem, 6vw, 4rem) 0; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 2rem; }
.feature h3 { color: #fff; margin-bottom: .4rem; }
.feature p { color: rgba(255,255,255,.8); margin: 0; }
.feature-icon { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: rgba(176,141,87,.18); color: var(--gold); margin-bottom: .9rem; }
.feature-icon svg { width: 23px; height: 23px; }

/* Trust badges (product page, checkout) */
.trust-badges { display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: .55rem; margin: 1.25rem 0; }
.trust-badge { display: flex; align-items: center; gap: .6rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .6rem .75rem; box-shadow: var(--shadow-sm); }
.trust-badge-icon { flex: 0 0 auto; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--cream-200); color: var(--gold-dark); }
.trust-badge-icon svg { width: 18px; height: 18px; }
.trust-badge-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.trust-badge-text strong { font-size: .85rem; color: var(--ink); }
.trust-badge-text span { font-size: .75rem; color: var(--muted); }

/* --------------------------- Breadcrumb ---------------------------- */
.breadcrumb { display: flex; flex-wrap: wrap; gap: .5rem; font-size: .85rem; color: var(--muted); padding: 1.5rem 0 .5rem; }
.breadcrumb a:hover { color: var(--gold-dark); }
.breadcrumb .current { color: var(--ink); }

.page-head { padding: .5rem 0 2rem; }
.page-head h1 { margin-bottom: .25rem; }

/* --------------------------- Shop layout --------------------------- */
.shop-layout { display: grid; grid-template-columns: 230px 1fr; gap: 2.5rem; padding-bottom: 4rem; align-items: start; }
.shop-filters { position: sticky; top: 90px; }
.filter-block { margin-bottom: 1.75rem; }
.filter-block h4 { font-family: var(--font-body); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: .75rem; }
.filter-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .15rem; }
.filter-list a { display: block; padding: .5rem .75rem; border-radius: var(--radius-sm); font-size: .95rem; color: var(--ink); }
.filter-list a:hover { background: var(--cream-200); }
.filter-list a.active { background: var(--indigo); color: #fff; font-weight: 600; }

.shop-toolbar { display: flex; justify-content: flex-end; margin-bottom: 1.5rem; }
.sort-form { display: flex; align-items: center; gap: .6rem; font-size: .9rem; color: var(--muted); }
.sort-form select { padding: .5rem .75rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--white); font-family: var(--font-body); font-size: .9rem; color: var(--ink); cursor: pointer; }

/* --------------------------- Pagination ---------------------------- */
.pagination { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; margin-top: 2.5rem; }
.page-link { padding: .5rem .85rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--white); font-size: .9rem; font-weight: 600; color: var(--ink); }
.page-link:hover { border-color: var(--gold); color: var(--gold-dark); }
.page-link.active { background: var(--indigo); color: #fff; border-color: var(--indigo); }

/* ------------------------- Empty / states -------------------------- */
.empty-state { text-align: center; padding: 4rem 0; display: flex; flex-direction: column; align-items: center; gap: 1rem; }

/* ------------------------- Product detail -------------------------- */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; padding: 1rem 0 3.5rem; align-items: start; }
.product-gallery { position: sticky; top: 84px; align-self: start; }
.product-gallery-main { position: relative; background: var(--cream-200); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 5; }
.product-gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.product-thumbs { display: flex; gap: .6rem; margin-top: .75rem; flex-wrap: wrap; }
.product-thumb { width: 68px; height: 68px; padding: 0; border: 2px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--cream-200); cursor: pointer; }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-thumb:hover { border-color: var(--gold-dark); }
.product-thumb.active { border-color: var(--gold); }
.product-info-cat { display: inline-block; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-dark); margin-bottom: .5rem; }
.product-price { font-size: 1.8rem; font-weight: 700; color: var(--indigo); margin: .1rem 0 .55rem; }
.product-stock { font-size: .9rem; font-weight: 600; margin-bottom: .9rem; }
.product-stock.in { color: var(--success); }
.product-stock.out { color: var(--danger); }
.product-desc { color: #444; margin-bottom: 1.75rem; }
/* Full-width "Product details" section below the photo + buy-box row */
.product-details { padding-top: 0; }
.product-details .product-desc { max-width: 820px; margin-bottom: 0; line-height: 1.75; }

.variant-select { width: 100%; margin-bottom: .85rem; }
.variant-select label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .35rem; color: var(--ink); }
.variant-select select { width: 100%; max-width: 100%; padding: .65rem .75rem; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: .95rem; background: var(--white); font-family: var(--font-body); color: var(--ink); }
.variant-select select:focus { outline: 0; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(176,141,87,.18); }
.cart-row-variant { font-size: .8rem; color: var(--gold-dark); }

/* ---------------------------- Cookie banner ------------------------ */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; background: var(--indigo); color: #fff; box-shadow: 0 -4px 24px rgba(0,0,0,.25); }
.cookie-banner[hidden] { display: none; }
.cookie-banner-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; flex-wrap: wrap; }
.cookie-banner p { margin: 0; font-size: .88rem; color: rgba(255,255,255,.9); flex: 1; min-width: 240px; }
.cookie-banner a { color: var(--gold); text-decoration: underline; }
.cookie-banner-actions { display: flex; gap: .6rem; flex-shrink: 0; }
.cookie-banner .btn-ghost { border-color: rgba(255,255,255,.5); color: #fff; }
.cookie-banner .btn-ghost:hover { background: #fff; color: var(--indigo); }

/* ----------------------------- Legal pages ------------------------- */
.legal-page { padding: 1rem 0 4rem; max-width: 820px; }
.legal-body { color: #444; line-height: 1.75; }
.legal-body h2 { font-size: 1.2rem; margin: 1.75rem 0 .6rem; color: var(--indigo); }
.legal-body ul { padding-left: 1.2rem; }
.legal-body li { margin-bottom: .4rem; }
.legal-body a { color: var(--gold-dark); }

.add-to-cart { display: flex; gap: .75rem; align-items: stretch; margin-bottom: 1.25rem; flex-wrap: wrap; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--white); overflow: hidden; }
.qty-btn { width: 42px; height: 100%; min-height: 44px; border: 0; background: transparent; font-size: 1.2rem; cursor: pointer; color: var(--indigo); }
.qty-btn:hover { background: var(--cream-200); }
.qty-input { width: 52px; text-align: center; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); font-size: 1rem; padding: .6rem 0; -moz-appearance: textfield; }
.qty-input::-webkit-outer-spin-button, .qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.add-to-cart .btn-block { flex: 1; min-width: 180px; }

.product-meta { list-style: none; margin: 0; padding: 1rem 0 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: .5rem; }
.product-meta li { display: flex; justify-content: space-between; gap: 1rem; font-size: .9rem; }
.product-meta span { color: var(--muted); }
.product-meta strong { color: var(--ink); font-weight: 600; text-align: right; }

/* ------------------------------ Footer ----------------------------- */
.site-footer { background: var(--indigo); color: rgba(255,255,255,.82); margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2rem; padding: 3.5rem 1.25rem 2.5rem; }
.footer-brand { font-family: var(--font-head); font-size: 1.3rem; color: #fff; margin-bottom: .75rem; }
.footer-text { font-size: .9rem; color: rgba(255,255,255,.7); }
.footer-text a { color: var(--gold); }
.footer-col h4 { color: #fff; font-family: var(--font-body); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 1rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .55rem; }
.footer-col ul a { color: rgba(255,255,255,.75); font-size: .92rem; }
.footer-col ul a:hover { color: var(--gold); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); }
.footer-bottom .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; padding-top: 1.25rem; padding-bottom: 1.25rem; font-size: .82rem; color: rgba(255,255,255,.6); }

/* page must push footer down */
body { display: flex; flex-direction: column; min-height: 100vh; }
.site-main { flex: 1; }

/* ------------------------------ Toast ------------------------------ */
.toast-container { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 100; display: flex; flex-direction: column; gap: .6rem; }

/* Floating WhatsApp chat button (storefront) */
.wa-float { position: fixed; right: 18px; bottom: 18px; z-index: 80; display: inline-flex; align-items: center; height: 56px; padding: 0 13px; border-radius: 999px; background: #25d366; color: #fff; text-decoration: none; box-shadow: 0 8px 24px rgba(0,0,0,.28); transition: padding .25s ease, transform .2s ease; }
.wa-float:hover { transform: translateY(-2px); color: #fff; }
.wa-float-icon { width: 30px; height: 30px; flex: 0 0 auto; }
.wa-float-label { max-width: 0; overflow: hidden; white-space: nowrap; opacity: 0; font-weight: 600; font-size: .95rem; transition: max-width .25s ease, opacity .2s ease, margin .25s ease; }
.wa-float:hover .wa-float-label { max-width: 150px; opacity: 1; margin-left: 9px; }
@media (max-width: 560px) {
    .wa-float { right: 14px; bottom: 14px; height: 52px; padding: 0 11px; }
    .wa-float:hover .wa-float-label { max-width: 0; opacity: 0; margin-left: 0; }
}
.toast { background: var(--indigo); color: #fff; padding: .85rem 1.2rem; border-radius: var(--radius-sm); box-shadow: var(--shadow); font-size: .9rem; opacity: 0; transform: translateY(10px); transition: opacity .25s ease, transform .25s ease; max-width: 320px; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }

/* --------------------------- Responsive ---------------------------- */
@media (max-width: 980px) {
    .hero-inner { grid-template-columns: 1fr; }
    .hero-media { min-height: 300px; max-width: 460px; margin: 1rem auto 0; width: 100%; }
    .shop-layout { grid-template-columns: 1fr; }
    .shop-filters { position: static; }
    .filter-list { flex-direction: row; flex-wrap: wrap; }
    .product-detail { grid-template-columns: 1fr; gap: 2rem; }
    .product-gallery { position: static; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
    .hero-media { display: none; }
}

@media (max-width: 760px) {
    .search-form { display: none; }
    .nav-toggle { display: flex; }
    .main-nav {
        position: fixed; inset: 72px 0 auto 0; flex-direction: column; gap: 0;
        background: var(--cream); border-bottom: 1px solid var(--line);
        padding: .5rem 1.25rem 1rem; transform: translateY(-120%); transition: transform .25s ease;
        max-height: calc(100vh - 72px); overflow-y: auto;
    }
    .main-nav.open { transform: translateY(0); box-shadow: var(--shadow); }
    .main-nav a { padding: .85rem 0; border-bottom: 1px solid var(--line); width: 100%; }
    .main-nav a::after { display: none; }
    .header-inner { gap: .75rem; }
}

@media (max-width: 520px) {
    .footer-grid { grid-template-columns: 1fr; }
    .section-head { flex-direction: column; align-items: flex-start; gap: .35rem; }
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
    .icon-link { display: none; }
}

/* ------------------------------ Cart ------------------------------- */
.cart-page { padding-bottom: 4rem; }
.cart-layout { display: grid; grid-template-columns: 1fr 320px; gap: 2.5rem; align-items: start; }
.cart-items { display: flex; flex-direction: column; gap: 1rem; }
.cart-row { display: grid; grid-template-columns: 90px 1fr auto auto; gap: 1.25rem; align-items: center; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.cart-row-media { width: 90px; height: 90px; border-radius: var(--radius-sm); overflow: hidden; background: var(--cream-200); }
.cart-row-media img { width: 100%; height: 100%; object-fit: cover; }
.cart-row-info { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.cart-row-name { font-weight: 600; color: var(--indigo); }
.cart-row-name:hover { color: var(--gold-dark); }
.cart-row-total { font-weight: 700; color: var(--indigo); white-space: nowrap; }
.link-btn { align-self: flex-start; background: none; border: 0; padding: 0; color: var(--muted); font-size: .85rem; cursor: pointer; text-decoration: underline; font-family: var(--font-body); }
.link-btn:hover { color: var(--danger); }

.cart-summary { position: sticky; top: 90px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow-sm); }
.cart-summary h2 { font-size: 1.2rem; margin-bottom: 1rem; }
.summary-row { display: flex; justify-content: space-between; padding: .5rem 0; font-size: .95rem; }
.summary-total { display: flex; justify-content: space-between; align-items: baseline; padding: .85rem 0; margin: .5rem 0 1rem; border-top: 1px solid var(--line); font-size: 1.1rem; }
.summary-total strong { font-size: 1.35rem; color: var(--indigo); }
.summary-note { font-size: .8rem; text-align: center; margin: .85rem 0; }
/* "Free shipping unlocked" banner (cart + checkout) */
.free-ship-note { display: flex; align-items: center; gap: .55rem; background: #e8f5ee; color: #1f6b46; border: 1px solid #bfe3cf; border-radius: var(--radius-sm); padding: .65rem .8rem; font-size: .85rem; line-height: 1.35; margin-bottom: 1rem; }
.free-ship-note[hidden] { display: none; }
.free-ship-note .free-ship-icon { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #1f6b46; color: #fff; font-size: .72rem; font-weight: 700; flex: 0 0 auto; }
.free-ship-note strong { font-weight: 700; }
.free-ship-note--sm { font-size: .82rem; padding: .55rem .7rem; margin: .25rem 0 .5rem; }
.cart-summary .link-more { display: inline-block; margin-top: .25rem; }
.summary-discount { color: var(--success); }
.summary-discount strong { color: var(--success); }

/* Coupon box (checkout summary) */
.coupon-box { margin: 0 0 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.coupon-box .alert { margin-bottom: .65rem; }
.coupon-form { display: flex; gap: .5rem; }
.coupon-form input { flex: 1; min-width: 0; padding: .6rem .75rem; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: .92rem; font-family: var(--font-body); text-transform: uppercase; }
.coupon-form input:focus { outline: 0; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(176,141,87,.18); }
.coupon-form .btn { white-space: nowrap; }
.coupon-applied { display: flex; align-items: center; justify-content: space-between; gap: .75rem; background: #e8f5ee; border: 1px solid #b6dcc5; color: #1f6b46; border-radius: var(--radius-sm); padding: .6rem .8rem; font-size: .9rem; }
.coupon-applied .link-btn { color: #1f6b46; }

/* Shipping method selector (checkout) */
.ship-methods { display: flex; flex-direction: column; gap: .5rem; }
.ship-methods .ship-method { display: flex; align-items: center; gap: .7rem; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .65rem .85rem; margin: 0; cursor: pointer; }
.ship-methods .ship-method:hover { border-color: var(--gold); }
.ship-methods .ship-method:has(input:checked) { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(176,141,87,.15); }
/* Reset the radio: .form-group input forces width:100%/padding/border, which blows the radio up. */
.ship-methods .ship-method input[type="radio"] { flex: 0 0 auto; width: auto; margin: 0; padding: 0; border: 0; box-shadow: none; }
.ship-methods .ship-method-info { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.ship-methods .ship-method-name { font-weight: 600; font-size: .92rem; color: var(--ink); }
.ship-methods .ship-method-eta { font-size: .78rem; color: var(--muted); }
.ship-methods .ship-method-price { flex: 0 0 auto; margin-left: auto; font-weight: 700; color: var(--indigo); white-space: nowrap; }

/* ---------------------------- Auth forms --------------------------- */
.auth-wrap { display: flex; justify-content: center; padding: 3rem 1.25rem 4.5rem; }
.auth-card { width: 100%; max-width: 440px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 2rem; }
.auth-card h1 { margin-bottom: .25rem; }
.auth-card > .muted { margin: 0 0 1.5rem; }
.form-group { margin-bottom: 1.1rem; display: flex; flex-direction: column; gap: .4rem; }
.form-group label { font-size: .85rem; font-weight: 600; color: var(--ink); }
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%; padding: .7rem .85rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
    font-size: .95rem; font-family: var(--font-body); color: var(--ink); background: var(--white);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { outline: 0; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(176,141,87,.18); }
.form-group small { font-size: .78rem; }
.auth-alt { margin-top: 1.25rem; text-align: center; font-size: .9rem; color: var(--muted); }
.auth-alt a { color: var(--gold-dark); font-weight: 600; }

.alert { border-radius: var(--radius-sm); padding: .85rem 1rem; margin-bottom: 1.25rem; font-size: .9rem; }
.alert-error { background: #fbeaea; border: 1px solid #e7bcbc; color: #8a2b2b; }
.alert-success { background: #e8f5ee; border: 1px solid #b6dcc5; color: #1f6b46; }
.alert ul { margin: 0; padding-left: 1.1rem; }

/* ----------------------------- Account ----------------------------- */
.account-page { padding: 1rem 0 4rem; }
.account-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin: 1rem 0 2rem; }
.account-head h1 { margin-bottom: .25rem; }
.account-section h2 { font-size: 1.3rem; margin-bottom: 1rem; }
.order-list { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--white); }
.order-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr .8fr; gap: 1rem; align-items: center; padding: .9rem 1.1rem; border-top: 1px solid var(--line); font-size: .92rem; }
.order-row:first-child { border-top: 0; }
.order-row-head { background: var(--cream-200); font-weight: 600; font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.order-num { font-weight: 600; color: var(--indigo); }
.order-track { margin-top: .45rem; font-size: .8rem; color: var(--muted); }
.order-track a { color: var(--gold-dark); font-weight: 600; }
.ta-right { text-align: right; }

.badge-status { display: inline-block; font-size: .72rem; font-weight: 700; padding: .25rem .6rem; border-radius: 999px; text-transform: capitalize; background: var(--cream-200); color: var(--muted); }
.badge-status.pending { background: #fdf1dc; color: #8a5a12; }
.badge-status.paid { background: #e3f0fb; color: #1c5a93; }
.badge-status.processing { background: #efe8fb; color: #5a3da0; }
.badge-status.shipped { background: #e3eefb; color: #275aa0; }
.badge-status.completed { background: #e8f5ee; color: #1f6b46; }
.badge-status.cancelled { background: #fbeaea; color: #8a2b2b; }

@media (max-width: 600px) {
    .order-row { grid-template-columns: 1fr 1fr; }
    .order-row-head { display: none; }
    .order-row span:nth-child(4) { text-align: left; }
}

@media (max-width: 860px) {
    .cart-layout { grid-template-columns: 1fr; }
    .cart-summary { position: static; }
}
@media (max-width: 520px) {
    .cart-row { grid-template-columns: 70px 1fr; grid-template-areas: "media info" "media qty" "total total"; row-gap: .75rem; column-gap: 1rem; }
    .cart-row-media { grid-area: media; width: 70px; height: 70px; }
    .cart-row-info { grid-area: info; }
    .cart-row-qty { grid-area: qty; }
    .cart-row-total { grid-area: total; text-align: right; }
}

/* ---------------------------- Checkout ----------------------------- */
.checkout-page { padding-bottom: 4rem; }
.checkout-layout { display: grid; grid-template-columns: 1fr 360px; gap: 2.5rem; align-items: start; }
.checkout-form h2, .checkout-summary h2 { font-size: 1.2rem; margin-bottom: 1rem; }
.checkout-signin-note { background: var(--cream-200); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .8rem 1rem; margin-bottom: 1.5rem; font-size: .9rem; }
.checkout-signin-note a { color: var(--gold-dark); font-weight: 600; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group[hidden] { display: none; }
.checkout-account { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.checkbox-line { display: flex; align-items: flex-start; gap: .6rem; font-size: .92rem; cursor: pointer; }
.checkbox-line input { margin-top: .2rem; }
.account-password-group { margin-top: 1rem; }
.form-errors { background: #fbeaea; border: 1px solid #e7bcbc; color: #8a2b2b; border-radius: var(--radius-sm); padding: .75rem 1rem; margin-bottom: 1rem; font-size: .9rem; }
.form-errors[hidden] { display: none; }

.checkout-summary { position: sticky; top: 90px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow-sm); }
.summary-items { display: flex; flex-direction: column; gap: .6rem; padding-bottom: .85rem; margin-bottom: .5rem; border-bottom: 1px solid var(--line); }
.summary-item { display: flex; justify-content: space-between; gap: 1rem; font-size: .9rem; }
.summary-item-name { color: var(--ink); }
.paypal-box { margin: 1.25rem 0 .25rem; min-height: 48px; }

/* ------------------------ Order confirmation ----------------------- */
.confirm-page { padding: 1rem 0 4rem; }
.confirm-hero { text-align: center; padding: 2rem 0 2.5rem; }
.confirm-check { width: 64px; height: 64px; border-radius: 50%; background: var(--success); color: #fff; font-size: 2rem; display: flex; align-items: center; justify-content: center; margin: 0 auto 1rem; }
.confirm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.confirm-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow-sm); }
.confirm-card h2 { font-size: 1.15rem; margin-bottom: 1rem; }
.confirm-address { font-style: normal; line-height: 1.7; color: var(--ink); }
.confirm-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-top: 2rem; }

/* --------------------------- Track order --------------------------- */
.track-page { padding: 1rem 0 4rem; }
.track-info { display: flex; flex-direction: column; gap: .5rem; margin-top: .5rem; }
.track-info .btn { align-self: flex-start; margin-top: .5rem; }
.copy-btn { background: none; border: 1px solid var(--line); border-radius: 6px; padding: .1rem .5rem; margin-left: .45rem; font-size: .72rem; cursor: pointer; color: var(--muted); font-family: var(--font-body); vertical-align: middle; }
.copy-btn:hover { border-color: var(--gold); color: var(--ink); }

/* White-label tracking: status badge + progress + event timeline */
.track-status { margin: 1.25rem 0 .25rem; }
.track-status-badge { display: inline-block; font-weight: 700; font-size: .9rem; padding: .4rem .95rem; border-radius: 999px; }
.track-status-active .track-status-badge { background: #eef1f4; color: var(--indigo); }
.track-status-delivered .track-status-badge { background: #e8f5ee; color: #1f6b46; }
.track-status-warn .track-status-badge { background: #fbeede; color: #8a5a12; }

.track-progress { list-style: none; display: flex; padding: 0; margin: 1.1rem 0 1.35rem; }
.track-progress li { flex: 1; text-align: center; position: relative; font-size: .72rem; color: var(--muted); }
.track-progress li .track-dot { display: block; width: 14px; height: 14px; border-radius: 50%; background: var(--line); border: 2px solid var(--line); margin: 0 auto .4rem; position: relative; z-index: 1; }
.track-progress li::before { content: ""; position: absolute; top: 6px; left: -50%; width: 100%; height: 2px; background: var(--line); z-index: 0; }
.track-progress li:first-child::before { display: none; }
.track-progress li.done { color: var(--ink); font-weight: 600; }
.track-progress li.done .track-dot { background: var(--gold); border-color: var(--gold); }
.track-progress li.done::before { background: var(--gold); }

.track-timeline { list-style: none; padding: 0; margin: .5rem 0 0; }
.track-timeline li { position: relative; padding: 0 0 1.1rem 1.5rem; border-left: 2px solid var(--line); }
.track-timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.track-tl-dot { position: absolute; left: -7px; top: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--line); }
.track-timeline li.latest .track-tl-dot { background: var(--gold); box-shadow: 0 0 0 4px rgba(176,141,87,.15); }
.track-tl-desc { margin: 0; font-size: .92rem; color: var(--ink); }
.track-tl-meta { margin: .15rem 0 0; font-size: .78rem; color: var(--muted); }
.track-refresh { display: flex; align-items: center; gap: .75rem; margin-top: 1rem; }

@media (max-width: 860px) {
    .checkout-layout { grid-template-columns: 1fr; }
    .checkout-summary { position: static; }
    .confirm-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .form-row { grid-template-columns: 1fr; }
}

/* ----------------------------- Reviews ----------------------------- */
.star { color: #d8cdbb; }
.star.on { color: var(--gold); }
.product-rating { display: inline-flex; align-items: center; gap: .5rem; margin: 0 0 .6rem; font-size: .9rem; color: var(--muted); text-decoration: none; }
.product-rating .star { font-size: 1rem; }
.product-rating:hover { color: var(--gold-dark); }

.reviews-section { border-top: 1px solid var(--line); }
.reviews-layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: 2.5rem; align-items: start; }
.reviews-summary { display: flex; align-items: center; gap: 1rem; padding-bottom: 1rem; margin-bottom: 1rem; border-bottom: 1px solid var(--line); }
.reviews-avg { font-size: 2.6rem; font-weight: 700; color: var(--indigo); line-height: 1; }
.reviews-avg-meta { font-size: .85rem; color: var(--muted); }
.reviews-avg-meta .star { font-size: 1rem; }
.review { padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.review:last-child { border-bottom: 0; }
.review-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.review-head strong { color: var(--indigo); }
.review-stars .star { font-size: .95rem; }
.review-date { font-size: .78rem; margin: .15rem 0 .45rem; }
.review-comment { margin: 0; color: #444; }
.review-photo { display: inline-block; margin-top: .65rem; line-height: 0; }
.review-photo img { width: 110px; height: 110px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--line); transition: transform .15s ease; }
.review-photo:hover img { transform: scale(1.03); }
.review-form-wrap { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow-sm); position: sticky; top: 90px; }
.review-form-wrap h3 { margin-bottom: 1rem; }

@media (max-width: 860px) {
    .reviews-layout { grid-template-columns: 1fr; }
    .review-form-wrap { position: static; }
}

/* ------------------------------ Blog ------------------------------- */
.blog-eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; color: var(--gold-dark); margin: 0 0 .35rem; }
.blog-page { padding-bottom: 3rem; }

.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem; margin-top: 1.5rem; }
.blog-card { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease; }
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.blog-card-media { display: block; aspect-ratio: 16 / 10; background: var(--cream-200); overflow: hidden; }
.blog-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.blog-card:hover .blog-card-media img { transform: scale(1.04); }
.blog-card-body { display: flex; flex-direction: column; gap: .5rem; padding: 1.15rem 1.25rem 1.35rem; flex: 1; }
.blog-card-date { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.blog-card-title { font-size: 1.25rem; margin: 0; line-height: 1.3; }
.blog-card-title a:hover { color: var(--gold-dark); }
.blog-card-excerpt { margin: 0; color: #4c4c55; font-size: .92rem; }
.blog-card .link-more { margin-top: auto; }

.blog-pagination { display: flex; align-items: center; justify-content: center; gap: 1.25rem; margin-top: 2.5rem; }

/* ---------------------------- Article ------------------------------ */
.article { max-width: 760px; padding-bottom: 3.5rem; }
.article-head { margin: .5rem 0 1.5rem; }
.article-date { display: block; font-size: .82rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: .5rem; }
.article-head h1 { margin: 0; }
.article-cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); margin-bottom: 2rem; }

.article-body { font-size: 1.05rem; line-height: 1.75; color: #33333b; }
.article-body h2 { font-size: 1.6rem; margin: 2rem 0 .75rem; }
.article-body h3 { font-size: 1.25rem; margin: 1.6rem 0 .6rem; }
.article-body p { margin: 0 0 1.15rem; }
.article-body ul, .article-body ol { margin: 0 0 1.15rem; padding-left: 1.4rem; }
.article-body li { margin-bottom: .5rem; }
.article-body a { color: var(--gold-dark); text-decoration: underline; }
.article-body a:hover { color: var(--gold); }
.article-body img { border-radius: var(--radius-sm); margin: 1.25rem 0; }
.article-body blockquote { margin: 1.5rem 0; padding: .5rem 0 .5rem 1.25rem; border-left: 3px solid var(--gold); color: var(--muted); font-style: italic; }

.article-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }

@media (max-width: 900px) {
    .blog-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
    .blog-grid { grid-template-columns: 1fr; }
}
