:root {
    /* PALETA AUTÊNTICA ITALIANA (Rústico & Elegante) */
    --primary: #A0522D;
    /* Sienna (Terracota Queimado) - Cor de pão assado */
    --primary-hover: #8B4513;
    /* Marrom Sela */
    --secondary: #6B8E23;
    /* Olive Drab (Verde Oliva) - Frescor/Ervas */
    --accent: #DAA520;
    /* Goldenrod (Dourado Fosco) - Detalhes Premium */

    --bg-body: #FAF7F2;
    /* Branco Off-white (Papel de linho) */
    --bg-card: #FFFFFF;
    /* Branco Puro */
    --bg-overlay: rgba(44, 34, 28, 0.9);
    /* Overlay Marrom Café */

    --text-main: #2C221C;
    /* Marrom Café muito escuro (Quase preto) */
    --text-muted: #6D645D;
    /* Cinza quente */
    --border-color: #E6E0D4;
    /* Bege suave para bordas */

    --border-radius: 4px;
    /* Bordas mais retas = Mais sofisticação clássica */
    --transition: all 0.4s ease;

    --font-title: 'Playfair Display', serif;
    --font-body: 'Lato', sans-serif;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-body);
    /* Textura de papel sutil */
    background-image: radial-gradient(#DCCFC2 1px, transparent 1px);
    background-size: 20px 20px;
    font-family: var(--font-body);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    padding-bottom: 100px;
    overflow-x: hidden;
    line-height: 1.6;
}

/* --- Tipografia --- */
h1,
h2,
h3,
h4,
.price {
    font-family: var(--font-title);
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* --- Hero Section (Clássico & Imersivo) --- */
.hero {
    position: relative;
    height: 60vh;
    /* Mais alto para impacto */
    min-height: 450px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Imagem rústica com overlay gradiente escuro */
    background: linear-gradient(to bottom, rgba(44, 34, 28, 0.3), rgba(44, 34, 28, 0.8)),
        url('/assets/demo-photo.svg');
    background-size: cover;
    background-position: center;
    z-index: -1;
    filter: sepia(20%);
    /* Filtro vintage */
}

.hero-content {
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 40px 60px;
    background: rgba(44, 34, 28, 0.4);
    animation: fadeInUp 1.2s ease-out;
}

.brand-logo {
    font-size: 5rem;
    margin: 0;
    color: #fff;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    font-style: italic;
}

.brand-subtitle {
    margin-top: 10px;
    font-size: 1.1rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--accent);
    font-family: var(--font-body);
    font-weight: 400;
}

/* --- Navigation (Estilo Menu de Restaurante) --- */
.nav-sticky {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #FAF7F2;
    border-bottom: 1px solid var(--primary);
    /* Linha fina elegante */
    padding: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.nav-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 0;
    /* Links colados visualmente */
}

.nav-btn {
    background: transparent;
    color: var(--text-muted);
    padding: 20px 25px;
    font-family: var(--font-title);
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    transition: var(--transition);
    border-bottom: 3px solid transparent;
}

.nav-btn i {
    font-size: 1rem;
    opacity: 0.7;
}

.nav-btn:hover {
    color: var(--primary);
    background: rgba(160, 82, 45, 0.05);
}

.nav-btn.active {
    color: var(--primary);
    border-bottom: 3px solid var(--primary);
}

/* --- Search & Filter (Minimalista) --- */
.search-filter-container {
    padding-top: 40px;
    text-align: center;
}

.search-box {
    position: relative;
    max-width: 500px;
    margin: 0 auto 25px;
}

.search-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--text-muted);
    padding: 10px 10px 10px 30px;
    border-radius: 0;
    /* Input estilo linha */
    color: var(--text-main);
    font-size: 1.1rem;
    font-family: var(--font-title);
    transition: var(--transition);
    text-align: center;
}

.search-box i {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-input:focus {
    outline: none;
    border-bottom-color: var(--primary);
    box-shadow: 0 1px 0 var(--primary);
}

.search-input::placeholder {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-style: italic;
}

.filter-chips {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.chip {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-body);
}

.chip:hover,
.chip.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* --- Layout --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 30px;
}

.menu-section {
    margin-bottom: 80px;
    scroll-margin-top: 100px;
}

.section-title {
    font-size: 2.8rem;
    color: var(--primary);
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    display: inline-block;
    width: 100%;
}

/* Decoração do Título (Estilo Flourish) */
.section-title::before,
.section-title::after {
    content: '';
    display: inline-block;
    width: 60px;
    height: 1px;
    background: var(--secondary);
    vertical-align: middle;
    margin: 0 20px;
    opacity: 0.6;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 40px;
}

