/* ─────────────────────────────────────────────────────
   01. Design tokens
   ───────────────────────────────────────────────────── */
:root {
    --tg-cream:         #FAF7F2;
    --tg-ink:           #1C1A16;
    --tg-ink-muted:     #6B6760;
    --tg-surface:       #ffffff;
    --tg-brand:         #c41212;
    --tg-accent:        #F59E0B;
    --tg-wa:            #25D366;

    --tg-ink-06:        rgba(28, 26, 22, .06);
    --tg-ink-10:        rgba(28, 26, 22, .10);
    --tg-ink-22:        rgba(28, 26, 22, .22);
    --tg-wa-40:         rgba(37, 211, 102, .40);
    --tg-wa-50:         rgba(37, 211, 102, .50);
    --tg-white-06:      rgba(255, 255, 255, .06);

    /* Acentos por categoria de produto */
    --tg-picles:        #639922;   /* verde — picles */
    --tg-pimenta:       #c41212;   /* vermelho — pimenta */
    --tg-caponata:      #6B3B7B;   /* púrpura — berinjela */
    --tg-sardella:      #8B2331;   /* vinho — antepasto típico */
    --tg-secos:         #8A6A3B;   /* terra — secos */

    --tg-font-display:  'Playfair Display', Georgia, serif;
    --tg-font-body:     'DM Sans', system-ui, sans-serif;

    --tg-topbar-h:      40px;
    --tg-navbar-h:      65px;
    --tg-header-h:      calc(var(--tg-topbar-h) + var(--tg-navbar-h));

    --tg-sp-sm:         0.75rem;
    --tg-sp-lg:         1.5rem;

    --tg-radius-card:   16px;
    --tg-radius-btn:    10px;
    --tg-shadow-card:   0 12px 32px var(--tg-ink-06);
    --tg-shadow-wa:     0 4px 16px var(--tg-wa-40);
    --tg-shadow-wa-lg:  0 6px 22px var(--tg-wa-50);
    --tg-ease:          .2s ease;
    --tg-ease-slow:     .4s ease;
}

/* ─────────────────────────────────────────────────────
   02. Reset mínimo
   ───────────────────────────────────────────────────── */
*,
*::before,
*::after { box-sizing: border-box; }

/* ─────────────────────────────────────────────────────
   03. Header fixo
   ───────────────────────────────────────────────────── */
body {
    background-color: var(--tg-cream);
    font-family: var(--tg-font-body);
    color: var(--tg-ink);
    margin: 0;
    padding-top: var(--tg-header-h);
}

.tg-topbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--tg-topbar-h);
    z-index: 1031;
    background-color: #111 !important;
    display: flex;
    align-items: center;
}

.navbar.navbar-custom {
    top: var(--tg-topbar-h) !important;
    height: var(--tg-navbar-h);
    background-color: var(--tg-surface) !important;
    border-bottom: 1px solid var(--tg-ink-10);
}

.logo-nav {
    height: 52px;
    width: auto;
    transition: height var(--tg-ease);
}

.navbar-custom .navbar-nav .nav-link {
    color: var(--tg-ink) !important;
    font-family: var(--tg-font-body);
    font-weight: 500;
    padding: 0.625rem 0.9375rem !important;
    transition: color var(--tg-ease);
}

.navbar-custom .navbar-nav .nav-link:hover,
.navbar-custom .navbar-nav .nav-link.active {
    color: var(--tg-brand) !important;
}

.navbar-custom .dropdown-menu {
    border: none;
    box-shadow: 0 4px 12px var(--tg-ink-10);
    border-radius: var(--tg-radius-btn);
}

.navbar-custom .dropdown-item:hover,
.navbar-custom .dropdown-item.active {
    background-color: var(--tg-cream);
    color: var(--tg-brand);
}

.navbar-custom .navbar-collapse {
    background-color: var(--tg-surface);
    padding: var(--tg-sp-lg);
    margin-top: var(--tg-sp-sm);
    border-radius: var(--tg-radius-btn);
    box-shadow: 0 10px 15px var(--tg-ink-10);
}

/* ─────────────────────────────────────────────────────
   04. Reduced-motion
   ───────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration:        0.01ms !important;
        animation-iteration-count: 1      !important;
        transition-duration:       0.01ms !important;
        scroll-behavior:           auto   !important;
    }
}

/* ─────────────────────────────────────────────────────
   05. Page hero
   ───────────────────────────────────────────────────── */
.products-hero {
    padding: 60px 0 40px;
    text-align: center;
}

.products-hero .eyebrow {
    display: block;
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--tg-ink-muted);
    margin-bottom: 12px;
}

