@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,600;0,700;1,400&family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --color-wine: #800020;
    --color-wine-dark: #630018;
    --color-cream: #F8EFE0;
    --color-cream-light: #FDFBF7;
    --color-olive: #556B2F;
    --color-text: #333333;
    --color-text-light: #555555;
    --color-white: #ffffff;
    
    --font-heading: 'Lora', serif;
    --font-body: 'Outfit', sans-serif;
    
    --radius: 8px;
    --radius-lg: 12px;
    --shadow: 0 4px 12px rgba(0,0,0,0.05);
    --shadow-hover: 0 8px 24px rgba(0,0,0,0.1);
    
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background-color: var(--color-cream);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-wine);
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: var(--color-wine);
    transition: var(--transition);
}

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

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

.section-light {
    background-color: var(--color-cream-light);
}

.text-center {
    text-align: center;
}

/* Typography */
.title-main {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1.5rem;
}

.title-section {
    font-size: clamp(2rem, 4vw, 2.5rem);
    margin-bottom: 2rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: var(--font-body);
    text-align: center;
}

.btn-primary {
    background-color: var(--color-wine);
    color: var(--color-white);
}

.btn-primary:hover {
    background-color: var(--color-wine-dark);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-wine);
    border: 2px solid var(--color-wine);
}

.btn-secondary:hover {
    background-color: var(--color-wine);
    color: var(--color-white);
}

.btn-whatsapp {
    background-color: #25D366;
    color: var(--color-white);
}

.btn-whatsapp:hover {
    background-color: #128C7E;
    color: var(--color-white);
}

/* Header */
.header {
    background-color: var(--color-cream);
    padding: 15px 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: var(--shadow);
}

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

.logo {
    width: 150px;
}

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

.nav-links {
    display: flex;
    gap: 20px;
    list-style: none;
}

.nav-links a {
    font-weight: 500;
    color: var(--color-text);
}

.nav-links a:hover {
    color: var(--color-wine);
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    color: var(--color-wine);
    cursor: pointer;
}

/* Hero Section */
.hero {
    padding: 120px 0 60px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background-color: var(--color-cream-light);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--color-text-light);
    margin-bottom: 30px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.hero-badges {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-olive);
    background-color: rgba(85, 107, 47, 0.1);
    padding: 6px 12px;
    border-radius: 20px;
}

.hero-image {
    position: relative;
}

/* Cards (Diferenciais) */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.feature-card {
    background-color: var(--color-white);
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    text-align: center;
}

.feature-card h3 {
    font-family: var(--font-body);
    color: var(--color-wine);
    font-size: 1.25rem;
    margin-bottom: 15px;
}

/* Pizza Builder Section */
.pizza-builder {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
    align-items: flex-start;
    margin-top: 40px;
}

.builder-controls {
    background-color: var(--color-white);
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.flavor-selector {
    margin-bottom: 25px;
}

.flavor-selector select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--color-text);
    outline: none;
}

.ingredients-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ingredient-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: var(--color-cream);
    border: 1px solid #e0d5c1;
    border-radius: var(--radius);
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 500;
    transition: var(--transition);
}

.ingredient-btn:hover {
    background-color: #f0e2ca;
}

.ingredient-btn.active {
    background-color: var(--color-wine);
    color: var(--color-white);
    border-color: var(--color-wine);
}

.ingredient-btn.active::after {
    content: '✓';
    font-weight: bold;
}

.builder-canvas-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    aspect-ratio: 1 / 1;
}

/* Base image (tábua/prato) that is always there */
.builder-base {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: #e6dcc6; /* Placeholder for plate */
    box-shadow: inset 0 0 20px rgba(0,0,0,0.1), var(--shadow);
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

/* The actual pizza canvas */
.builder-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.pizza-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.pizza-layer.visible {
    opacity: 1;
    transform: scale(1);
}

.builder-success {
    position: relative;
    margin-top: 30px;
    background-color: rgba(255,255,255,0.95);
    padding: 20px 30px;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-hover);
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: all 0.5s ease;
    width: 100%;
    max-width: 400px;
}

.close-success {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--color-text-light);
    cursor: pointer;
    line-height: 1;
    padding: 5px;
    transition: color 0.3s ease;
}