/* --- Cards (Estilo Artesanal) --- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 15px;
    /* Moldura interna branca */
    box-shadow: 0 5px 15px rgba(44, 34, 28, 0.03);
    /* Sombra muito suave */
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
    opacity: 0;
    /* Para animação */
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(44, 34, 28, 0.08);
    border-color: var(--secondary);
    z-index: 2;
}

.card-img-wrapper {
    height: 250px;
    overflow: hidden;
    border-radius: 2px;
    position: relative;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
    filter: contrast(95%) sepia(10%);
    /* Toque vintage na foto */
}

.card:hover .card-img {
    transform: scale(1.05);
    filter: contrast(100%) sepia(0%);
}

.card-content {
    padding: 20px 10px 10px;
    text-align: center;
    /* Centralizado como menu clássico */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.5rem;
    margin: 0 0 10px;
    color: var(--text-main);
}

.card-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 20px;
}

/* Badges (Estilo Selo) */
.card-badge {
    position: absolute;
    top: 25px;
    left: 25px;
    padding: 5px 12px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid currentColor;
    /* Borda da cor do texto */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.badge-primary {
    color: var(--primary);
    border-color: var(--primary);
}

.badge-secondary {
    color: var(--secondary);
    border-color: var(--secondary);
}

.badge-dark {
    color: var(--text-main);
    border-color: var(--text-main);
}

.popular-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    /* Dentro da foto, canto inferior */
    background: var(--accent);
    color: white;
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
    z-index: 10;
}

/* Combo Option */
.combo-option {
    margin-bottom: 20px;
    border-top: 1px dashed var(--border-color);
    border-bottom: 1px dashed var(--border-color);
    padding: 10px 0;
}

.combo-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-muted);
    cursor: pointer;
}

.combo-checkbox {
    accent-color: var(--secondary);
    width: 16px;
    height: 16px;
}

.card-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: auto;
}

.price {
    font-size: 1.4rem;
    color: var(--primary);
}

.btn-add {
    background: transparent;
    border: 1px solid var(--text-muted);
    color: var(--text-muted);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    cursor: pointer;
}

.btn-add:hover {
    background: var(--secondary);
    border-color: var(--secondary);
    color: white;
    transform: rotate(90deg);
}

/* Classe de animação ao clicar */
.btn-add.adding {
    background: var(--primary) !important;
    color: white !important;
    border-color: var(--primary) !important;
    transform: rotate(360deg);
}

/* --- Reviews (Estilo Editorial) --- */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.review-card {
    background: transparent;
    border-left: 3px solid var(--secondary);
    /* Linha lateral apenas */
    padding: 10px 20px;
}

.review-text {
    font-family: var(--font-title);
    font-size: 1.2rem;
    font-style: italic;
    color: var(--text-main);
    margin-bottom: 15px;
    line-height: 1.5;
}

.review-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.review-avatar {
    width: 40px;
    height: 40px;
    background: var(--border-color);
    color: var(--text-muted);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
}

.review-info h4 {
    margin: 0;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stars {
    color: var(--accent);
    font-size: 0.8rem;
}

/* --- Footer (Rústico Escuro) --- */
.footer-rich {
    background-color: #1A120B;
    color: #E6E0D4;
    padding: 80px 0 30px;
    margin-top: 100px;
    font-family: var(--font-body);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 50px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
}

.footer-col h3,
.brand-logo-footer {
    font-family: var(--font-title);
    color: var(--primary);
    /* Siena no footer */
    margin-top: 0;
    margin-bottom: 20px;
}

.footer-col p,
.footer-col li {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-btn {
    color: #E6E0D4;
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: 0.3s;
    text-decoration: none;
}

.social-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.copyright {
    text-align: center;
    margin-top: 60px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
    opacity: 0.6;
}

/* --- Cart & Modal (Clean) --- */
/* CORREÇÃO DO BOTÃO: Z-index alto e cor sólida */
.cart-fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 65px;
    height: 65px;
    background: var(--primary);
    /* Cor Terracota para destaque */
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    box-shadow: 0 5px 25px rgba(160, 82, 45, 0.5);
    /* Sombra colorida */
    cursor: pointer;
    z-index: 2000;
    /* Prioridade máxima sobre tudo */
    border: 3px solid var(--bg-body);
    /* Borda para separar do fundo */
    transition: var(--transition);
    pointer-events: auto;
    /* Garante clique */
}

.cart-fab:hover {
    background: var(--primary-hover);
    transform: scale(1.1) rotate(5deg);
}

.cart-fab.pulse {
    animation: pulseCart 0.4s ease-in-out;
}

.cart-counter {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--accent);
    /* Dourado */
    color: var(--text-main);
    font-size: 0.75rem;
    font-weight: 800;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-body);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* --- Modal Overlay (CORREÇÃO: Fixado na tela inteira) --- */
