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

@font-face {
    font-family: 'Super Groovy';
    src: url('../fonts/SuperGroovy.ttf?v=2') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
html, body {
    max-width: 100%;
    overflow-x: hidden !important;
    position: relative;
    width: 100%;
}

:root {
    /* Paleta Gourmet Bakery */
    --primary: #C47335;          /* Caramelo / Canela Quente */
    --primary-light: #E8A96A;    /* Caramelo claro */
    --primary-bg: #FDF8EC;       /* Creme Suave - fundo principal */
    --primary-pastel: #F5EDD8;   /* Creme mais escuro - para destaques */
    --text-dark: #3B1F0A;        /* Marrom Chocolate Profundo */
    --text-light: #7A5840;       /* Marrom médio - texto secundário */
    --white: #FFFFFF;
    --shadow: 0 4px 24px rgba(59, 31, 10, 0.08);
    --shadow-hover: 0 12px 40px rgba(59, 31, 10, 0.16);
    --radius: 18px;
    --transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Outfit', sans-serif;
}

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

html {
    background-color: var(--primary-bg);
}

body {
    font-family: var(--font-body);
    background-color: var(--primary-bg);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

/* Global Fix to prevent horizontal overflow */
.admin-wrapper, main, section, div, .container {
    max-width: 100%;
    box-sizing: border-box;
}

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

/* Header */
.header {
    background-color: var(--primary-bg);
    border-bottom: 1px solid rgba(196, 115, 53, 0.2);
    padding: 12px 0;
    box-shadow: 0 2px 20px rgba(59, 31, 10, 0.08);
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1100;
    transition: var(--transition);
}

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

.logo {
    font-family: "Super Groovy", "Pacifico", cursive !important;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: -0.5px;
}

.logo-img {
    object-fit: contain;
    transition: var(--transition);
}

.logo-img:hover {
    transform: scale(1.05);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 13px 28px;
    border: none;
    border-radius: 50px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    text-align: center;
    letter-spacing: 0.3px;
}

.btn-primary {
    background-color: var(--text-dark);
    color: var(--primary-light);
    box-shadow: 0 4px 18px rgba(59, 31, 10, 0.25);
}

.btn-primary:hover {
    background-color: #2a1506;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(59, 31, 10, 0.35);
    color: var(--primary);
}

.btn-add {
    background-color: var(--text-dark);
    color: var(--primary-light);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    padding: 0;
    font-weight: 700;
    transition: var(--transition);
}

.btn-add:hover {
    background-color: var(--primary);
    color: var(--text-dark);
    transform: scale(1.12);
    box-shadow: 0 4px 14px rgba(196, 115, 53, 0.4);
}

.btn-block {
    display: block;
    width: 100%;
}

/* Google Button */
.btn-google {
    background: white;
    color: #444;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 600;
    transition: var(--transition);
    text-decoration: none;
    margin-top: 15px;
    font-size: 15px;
}

.btn-google:hover {
    background: #f8f8f8;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}

.btn-google img {
    width: 20px;
    height: 20px;
}

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 25px 0;
    color: #999;
    font-size: 13px;
}

.auth-divider::before, .auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #eee;
}

.auth-divider:not(:empty)::before { margin-right: 15px; }
.auth-divider:not(:empty)::after { margin-left: 15px; }

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cart-btn {
    background: var(--text-dark);
    border: none;
    color: var(--primary-light);
    padding: 10px 22px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-body);
    font-size: 15px;
    box-shadow: 0 4px 15px rgba(59, 31, 10, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-btn:hover {
    background-color: var(--primary);
    color: var(--text-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(196, 115, 53, 0.35);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-dark);
    cursor: pointer;
    padding: 5px;
    margin-right: -5px; /* Compensa o padding para alinhar visualmente */
}

.menu-close-btn {
    display: none;
}

/* Main Nav */
.main-nav {
    display: block;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 500;
    font-size: 15px;
    transition: var(--transition);
    position: relative;
    padding-bottom: 3px;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav-menu a:hover {
    color: var(--text-dark);
}

.nav-menu a:hover::after {
    width: 100%;
}

@media (max-width: 768px) {
    .main-nav { 
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: var(--primary-bg);
        border-top: 2px solid var(--primary-pastel);
        transition: 0.3s;
        display: block;
        z-index: 1000;
    }

    .main-nav.active {
        left: 0;
    }

    .menu-close-btn {
        display: block;
        position: absolute;
        top: 20px;
        right: 20px;
        background: none;
        border: none;
        font-size: 40px;
        color: var(--text-dark);
        cursor: pointer;
    }

    .nav-menu {
        flex-direction: column;
        align-items: center;
        padding-top: 181px;
    }

    .nav-menu a {
        font-size: 20px;
        color: var(--text-dark);
    }

    .mobile-menu-btn { 
        display: block; 
    }
}

/* Hero Section */
.hero {
    padding: 100px 0;
    text-align: center;
    background-size: cover;
    background-position: center;
    position: relative;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(253, 248, 236, 0.5); /* Reduced from 0.82 */
    backdrop-filter: blur(1px); /* Reduced from 3px */
    z-index: 0;
}

.hero h2 {
    font-family: "Super Groovy", "Pacifico", cursive !important;
    font-size: 56px;
    margin-bottom: 20px;
    color: var(--text-dark);
    position: relative;
    z-index: 1;
    line-height: 1.2;
    letter-spacing: -1px;
}

.hero p {
    font-size: 18px;
    color: var(--text-light);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1;
    font-weight: 400;
    line-height: 1.7;
}

.hero.has-bg-image h2, 
.hero.has-bg-image p {
    color: var(--white);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.hero-btns {
    display: flex;
    gap: 15px;
    justify-content: center;
    position: relative;
    z-index: 1;
    flex-wrap: wrap; /* Fix: Allow buttons to wrap on mobile */
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary);
    color: var(--text-dark);
}

.btn-outline:hover {
    background-color: var(--primary);
    color: var(--text-dark);
    transform: translateY(-2px);
}

/* Gallery Section */
.gallery-section {
    padding: 80px 0;
    background-color: var(--primary-pastel);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.gallery-item {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    cursor: pointer;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: none; /* GSAP handles this */
}

.gallery-item:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}

.gallery-item:hover img {
    transform: scale(1.06);
}

/* About Section */
.about-section {
    padding: 100px 0;
    background: var(--white);
    border-top: 1px solid var(--primary-pastel);
    border-bottom: 1px solid var(--primary-pastel);
}

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

.section-tag {
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 12px;
    display: block;
    margin-bottom: 12px;
}

.about-text {
    font-size: 18px;
    color: var(--text-light);
    line-height: 1.8;
    text-align: justify;
}

.about-content .section-title {
    margin-bottom: 15px;
    margin-top: 0;
}

.about-text p {
    margin: 0;
}

.about-image {
    display: flex;
    justify-content: center;
}

.about-img-wrapper {
    position: relative;
}

.about-img-wrapper img {
    height: auto;
    border-radius: 30px;
    box-shadow: 20px 20px 60px rgba(0,0,0,0.1);
    object-fit: cover;
    max-width: 100% !important; /* Ensure it never overflows */
}

.about-img-accent {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 100px;
    height: 100px;
    background: var(--primary-pastel);
    border-radius: 50%;
    z-index: -1;
}

.about-img-placeholder {
    width: 100%;
    height: 400px;
    background: var(--primary-pastel);
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
}

/* Menu Section */
.menu-section {
    padding: 80px 0;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='rgba(139, 69, 19, 0.07)'%3E%3Ccircle cx='20' cy='20' r='1.5'/%3E%3Ccircle cx='70' cy='40' r='2.5'/%3E%3Ccircle cx='40' cy='80' r='1'/%3E%3Ccircle cx='90' cy='90' r='2'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 100px;
    background-repeat: repeat;
}

.section-title {
    text-align: center;
    font-family: var(--font-display);
    font-size: 42px;
    margin-bottom: 50px;
    color: var(--text-dark);
    letter-spacing: -1px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 28px;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    border: 1px solid rgba(196, 115, 53, 0.1);
    backface-visibility: hidden;
    transform: translateZ(0);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.product-image {
    height: 220px;
    overflow: hidden;
    background-color: var(--primary-pastel);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: none; /* GSAP handles this */
}

.product-card:hover .product-image img {
    transform: scale(1.07);
}

.product-info {
    padding: 22px;
}

.product-info h3 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-dark);
}

.product-info p {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 16px;
    line-height: 1.5;
}

.price {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-dark);
    font-family: var(--font-display);
    display: inline-block;
}

/* Modal Base */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    backdrop-filter: blur(8px);
}

