:root {
    --brand: #b5341f;
    --brand-dark: #8c2414;
    --brand-light: #f6d9c8;
    --gold: #d9a441;
    --ink: #2b2018;
    --muted: #6f6258;
    --bg: #fffaf5;
    --card: #ffffff;
    --line: #efe2d6;
    --radius: 14px;
    --shadow: 0 8px 24px rgba(140, 36, 20, 0.08);
    --maxw: 1140px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.6;
}

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

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

.container {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------- Header ---------- */
.site-header {
    background: var(--card);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow);
}
.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 68px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.15rem;
    color: var(--ink);
}
.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 38px; height: 38px;
    background: var(--brand);
    color: #fff;
    border-radius: 50%;
    font-size: 1.1rem;
}
.brand-text strong { color: var(--brand); }
.nav-links {
    display: flex;
    align-items: center;
    gap: 22px;
}
.nav-links a {
    color: var(--ink);
    font-weight: 600;
    font-size: 0.96rem;
    padding: 6px 2px;
    border-bottom: 2px solid transparent;
}
.nav-links a:hover, .nav-links a.is-active {
    color: var(--brand);
    border-color: var(--brand);
}
.cart-link { position: relative; }
.cart-badge {
    background: var(--gold);
    color: #fff;
    border-radius: 999px;
    padding: 1px 8px;
    font-size: 0.78rem;
    margin-left: 4px;
}
.nav-toggle {
    display: none;
    background: none;
    border: ;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--brand);
}

/* ---------- Layout ---------- */
.site-main { min-height: 70vh; }
.section { padding: 56px 0; }
.section-title {
    text-align: center;
    margin: 0 0 8px;
    font-size: 2rem;
}
.section-sub {
    text-align: center;
    color: var(--muted);
    margin: 0 0 36px;
}

/* ---------- Hero ---------- */
.hero {
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
    color: #fff;
    padding: 84px 0;
    text-align: center;
}
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin: 0 0 14px; }
.hero p { font-size: 1.15rem; max-width: 640px; margin: 0 auto 28px; opacity: .95; }
.hero .btn { background: #fff; color: var(--brand-dark); }
.hero .btn:hover { background: var(--brand-light); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    background: var(--brand);
    color: #fff;
    border: 0;
    border-radius: 999px;
    padding: 12px 26px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform .08s ease, background .2s ease;
}
.btn:hover { background: var(--brand-dark); color: #fff; transform: translateY(-1px); }
.btn.secondary { background: var(--gold); }
.btn.secondary:hover { background: #c08f2f; }
.btn.ghost { background: transparent; color: var(--brand); border: 2px solid var(--brand); }
.btn.ghost:hover { background: var(--brand); color: #fff; }
.btn.small { padding: 8px 16px; font-size: .9rem; }
.btn.block { width: 100%; }

/* ---------- Product grid ---------- */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
}
.product-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow);
    transition: transform .12s ease;
}
.product-card:hover { transform: translateY(-4px); }
.product-media {
    aspect-ratio: 4/3;
    background: var(--brand-light);
    display: grid;
    place-items: center;
    font-size: 3.4rem;
}
.product-body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-cat { font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; color: var(--brand); font-weight: 700; }
.product-name { font-size: 1.1rem; margin: 0; }
.product-name a { color: var(--ink); }
.product-short { color: var(--muted); font-size: .92rem; margin: 0; flex: 1; }
.product-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.price { font-weight: 800; font-size: 1.15rem; color: var(--brand-dark); }
.tag {
    display: inline-block;
    background: var(--brand-light);
    color: var(--brand-dark);
    border-radius: 999px;
    padding: 2px 10px;
    font-size: .74rem;
    margin:  4px 4px 0;
}

/* ---------- Category bar ---------- */
.cat-bar { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 32px; }
.cat-chip {
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 999px;
    padding: 7px 16px;
    font-weight: 600;
    color: var(--ink);
    cursor: pointer;
}
.cat-chip.active, .cat-chip:hover { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ---------- Product detail ---------- */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.product-detail .media {
    background: var(--brand-light);
    border-radius: var(--radius);
    aspect-ratio: 1/1;
    display: grid;
    place-items: center;
    font-size: 6rem;
}
.qty-row { display: flex; align-items: center; gap: 12px; margin: 18px 0; }
.qty-row input { width: 70px; padding: 10px; text-align: center; border: 1px solid var(--line); border-radius: 8px; }

/* ---------- Tables / cart ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 14px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.table th { font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.cart-line { display: flex; align-items: center; gap: 14px; }
.cart-thumb { width: 56px; height: 56px; border-radius: 10px; background: var(--brand-light); display: grid; place-items: center; font-size: 1.6rem; flex: none; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 4px; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: .9rem; }
.field input, .field textarea, .field select {
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    font: inherit;
    background: #fff;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--brand-light); border-color: var(--brand); }

/* ---------- Checkout summary ---------- */
.checkout-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: start; }
.summary-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
    position: sticky;
    top: 90px;
}
.summary-row { display: flex; justify-content: space-between; padding: 8px 0; }
.summary-row.total { border-top: 2px solid var(--line); margin-top: 8px; padding-top: 14px; font-weight: 800; font-size: 1.2rem; }

/* ---------- Alerts ---------- */
.alert {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 18px;
    font-weight: 600;
}
.alert.success { background: #e6f6ec; color: #1f7a44; border: 1px solid #bfe6cd; }
.alert.error { background: #fdecec; color: #b5341f; border: 1px solid #f6c9c2; }
.alert.info { background: #eef4fb; color: #1f5a99; border: 1px solid #cfe2f6; }

/* ---------- Misc ---------- */
.empty-state { text-align: center; padding: 60px ; color: var(--muted); }
.breadcrumb { font-size: .85rem; color: var(--muted); margin-bottom: 18px; }
.breadcrumb a { color: var(--brand); }
.about-img, .contact-card { background: var(--brand-light); border-radius: var(--radius); padding: 40px; text-align: center; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #f1e7de; margin-top: 60px; padding: 48px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.footer-grid h3, .footer-grid h4 { color: #fff; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a, .site-footer a { color: #f1e7de; }
.footer-links a:hover, .site-footer a:hover { color: var(--gold); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 32px; padding: 18px 0; text-align: center; font-size: .85rem; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
    .product-detail, .checkout-grid, .form-grid { grid-template-columns: 1fr; }
    .summary-card { position: static; }
    .nav-toggle { display: inline-block; }
    .nav-links {
        display: none;
        position: absolute;
        left: 0; right: 0; top: 68px;
        flex-direction: column;
        background: #fff;
        padding: 16px 20px;
        gap: 14px;
        border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow);
    }
    .nav-links.open { display: flex; }
    .footer-grid { grid-template-columns: 1fr; }
}