.close-success:hover {
    color: var(--color-wine);
}

.builder-success.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.builder-success h4 {
    color: var(--color-olive);
    margin-bottom: 5px;
}

/* Steps (Como preparar) */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.step-card {
    text-align: center;
}

.step-number {
    width: 50px;
    height: 50px;
    background-color: var(--color-wine);
    color: var(--color-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    font-family: var(--font-heading);
    margin: 0 auto 20px;
}

/* Packaging */
.packaging-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

/* Occasions */
.occasions-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.occasion-item {
    background-color: var(--color-white);
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 500;
    color: var(--color-wine);
    box-shadow: var(--shadow);
}

/* FAQ */
.faq-container {
    max-width: 800px;
    margin: 40px auto 0;
}

.faq-item {
    background-color: var(--color-white);
    border-radius: var(--radius);
    margin-bottom: 15px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.faq-question {
    padding: 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--color-wine);
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    transition: var(--transition);
}

.faq-item.active .faq-question::after {
    content: '−';
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
    padding: 0 20px 20px;
    max-height: 200px;
}

/* Footer */
.footer {
    background-color: var(--color-wine-dark);
    color: var(--color-cream);
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    width: 150px;
    filter: brightness(0) invert(1);
    margin-bottom: 15px;
}

.footer h4 {
    color: var(--color-white);
    font-family: var(--font-body);
    margin-bottom: 20px;
}

.footer ul {
    list-style: none;
}

.footer ul li {
    margin-bottom: 10px;
}

.footer ul a {
    color: var(--color-cream);
    opacity: 0.8;
}

.footer ul a:hover {
    opacity: 1;
    color: var(--color-white);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Floating Action Button (Mobile) */
.fab-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fab {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-hover);
    color: white;
    font-size: 24px;
    transition: var(--transition);
}

.fab:hover {
    transform: scale(1.1);
}

/* Responsive */
@media (max-width: 992px) {
    .pizza-builder {
        grid-template-columns: 1fr;
    }
    
    .builder-controls {
        order: 2;
    }
    
    .builder-visual-wrapper {
        order: 1;
    }
    
    .builder-canvas-container {
        max-width: 400px;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--color-cream);
        flex-direction: column;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        box-shadow: 0 10px 10px rgba(0,0,0,0.05);
    }
    
    .nav-links.active {
        max-height: 400px;
    }
    
    .nav-links a {
        display: block;
        padding: 15px 20px;
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }
    
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: 40px;
    }
    
    .hero-buttons, .hero-badges {
        justify-content: center;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
    
    .packaging-grid {
        grid-template-columns: 1fr;
    }
    
    .packaging-grid .packaging-content {
        order: 2;
        text-align: center;
    }
    
    .packaging-grid .packaging-img {
        order: 1;
    }

    /* Header optimization */
    .header { padding: 5px 0; }
    .logo { width: 70px; }
    
    /* Global Section optimization */
    .section { padding: 30px 0; }
    .title-main { font-size: clamp(2rem, 8vw, 2.5rem); }
    .title-section { margin-bottom: 1rem; font-size: clamp(1.5rem, 6vw, 1.8rem); }
    
    /* Pizza Builder optimization */
    .pizza-builder { margin-top: 15px; gap: 15px; }
    .builder-controls { 
        padding: 15px; 
        max-height: 260px; 
        overflow-y: auto; 
        border: 1px solid #eee;
    }
    .flavor-selector { margin-bottom: 10px; }
    .flavor-selector select { padding: 8px; font-size: 0.9rem; }
    .ingredients-list { gap: 5px; }
    .ingredient-btn { padding: 8px 12px; font-size: 0.85rem; }
    .builder-canvas-container { max-width: 200px; margin: 0 auto; }
    
    /* Success Popup (Toast) for Mobile */
    .builder-success {
        position: fixed;
        bottom: 20px;
        left: 20px;
        right: 20px;
        width: auto;
        max-width: none;
        margin-top: 0;
        z-index: 1000;
        transform: translateY(150%);
        box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
        border: 2px solid var(--color-olive);
    }
    .builder-success.show {
        transform: translateY(0);
    }
    
    /* Hero */
    .hero { min-height: auto; padding: 80px 0 30px; }
}