/* Cart Modal Styling */
.modal-content {
    background-color: var(--white);
    width: 100%;
    max-width: 500px;
    height: 100%;
    float: right;
    padding: 40px;
    overflow-y: auto;
    position: relative;
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.modal-content h2 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 30px;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 15px;
}

.modal-content h2::after {
    content: '';
    flex: 1;
    height: 2px;
    background: var(--primary-pastel);
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.cart-item-info h4 {
    font-size: 18px;
    margin-bottom: 5px;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--primary-pastel);
    padding: 8px 15px;
    border-radius: 50px;
}

.btn-qty {
    background: transparent;
    border: none;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    color: var(--text-dark);
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

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

.checkout-form {
    margin-top: 40px;
}

.checkout-form input, .checkout-form textarea {
    width: 100%;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid #eee;
    border-radius: 12px;
    font-family: inherit;
    font-size: 15px;
    background: #fafafa;
    transition: var(--transition);
}

.checkout-form input:focus, .checkout-form textarea:focus {
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(255, 183, 3, 0.1);
    outline: none;
}

/* Login Required Section in Cart */
.login-required-box {
    background: var(--primary-bg);
    border: 2px dashed var(--primary);
    padding: 30px 20px;
    border-radius: 20px;
    text-align: center;
    margin-top: 30px;
}

.login-required-box h4 {
    margin-bottom: 10px;
    color: var(--text-dark);
    font-size: 18px;
}

.login-required-box p {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 20px;
}

.login-required-btns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* Footer */
footer {
    text-align: center;
    padding: 60px 0;
    background: var(--text-dark);
    color: var(--primary-pastel);
}

footer p {
    color: var(--primary-pastel);
    opacity: 0.85;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.social-btn {
    width: 42px;
    height: 42px;
    background: rgba(255,255,255,0.1);
    color: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid rgba(196, 115, 53, 0.3);
}

.social-btn:hover {
    background: var(--primary);
    color: var(--text-dark);
    transform: translateY(-3px);
}

/* Success/Cancel Pages Styling */
.center-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-color: var(--primary-pastel);
    padding: 20px;
}

.message-card {
    background: var(--white);
    padding: 60px 40px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow);
    max-width: 500px;
    width: 100%;
}