.products-hero h1 {
    font-family: var(--tg-font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 600;
    line-height: 1.2;
    color: var(--tg-ink);
    margin-bottom: 16px;
}

.products-hero h1 em {
    font-style: italic;
    color: var(--tg-brand);
}

.products-hero p {
    font-size: 1rem;
    color: var(--tg-ink-muted);
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ─────────────────────────────────────────────────────
   06. Cabeçalho de categoria (todos produtos)
   ───────────────────────────────────────────────────── */
.category-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 32px 0 20px;
}

.category-header .cat-mark {
    width: 36px;
    height: 1px;
    background: var(--tg-ink-22);
}

.category-header h2 {
    font-family: var(--tg-font-display);
    font-size: 1.625rem;
    font-weight: 600;
    color: var(--tg-ink);
    margin: 0;
    letter-spacing: -.01em;
}

.category-header .cat-count {
    font-family: var(--tg-font-body);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--tg-ink-muted);
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-left: auto;
}

/* ─────────────────────────────────────────────────────
   07. Product grid
   ───────────────────────────────────────────────────── */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    padding-bottom: 24px;
}

.products-grid--last { padding-bottom: 80px; }

/* ─────────────────────────────────────────────────────
   08. Product card
   ───────────────────────────────────────────────────── */
.product-card {
    background: var(--tg-surface);
    border: 1px solid var(--tg-ink-10);
    border-radius: var(--tg-radius-card);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition:
        border-color var(--tg-ease),
        transform    var(--tg-ease),
        box-shadow   var(--tg-ease);
}

.product-card:hover {
    border-color: var(--tg-ink-22);
    transform: translateY(-3px);
    box-shadow: var(--tg-shadow-card);
}

/* 08a. Imagem do produto */
.product-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: linear-gradient(180deg, #fafaf8 0%, #f0ede8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    padding: 18px;
    transition: transform var(--tg-ease-slow);
}

.product-card:hover .product-img-wrap img { transform: scale(1.04); }

.product-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: .04em;
    padding: 4px 12px;
    border-radius: 99px;
    backdrop-filter: blur(6px);
}

.product-badge.picles    { background: rgba(99,153,34,.15);  color: #27500A; border: 1px solid rgba(99,153,34,.30); }
.product-badge.pimenta   { background: rgba(196,18,18,.12);  color: #6B0707; border: 1px solid rgba(196,18,18,.25); }
.product-badge.caponata  { background: rgba(107,59,123,.15); color: #3F2249; border: 1px solid rgba(107,59,123,.30); }
.product-badge.sardella  { background: rgba(139,35,49,.15);  color: #54151E; border: 1px solid rgba(139,35,49,.30); }
.product-badge.secos     { background: rgba(138,106,59,.15); color: #4E3B20; border: 1px solid rgba(138,106,59,.30); }

.product-weight {
    position: absolute;
    top: 14px;
    right: 14px;
    font-size: 0.6875rem;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 99px;
    background: rgba(250, 247, 242, .92);
    color: var(--tg-ink);
    border: 1px solid var(--tg-ink-10);
    backdrop-filter: blur(4px);
    letter-spacing: .02em;
}

/* 08b. Corpo do card */
.product-body {
    padding: 22px 22px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-family: var(--tg-font-display);
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.25;
    color: var(--tg-ink);
    margin: 0 0 6px;
}

.product-title em {
    font-style: italic;
    color: var(--tg-brand);
}

.product-subtitle {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--tg-ink-muted);
    letter-spacing: .04em;
    text-transform: uppercase;
    margin: 0 0 14px;
}

.product-desc {
    font-size: 0.8125rem;
    color: var(--tg-ink-muted);
    line-height: 1.7;
    margin: 0 0 18px;
}

.product-section-label {
    font-size: 0.625rem;
    font-weight: 500;
    letter-spacing: .10em;
    text-transform: uppercase;
    color: var(--tg-ink-muted);
    margin: 0 0 10px;
}

/* Bloco de apresentação (peso/medidas) */
.spec-block {
    background: var(--tg-cream);
    border-radius: var(--tg-radius-btn);
    padding: 12px 14px;
    margin-bottom: 16px;
}

.spec-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.8125rem;
    padding: 4px 0;
}

.spec-row + .spec-row {
    border-top: 1px dashed var(--tg-ink-10);
    margin-top: 4px;
    padding-top: 8px;
}

.spec-row .spec-key {
    color: var(--tg-ink-muted);
    font-weight: 400;
}

.spec-row .spec-val {
    color: var(--tg-ink);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* Lista de sugestões / harmonização */
.pairing-list {
    list-style: none;
    margin: 0 0 4px;
    padding: 0;
}

.pairing-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8125rem;
    color: var(--tg-ink);
    padding: 6px 0;
    border-bottom: 1px solid var(--tg-ink-10);
}

.pairing-list li:last-child { border-bottom: none; }

.pairing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.pairing-dot.picles    { background: var(--tg-picles); }
.pairing-dot.pimenta   { background: var(--tg-pimenta); }
.pairing-dot.caponata  { background: var(--tg-caponata); }
.pairing-dot.sardella  { background: var(--tg-sardella); }
.pairing-dot.secos     { background: var(--tg-secos); }

/* 08c. Rodapé do card */
.product-footer {
    padding: 14px 22px 18px;
    border-top: 1px solid var(--tg-ink-10);
}

.cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 11px 0;
    background: var(--tg-wa);
    color: var(--tg-surface) !important;
    font-family: var(--tg-font-body);
    font-size: 0.875rem;
    font-weight: 500;
    border: none;
    border-radius: var(--tg-radius-btn);
    text-decoration: none !important;
    transition: opacity var(--tg-ease), transform var(--tg-ease);
}

.cta-btn:hover  { opacity: .88; }
.cta-btn:active { transform: scale(.98); }

/* ─────────────────────────────────────────────────────
   09. Empty state (Em breve)
   ───────────────────────────────────────────────────── */
.empty-state {
    background: var(--tg-surface);
    border: 1px dashed var(--tg-ink-22);
    border-radius: var(--tg-radius-card);
    padding: 64px 32px;
    text-align: center;
    max-width: 640px;
    margin: 0 auto 80px;
}

.empty-state .empty-icon {
    display: inline-flex;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--tg-cream);
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--tg-secos);
    margin-bottom: 20px;
}

