:root {
    --bg: #f4f1ea;
    --paper: #fffdf8;
    --ink: #1c1914;
    --muted: #5c574e;
    --line: #ddd6c8;
    --accent: #0f6e56;
    --accent-ink: #083d30;
    --warn: #9a4d0a;
    --ok: #0f6e56;
    --err: #9b1c1c;
    --wa: #128c4b;
    --shadow: 0 10px 30px rgba(28, 25, 20, 0.06);
    --radius: 18px;
    --font: "DM Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.5;
    min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(244, 241, 234, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}
.header-bar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 16px;
    align-items: center;
    min-height: 72px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: -0.03em;
}
.brand img { height: 40px; width: auto; }
.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--ink);
    color: var(--paper);
    display: grid;
    place-items: center;
}
.brand-mark svg { width: 20px; height: 20px; }
.header-search {
    display: flex;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 999px;
    overflow: hidden;
}
.header-search input {
    flex: 1;
    border: 0;
    background: transparent;
    padding: 10px 16px;
    outline: none;
}
.header-search button {
    border: 0;
    background: transparent;
    padding: 0 14px;
    color: var(--muted);
    cursor: pointer;
}
.header-search svg { width: 18px; height: 18px; display: block; }
.header-nav {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.95rem;
}
.header-nav a { text-decoration: none; color: var(--muted); }
.header-nav a:hover { color: var(--ink); }

.btn, .btn-wa, .btn-primary, .btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid transparent;
    text-decoration: none;
    cursor: pointer;
    font-weight: 600;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-wa { background: var(--wa); color: #fff; }
.btn-block { width: 100%; }

.flash {
    margin: 20px 0 0;
    padding: 12px 16px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}
.flash button { border: 0; background: none; font-size: 1.2rem; cursor: pointer; }
.flash-ok { background: #e4f4ee; color: var(--accent-ink); }
.flash-err { background: #f8e4e4; color: var(--err); }

.hero {
    padding: 48px 0 20px;
}
.hero-inner { max-width: 720px; }
.eyebrow {
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 10px;
}
.hero h1 {
    font-size: clamp(2rem, 5vw, 3.4rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
    margin-bottom: 12px;
}
.hero-copy { color: var(--muted); font-size: 1.1rem; }

.catalog {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 32px;
    padding: 20px 0 72px;
}
.filters {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
    height: fit-content;
    position: sticky;
    top: 92px;
}
.filters-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}
.filters h2 { font-size: 1rem; }
.filters-toggle {
    display: none;
    border: 0;
    background: none;
    color: var(--accent);
    font-weight: 600;
    cursor: pointer;
}
.filters-form { display: grid; gap: 12px; }
.filters-form label { display: grid; gap: 6px; font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.filters-form input,
.filters-form select,
.lead-form input,
.lead-form textarea {
    width: 100%;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 12px;
    padding: 10px 12px;
    color: var(--ink);
}
.filters-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.filters-actions { display: grid; gap: 8px; margin-top: 6px; }

.results-bar {
    color: var(--muted);
    margin-bottom: 16px;
}
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}
.product-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    transition: transform .18s ease, box-shadow .18s ease;
}
.product-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}
.product-media {
    aspect-ratio: 1;
    background: #efeae0;
    position: relative;
    overflow: hidden;
}
.product-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.product-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: #b3aa99;
}
.product-placeholder svg { width: 42px; height: 42px; }
.product-placeholder.tall { min-height: 360px; }
.chip {
    position: absolute;
    left: 12px;
    top: 12px;
    background: #fff4e5;
    color: var(--warn);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 999px;
}
.product-body { padding: 14px 16px 18px; }
.product-cat {
    display: inline-block;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 6px;
}
.product-body h3, .buybox h1 {
    letter-spacing: -0.03em;
    line-height: 1.2;
}
.product-body h3 { font-size: 1.05rem; min-height: 2.5em; }
.product-price, .price-lg {
    margin-top: 10px;
    font-weight: 700;
    letter-spacing: -0.03em;
}
.price-lg { font-size: 2rem; margin: 8px 0 0; }

.pager {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 28px;
}
.pager a { color: var(--accent); font-weight: 600; }
.empty {
    background: var(--paper);
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    padding: 48px 24px;
    text-align: center;
}
.empty h2 { margin-bottom: 8px; }
.empty p { color: var(--muted); margin-bottom: 16px; }

.product-page { padding: 28px 0 72px; }
.crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
}
.crumbs a { color: var(--accent); text-decoration: none; }
.product-layout {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 36px;
}
.gallery-main {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    position: relative;
    overflow: hidden;
    min-height: 380px;
}
.gallery-main img {
    width: 100%;
    height: 480px;
    object-fit: contain;
    background: #efeae0;
}
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    font-size: 1.4rem;
}
.gallery-nav.prev { left: 12px; }
.gallery-nav.next { right: 12px; }
.thumbs { display: flex; gap: 8px; margin-top: 12px; overflow: auto; }
.miniatura {
    width: 72px;
    height: 72px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    cursor: pointer;
}
.miniatura.is-active { outline: 2px solid var(--ink); }
.miniatura img { width: 100%; height: 100%; object-fit: cover; }

.buybox h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 4px 0 6px; }
.sku, .price-note { color: var(--muted); font-size: 0.9rem; }
.stock-ok { color: var(--ok); font-weight: 600; margin: 10px 0 18px; }
.specs {
    margin: 22px 0;
    display: grid;
    gap: 10px;
}
.specs div {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}
.specs dt { color: var(--muted); font-size: 0.9rem; }
.desc { margin: 20px 0; }
.desc h2, .lead-form h2 { font-size: 1.1rem; margin-bottom: 8px; }
.desc p { color: var(--muted); }

.lead-form {
    margin-top: 28px;
    padding: 20px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    display: grid;
    gap: 10px;
}
.lead-form p { color: var(--muted); font-size: 0.95rem; }
.lead-form label { display: grid; gap: 6px; font-size: 0.85rem; font-weight: 600; }

.site-footer {
    background: var(--ink);
    color: #efeae0;
    padding: 48px 0 24px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 28px;
}
.footer-brand { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 8px; }
.footer-lead, .site-footer p { color: #c9c1b3; }
.site-footer h3 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 10px; color: #fff; }
.site-footer a { color: #efeae0; }
.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 32px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,.1);
    font-size: 0.85rem;
}

@media (max-width: 960px) {
    .header-bar { grid-template-columns: 1fr auto; }
    .header-search { display: none; }
    .catalog { grid-template-columns: 1fr; }
    .filters { position: static; }
    .filters-toggle { display: inline; }
    .filters-form { display: none; }
    .filters.is-open .filters-form { display: grid; }
    .product-grid { grid-template-columns: repeat(2, 1fr); }
    .product-layout { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .header-nav a:not(.btn-wa) { display: none; }
    .product-grid { grid-template-columns: 1fr; }
    .gallery-main img { height: 280px; }
    .footer-bottom { flex-direction: column; }
}
