/* ============================================================
   Tiny Sprouts — Design System
   Kids clothing & newborn accessories store
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
    --cream: #FFF9F2;
    --surface: #FFFFFF;
    --ink: #3D2C29;
    --ink-soft: #5A4640;
    --muted: #94817A;
    --line: #F2E6DC;
    --line-strong: #E7D5C8;

    --coral: #FF6B52;
    --coral-deep: #F04E33;
    --coral-soft: #FFE9E4;
    --sun: #FFC53D;
    --sun-soft: #FFF3D6;
    --mint: #3ECF9E;
    --mint-deep: #1FA97C;
    --mint-soft: #DFF6EC;
    --sky: #6BB7FF;
    --sky-soft: #E3F0FF;
    --lav: #A78BFA;
    --lav-soft: #EEE8FD;
    --blush: #FF9FB2;
    --blush-soft: #FFE9EE;

    --grad-main: linear-gradient(135deg, #FF6B52 0%, #FF8A5C 55%, #FFB84D 100%);
    --grad-hero: linear-gradient(160deg, #FFF3D6 0%, #FFE9E4 40%, #FFE0EA 70%, #E3F0FF 100%);

    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 22px;
    --radius-pill: 999px;

    --shadow-sm: 0 2px 8px rgba(61, 44, 41, .06);
    --shadow: 0 8px 24px rgba(61, 44, 41, .08);
    --shadow-lg: 0 20px 50px rgba(61, 44, 41, .14);

    --font-head: 'Fredoka', 'Nunito', ui-rounded, system-ui, sans-serif;
    --font-body: 'Nunito', 'Segoe UI', system-ui, -apple-system, sans-serif;

    --header-h: 72px;
    --nav-h: 46px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--cream);
    line-height: 1.6;
    font-size: 16px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
ul, ol { list-style: none; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; line-height: 1.2; letter-spacing: .2px; }
h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.45rem, 3vw, 1.9rem); }
h3 { font-size: 1.12rem; }
h4 { font-size: 1rem; }
:focus-visible { outline: 3px solid rgba(255, 107, 82, .45); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--sun-soft); }

.icon { flex-shrink: 0; }

/* ---------- Layout ---------- */
.container { width: min(1200px, 100% - 2.5rem); margin-inline: auto; }
.page-wrap { flex: 1; display: flex; flex-direction: column; }
.section { padding: 3.25rem 0; }
.section-tint { background: linear-gradient(180deg, rgba(255,255,255,.6), rgba(255, 233, 228, .35)); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.75rem; flex-wrap: wrap; }
.section-head.center { flex-direction: column; align-items: center; text-align: center; }
.section-kicker { display: inline-flex; align-items: center; gap: .4rem; color: var(--coral-deep); font-weight: 800; font-size: .8rem; text-transform: uppercase; letter-spacing: 1.2px; margin-bottom: .35rem; }
.muted { color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    font-family: var(--font-body); font-weight: 800; font-size: .95rem;
    padding: .72rem 1.4rem; border-radius: var(--radius-pill);
    border: 2px solid transparent; cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
    white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-primary { background: var(--grad-main); color: #fff; box-shadow: 0 8px 20px rgba(255, 107, 82, .35); }
.btn-primary:hover { box-shadow: 0 12px 26px rgba(255, 107, 82, .45); }
.btn-white { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.btn-white:hover { box-shadow: var(--shadow-lg); }
.btn-ghost { background: transparent; border-color: var(--line-strong); color: var(--ink-soft); }
.btn-ghost:hover { border-color: var(--coral); color: var(--coral-deep); background: var(--coral-soft); }
.btn-danger { background: #FDECEC; color: #D64545; }
.btn-danger:hover { background: #FBDADA; }
.btn-disabled { background: #EFE7E0; color: #B7A8A0; cursor: not-allowed; box-shadow: none; }
.btn-disabled:hover { transform: none; }
.btn-lg { padding: .95rem 1.9rem; font-size: 1.02rem; }
.btn-sm { padding: .45rem .9rem; font-size: .84rem; }
.btn-block { width: 100%; }
.flex-1 { flex: 1; }
.icon-btn {
    position: relative; display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; border-radius: 50%; color: var(--ink-soft);
    transition: background .18s ease, color .18s ease, transform .18s ease;
}
.icon-btn:hover { background: var(--sun-soft); color: var(--ink); transform: translateY(-1px); }

/* ---------- Badges / chips ---------- */
.badge {
    position: absolute; top: -2px; right: -2px;
    min-width: 19px; height: 19px; padding: 0 5px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--coral); color: #fff; font-size: .68rem; font-weight: 800;
    border-radius: var(--radius-pill); border: 2px solid var(--cream);
}
.badge-flag {
    position: absolute; top: 12px; left: 12px;
    padding: .28rem .7rem; border-radius: var(--radius-pill);
    font-size: .72rem; font-weight: 800; letter-spacing: .4px; text-transform: uppercase;
}
.sale-flag { background: var(--coral); color: #fff; box-shadow: 0 4px 12px rgba(255, 107, 82, .4); }
.out-flag { background: #5A4640; color: #fff; }
.low-flag { background: var(--sun-soft); color: #8A6A00; }
.status-chip {
    display: inline-flex; align-items: center; padding: .22rem .7rem; border-radius: var(--radius-pill);
    font-size: .76rem; font-weight: 800;
}
.status-active, .status-delivered { background: var(--mint-soft); color: var(--mint-deep); }
.status-pending { background: var(--sun-soft); color: #9A7400; }
.status-processing { background: var(--sky-soft); color: #2B7FD0; }
.status-shipped { background: var(--lav-soft); color: #7A5BD0; }
.status-cancelled, .status-inactive, .status-hidden { background: #F3EAE5; color: #9B8A82; }
.count-chip { background: var(--coral-soft); color: var(--coral-deep); padding: .15rem .6rem; border-radius: var(--radius-pill); font-size: .8rem; font-weight: 800; }

/* ---------- Announcement bar ---------- */
.announcement {
    background: var(--ink); color: #FFE9C4; text-align: center;
    font-size: .84rem; font-weight: 700; letter-spacing: .3px;
    padding: .5rem 1rem;
}

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 60;
    background: rgba(255, 249, 242, .92);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 1px 0 rgba(255,255,255,.6);
}
.site-header.scrolled { box-shadow: var(--shadow-sm); }
.header-inner { display: flex; align-items: center; gap: 1rem; height: var(--header-h); }
.logo { display: inline-flex; align-items: center; gap: .6rem; }
.logo-mark { display: inline-flex; }
.logo-word { font-family: var(--font-head); font-weight: 700; font-size: 1.35rem; letter-spacing: .2px; }
.logo-word span { color: var(--coral); }
.header-search {
    flex: 1; max-width: 460px; margin-inline: auto; position: relative;
    display: flex; align-items: center;
}
.search-ic { position: absolute; left: 16px; color: var(--muted); display: inline-flex; }
.header-search input {
    width: 100%; padding: .72rem 1rem .72rem 2.7rem;
    border: 2px solid var(--line-strong); border-radius: var(--radius-pill);
    background: var(--surface); transition: border-color .18s ease, box-shadow .18s ease;
}
.header-search input:focus { outline: none; border-color: var(--coral); box-shadow: 0 0 0 4px var(--coral-soft); }
.suggest {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow-lg); overflow: hidden; z-index: 80;
}
.suggest-item { display: flex; align-items: center; gap: .8rem; padding: .65rem .9rem; transition: background .15s ease; }
.suggest-item:hover { background: var(--cream); }
.suggest-item img { width: 46px; height: 46px; border-radius: var(--radius-sm); object-fit: cover; background: var(--cream); }
.suggest-item .s-name { font-weight: 700; font-size: .9rem; }
.suggest-item .price-sale { font-size: .85rem; }

.header-actions { display: flex; align-items: center; gap: .2rem; }
.search-toggle { display: none; }
.mobile-menu-btn { display: none; }

/* Main nav */
.main-nav { display: flex; align-items: center; gap: .2rem; height: var(--nav-h); overflow-x: auto; scrollbar-width: none; }
.main-nav::-webkit-scrollbar { display: none; }
.main-nav a {
    padding: .55rem .95rem; border-radius: var(--radius-pill);
    font-weight: 700; font-size: .94rem; color: var(--ink-soft);
    transition: background .16s ease, color .16s ease; white-space: nowrap;
}
.main-nav a:hover { background: var(--sun-soft); color: var(--ink); }
.main-nav a.active { background: var(--ink); color: #fff; }
.main-nav .nav-sale { color: var(--coral-deep); display: inline-flex; align-items: center; gap: .25rem; }
.main-nav .nav-sale.active { background: var(--coral); color: #fff; }
.main-nav .nav-admin { color: var(--mint-deep); }

/* ---------- Drawers ---------- */
.drawer-overlay, .modal-overlay {
    position: fixed; inset: 0; background: rgba(61, 44, 41, .45);
    backdrop-filter: blur(3px); z-index: 90;
    opacity: 0; transition: opacity .25s ease;
}
.drawer-overlay.show, .modal-overlay.show { opacity: 1; }
.mobile-drawer, .cart-drawer {
    position: fixed; top: 0; bottom: 0; z-index: 100;
    background: var(--cream); width: min(360px, 88vw);
    display: flex; flex-direction: column;
    transition: transform .3s cubic-bezier(.4, 0, .2, 1);
}
.mobile-drawer { left: 0; transform: translateX(-105%); box-shadow: var(--shadow-lg); }
.mobile-drawer.open { transform: translateX(0); }
.cart-drawer { right: 0; transform: translateX(105%); }
.cart-drawer.open { transform: translateX(0); }

.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--line); }
.drawer-user { padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: .8rem; }
.drawer-user .btn { margin-top: .4rem; }
.drawer-user > div { display: flex; flex-direction: column; min-width: 0; }
.drawer-user small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.drawer-nav { flex: 1; padding: .8rem 0; overflow-y: auto; }
.drawer-nav a, .drawer-foot a {
    display: flex; align-items: center; gap: .8rem;
    padding: .85rem 1.25rem; font-weight: 700; color: var(--ink-soft);
    transition: background .15s ease;
}
.drawer-nav a:hover, .drawer-foot a:hover { background: var(--sun-soft); color: var(--ink); }
.drawer-nav .sale-link { color: var(--coral-deep); }
.drawer-foot { border-top: 1px solid var(--line); padding: .5rem 0; }

/* Cart drawer */
.cart-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--line); }
.cart-drawer-head h2 { font-size: 1.15rem; display: flex; align-items: center; gap: .6rem; }
.cart-drawer-body { flex: 1; overflow-y: auto; padding: .6rem 1.25rem; }
.drawer-item { display: flex; gap: .8rem; padding: .9rem 0; border-bottom: 1px solid var(--line); animation: slideIn .25s ease; }
.drawer-item-img { width: 74px; height: 74px; flex-shrink: 0; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.drawer-item-img img { width: 100%; height: 100%; object-fit: cover; }
.drawer-item-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.drawer-item-name { font-weight: 700; font-size: .9rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.drawer-item-size { color: var(--muted); font-size: .8rem; }
.drawer-item-row { display: flex; align-items: center; gap: .6rem; margin-top: auto; }
.drawer-item-price { font-weight: 800; margin-left: auto; font-size: .92rem; }
.drawer-item-remove { width: 32px; height: 32px; color: var(--muted); }
.drawer-item-remove:hover { background: #FDECEC; color: #D64545; }
.cart-drawer-foot { border-top: 1px solid var(--line); padding: 1rem 1.25rem 1.25rem; background: var(--surface); }
.drawer-total { display: flex; justify-content: space-between; align-items: center; margin-bottom: .3rem; }
.drawer-total strong { font-size: 1.3rem; font-family: var(--font-head); }
.drawer-hint { display: flex; align-items: center; gap: .4rem; color: var(--muted); font-size: .8rem; margin-bottom: .8rem; }
.cart-empty { text-align: center; padding: 3rem 1rem; }
.cart-empty-ic { color: var(--line-strong); display: inline-flex; margin-bottom: .8rem; }
.cart-empty h3 { margin-bottom: .3rem; }
.cart-empty p { color: var(--muted); margin-bottom: 1.2rem; }
@keyframes slideIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Hero ---------- */
.hero { background: var(--grad-hero); overflow: hidden; position: relative; }
.hero::after {
    content: ''; position: absolute; inset: auto -10% -40% -10%; height: 60%;
    background: radial-gradient(ellipse at 50% 100%, rgba(255, 197, 61, .25), transparent 60%);
    pointer-events: none;
}
.hero-inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: 2rem; align-items: center; padding: 4rem 0 4.5rem; position: relative; z-index: 1; }
.hero-eyebrow {
    display: inline-flex; align-items: center; gap: .4rem;
    background: rgba(255,255,255,.7); border: 1px solid rgba(255, 197, 61, .5);
    color: var(--ink-soft); font-weight: 800; font-size: .8rem;
    padding: .4rem .9rem; border-radius: var(--radius-pill); margin-bottom: 1.1rem;
    box-shadow: var(--shadow-sm);
}
.hero h1 { font-size: clamp(2.3rem, 5.2vw, 3.6rem); margin-bottom: 1rem; }
.grad-text { background: var(--grad-main); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-copy p { color: var(--ink-soft); font-size: 1.08rem; max-width: 44ch; margin-bottom: 1.6rem; }
.hero-ctas { display: flex; gap: .8rem; flex-wrap: wrap; margin-bottom: 2rem; }
.hero-stats { display: flex; gap: 2rem; flex-wrap: wrap; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-family: var(--font-head); font-size: 1.35rem; color: var(--ink); }
.hero-stats span { color: var(--muted); font-size: .82rem; }

.hero-visual { position: relative; min-height: 420px; }
.hero-blob { position: absolute; border-radius: 50%; filter: blur(2px); opacity: .8; animation: float 7s ease-in-out infinite; }
.blob-1 { width: 300px; height: 300px; background: rgba(255, 197, 61, .35); top: 10px; right: 20px; }
.blob-2 { width: 220px; height: 220px; background: rgba(255, 107, 82, .25); bottom: 20px; left: 0; animation-delay: 1.5s; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
.hero-card {
    position: absolute; background: #fff; border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg); padding: .9rem; text-align: center;
    animation: float 6s ease-in-out infinite;
}
.hero-card img { width: 150px; height: 150px; object-fit: cover; border-radius: var(--radius); }
.hero-chip { display: inline-block; margin-top: .5rem; font-weight: 800; font-size: .8rem; color: var(--ink-soft); }
.hero-card-1 { top: 0; left: 4%; transform: rotate(-4deg); }
.hero-card-2 { top: 38%; right: 0; transform: rotate(4deg); animation-delay: 1s; }
.hero-card-3 { bottom: 0; left: 22%; transform: rotate(-2deg); animation-delay: 2s; }
.hero-float-note {
    position: absolute; top: 46%; left: -8px; background: var(--ink); color: #fff;
    display: flex; align-items: center; gap: .6rem; padding: .7rem 1rem;
    border-radius: var(--radius); box-shadow: var(--shadow-lg); animation: float 5.5s ease-in-out infinite;
}
.hero-float-note div { display: flex; flex-direction: column; line-height: 1.2; }
.hero-float-note strong { font-size: .85rem; }
.hero-float-note span { font-size: .72rem; color: #E8D9C8; }
.hero-visual > svg { position: absolute; top: 12%; right: 30%; color: var(--coral); animation: twinkle 2.4s ease-in-out infinite; }
@keyframes twinkle { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .5; transform: scale(.8) rotate(20deg); } }

/* ---------- Perks ---------- */
.perks { background: var(--surface); border-bottom: 1px solid var(--line); }
.perks-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; padding: 1.4rem 0; }
.perk { display: flex; align-items: center; gap: .8rem; justify-content: center; text-align: left; }
.perk svg { color: var(--coral); }
.perk div { display: flex; flex-direction: column; line-height: 1.3; }
.perk strong { font-size: .92rem; }
.perk span { color: var(--muted); font-size: .8rem; }

/* ---------- Category cards ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.cat-card {
    --accent: var(--sun-soft);
    position: relative; border-radius: var(--radius-lg); overflow: hidden;
    background: var(--accent); border: 1px solid var(--line);
    transition: transform .25s ease, box-shadow .25s ease;
}
.cat-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.cat-card img { width: 100%; height: 210px; object-fit: cover; transition: transform .4s ease; }
.cat-card:hover img { transform: scale(1.05); }
.cat-info { padding: 1rem 1.1rem 1.15rem; display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.cat-info h3 { font-size: 1.08rem; }
.cat-info span { display: inline-flex; align-items: center; gap: .3rem; color: var(--coral-deep); font-weight: 800; font-size: .82rem; }

/* ---------- Product grid & cards ---------- */
.p-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.3rem; }
.p-card {
    position: relative; background: var(--surface); border-radius: var(--radius);
    border: 1px solid var(--line); overflow: hidden;
    transition: transform .22s ease, box-shadow .22s ease;
    display: flex; flex-direction: column;
}
.p-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.p-card-img { position: relative; display: block; overflow: hidden; aspect-ratio: 1/1; background: var(--cream); }
.p-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.p-card:hover .p-card-img img { transform: scale(1.06); }
.wish-btn-abs {
    position: absolute; top: 10px; right: 10px; z-index: 5;
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(255,255,255,.92); box-shadow: var(--shadow-sm);
    display: inline-flex; align-items: center; justify-content: center; color: var(--muted);
    transition: all .18s ease; opacity: 0;
}
.p-card:hover .wish-btn-abs, .wish-btn-abs.wished { opacity: 1; }
.wish-btn-abs:hover { transform: scale(1.12); color: var(--coral); }
.wish-btn-abs.wished { color: var(--coral); }
.p-card-body { padding: .85rem 1rem 1rem; display: flex; flex-direction: column; flex: 1; }
.p-card-name { font-weight: 800; font-size: .92rem; line-height: 1.35; margin-bottom: .35rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em; }
.p-card-name:hover { color: var(--coral-deep); }
.stars { display: inline-flex; align-items: center; gap: 1px; }
.star { color: #E8D9CE; display: inline-flex; }
.star.on { color: var(--sun); }
.stars small { color: var(--muted); margin-left: .3rem; font-size: .78rem; }
.p-card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; gap: .5rem; }
.p-card-price { display: flex; align-items: baseline; gap: .45rem; flex-wrap: wrap; }
.price-sale { font-weight: 800; font-size: 1.02rem; color: var(--ink); }
.price-old { color: var(--muted); text-decoration: line-through; font-size: .84rem; }
.add-btn {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--grad-main); color: #fff; box-shadow: 0 6px 14px rgba(255, 107, 82, .35);
    display: inline-flex; align-items: center; justify-content: center;
    transition: transform .18s ease, box-shadow .18s ease;
}
.add-btn:hover { transform: scale(1.12) rotate(-6deg); }
.add-btn.pulse { animation: pulse .5s ease; }
@keyframes pulse { 0% { transform: scale(1); } 40% { transform: scale(1.25); } 100% { transform: scale(1); } }

/* ---------- Sale banner ---------- */
.sale-banner {
    background: linear-gradient(120deg, #FF6B52, #FF8A5C 45%, #FFB84D);
    border-radius: var(--radius-lg); overflow: hidden; position: relative;
    display: grid; grid-template-columns: 1.1fr .9fr; align-items: center;
    box-shadow: var(--shadow-lg);
}
.sale-banner::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(circle at 85% 20%, rgba(255,255,255,.25), transparent 45%);
}
.sale-banner-copy { padding: 2.8rem; position: relative; z-index: 1; color: #fff; }
.sale-banner .hero-eyebrow { background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.4); color: #fff; }
.sale-banner h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: .5rem; color: #fff; }
.sale-banner p { color: rgba(255,255,255,.92); margin-bottom: 1.4rem; }
.sale-banner .btn-white { color: var(--coral-deep); }
.sale-banner-art { display: flex; justify-content: center; align-items: flex-end; gap: 1rem; padding: 2.5rem 2rem 0; }
.sale-banner-art img {
    width: 130px; height: 130px; object-fit: cover; border-radius: var(--radius);
    border: 5px solid rgba(255,255,255,.55); box-shadow: var(--shadow-lg);
    transform: rotate(-4deg);
}
.sale-banner-art img:nth-child(2) { transform: rotate(3deg) translateY(-14px); width: 150px; height: 150px; }
.sale-banner-art img:nth-child(3) { transform: rotate(5deg); }

/* ---------- Testimonials ---------- */
.t-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; }
.t-card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
    padding: 1.6rem; display: flex; flex-direction: column; gap: .9rem;
    transition: transform .22s ease, box-shadow .22s ease;
}
.t-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.t-card blockquote { font-size: .98rem; color: var(--ink-soft); flex: 1; }
.t-card figcaption { display: flex; align-items: center; gap: .6rem; font-weight: 800; font-size: .9rem; }
.avatar {
    width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
    background: var(--grad-main); color: #fff; font-weight: 800;
    display: inline-flex; align-items: center; justify-content: center; font-size: .95rem;
}
.avatar-lg { width: 52px; height: 52px; font-size: 1.3rem; }

/* ---------- Page head / breadcrumbs ---------- */
.page-head { background: var(--surface); border-bottom: 1px solid var(--line); padding: 1.6rem 0; }
.breadcrumbs { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; font-size: .82rem; color: var(--muted); margin-bottom: .6rem; }
.breadcrumbs a:hover { color: var(--coral-deep); }
.breadcrumbs svg { color: #D8C7BA; }
.page-head h1 { margin: 0; }
.cat-desc { margin-top: .4rem; max-width: 60ch; }

/* ---------- Shop ---------- */
.shop-layout { display: grid; grid-template-columns: 250px 1fr; gap: 2rem; align-items: start; }
.filters {
    position: sticky; top: calc(var(--header-h) + var(--nav-h) + 16px);
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1.3rem; display: flex; flex-direction: column; gap: 1.4rem;
}
.filter-group h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin-bottom: .7rem; }
.filter-link {
    display: flex; align-items: center; gap: .4rem; padding: .45rem .7rem; margin-left: -.7rem;
    border-radius: var(--radius-sm); font-weight: 700; font-size: .92rem; color: var(--ink-soft);
    transition: background .15s ease;
}
.filter-link:hover { background: var(--cream); }
.filter-link.on { background: var(--coral-soft); color: var(--coral-deep); }
.filter-link.sale-link { color: var(--coral-deep); }
.size-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.size-chip {
    padding: .32rem .7rem; border-radius: var(--radius-pill); font-size: .78rem; font-weight: 700;
    border: 1.5px solid var(--line-strong); color: var(--ink-soft); transition: all .15s ease;
}
.size-chip:hover { border-color: var(--coral); color: var(--coral-deep); }
.size-chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.price-form { display: flex; flex-direction: column; gap: .6rem; }
.price-inputs { display: flex; align-items: center; gap: .4rem; }
.price-inputs input {
    width: 100%; padding: .5rem .6rem; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm);
    background: var(--surface); font-size: .88rem;
}
.price-inputs input:focus { outline: none; border-color: var(--coral); }
.filter-toggle { display: none; }

.shop-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; flex-wrap: wrap; }
.result-count { color: var(--muted); font-weight: 700; font-size: .92rem; }
.sort { display: flex; align-items: center; gap: .5rem; }
.sort label { font-weight: 700; font-size: .85rem; color: var(--muted); }
.sort select {
    padding: .5rem .9rem; border-radius: var(--radius-pill); border: 1.5px solid var(--line-strong);
    background: var(--surface); font-weight: 700; font-size: .88rem; cursor: pointer;
}

.pagination { display: flex; gap: .4rem; justify-content: center; margin-top: 2.5rem; flex-wrap: wrap; }
.page-btn {
    min-width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%; font-weight: 800; border: 1.5px solid var(--line-strong); color: var(--ink-soft);
    transition: all .16s ease;
}
.page-btn:hover { border-color: var(--coral); color: var(--coral-deep); }
.page-btn.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.flip { display: inline-flex; transform: scaleX(-1); }

/* ---------- Empty state ---------- */
.empty-state { text-align: center; padding: 4rem 1rem; }
.empty-ic { display: inline-flex; color: var(--line-strong); margin-bottom: 1rem; }
.empty-state h3 { font-size: 1.35rem; margin-bottom: .3rem; }
.empty-state p { color: var(--muted); margin-bottom: 1.4rem; }

/* ---------- Product page ---------- */
.product-section { padding-top: 2rem; }
.product-layout { display: grid; grid-template-columns: 1fr 1.05fr; gap: 2.5rem; margin-top: 1.2rem; }
.gallery { position: sticky; top: calc(var(--header-h) + var(--nav-h) + 16px); align-self: start; }
.gallery-main {
    position: relative; border-radius: var(--radius-lg); overflow: hidden;
    border: 1px solid var(--line); background: var(--cream); aspect-ratio: 1/1;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: .6rem; margin-top: .7rem; }
.thumb {
    width: 76px; height: 76px; border-radius: var(--radius-sm); overflow: hidden;
    border: 2px solid transparent; background: var(--cream); opacity: .75; transition: all .16s ease;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb:hover { opacity: 1; }
.thumb.on { border-color: var(--coral); opacity: 1; }

.product-info { padding-top: .4rem; }
.p-brand-line { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: .5rem; }
.p-cat {
    background: var(--sun-soft); color: #8A6A00; font-weight: 800; font-size: .78rem;
    padding: .28rem .8rem; border-radius: var(--radius-pill); text-transform: uppercase; letter-spacing: .6px;
}
.product-info h1 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: .7rem; }
.p-price-row { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; margin-bottom: 1rem; }
.p-price-row .price-sale { font-size: 1.7rem; }
.p-price-row .price-old { font-size: 1.05rem; }
.save-chip { background: var(--mint-soft); color: var(--mint-deep); font-weight: 800; font-size: .8rem; padding: .3rem .8rem; border-radius: var(--radius-pill); }
.p-desc { color: var(--ink-soft); margin-bottom: 1.4rem; }
.field { display: flex; flex-direction: column; gap: .35rem; }
.field-label { font-weight: 800; font-size: .9rem; }
.err-text { color: #D64545; font-weight: 700; font-size: .8rem; }
.size-pills { display: flex; flex-wrap: wrap; gap: .5rem; margin: .3rem 0 1.1rem; }
.size-pill {
    min-width: 52px; padding: .5rem .8rem; border-radius: var(--radius-sm);
    border: 2px solid var(--line-strong); background: var(--surface); font-weight: 800; font-size: .85rem;
    transition: all .15s ease;
}
.size-pill:hover:not(:disabled) { border-color: var(--coral); color: var(--coral-deep); }
.size-pill.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.size-pill:disabled { opacity: .4; cursor: not-allowed; }
.buy-row { display: flex; gap: .8rem; margin-bottom: .8rem; }
.qty { display: inline-flex; align-items: center; border: 2px solid var(--line-strong); border-radius: var(--radius-pill); overflow: hidden; background: var(--surface); }
.qty-btn { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; color: var(--ink-soft); transition: background .15s ease; }
.qty-btn:hover { background: var(--cream); color: var(--coral-deep); }
.qty-input { width: 44px; text-align: center; border: 0; background: transparent; font-weight: 800; -moz-appearance: textfield; appearance: textfield; }
.qty-input::-webkit-outer-spin-button, .qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-lg .qty-btn { width: 46px; height: 46px; }
.qty-lg .qty-input { width: 52px; font-size: 1.05rem; }
.wish-big { margin-bottom: 1.1rem; }
.wish-big.wished { border-color: var(--coral); color: var(--coral-deep); background: var(--coral-soft); }
.stock-line { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: .9rem 0; border-top: 1px dashed var(--line-strong); }
.stock { display: inline-flex; align-items: center; gap: .4rem; font-weight: 800; font-size: .88rem; }
.stock.in { color: var(--mint-deep); }
.stock.low { color: #9A7400; }
.stock.out { color: #D64545; }
.stock.low.small { font-size: .78rem; }
.sku { color: var(--muted); font-size: .8rem; }
.p-perks { display: flex; flex-direction: column; gap: .55rem; margin-top: .6rem; }
.p-perks div { display: flex; align-items: center; gap: .7rem; color: var(--ink-soft); font-size: .9rem; font-weight: 700; }
.p-perks svg { color: var(--mint-deep); }

/* Tabs */
.p-tabs { margin-top: 3.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.tab-head { display: flex; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab-btn { padding: 1rem 1.5rem; font-weight: 800; font-size: .95rem; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; transition: color .15s ease; white-space: nowrap; }
.tab-btn:hover { color: var(--ink); }
.tab-btn.on { color: var(--coral-deep); border-bottom-color: var(--coral); }
.tab-panel { display: none; padding: 1.6rem; }
.tab-panel.on { display: block; animation: slideIn .25s ease; }
.tab-panel p { color: var(--ink-soft); margin-bottom: .8rem; }
.detail-list { display: flex; flex-direction: column; gap: .5rem; margin-top: .6rem; }
.detail-list li { display: flex; align-items: center; gap: .6rem; color: var(--ink-soft); font-weight: 700; }
.detail-list svg { color: var(--mint-deep); }

/* Reviews */
.review { padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.review:last-of-type { border-bottom: 0; }
.review-head { display: flex; align-items: center; gap: .8rem; margin-bottom: .5rem; }
.review-head > div { display: flex; flex-direction: column; line-height: 1.3; }
.review-head time { margin-left: auto; color: var(--muted); font-size: .8rem; }
.review p { margin: 0; }
.review-form { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: .8rem; }
.review-form h3 { margin-bottom: .2rem; }
.rate-row { display: flex; align-items: center; gap: .8rem; font-weight: 700; }
.rate-input { display: inline-flex; }
.rate-star { color: #E8D9CE; transition: transform .12s ease, color .12s ease; display: inline-flex; }
.rate-star:hover { transform: scale(1.2); }
.rate-star.on { color: var(--sun); }
.review-form textarea, .review-form input, .field textarea, .field input, .field select {
    width: 100%; padding: .7rem .95rem; border: 2px solid var(--line-strong); border-radius: var(--radius-sm);
    background: var(--surface); transition: border-color .16s ease, box-shadow .16s ease;
}
.review-form textarea:focus, .review-form input:focus, .field textarea:focus, .field input:focus, .field select:focus {
    outline: none; border-color: var(--coral); box-shadow: 0 0 0 4px var(--coral-soft);
}
.review-form .btn { align-self: flex-start; }

.related-head { margin-top: 3.5rem; }

/* ---------- Forms (shared) ---------- */
label { font-weight: 800; font-size: .88rem; }
.field input, .field select, .field textarea {
    width: 100%; padding: .7rem .95rem; border: 2px solid var(--line-strong); border-radius: var(--radius-sm);
    background: var(--surface); transition: border-color .16s ease, box-shadow .16s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none; border-color: var(--coral); box-shadow: 0 0 0 4px var(--coral-soft);
}
.field input:disabled { background: var(--cream); color: var(--muted); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.span-2 { grid-column: span 2; }
.form-error-banner {
    background: #FDECEC; color: #B3352F; border: 1px solid #F5C6C6;
    padding: .8rem 1rem; border-radius: var(--radius-sm); font-weight: 700; margin-bottom: 1rem;
}
.check-label { display: flex; align-items: center; gap: .6rem; font-weight: 700; cursor: pointer; }
.check-label input { width: auto; }

/* ---------- Cart page ---------- */
.cart-layout { display: grid; grid-template-columns: 1fr 360px; gap: 2rem; align-items: start; }
.cart-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.cart-row { display: grid; grid-template-columns: 110px 1fr auto; gap: 1.1rem; padding: 1.2rem; border-bottom: 1px solid var(--line); align-items: center; }
.cart-row:last-child { border-bottom: 0; }
.cart-row-img { width: 110px; height: 110px; border-radius: var(--radius); overflow: hidden; background: var(--cream); border: 1px solid var(--line); }
.cart-row-img 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: 800; font-size: 1.02rem; }
.cart-row-name:hover { color: var(--coral-deep); }
.cart-row-meta { color: var(--muted); font-size: .86rem; }
.cart-row-actions { display: flex; align-items: center; gap: 1rem; margin-top: .5rem; flex-wrap: wrap; }
.remove-btn { display: inline-flex; align-items: center; gap: .35rem; color: var(--muted); font-weight: 700; font-size: .84rem; transition: color .15s ease; }
.remove-btn:hover { color: #D64545; }
.cart-row-total { font-weight: 800; font-size: 1.15rem; font-family: var(--font-head); }
.back-shop { display: inline-flex; align-items: center; gap: .4rem; margin-top: 1.4rem; font-weight: 800; color: var(--coral-deep); }
.back-shop svg { transform: scaleX(-1); }

.summary {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
    padding: 1.5rem; position: sticky; top: calc(var(--header-h) + var(--nav-h) + 16px);
}
.summary h2 { font-size: 1.15rem; margin-bottom: 1rem; }
.coupon-form { display: flex; gap: .5rem; margin-bottom: .6rem; }
.coupon-form input {
    flex: 1; padding: .6rem .9rem; border: 2px solid var(--line-strong); border-radius: var(--radius-pill);
    font-size: .9rem;
}
.coupon-form input:focus { outline: none; border-color: var(--coral); }
.coupon-applied { color: var(--mint-deep); font-weight: 800; font-size: .86rem; display: flex; align-items: center; gap: .35rem; margin-bottom: .8rem; }
.summary-lines { display: flex; flex-direction: column; gap: .5rem; margin: .8rem 0 1.1rem; }
.sum-line { display: flex; justify-content: space-between; align-items: center; font-size: .95rem; color: var(--ink-soft); }
.sum-line strong { font-weight: 800; color: var(--ink); }
.sum-line.good strong { color: var(--mint-deep); }
.sum-line.total { border-top: 2px dashed var(--line-strong); padding-top: .8rem; margin-top: .3rem; }
.sum-line.total strong { font-size: 1.5rem; font-family: var(--font-head); }
.free-tag { color: var(--mint-deep); font-weight: 800; }
.ship-progress { display: flex; align-items: center; gap: .4rem; color: var(--muted); font-size: .82rem; margin-top: -.2rem; }
.secure-note { display: flex; align-items: center; justify-content: center; gap: .4rem; color: var(--muted); font-size: .8rem; margin-top: .9rem; }

/* ---------- Checkout ---------- */
.checkout-layout { display: grid; grid-template-columns: 1fr 380px; gap: 2rem; align-items: start; }
.checkout-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.8rem; }
.co-step { display: flex; align-items: center; gap: .7rem; font-size: 1.1rem; margin: 1.4rem 0 1rem; }
.co-step:first-of-type { margin-top: 0; }
.co-step span {
    width: 30px; height: 30px; border-radius: 50%; background: var(--grad-main); color: #fff;
    display: inline-flex; align-items: center; justify-content: center; font-size: .9rem; font-family: var(--font-body);
}
.checkout-login-note {
    display: flex; align-items: center; gap: .6rem; background: var(--sky-soft); color: #2B5580;
    padding: .8rem 1rem; border-radius: var(--radius-sm); font-size: .9rem; margin-bottom: 1.2rem;
}
.checkout-login-note a { color: var(--coral-deep); font-weight: 800; text-decoration: underline; }
.pay-options { display: flex; flex-direction: column; gap: .7rem; }
.pay-option {
    display: flex; align-items: center; gap: .9rem; padding: 1rem 1.1rem;
    border: 2px solid var(--line-strong); border-radius: var(--radius); cursor: pointer;
    transition: border-color .16s ease, background .16s ease; position: relative;
}
.pay-option:hover { border-color: var(--coral); }
.pay-option:has(input:checked) { border-color: var(--coral); background: var(--coral-soft); }
.pay-option input { position: absolute; opacity: 0; }
.pay-ic { color: var(--ink-soft); display: inline-flex; }
.pay-txt { display: flex; flex-direction: column; line-height: 1.35; flex: 1; }
.pay-txt small { color: var(--muted); }
.radio-dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-strong); position: relative; flex-shrink: 0; }
.radio-dot.on { border-color: var(--coral); }
.radio-dot.on::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--coral); }
.pay-option:has(input:checked) .radio-dot { border-color: var(--coral); }
.pay-option:has(input:checked) .radio-dot::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--coral); }
.card-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1rem; padding: 1.2rem; background: var(--cream); border-radius: var(--radius); }
.demo-note { font-size: .8rem; color: var(--muted); display: flex; align-items: center; gap: .4rem; }
.co-summary { position: sticky; top: calc(var(--header-h) + var(--nav-h) + 16px); }
.co-items { display: flex; flex-direction: column; gap: .7rem; max-height: 280px; overflow-y: auto; padding-right: .3rem; }
.co-item { display: flex; align-items: center; gap: .8rem; }
.co-item img { width: 52px; height: 52px; border-radius: var(--radius-sm); object-fit: cover; background: var(--cream); border: 1px solid var(--line); }
.co-item div { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.3; }
.co-item span { font-size: .86rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.co-item small { color: var(--muted); font-size: .78rem; }
.co-item strong { font-size: .9rem; }

/* ---------- Auth ---------- */
.auth-section { padding: 3.5rem 0 4.5rem; }
.auth-card {
    max-width: 460px; margin: 0 auto; background: var(--surface);
    border: 1px solid var(--line); border-radius: var(--radius-lg);
    padding: 2.2rem; text-align: center; box-shadow: var(--shadow-sm);
}
.auth-ic { display: inline-flex; color: var(--coral); margin-bottom: .6rem; }
.auth-card h2 { margin-bottom: .3rem; }
.auth-card > .muted { margin-bottom: 1.4rem; }
.stack-form { display: flex; flex-direction: column; gap: .95rem; text-align: left; }
.stack-form .btn { margin-top: .3rem; }
.auth-alt { margin-top: 1.3rem; font-size: .92rem; color: var(--muted); }
.auth-alt a { color: var(--coral-deep); font-weight: 800; }
.auth-demo { margin-top: .8rem; font-size: .78rem; }
.pass-wrap { position: relative; }
.pass-wrap input { padding-right: 3rem; }
.pass-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.pass-toggle:hover { background: var(--cream); color: var(--ink); }

/* ---------- Account ---------- */
.account-layout { display: grid; grid-template-columns: 250px 1fr; gap: 2rem; align-items: start; }
.account-nav {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
    padding: 1rem; display: flex; flex-direction: column; gap: .2rem;
    position: sticky; top: calc(var(--header-h) + var(--nav-h) + 16px);
}
.account-user { display: flex; align-items: center; gap: .7rem; padding: .5rem .6rem 1rem; border-bottom: 1px solid var(--line); margin-bottom: .6rem; }
.account-user div { display: flex; flex-direction: column; min-width: 0; }
.account-user small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.account-nav a { display: flex; align-items: center; gap: .7rem; padding: .65rem .8rem; border-radius: var(--radius-sm); font-weight: 700; color: var(--ink-soft); transition: background .15s ease; }
.account-nav a:hover { background: var(--cream); }
.account-nav a.on { background: var(--coral-soft); color: var(--coral-deep); }
.account-main h2 { margin-bottom: 1.2rem; }
.orders-list { display: flex; flex-direction: column; gap: .6rem; }
.order-row {
    display: grid; grid-template-columns: 1fr auto auto auto; gap: 1rem; align-items: center;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1rem 1.2rem; transition: border-color .15s ease, transform .15s ease;
}
.order-row:hover { border-color: var(--coral); transform: translateX(3px); }
.order-row div { display: flex; flex-direction: column; }
.order-row small { color: var(--muted); font-size: .8rem; }
.narrow-form { max-width: 420px; }

/* ---------- Order page ---------- */
.narrow { max-width: 760px; }
.order-success { text-align: center; padding: 1.5rem 0 2rem; }
.success-ic {
    width: 74px; height: 74px; border-radius: 50%; background: var(--mint-soft); color: var(--mint-deep);
    display: inline-flex; align-items: center; justify-content: center; margin-bottom: 1rem;
    animation: pop .5s cubic-bezier(.34, 1.56, .64, 1);
}
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }
.order-timeline { display: flex; justify-content: space-between; gap: .5rem; margin: 1.2rem 0 2rem; position: relative; }
.order-timeline::before { content: ''; position: absolute; top: 19px; left: 8%; right: 8%; height: 3px; background: var(--line-strong); border-radius: 3px; }
.tl-step { display: flex; flex-direction: column; align-items: center; gap: .45rem; position: relative; z-index: 1; font-size: .78rem; font-weight: 800; color: var(--muted); text-align: center; }
.tl-dot {
    width: 40px; height: 40px; border-radius: 50%; background: var(--surface); border: 3px solid var(--line-strong);
    display: inline-flex; align-items: center; justify-content: center; font-size: .85rem; font-weight: 800;
}
.tl-step.done .tl-dot { background: var(--mint); border-color: var(--mint); color: #fff; }
.tl-step.current .tl-dot { border-color: var(--coral); color: var(--coral-deep); box-shadow: 0 0 0 5px var(--coral-soft); }
.tl-step.current span:last-child { color: var(--ink); }
.order-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.5rem; margin-bottom: 1.2rem; }
.order-card h3 { margin-bottom: 1rem; }
.order-item { display: flex; align-items: center; gap: .9rem; padding: .7rem 0; border-bottom: 1px dashed var(--line); }
.order-item:last-child { border-bottom: 0; }
.order-item img { width: 56px; height: 56px; border-radius: var(--radius-sm); object-fit: cover; background: var(--cream); border: 1px solid var(--line); }
.order-item div { flex: 1; display: flex; flex-direction: column; }
.order-item small { color: var(--muted); }
.order-item > span { font-weight: 800; }
.order-ctas { display: flex; gap: .8rem; justify-content: center; margin-top: 1.5rem; flex-wrap: wrap; }
.lookup-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 2rem; max-width: 460px; margin: 0 auto; text-align: center; }
.lookup-card h2 { margin-bottom: .3rem; }
.lookup-card > p { color: var(--muted); margin-bottom: 1.3rem; }
.lookup-form { display: flex; flex-direction: column; gap: 1rem; text-align: left; }
.kv { color: var(--ink-soft); line-height: 1.7; }

/* ---------- Footer ---------- */
.site-footer { background: #2E201C; color: #E9DCCF; margin-top: auto; }
.footer-top {
    display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1.4fr; gap: 2.2rem;
    padding: 3.5rem 0 2.5rem;
}
.footer-brand p { color: #C9B4A6; font-size: .9rem; margin: 1rem 0; max-width: 34ch; }
.site-footer .logo-word { color: #FFF6E9; }
.site-footer .logo-word span { color: var(--sun); }
.socials { display: flex; gap: .5rem; }
.socials a {
    width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.08);
    display: inline-flex; align-items: center; justify-content: center; color: #E9DCCF;
    transition: background .16s ease, transform .16s ease;
}
.socials a:hover { background: var(--coral); color: #fff; transform: translateY(-3px); }
.footer-col { display: flex; flex-direction: column; gap: .55rem; }
.footer-col h4, .footer-news h4 { color: #FFF6E9; margin-bottom: .4rem; font-size: 1rem; }
.footer-col a { color: #C9B4A6; font-size: .9rem; transition: color .15s ease; }
.footer-col a:hover { color: var(--sun); }
.footer-news p { color: #C9B4A6; font-size: .88rem; margin-bottom: .9rem; }
.news-form { display: flex; gap: .5rem; }
.news-form input {
    flex: 1; padding: .7rem 1rem; border-radius: var(--radius-pill); border: 2px solid rgba(255,255,255,.15);
    background: rgba(255,255,255,.07); color: #fff; font-size: .9rem; min-width: 0;
}
.news-form input::placeholder { color: #A98F7E; }
.news-form input:focus { outline: none; border-color: var(--sun); }
.news-form .btn-primary { background: var(--sun); color: var(--ink); box-shadow: none; }
.news-form .btn-primary:hover { background: #FFD257; }
.news-note { font-weight: 700; }
.footer-bottom {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
    border-top: 1px solid rgba(255,255,255,.1); padding: 1.4rem 0; color: #A98F7E; font-size: .84rem;
}
.footer-bottom svg { color: var(--coral); display: inline; }
.payments { display: inline-flex; gap: .8rem; color: #C9B4A6; }
.footer-links { display: inline-flex; align-items: center; gap: 1rem; }
.footer-links a { color: #C9B4A6; font-weight: 800; font-size: .84rem; transition: color .15s ease; }
.footer-links a:hover { color: var(--sun); }

/* ---------- Toasts ---------- */
.toast-stack { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 200; display: flex; flex-direction: column; gap: .6rem; }
.toast {
    background: var(--ink); color: #fff; padding: .85rem 1.2rem; border-radius: var(--radius);
    box-shadow: var(--shadow-lg); font-weight: 700; font-size: .9rem;
    display: flex; align-items: center; gap: .6rem;
    animation: toastIn .3s cubic-bezier(.34, 1.56, .64, 1);
    max-width: 340px;
}
.toast.success::before { content: '✓'; color: var(--mint); font-weight: 900; }
.toast.error::before { content: '✕'; color: var(--blush); font-weight: 900; }
.toast.info::before { content: 'ℹ'; color: var(--sky); font-weight: 900; }
.toast.out { animation: toastOut .3s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(.95); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px) scale(.95); } }

/* Static flash toasts (server-rendered) */
.page-wrap > .toast {
    position: fixed; top: calc(var(--header-h) + var(--nav-h) + 12px); left: 50%; transform: translateX(-50%);
    z-index: 150; animation: toastIn .35s cubic-bezier(.34, 1.56, .64, 1);
}

/* ---------- Admin ---------- */
.admin-body { background: #F6F1EB; }
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: 240px; background: var(--ink); color: #E9DCCF; flex-shrink: 0;
    display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.admin-sidebar .logo { padding: 1.3rem 1.4rem 1rem; flex-direction: column; align-items: flex-start; gap: .1rem; }
.admin-sidebar .logo-word { color: #FFF6E9; font-size: 1.15rem; }
.admin-sidebar .logo small { color: var(--sun); font-weight: 800; letter-spacing: 2px; text-transform: uppercase; font-size: .68rem; }
.admin-nav { flex: 1; padding: .8rem .8rem; display: flex; flex-direction: column; gap: .2rem; overflow-y: auto; }
.admin-nav a {
    display: flex; align-items: center; gap: .8rem; padding: .7rem .9rem; border-radius: var(--radius-sm);
    color: #C9B4A6; font-weight: 700; font-size: .92rem; transition: all .15s ease;
}
.admin-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.admin-nav a.on { background: var(--coral); color: #fff; }
.admin-sidebar-foot { border-top: 1px solid rgba(255,255,255,.1); padding: .9rem 1rem; display: flex; flex-direction: column; gap: .3rem; }
.admin-sidebar-foot a { display: flex; align-items: center; gap: .7rem; color: #C9B4A6; font-weight: 700; font-size: .88rem; padding: .4rem .3rem; }
.admin-sidebar-foot a:hover { color: var(--sun); }
.admin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.admin-topbar {
    display: flex; align-items: center; gap: 1rem; padding: 1rem 1.8rem;
    background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40;
}
.admin-topbar h1 { font-size: 1.25rem; flex: 1; }
.admin-user { display: flex; align-items: center; gap: .6rem; font-weight: 800; font-size: .9rem; }
.admin-content { padding: 1.8rem; display: flex; flex-direction: column; gap: 1.4rem; }
.admin-content > .toast { position: static; transform: none; animation: toastIn .3s ease; margin-bottom: 0; }
#adminMenuBtn { display: none; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.stat-card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1.2rem 1.3rem; display: flex; align-items: center; gap: 1rem;
    transition: transform .18s ease, box-shadow .18s ease;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.stat-ic { width: 48px; height: 48px; border-radius: var(--radius-sm); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.stat-ic.coral { background: var(--coral-soft); color: var(--coral-deep); }
.stat-ic.sky { background: var(--sky-soft); color: #2B7FD0; }
.stat-ic.mint { background: var(--mint-soft); color: var(--mint-deep); }
.stat-ic.lav { background: var(--lav-soft); color: #7A5BD0; }
.stat-card div { display: flex; flex-direction: column; line-height: 1.3; }
.stat-card small { color: var(--muted); font-weight: 800; font-size: .76rem; text-transform: uppercase; letter-spacing: .8px; }
.stat-card strong { font-size: 1.45rem; font-family: var(--font-head); }
.stat-card em { font-size: .78rem; color: var(--muted); font-style: normal; font-family: var(--font-body); }

.admin-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.5rem; }
.panel h3 { margin-bottom: 1rem; font-size: 1.05rem; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.panel-head h3 { margin-bottom: 0; }
.panel-pad { padding: 1rem 1.5rem 1.5rem; }

.bar-chart { display: flex; align-items: flex-end; gap: .8rem; height: 180px; padding-top: 1.6rem; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .35rem; height: 100%; justify-content: flex-end; }
.bar { width: 100%; max-width: 44px; background: var(--grad-main); border-radius: 8px 8px 4px 4px; transition: height .6s ease; min-height: 4px; }
.bar-val { font-size: .68rem; color: var(--muted); font-weight: 800; }
.bar-label { font-size: .76rem; color: var(--muted); font-weight: 800; }

.status-bars { display: flex; flex-direction: column; gap: .8rem; }
.status-bar-row { display: flex; align-items: center; gap: .8rem; font-size: .88rem; }
.status-bar-row > span { width: 120px; font-weight: 700; color: var(--ink-soft); }
.status-bar-row strong { width: 34px; text-align: right; }
.status-bar-track { flex: 1; height: 10px; background: var(--cream); border-radius: 6px; overflow: hidden; }
.status-bar-fill { height: 100%; border-radius: 6px; transition: width .6s ease; }
.s-pending { background: var(--sun); }
.s-processing { background: var(--sky); }
.s-shipped { background: var(--lav); }
.s-delivered { background: var(--mint); }
.s-cancelled { background: #C9B4A6; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.admin-table { width: 100%; border-collapse: collapse; min-width: 720px; }
.admin-table th {
    text-align: left; padding: .85rem 1.1rem; font-size: .76rem; text-transform: uppercase;
    letter-spacing: .8px; color: var(--muted); background: var(--cream); border-bottom: 1px solid var(--line);
}
.admin-table td { padding: .85rem 1.1rem; border-bottom: 1px solid var(--line); font-size: .9rem; vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table tr:hover td { background: #FFFDFA; }
.admin-table small { color: var(--muted); font-size: .78rem; }
.ta-r { text-align: right; }
.cell-product { display: flex; align-items: center; gap: .8rem; min-width: 220px; }
.cell-product img { width: 44px; height: 44px; border-radius: var(--radius-sm); object-fit: cover; background: var(--cream); border: 1px solid var(--line); flex-shrink: 0; }
.cell-product div { display: flex; flex-direction: column; line-height: 1.3; }
.sale-text { color: var(--coral-deep); font-weight: 800; }
.sale-picker { max-height: 340px; overflow-y: auto; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); padding: .3rem; }
.sale-pick-row { display: flex; align-items: center; gap: .7rem; padding: .45rem .5rem; border-radius: var(--radius-sm); cursor: pointer; }
.sale-pick-row:hover { background: var(--cream); }
.sale-pick-row img { width: 36px; height: 36px; border-radius: var(--radius-sm); object-fit: cover; border: 1px solid var(--line); flex-shrink: 0; }
.sale-pick-name { flex: 1; display: flex; flex-direction: column; line-height: 1.25; font-weight: 700; font-size: .88rem; min-width: 0; }
.sale-pick-name small { color: var(--muted); font-weight: 600; font-size: .76rem; }
.sale-pick-price { font-weight: 800; font-size: .86rem; color: var(--muted); white-space: nowrap; }
.sale-end-chip { background: var(--sun-soft); color: #9A7400; }
.btn-google {
    display: flex; align-items: center; justify-content: center; gap: .7rem; width: 100%;
    padding: .85rem 1.2rem; border-radius: var(--radius); border: 2px solid var(--line-strong);
    background: #fff; color: var(--ink); font-weight: 800; font-size: .98rem; transition: all .15s ease;
}
.btn-google:hover { border-color: var(--coral); box-shadow: var(--shadow); transform: translateY(-1px); }
.or-divider { display: flex; align-items: center; gap: .8rem; margin: 1rem 0; color: var(--muted); font-size: .85rem; font-weight: 600; }
.or-divider::before, .or-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.stock-num { font-weight: 800; padding: .2rem .6rem; border-radius: var(--radius-pill); background: var(--mint-soft); color: var(--mint-deep); }
.stock-num.low { background: var(--sun-soft); color: #9A7400; }
.row-actions { display: flex; align-items: center; gap: .4rem; justify-content: flex-end; flex-wrap: wrap; }
.inline-form { display: inline-flex; }
.inline-form select {
    padding: .4rem .6rem; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm);
    background: var(--surface); font-weight: 700; font-size: .84rem;
}
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.search-mini { display: flex; gap: .5rem; flex: 1; max-width: 420px; }
.search-mini input {
    flex: 1; padding: .6rem .95rem; border: 2px solid var(--line-strong); border-radius: var(--radius-pill); font-size: .9rem;
}
.search-mini input:focus { outline: none; border-color: var(--coral); }
.seg { display: flex; gap: .3rem; flex-wrap: wrap; }
.seg a {
    padding: .4rem .85rem; border-radius: var(--radius-pill); font-weight: 800; font-size: .82rem;
    color: var(--muted); border: 1.5px solid var(--line-strong); transition: all .15s ease;
}
.seg a:hover { border-color: var(--coral); color: var(--coral-deep); }
.seg a.on { background: var(--ink); border-color: var(--ink); color: #fff; }

.img-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: .5rem; margin-bottom: .8rem; }
.img-opt { position: relative; cursor: pointer; border-radius: var(--radius-sm); overflow: hidden; border: 3px solid transparent; transition: border-color .15s ease; }
.img-opt img { width: 100%; aspect-ratio: 1/1; object-fit: cover; background: var(--cream); }
.img-opt:hover { border-color: var(--line-strong); }
.img-opt.on { border-color: var(--coral); }
.img-opt input { position: absolute; opacity: 0; }
.upload-row { display: flex; align-items: center; gap: .7rem; }
.form-actions { display: flex; gap: .7rem; justify-content: flex-end; margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.cat-admin-list, .coupon-list { display: flex; flex-direction: column; gap: .5rem; }
.cat-admin-row, .coupon-row {
    display: flex; align-items: center; gap: .8rem; padding: .7rem .8rem;
    border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.cat-dot { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; }
.cat-admin-row div, .coupon-row div { flex: 1; display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.cat-admin-row small, .coupon-row small { color: var(--muted); font-size: .78rem; }
.coupon-code { font-family: var(--font-head); font-weight: 700; background: var(--sun-soft); color: #8A6A00; padding: .35rem .7rem; border-radius: var(--radius-sm); font-size: .9rem; }
.order-items-admin { display: flex; flex-direction: column; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .p-grid { grid-template-columns: repeat(3, 1fr); }
    .cat-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-top { grid-template-columns: 1fr 1fr; gap: 2rem; }
    .hero-inner { grid-template-columns: 1fr; }
    .hero-visual { max-width: 560px; margin: 0 auto; width: 100%; min-height: 400px; }
    .perks-grid { grid-template-columns: repeat(2, 1fr); row-gap: 1.2rem; }
    .t-grid { grid-template-columns: repeat(2, 1fr); }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .checkout-layout { grid-template-columns: 1fr; }
    .co-summary { position: static; order: -1; }
    .sale-banner { grid-template-columns: 1fr; }
    .sale-banner-art { padding: 0 2rem 2.5rem; }
}

@media (max-width: 768px) {
    :root { --header-h: 64px; --nav-h: 0px; }
    .mobile-menu-btn, .search-toggle { display: inline-flex; }
    .main-nav { display: none; }
    .header-search {
        position: absolute; left: 0; right: 0; top: var(--header-h);
        background: var(--cream); padding: .7rem 1.25rem; border-bottom: 1px solid var(--line);
        max-width: none; display: none; box-shadow: var(--shadow-sm);
    }
    .header-search.open { display: flex; }
    .header-inner { gap: .4rem; }
    .header-actions { gap: 0; }
    .logo-word { font-size: 1.15rem; }
    .hero-inner { padding: 3rem 0 3.5rem; gap: 1rem; }
    .hero-stats { gap: 1.4rem; }
    .p-grid { grid-template-columns: repeat(2, 1fr); gap: .9rem; }
    .section { padding: 2.4rem 0; }
    .shop-layout { grid-template-columns: 1fr; }
    .filters {
        position: fixed; inset: 0 auto 0 0; width: min(320px, 86vw); z-index: 100;
        border-radius: 0; overflow-y: auto; transform: translateX(-105%);
        transition: transform .3s cubic-bezier(.4, 0, .2, 1); top: 0;
        border-right: 1px solid var(--line);
    }
    .filters.open { transform: translateX(0); }
    .filter-toggle { display: inline-flex; margin-bottom: 1rem; }
    .product-layout { grid-template-columns: 1fr; gap: 1.6rem; }
    .gallery { position: static; }
    .cart-layout { grid-template-columns: 1fr; }
    .summary { position: static; }
    .cart-row { grid-template-columns: 84px 1fr; }
    .cart-row-img { width: 84px; height: 84px; }
    .cart-row-total { grid-column: 2; text-align: right; }
    .account-layout { grid-template-columns: 1fr; }
    .account-nav { position: static; flex-direction: row; flex-wrap: wrap; }
    .account-nav .account-user { width: 100%; }
    .admin-sidebar {
        position: fixed; left: 0; top: 0; bottom: 0; z-index: 120; transform: translateX(-105%);
        transition: transform .3s ease;
    }
    .admin-sidebar.open { transform: translateX(0); }
    #adminMenuBtn { display: inline-flex; }
    .admin-content { padding: 1.2rem; }
    .admin-grid-2 { grid-template-columns: 1fr; }
    .order-timeline { flex-wrap: wrap; justify-content: flex-start; gap: 1.2rem; }
    .order-timeline::before { display: none; }
    .page-wrap > .toast { top: calc(var(--header-h) + 12px); width: calc(100% - 2rem); max-width: 420px; }
}

@media (max-width: 520px) {
    .container { width: min(1200px, 100% - 1.6rem); }
    .p-grid { gap: .7rem; }
    .p-card-name { font-size: .84rem; }
    .cat-grid { grid-template-columns: 1fr 1fr; gap: .8rem; }
    .cat-card img { height: 140px; }
    .hero-visual { min-height: 340px; }
    .hero-card img { width: 110px; height: 110px; }
    .hero-card-2 { top: 30%; }
    .hero-float-note { top: 55%; left: -4px; }
    .hero-stats { gap: 1.2rem; }
    .hero-stats strong { font-size: 1.1rem; }
    .t-grid { grid-template-columns: 1fr; }
    .footer-top { grid-template-columns: 1fr; gap: 1.6rem; }
    .footer-bottom { justify-content: center; text-align: center; }
    .form-grid { grid-template-columns: 1fr; }
    .span-2 { grid-column: span 1; }
    .buy-row { flex-direction: column; }
    .buy-row .btn { width: 100%; }
    .qty-lg { align-self: flex-start; }
    .sale-banner-copy { padding: 2rem 1.5rem; }
    .sale-banner-art img { width: 90px; height: 90px; }
    .sale-banner-art img:nth-child(2) { width: 105px; height: 105px; }
    .stat-grid { grid-template-columns: 1fr 1fr; gap: .8rem; }
    .stat-card { padding: .9rem; }
    .stat-ic { width: 40px; height: 40px; }
    .stat-card strong { font-size: 1.15rem; }
    .checkout-form { padding: 1.3rem; }
    .card-fields { grid-template-columns: 1fr; }
    .order-row { grid-template-columns: 1fr auto; }
    .order-row .status-chip { grid-row: 2; }
    .order-row > svg { display: none; }
    .tab-btn { padding: .85rem 1rem; font-size: .88rem; }
    .toast-stack { left: 1rem; right: 1rem; bottom: 1rem; }
    .toast { max-width: none; }
}

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