.empty-state h3 {
    font-family: var(--tg-font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--tg-ink);
    margin: 0 0 10px;
}

.empty-state h3 em {
    font-style: italic;
    color: var(--tg-brand);
}

.empty-state p {
    font-size: 0.9375rem;
    color: var(--tg-ink-muted);
    line-height: 1.7;
    margin: 0 0 24px;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

.empty-state .empty-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    background: var(--tg-wa);
    color: var(--tg-surface);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--tg-radius-btn);
    text-decoration: none;
    transition: opacity var(--tg-ease), transform var(--tg-ease);
}

.empty-state .empty-cta:hover  { opacity: .88; color: var(--tg-surface); }
.empty-state .empty-cta:active { transform: scale(.98); }

/* ─────────────────────────────────────────────────────
   10. Selo "Alto em sódio" sutil
   ───────────────────────────────────────────────────── */
.sodium-warning {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--tg-ink-muted);
    padding: 4px 10px;
    background: rgba(28, 26, 22, .04);
    border-radius: 99px;
    margin-top: 8px;
}

.sodium-warning::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--tg-accent);
}

/* ─────────────────────────────────────────────────────
   11. WhatsApp FAB
   ───────────────────────────────────────────────────── */
.tg-fab {
    position: fixed;
    bottom: 1.375rem;
    right: 1.125rem;
    z-index: 1050;
    width: 3.375rem;
    height: 3.375rem;
    border-radius: 50%;
    background: var(--tg-wa);
    color: var(--tg-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: var(--tg-shadow-wa);
    transition: transform var(--tg-ease), box-shadow var(--tg-ease);
    text-decoration: none;
}

.tg-fab:is(:hover, :focus-visible) {
    color: var(--tg-surface);
    transform: scale(1.08);
    box-shadow: var(--tg-shadow-wa-lg);
    outline: none;
}

/* ─────────────────────────────────────────────────────
   12. Footer
   ───────────────────────────────────────────────────── */
.footer {
    border-top: 1px solid var(--tg-white-06);
}

/* ─────────────────────────────────────────────────────
   13. Responsivo
   ───────────────────────────────────────────────────── */
@media (max-width: 991px) {
    .navbar-custom .navbar-collapse {
        position: absolute;
        top: calc(var(--tg-navbar-h) - 1px);
        left: 0;
        right: 0;
        z-index: 1030;
    }
}

@media (max-width: 767px) {
    :root {
        --tg-navbar-h: 56px;
        --tg-header-h: 96px;
    }

    .logo-nav { height: 44px; }

    .navbar-custom .navbar-nav .nav-link {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.9rem;
    }

    .products-hero { padding: 40px 0 24px; }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .category-header {
        margin: 24px 0 16px;
    }

    .category-header h2 { font-size: 1.375rem; }

    .empty-state { padding: 48px 24px; }
}

@media (max-width: 480px) {
    :root {
        --tg-navbar-h: 52px;
        --tg-header-h: 92px;
    }

    .logo-nav { height: 40px; }

    .navbar-custom .navbar-nav .nav-link {
        padding: 0.45rem 0.65rem !important;
        font-size: 0.85rem;
    }
}