.icon-success {
    font-size: 80px;
    margin-bottom: 20px;
}

.message-card h2 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.message-card p {
    color: var(--text-light);
    margin-bottom: 10px;
    font-size: 18px;
}

.mt-4 {
    margin-top: 30px;
}
/* Responsividade Extra */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .hero h2 {
        font-size: 32px;
    }
    
    .hero p {
        font-size: 16px;
    }
    
    .section-title {
        font-size: 28px;
        margin-bottom: 30px;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .modal-content {
        width: 100%;
        max-width: none;
        padding: 20px;
    }

    .message-card {
        padding: 40px 20px;
    }
}

@media (max-width: 480px) {
    .hero-btns {
        flex-direction: column;
        align-items: stretch;
    }
    
    .hero-btns .btn {
        width: 100%;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .header-actions {
        gap: 10px;
    }
    
    .cart-btn span {
        display: none; /* Esconde texto "0" ou "Total" no mobile pequeno se precisar */
    }
}

/* Google Maps Autocomplete Fixes */
.pac-container {
    z-index: 9999 !important;
    border-radius: 12px;
    margin-top: 5px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border: 1px solid #eee;
    font-family: 'Outfit', sans-serif;
    background-color: #fff;
}

.pac-item {
    padding: 12px 15px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-top: 1px solid #f0f0f0;
}

.pac-item:first-child {
    border-top: none;
}

.pac-item:hover {
    background-color: #f8f9fa;
}

.pac-icon {
    margin-top: 0;
}


/* NotificaÃÂÃÂÃÂÃÂ§ÃÂÃÂÃÂÃÂµes Premium */
.notification {
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10000;
}

.notification.success { background-color: var(--notification-success); }
.notification.error { background-color: var(--notification-error); }

.notification i {
    font-size: 20px;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Ajuste do Header e Topo Dinâmico */
html {
    background-color: var(--primary);
}

body {
    padding-top: 181px;
    background-color: var(--primary-bg);

    background-repeat: no-repeat;
    background-attachment: scroll;
}

.header {
    background-color: var(--primary);
    padding: 12px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1100;
}

.alerts-container {
    position: sticky;
    top: 181px;
    z-index: 1000;
    width: 100%;
}

/* Responsividade Global */
@media (max-width: 768px) {
    body { 
        padding-top: 82px !important; 
    }
    
    .header { 
        padding: 16px 0 !important;
    }
    
    .logo-img {
        height: 50px !important;
    }

    .container {
        padding: 0 15px;
    }

    .hero h2 { font-size: 30px; }
    .hero p { font-size: 15px; }
    
    .modal-content {
        padding: 20px !important;
    }
    
    .cart-item {
        padding: 15px 0;
    }
    
    .cart-summary {
        margin-bottom: 30px;
    }

    /* Grids Responsivos */
    .products-grid, .gallery-grid, .about-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
}

.header {
    background-color: var(--primary);
    padding: 12px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1100;
}

.alerts-container {
    position: sticky;
    top: 181px;
    z-index: 1000;
    width: 100%;
}

@media (max-width: 768px) {
    .alerts-container {
        top: 82px;
    }
}