.cart-modal-overlay {
    position: fixed;
    /* Essencial para cobrir a tela */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(44, 34, 28, 0.7);
    /* Marrom café semitransparente */
    z-index: 1500;
    /* Abaixo do botão flutuante (2000), mas acima do site */
    display: flex;
    justify-content: flex-end;
    /* Alinha o carrinho à direita */
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
    backdrop-filter: blur(3px);
    /* Desfoque suave */
    -webkit-backdrop-filter: blur(3px);
}

.cart-modal-overlay.open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.3s ease, visibility 0s linear 0s;
}

/* Carrinho Sidebar */
.cart-sidebar {
    width: 100%;
    max-width: 400px;
    background: #FAF7F2;
    /* Fundo off-white */
    height: 100%;
    padding: 40px;
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.2);
    border-left: 5px solid var(--primary);
    /* Detalhe lateral */
}

.cart-header h2 {
    font-family: var(--font-title);
    color: var(--primary);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.cart-header {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.cart-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.close-cart {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: 0.3s;
}

.close-cart:hover {
    color: var(--primary);
    transform: rotate(90deg);
}

.delivery-estimation {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 10px;
}

/* Upsell */
.upsell-bar-container {
    background: rgba(160, 82, 45, 0.1);
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 10px;
}

.upsell-text {
    font-size: 0.85rem;
    color: var(--primary);
    display: block;
    text-align: center;
    margin-bottom: 5px;
}

.progress-bar-bg {
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.5s;
}

.cart-item {
    background: white;
    border: 1px solid var(--border-color);
    padding: 15px;
    margin-bottom: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.cart-item-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.cart-item-info h4 {
    margin: 0;
    color: var(--text-main);
    font-family: var(--font-title);
}

.cart-item-info p {
    margin: 5px 0 0;
    color: var(--secondary);
    font-weight: bold;
}

.cart-item-obs {
    width: 100%;
    border: none;
    border-bottom: 1px dashed var(--text-muted);
    background: transparent;
    padding: 5px 0;
    font-size: 0.85rem;
    margin-top: 10px;
}

.cart-item-obs:focus {
    outline: none;
    border-bottom-color: var(--primary);
}

.remove-item {
    color: #e74c3c;
    cursor: pointer;
    border: none;
    background: none;
    font-size: 1.1rem;
}

.cart-items {
    flex-grow: 1;
    overflow-y: auto;
    margin-bottom: 20px;
    padding-right: 10px;
}

.cart-items::-webkit-scrollbar {
    width: 6px;
}

.cart-items::-webkit-scrollbar-track {
    background: transparent;
}

.cart-items::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.cart-total {
    border-top: 2px solid var(--text-main);
    padding-top: 20px;
    margin-top: auto;
    margin-bottom: 20px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    font-family: var(--font-title);
}

.total-row span:last-child {
    color: var(--primary);
}

.btn-checkout {
    background: var(--text-main);
    color: white;
    border: none;
    width: 100%;
    padding: 15px;
    font-family: var(--font-body);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-checkout:hover {
    background: var(--primary);
}

/* --- Skeleton & Animations --- */
.skeleton {
    background: #E6E0D4;
    height: 350px;
    border-radius: var(--border-radius);
    position: relative;
    overflow: hidden;
}

.skeleton::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background-image: linear-gradient(90deg, rgba(255, 255, 255, 0) 0, rgba(255, 255, 255, 0.5) 20%, rgba(255, 255, 255, 0.5) 60%, rgba(255, 255, 255, 0));
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulseCart {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes flyToCart {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }

    100% {
        opacity: 0;
        transform: translate(var(--target-x), var(--target-y)) scale(0.1);
    }
}

.scroll-reveal {
    opacity: 0;
}

.scroll-reveal.visible {
    animation: fadeInUp 0.8s ease forwards;
}

.flying-item {
    position: fixed;
    width: 20px;
    height: 20px;
    background: var(--primary);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
}

/* Mobile */
@media (max-width: 600px) {
    .brand-logo {
        font-size: 3.5rem;
    }

    .nav-container {
        justify-content: flex-start;
        padding: 0 10px;
    }

    .nav-btn {
        padding: 15px;
        font-size: 0.9rem;
    }

    .filter-chips {
        justify-content: flex-start;
        padding: 0 20px;
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .cart-sidebar {
        width: 100%;
        max-width: none;
        border-left: none;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }
}
