:root {
    /* Colors */
    --bg-color: #252423;
    --surface-color: #1E1E1E;
    --primary-color: #9B7830;
    /* Salmon */
    --primary-dim: rgba(220, 171, 39, 0.1);
    --secondary-color: #4ECDC4;
    /* Wasabi/Fresh */
    --accent-gold: #FFD93D;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --glass-bg: rgba(15, 17, 21, 0.85);
    --border-color: rgba(255, 255, 255, 0.08);

    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 48px;

    /* Transitions */
    --transition-speed: 0.3s;
}

.logo-custom {
    font-family: 'Great Vibes', cursive;
    font-size: 30px;
    /* Tamanho medio para destaque */
    color: #f1b80f;
    /* Amarelo/Dourado similar ao da foto */
    margin: 0;
    padding: 10px;
    line-height: 1;
    text-decoration: none;
    outline: none;
    /* Opcional: leve sombra para dar profundidade */
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
}

/* Utils */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-speed) ease;
    cursor: pointer;
    border: none;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #9B7830);
    color: white;
    box-shadow: 0 4px 15px rgba(151, 146, 112, 0.397);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(151, 146, 112, 0.908);
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: var(--spacing-md) 0;
    background: transparent;
    /* Changed to transparent for JS effect */
    transition: background 0.3s, padding 0.3s, backdrop-filter 0.3s;
    border-bottom: 1px solid transparent;
}

header.scrolled {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.carousel-item img {
    height: 300px;
    /* Ajuste o valor conforme preferir */
    width: auto;
    /* Mantém a proporção para não achatar */
    object-fit: cover;
    /* Faz com que a imagem preencha o espaço sem distorcer */
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}


.nav-links {
    display: flex;
    gap: var(--spacing-lg);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 12px;
    transition: all 0.2s;
}

.nav-item:hover,
.nav-item.active {
    color: var(--primary-color);
    background: var(--primary-dim);
}

.nav-item svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Hero */
.hero {
    position: relative;
    padding: 160px 0 100px;
    background: radial-gradient(circle at top right, rgba(255, 107, 107, 0.1), transparent 40%),
        radial-gradient(circle at bottom left, rgba(78, 205, 196, 0.05), transparent 40%);
    text-align: center;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: var(--spacing-md);
    line-height: 1.2;
}

.hero h1 span {
    color: var(--primary-color);
}

.hero p {
    color: var(--text-secondary);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto var(--spacing-xl);
}

/* Hero Carousel */
.hero-carousel {
    width: 100%;
    max-width: 800px;
    height: 400px;
    margin: 30px auto;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 215, 0, 0.2);
    position: relative;
}

.hero-info-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.hero-icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.hero-icon-item svg {
    width: 28px;
    height: 28px;
    fill: var(--primary-color);
    background: rgba(255, 255, 255, 0.05);
    padding: 5px;
    border-radius: 50%;
    box-sizing: content-box;
}

.carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Products Grid */
.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: var(--spacing-xl);
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

.section-title.clean {
    display: block;
    width: 100%;
    left: auto;
    transform: none;
    text-align: center;
}

.section-title.clean::after {
    display: none;
}

.products {
    padding: var(--spacing-xl) 0;
}

/* Accordion Styles */
.menu-accordion {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.accordion-item {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.accordion-header {
    width: 100%;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--surface-color);
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: left;
    transition: background 0.3s;
}

.accordion-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

.accordion-header .icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: transform 0.3s;
}

