:root {
    --bg: #f6f3ec;
    --paper: #fffdf8;
    --ink: #20241f;
    --muted: #687168;
    --line: #ded8cc;
    --brand: #0e614c;
    --brand-dark: #093d32;
    --brand-2: #c86a3d;
    --accent: #e7b85b;
    --soft: #eaf2ed;
    --soft-2: #fff3df;
    --danger: #9f2d2d;
    --ok: #247a4b;
    --radius: 8px;
    --shadow: 0 18px 50px rgba(29, 36, 32, .08);
    --container: min(1120px, calc(100% - clamp(24px, 5vw, 72px)));
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background:
        linear-gradient(180deg, rgba(255, 253, 248, .8), rgba(246, 243, 236, .95)),
        var(--bg);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.55;
}

a {
    color: inherit;
    text-decoration: none;
}

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

button,
input,
select,
textarea {
    font: inherit;
}

.site-header,
.site-footer {
    width: var(--container);
    margin-inline: auto;
}

.site-footer {
    border-top: 1px solid var(--line);
    padding: clamp(26px, 5vw, 54px) 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr repeat(4, 1fr);
    gap: 24px;
    width: 100%;
}

.site-footer a,
.link-button {
    color: var(--muted);
    justify-content: flex-start;
    min-height: auto;
    padding: 0;
    border: 0;
    background: transparent;
    font-weight: 650;
    text-align: left;
}

.site-header {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 18px;
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(246, 243, 236, .92);
    backdrop-filter: blur(12px);
}

.brand {
    display: inline-grid;
    font-size: clamp(1.1rem, 2vw, 1.45rem);
    font-weight: 800;
}

.brand span {
    color: var(--muted);
    font-size: .82rem;
    font-weight: 600;
}

.nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav a,
.button,
button,
.tab-link {
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
    color: var(--ink);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    font-weight: 750;
}

.nav a:hover,
.button:hover,
button:hover,
.tab-link:hover {
    border-color: rgba(14, 97, 76, .34);
    box-shadow: 0 8px 24px rgba(14, 97, 76, .08);
}

.button.primary,
button.primary {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.button.warning,
button.warning {
    background: var(--brand-2);
    border-color: var(--brand-2);
    color: #fff;
}

.badge,
.offer {
    border-radius: 999px;
    background: var(--soft);
    color: var(--brand);
    display: inline-flex;
    min-width: 26px;
    justify-content: center;
    padding: 2px 8px;
    font-size: .82rem;
    font-weight: 800;
}

.nav-toggle {
    display: none;
}

main {
    min-height: 62vh;
}

.section {
    width: var(--container);
    margin: 0 auto;
    padding: clamp(28px, 7vw, 76px) 0;
}

.hero {
    width: 100%;
    background:
        linear-gradient(90deg, rgba(9, 61, 50, .92), rgba(14, 97, 76, .68)),
        url("https://images.unsplash.com/photo-1512428559087-560fa5ceab42?auto=format&fit=crop&w=1600&q=78") center/cover;
    color: #fff;
    min-height: clamp(420px, 66vh, 620px);
    display: grid;
    align-items: center;
    border-bottom: 1px solid rgba(14, 97, 76, .16);
}

.hero-inner {
    width: var(--container);
    margin: 0 auto;
    max-width: 760px;
}

.hero h1,
.section h1,
.section h2 {
    margin: 0 0 14px;
    line-height: 1.05;
    font-size: clamp(2rem, 5vw, 4.6rem);
    letter-spacing: 0;
}

.section h2 {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.hero p,
.lead {
    color: inherit;
    font-size: clamp(1rem, 1.7vw, 1.2rem);
    max-width: 720px;
}

.hero .button {
    border-color: rgba(255, 255, 255, .28);
}

.hero .button:not(.primary) {
    background: rgba(255, 255, 255, .12);
    color: #fff;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.grid.two {
    grid-template-columns: repeat(2, 1fr);
}

.card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: clamp(16px, 3vw, 24px);
}

.card h2,
.card h3,
.product h2,
.product h3 {
    margin-top: 0;
}

.product {
    display: grid;
    gap: 12px;
    grid-template-rows: auto auto 1fr auto;
    transition: transform .18s ease, box-shadow .18s ease;
}

.product:hover {
    transform: translateY(-3px);
    box-shadow: 0 24px 55px rgba(29, 36, 32, .12);
}

.product-media {
    aspect-ratio: 4 / 3;
    background: var(--soft);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid rgba(14, 97, 76, .08);
}

.product-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.price {
    color: var(--brand);
    font-size: 1.25rem;
    font-weight: 850;
}

.catalog-toolbar {
    align-items: end;
    justify-content: space-between;
}

.stock {
    color: var(--muted);
    font-size: .92rem;
}

.stack {
    display: grid;
    gap: 12px;
}

.inline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.form-grid .full,
.full {
    grid-column: 1 / -1;
}

label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    color: var(--ink);
    padding: 10px 12px;
}

