:root {
    --bg: #f4f6fb;
    --card: #ffffff;
    --ink: #1c2430;
    --muted: #6b7686;
    --line: #e6eaf1;
    --accent: #6b3df5;
    --accent-2: #ff5a3c;
    --ok: #17a06a;
    --radius: 14px;
    --shadow: 0 6px 24px rgba(28, 36, 48, .08);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* Header */
.top {
    background: #fff;
    border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 50;
}
.top-inner {
    max-width: 1180px; margin: 0 auto; padding: 14px 20px;
    display: flex; align-items: center; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: -.02em; }
.brand .logo {
    width: 34px; height: 34px; border-radius: 9px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    display: grid; place-items: center; color: #fff;
}
.brand small { color: var(--muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.search { flex: 1; max-width: 560px; position: relative; }
.search input {
    width: 100%; padding: 11px 14px 11px 40px; border: 1px solid var(--line);
    border-radius: 999px; background: #f7f9fc; font-size: 15px; outline: none;
}
.search input:focus { border-color: var(--accent); background: #fff; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.top-actions { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.top-actions .link { color: var(--muted); font-weight: 600; font-size: 14px; }
.cart { position: relative; }
.cart .badge {
    position: absolute; top: -8px; right: -10px; background: var(--accent-2); color: #fff;
    font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; border-radius: 999px;
    display: grid; place-items: center; padding: 0 5px;
}
.navbar { background: #fff; border-bottom: 1px solid var(--line); }
.navbar-inner { max-width: 1180px; margin: 0 auto; padding: 0 20px; display: flex; gap: 26px; }
.navbar a { padding: 12px 0; font-size: 14px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; }
.navbar a:hover { color: var(--ink); }
.navbar a.hot { color: var(--accent-2); }

/* Layout */
.wrap { max-width: 1180px; margin: 0 auto; padding: 24px 20px 60px; }
.hero {
    border-radius: 20px; padding: 40px; color: #fff; margin-bottom: 28px;
    background: radial-gradient(1200px 300px at 10% -20%, rgba(255,255,255,.25), transparent),
                linear-gradient(120deg, var(--accent), #8a5bff 55%, var(--accent-2));
    box-shadow: var(--shadow);
}
.hero h1 { margin: 0 0 8px; font-size: 34px; letter-spacing: -.02em; }
.hero p { margin: 0 0 18px; opacity: .92; font-size: 16px; max-width: 560px; }
.hero .btn { background: #fff; color: var(--accent); }

.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 32px 0 14px; }
.section-head h2 { margin: 0; font-size: 22px; letter-spacing: -.01em; }
.section-head .muted { color: var(--muted); font-size: 14px; }

.btn {
    display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 10px;
    background: var(--accent); color: #fff; font-weight: 700; border: none; cursor: pointer; font-size: 15px;
}
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn:hover { filter: brightness(1.05); }

/* Carousel host */
.deal-strip {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 10px; box-shadow: var(--shadow); min-height: 60px;
}
.embed-note { color: var(--muted); font-size: 12px; margin: 8px 2px 0; }

/* Product grid (demo filler) */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, 1fr); } }
.pcard {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    overflow: hidden; box-shadow: var(--shadow); transition: transform .12s ease, box-shadow .12s ease;
}
.pcard:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(28,36,48,.12); }
.pcard .thumb { aspect-ratio: 4/3; display: grid; place-items: center; background: linear-gradient(135deg, #eef1f8, #e3e8f5); color: #b9c1d4; }
.pcard .body { padding: 14px; }
.pcard .name { font-weight: 700; font-size: 15px; margin: 0 0 4px; }
.pcard .cat { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.pcard .prices { margin-top: 10px; display: flex; align-items: baseline; gap: 8px; }
.pcard .now { font-weight: 800; font-size: 19px; color: var(--accent-2); }
.pcard .was { color: var(--muted); text-decoration: line-through; font-size: 13px; }

.layout { display: grid; grid-template-columns: 1fr; gap: 24px; }
.layout.with-side { grid-template-columns: 1fr 300px; }
@media (max-width: 900px) { .layout.with-side { grid-template-columns: 1fr; } }
.side-strip { background:#fff; border:1px solid var(--line); border-radius:var(--radius); padding:8px; box-shadow:var(--shadow); }

/* Product detail page */
.detail { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 30px; box-shadow: var(--shadow); }
@media (max-width: 800px) { .detail { grid-template-columns: 1fr; } }
.detail .gallery { aspect-ratio: 1/1; border-radius: 16px; display: grid; place-items: center; background: linear-gradient(135deg, #eef1f8, #e3e8f5); color: #aab3c9; }
.detail h1 { font-size: 28px; margin: 6px 0 4px; letter-spacing: -.02em; }
.detail .sku { color: var(--muted); font-size: 13px; }
.detail .price-row { display: flex; align-items: baseline; gap: 12px; margin: 18px 0; }
.detail .price-row .now { font-size: 32px; font-weight: 800; color: var(--accent-2); }
.detail .price-row .was { color: var(--muted); text-decoration: line-through; }
.detail ul.usp { padding-left: 18px; color: #40495a; }
.detail .buy-row { display: flex; gap: 12px; margin-top: 22px; }
.breadcrumb { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.breadcrumb a:hover { color: var(--accent); }

.arrived {
    margin-top: 22px; border: 1px dashed #cfd6e6; border-radius: 12px; padding: 16px; background: #fbfcff;
}
.arrived h3 { margin: 0 0 8px; font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); }
.arrived table { width: 100%; border-collapse: collapse; font-size: 13px; }
.arrived td { padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.arrived td.k { color: var(--muted); width: 40%; font-family: ui-monospace, Menlo, Consolas, monospace; }
.arrived td.v { font-family: ui-monospace, Menlo, Consolas, monospace; word-break: break-all; }
.arrived .empty { color: var(--muted); font-size: 13px; }

/* Toast */
.toast {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
    background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px; font-weight: 600;
    opacity: 0; pointer-events: none; transition: all .25s ease; z-index: 100;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

footer { border-top: 1px solid var(--line); background: #fff; margin-top: 40px; }
.footer-inner { max-width: 1180px; margin: 0 auto; padding: 26px 20px; color: var(--muted); font-size: 13px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.badge-demo { background: #fff3cd; color: #7a5b00; border: 1px solid #ffe69c; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