.accordion-item.active .accordion-header .icon {
    transform: rotate(45deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease-out;
    background: rgba(0, 0, 0, 0.2);
}

.accordion-item.active .accordion-content {
    max-height: 2000px;
    /* Large enough to fit content */
    padding: 24px;
    transition: max-height 0.2s ease-in;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
}

.product-card {
    background: var(--surface-color);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    padding: var(--spacing-lg);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(218, 155, 61, 0.452);
}

.product-image {
    width: 100%;
    height: 180px;
    background: #2a2e35;
    border-radius: 12px;
    /* Placeholder gradient for food */
    background: linear-gradient(45deg, #2a2e35, #323640);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #444;
    overflow: hidden;
    /* Ensure image stays inside border radius */
}

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

.product-info h3 {
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.product-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.product-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.add-btn {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.add-btn:hover {
    background: var(--primary-color);
    transform: scale(1.1);
}

.add-btn:active {
    transform: scale(0.95);
}

/* Loyalty Section Enhanced */
.loyalty-section {
    padding: 80px 0;
    margin-top: var(--spacing-xl);
    background: linear-gradient(rgba(15, 17, 21, 0.95), rgba(15, 17, 21, 0.95)),
        url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0MCIgaGVpZ2h0PSI0MCIgdmlld0JveD0iMCAwIDQwIDQwIiBmaWxsLW9wYWNpdHk9IjAuMDUiIGZpbGw9IiNmZmYiPgo8Y2lyY2xlIGN4PSIyMCIgY3k9IjIwIiByPSIxIi8+Cjwvc3ZnPg==');
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.loyalty-hero {
    margin-bottom: 60px;
}

.loyalty-icon-main svg {
    width: 60px;
    height: 60px;
    fill: var(--accent-gold);
    margin-bottom: 20px;
}

.loyalty-desc {
    color: var(--text-secondary);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 30px;
}

/* How It Works */
.loyalty-steps {
    margin-bottom: 60px;
}

.loyalty-steps h3,
.loyalty-rewards h3 {
    font-size: 1.8rem;
    margin-bottom: 40px;
    color: var(--primary-color);
}

.steps-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.step-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 30px;
    border-radius: 20px;
    width: 250px;
    transition: transform 0.3s;
}

.step-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05);
}

.step-icon svg {
    width: 48px;
    height: 48px;
    fill: var(--secondary-color);
    margin-bottom: 15px;
}

.step-card h4 {
    color: white;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.step-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.step-arrow {
    font-size: 2rem;
    color: var(--text-secondary);
    opacity: 0.5;
}

/* Rewards Grid */
.rewards-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.reward-card {
    background: linear-gradient(135deg, #252423, #1e1e1e);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 30px;
    width: 300px;
    position: relative;
    overflow: hidden;
    text-align: left;
    transition: 0.3s;
}

.reward-card.highlight {
    border-color: var(--accent-gold);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.1);
}

.reward-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--accent-gold);
    color: black;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
}

.reward-points {
    color: var(--accent-gold);
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.reward-card h4 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.reward-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 20px;
    height: 40px;
}

.progress-bar {
    background: rgba(255, 255, 255, 0.1);
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-bar div {
    height: 100%;
    background: var(--secondary-color);
}

.status-text {
    font-size: 0.8rem;
    color: var(--secondary-color);
}

.btn-claim {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    color: #555;
    cursor: not-allowed;
    font-weight: 600;
}

@media (max-width: 768px) {
    .step-arrow {
        display: none;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .nav-links span {
        display: none;
    }

    .nav-item {
        padding: 10px;
    }
}

/* Cart Styles */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    backdrop-filter: blur(3px);
}

.cart-overlay.open {
    opacity: 1;
    visibility: visible;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 100%;
    max-width: 400px;
    height: 100%;
    background: #1a1b1a;
    /* Dark background matching user theme */
    z-index: 2001;
    transition: right 0.3s cubic-bezier(0.77, 0.2, 0.05, 1.0);
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--primary-color);
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.5);
}

.cart-sidebar.open {
    right: 0;
}

