:root {
    --bg: #fff7ec;
    --bg-2: #ffeed4;
    --card: #ffffff;
    --ink: #3a2a1a;
    --ink-2: #6b4f33;
    --muted: #8a7a66;
    --accent: #c8541a;
    --accent-2: #e07a2c;
    --accent-soft: #fde2cf;
    --line: #efe2cb;
    --ok: #2e7d32;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 1px 2px rgba(58, 42, 26, .06), 0 8px 24px rgba(58, 42, 26, .07);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }

.container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4 {
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0 0 .5em;
    color: var(--ink);
}

h1 { font-size: clamp(28px, 4.4vw, 44px); }
h2 { font-size: clamp(22px, 3vw, 30px); }
h3 { font-size: 18px; }

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

/* HEADER */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 247, 236, .85);
    backdrop-filter: saturate(140%) blur(8px);
    -webkit-backdrop-filter: saturate(140%) blur(8px);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 18px;
    height: 64px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink) !important;
    font-weight: 800;
    font-size: 20px;
    letter-spacing: -0.02em;
}

.brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .04);
}

.nav {
    margin-left: 24px;
    display: flex;
    gap: 18px;
    flex: 1;
    flex-wrap: wrap;
}

.nav a {
    color: var(--ink-2);
    font-weight: 500;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
}

.nav a:hover { color: var(--accent); }

.nav a.is-active {
    color: var(--ink);
    border-bottom-color: var(--accent);
}

.cart-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--ink);
    color: #fff !important;
    font-weight: 600;
}

.cart-btn:hover { background: #2a1c10; color: #fff !important; }

.cart-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}
.cart-count.is-empty { background: #6b4f33; }

/* HERO */
.hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, var(--bg-2), var(--bg));
}

.hero-inner {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    align-items: center;
    gap: 36px;
    padding: 56px 0 64px;
}

.hero h1 {
    font-size: clamp(34px, 5.4vw, 60px);
    line-height: 1.05;
    margin-bottom: 16px;
}

.hero p.lead {
    font-size: clamp(16px, 1.6vw, 19px);
    color: var(--ink-2);
    max-width: 560px;
    margin: 0 0 24px;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero-img-wrap {
    aspect-ratio: 4/5;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: #fff;
}

.hero-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    mix-blend-mode: multiply;
}

/* BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 12px;
    border: 1px solid transparent;
    background: var(--ink);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    font-size: 15px;
    line-height: 1;
    transition: transform .04s ease, background .15s ease, color .15s ease, border-color .15s ease;
    text-decoration: none;
}
.btn:hover { background: #2a1c10; color: #fff; }
.btn:active { transform: translateY(1px); }

.btn-primary {
    background: var(--accent);
}
.btn-primary:hover { background: var(--accent-2); }

.btn-ghost {
    background: transparent;
    color: var(--ink);
    border-color: var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: #fff; }

.btn-block { width: 100%; }

.btn.is-added { background: var(--ok); }

/* USP / FEATURES */
.usp {
    padding: 36px 0 8px;
}
.usp-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.usp-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px 18px 20px;
}
.usp-card .ico {
    font-size: 26px;
    display: inline-flex;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent-soft);
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}
.usp-card h3 { margin-bottom: 6px; }
.usp-card p { margin: 0; color: var(--ink-2); font-size: 14px; }

/* SECTION */
.section {
    padding: 48px 0;
}
.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}
.section-head p { margin: 0; color: var(--ink-2); }

/* FILTERS */
.filters {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 22px;
}
.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.chip {
    appearance: none;
    background: var(--card);
    border: 1px solid var(--line);
    color: var(--ink);
    border-radius: 999px;
    padding: 9px 16px;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.chip:hover { border-color: var(--ink); }
.chip.is-active {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
}
.chip.chip-sm {
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-2);
}
.chip.chip-sm.is-active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* PRODUCT GRID */
.products {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.product {
    display: flex;
    flex-direction: column;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform .12s ease, box-shadow .15s ease, border-color .15s ease;
}
.product:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: #e3d2b3;
}

.product-img {
    aspect-ratio: 4/3;
    background: var(--bg-2);
    position: relative;
    overflow: hidden;
}
.product-img img {
    width: 100%; height: 100%;
    object-fit: cover;
}