input[type="checkbox"] {
    width: auto;
    min-height: auto;
}

textarea {
    min-height: 110px;
    resize: vertical;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

th,
td {
    padding: 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: .86rem;
}

.flash {
    width: var(--container);
    margin: 8px auto 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
    padding: 12px 14px;
    font-weight: 750;
}

.flash.error {
    border-color: var(--danger);
    color: var(--danger);
}

.flash.success {
    border-color: var(--ok);
    color: var(--ok);
}

.cookie-panel {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: grid;
    place-items: end center;
    padding: 18px;
    background: rgba(29, 36, 32, .28);
}

.cookie-panel[hidden] {
    display: none;
}

.cookie-box {
    width: min(720px, 100%);
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: clamp(18px, 4vw, 28px);
}

.legal-content {
    white-space: normal;
}

.admin-body {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

.invoice {
    width: min(980px, calc(100% - 28px));
    margin: 0 auto;
    padding: 28px 0;
}

.invoice-sheet {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: clamp(20px, 4vw, 44px);
}

.invoice-head {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 24px;
    padding-bottom: 20px;
}

.invoice-total {
    display: grid;
    justify-content: end;
    gap: 6px;
    margin-top: 18px;
    font-size: 1.08rem;
}

body:not(.admin-body) .admin-sidebar,
body:not(.admin-body) .admin-main {
    display: none;
}

@media print {
    body {
        background: #fff;
    }

    .no-print,
    .cookie-panel {
        display: none !important;
    }

    .invoice {
        width: 100%;
        padding: 0;
    }

    .invoice-sheet {
        border: 0;
        box-shadow: none;
    }
}

.admin-sidebar {
    background: var(--ink);
    color: #fff;
    padding: 24px;
}

.admin-sidebar .brand span,
.admin-sidebar a {
    color: #fff;
}

.admin-main {
    padding: clamp(20px, 4vw, 48px);
}

.kpis {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.kpi {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
}

.kpi strong {
    display: block;
    font-size: 2rem;
}

@media (max-width: 820px) {
    .site-header {
        grid-template-columns: 1fr auto;
        position: static;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .nav {
        display: none;
        grid-column: 1 / -1;
        flex-direction: column;
        align-items: stretch;
    }

    .nav.is-open {
        display: flex;
    }

    .offer {
        justify-self: start;
    }

    .grid,
    .grid.two,
    .form-grid,
    .footer-grid,
    .kpis {
        grid-template-columns: 1fr;
    }

    .admin-body {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: static;
    }

    table,
    thead,
    tbody,
    tr,
    th,
    td {
        display: block;
    }

    thead {
        display: none;
    }

    tr {
        border-bottom: 1px solid var(--line);
        padding: 10px;
    }

    td {
        border: 0;
        padding: 6px 0;
    }

    td::before {
        content: attr(data-label);
        display: block;
        color: var(--muted);
        font-size: .8rem;
        font-weight: 800;
    }
}