.cart-header {
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cart-header h3 {
    font-family: 'Playfair Display', serif;
    color: var(--primary-color);
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

.close-btn:hover {
    color: var(--primary-color);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cart-item {
    display: flex;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    padding: 12px;
    border-radius: 12px;
}

.cart-item-info {
    flex: 1;
}

.cart-item-title {
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
}

.cart-item-price {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.9rem;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 20px;
    padding: 2px;
    margin-top: 6px;
    width: fit-content;
}

.qty-btn {
    width: 24px;
    height: 24px;
    border: none;
    background: none;
    color: #fff;
    cursor: pointer;
    font-weight: bold;
}

.qty-btn:hover {
    color: var(--primary-color);
}

.qty-val {
    padding: 0 8px;
    font-size: 0.85rem;
}

.item-total-remove {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
}

.remove-item {
    color: #ff6b6b;
    font-size: 0.8rem;
    cursor: pointer;
    background: none;
    border: none;
    opacity: 0.7;
}

.remove-item:hover {
    opacity: 1;
    text-decoration: underline;
}

.cart-footer {
    padding: 24px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #fff;
}

.empty-cart-msg {
    text-align: center;
    color: var(--text-secondary);
    margin-top: 40px;
    font-style: italic;
}

/* Toggle Styles */
.toggle-btn {
    color: var(--text-secondary);
    font-weight: 500;
    transition: 0.3s;
}

input[type="radio"]:checked+.toggle-btn {
    color: var(--primary-color);
    font-weight: 700;
    text-shadow: 0 0 10px rgba(155, 120, 48, 0.5);
}

label:has(input[type="radio"]:checked) {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid var(--primary-color);
}

/* --- Organized Styles (Refactored from Inline) --- */
.delivery-toggle-container {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.delivery-option {
    flex: 1;
    text-align: center;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: 8px;
    transition: 0.2s;
}

.delivery-option:hover {
    background: rgba(255, 255, 255, 0.15);
}

.delivery-info-container {
    display: none;
    /* Toggled by JS */
    flex-direction: column;
    gap: 10px;
}

.input-group-vertical {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.input-label-sm {
    color: #aaa;
    font-size: 0.9rem;
}

.input-row {
    display: flex;
    gap: 5px;
}

.address-input-field {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 10px;
    border-radius: 8px;
    font-family: inherit;
}

.calc-button {
    padding: 0 15px;
    font-size: 0.8rem;
}

.calc-result-box {
    display: none;
    /* Toggled by JS */
    flex-direction: column;
    gap: 5px;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px;
    border-radius: 8px;
}

.calc-row {
    display: flex;
    justify-content: space-between;
    color: #aaa;
    font-size: 0.9rem;
}

.text-primary {
    color: var(--primary-color);
}

.old-price {
    color: grey;
    font-size: 0.9rem;
    margin-top: auto;
    text-decoration: line-through;
}

/* --- Responsive Optimizations --- */

/* Tablet & Mobile (Max Width 1024px) */
@media (max-width: 1024px) {
    .container {
        padding: 0 var(--spacing-sm);
    }

    .hero h1 {
        font-size: 3rem;
    }
}

/* Mobile Devices (Max Width 768px) */
@media (max-width: 768px) {

    /* Header */
    .navbar {
        padding: 0 10px;
    }

    .nav-links {
        gap: 10px;
    }

    .nav-links span {
        display: none;
        /* Hide text, show only icons */
    }

    .nav-item {
        padding: 8px;
    }

    /* Hero */
    .hero {
        padding: 120px 0 60px;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero-info-icons {
        flex-direction: column;
        gap: 15px;
    }

    .hero-carousel {
        height: 250px;
        /* Smaller carousel on mobile */
        margin: 20px auto;
    }

    /* Grids */
    .product-grid {
        grid-template-columns: 1fr;
        /* Single column for better mobile view */
        gap: 20px;
    }

    .steps-grid,
    .rewards-grid {
        flex-direction: column;
        width: 100%;
    }

    .step-card,
    .reward-card {
        width: 100%;
        /* Full width cards */
        max-width: 350px;
    }

    .step-arrow {
        transform: rotate(90deg);
        /* Point down on mobile */
        margin: 10px 0;
        display: block;
        /* Show arrows but rotated */
    }

    .step-arrow:last-child {
        display: none;
    }

    /* Cart Sidebar */
    .cart-sidebar {
        max-width: 100%;
        /* Full width on mobile */
        width: 100%;
        right: -100%;
        /* Fix: ensure it's fully off-screen */
    }

    .cart-header,
    .cart-footer {
        padding: 15px;
    }

    /* Footer & Info */
    .info-section h1 {
        font-size: 2rem;
    }

    .info-card {
        padding: 20px;
    }
}

/* Small Mobile (Max Width 480px) */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.8rem;
    }

    .section-title span {
        font-size: 1.8rem !important;
    }

    .btn {
        width: 100%;
        /* Full width buttons for easier tapping */
    }

    .nav-item svg {
        width: 24px;
        height: 24px;
    }
}

/* --- Final Polish & Bug Fixes --- */

/* Ensure Success Page Title Scales */
@media (max-width: 768px) {
    .success-title {
        font-size: 2.5rem;
    }

    .info-section {
        padding-top: 100px;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Better safe area for iPhones */
    body {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

@media (max-width: 480px) {
    .success-title {
        font-size: 2rem;
    }

    /* Ensure toast/notifications don't get cut off */
    .toast {
        width: 90%;
        left: 5%;
    }
}

/* --- Global Centering Polish --- */
.container {
    margin-left: auto;
    margin-right: auto;
    /* Redundant safety for centering */
}

/* Ensure headings are centered on mobile/tablet */
@media (max-width: 1024px) {

    .section-title,
    .hero h1,
    .hero p,
    .loyalty-desc,
    .info-section h1 {
        text-align: center;
    }

    /* Center grids on tablet */
    .product-grid {
        justify-content: center;
    }

    .steps-grid,
    .rewards-grid {
        justify-content: center;
    }
}

/* Garantir que o dropdown do Google Places apareça sobre o sidebar */
.pac-container {
    z-index: 9999 !important;
}