.product-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 4px 8px;
    border-radius: 999px;
}
.product-tag.t-премиум { background: #6b4f33; }
.product-tag.t-новинка { background: #1d6fa5; }
.product-tag.t-выгодно { background: #c8541a; }
.product-tag.t-добавка { background: #2e7d32; }
.product-tag.t-без-кофеина { background: #2e7d32; }

.product-body {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.product-name {
    font-weight: 700;
    color: var(--ink);
    font-size: 16px;
    line-height: 1.2;
}
.product-name a { color: inherit; }

.product-short {
    color: var(--ink-2);
    font-size: 13px;
    line-height: 1.4;
    flex: 1;
}

.product-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 6px;
}
.product-price {
    font-size: 18px;
    font-weight: 800;
}
.product-weight {
    font-size: 12px;
    color: var(--muted);
}

.product .btn {
    padding: 9px 14px;
    font-size: 14px;
}

/* PRODUCT PAGE */
.product-page {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 36px;
    align-items: start;
}

.product-page .product-img {
    aspect-ratio: 4/3;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--card);
}

.product-info h1 { margin-bottom: 10px; }
.product-info .desc { color: var(--ink-2); }
.product-info .price-row {
    display: flex;
    align-items: baseline;
    gap: 16px;
    margin: 18px 0;
}
.product-info .price-row .price {
    font-size: 32px;
    font-weight: 800;
}
.qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}
.qty button {
    width: 40px;
    height: 44px;
    background: transparent;
    border: 0;
    font-size: 18px;
    cursor: pointer;
    color: var(--ink);
}
.qty button:hover { background: var(--bg-2); }
.qty input {
    width: 48px;
    height: 44px;
    border: 0;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    background: transparent;
    color: var(--ink);
}
.qty input:focus { outline: none; }

.buy-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.ingredients {
    margin-top: 22px;
    padding: 16px 18px;
    border-radius: var(--radius);
    background: var(--card);
    border: 1px solid var(--line);
}
.ingredients h4 { margin-bottom: 6px; }
.ingredients p { margin: 0; color: var(--ink-2); font-size: 14px; }

/* CART */
.cart {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 28px;
    align-items: start;
}

.cart-list {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}
.cart-item {
    display: grid;
    grid-template-columns: 90px 1fr auto auto;
    gap: 16px;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
}
.cart-item:last-child { border-bottom: 0; }

.cart-item-img {
    width: 90px; height: 70px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg-2);
}
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; }

.cart-item-name { font-weight: 700; }
.cart-item-meta { color: var(--muted); font-size: 13px; }

.cart-item .qty button { width: 34px; height: 36px; font-size: 16px; }
.cart-item .qty input { width: 36px; height: 36px; font-size: 14px; }

.cart-item-sum {
    font-weight: 800;
    min-width: 90px;
    text-align: right;
}

.cart-item-remove {
    background: transparent;
    border: 0;
    color: var(--muted);
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    padding: 6px 8px;
    border-radius: 8px;
}
.cart-item-remove:hover { background: var(--bg-2); color: var(--accent); }

.cart-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--ink-2);
}

.checkout {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
    position: sticky;
    top: 84px;
}
.checkout h3 { margin-bottom: 14px; }
.totals { margin: 8px 0 16px; }
.totals .row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    color: var(--ink-2);
}
.totals .row.grand {
    font-weight: 800;
    color: var(--ink);
    font-size: 18px;
    border-top: 1px solid var(--line);
    margin-top: 6px;
    padding-top: 12px;
}

.field {
    display: block;
    margin-bottom: 12px;
}
.field label {
    display: block;
    font-size: 13px;
    color: var(--ink-2);
    margin-bottom: 4px;
}
.field input,
.field textarea,
.field select {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 10px;
    font: inherit;
    color: var(--ink);
}
.field input:focus,
.field textarea:focus,
.field select:focus {
    outline: 2px solid var(--accent-soft);
    border-color: var(--accent);
}
.field textarea { min-height: 70px; resize: vertical; }

.checkout-hint {
    color: var(--muted);
    font-size: 12px;
    margin-top: 10px;
}

/* DELIVERY / ABOUT */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}
.info-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
}
.info-card h3 { margin-bottom: 8px; }
.info-card p, .info-card li { color: var(--ink-2); }
.info-card ul { margin: 6px 0 0 18px; padding: 0; }

/* CONTACTS */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.contact-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
}
.contact-card .big {
    font-size: 22px;
    font-weight: 800;
    display: block;
    margin: 4px 0 8px;
}

/* CTA strip */
.cta {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    border-radius: 20px;
    padding: 36px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}
.cta h2 { color: #fff; margin: 0 0 4px; }
.cta p { margin: 0; color: rgba(255, 255, 255, .9); }
.cta .btn-ghost {
    color: #fff;
    border-color: rgba(255, 255, 255, .8);
    background: transparent;
}
.cta .btn-ghost:hover { background: #fff; color: var(--accent); }

/* FOOTER */
.site-footer {
    background: #2a1c10;
    color: #f3dec1;
    margin-top: 60px;
    padding: 40px 0 20px;
}
.site-footer a { color: #f3dec1; display: block; padding: 3px 0; }
.site-footer a:hover { color: #fff; }
.site-footer h4 {
    color: #fff;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 10px;
}
.site-footer .brand { color: #fff !important; margin-bottom: 8px; }
.site-footer .brand-mark { background: rgba(255, 255, 255, .1); }
.site-footer .muted { color: #c9b393; font-size: 14px; max-width: 280px; }
.footer-inner {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 24px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.copyright {
    padding-top: 20px;
    color: #a08767;
    font-size: 13px;
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%) translateY(20px);
    background: var(--ink);
    color: #fff;
    padding: 12px 18px;
    border-radius: 12px;
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
    z-index: 100;
}
.toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* RESPONSIVE */
@media (max-width: 980px) {
    .hero-inner { grid-template-columns: 1fr; }
    .hero-img-wrap { max-width: 420px; }
    .usp-grid { grid-template-columns: repeat(2, 1fr); }
    .products { grid-template-columns: repeat(3, 1fr); }
    .product-page { grid-template-columns: 1fr; }
    .cart { grid-template-columns: 1fr; }
    .checkout { position: static; }
    .info-grid { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
    .header-inner { gap: 10px; }
    .nav { margin-left: 0; gap: 12px; font-size: 14px; order: 3; width: 100%; }
    .header-inner { flex-wrap: wrap; height: auto; padding: 10px 0; }
    .products { grid-template-columns: repeat(2, 1fr); }
    .usp-grid { grid-template-columns: 1fr 1fr; }
    .cart-item {
        grid-template-columns: 70px 1fr;
        grid-template-rows: auto auto;
        row-gap: 8px;
    }
    .cart-item-img { width: 70px; height: 60px; }
    .cart-item .qty,
    .cart-item-sum,
    .cart-item-remove { grid-column: 2; justify-self: start; }
    .cart-item-sum { justify-self: end; }
    .footer-inner { grid-template-columns: 1fr; }
}
