:root {
    --primary: #3E2723;
    /* Chocolate */
    --secondary: #D4AF37;
    /* Gold */
    --accent: #FF8A80;
    /* Rose/Berry */
    --bg-light: #FFF8F0;
    /* Cream */
    --bg-white: #FFFFFF;
    --text-main: #2C1810;
    --text-light: #5D4037;
    --glass: rgba(255, 255, 255, 0.7);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
.logo {
    font-family: 'Playfair Display', serif;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 100px 0;
}

.alternate-bg {
    background-color: #F9EBE0;
}

.section-title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 20px;
    color: var(--primary);
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 60px;
}

/* Header & Nav */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: var(--glass);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
    transition: var(--transition);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary);
    background: linear-gradient(45deg, var(--primary) 30%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    letter-spacing: -0.5px;
    transition: var(--transition);
}

.logo:hover {
    transform: scale(1.02);
}

.logo span {
    background: linear-gradient(45deg, var(--secondary) 0%, #F5D061 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-style: italic;
    font-weight: 600;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--secondary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    font-size: 2rem;
    color: var(--primary);
    cursor: pointer;
}

.btn-contact {
    background: var(--primary);
    color: white !important;
    padding: 10px 25px;
    border-radius: 50px;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(rgba(255, 248, 240, 0.5), rgba(255, 248, 240, 0.5)), url('https://images.unsplash.com/photo-1578985545062-69928b1d9587?ixlib=rb-1.2.1&auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    position: relative;
}

.hero-content {
    text-align: center;
    max-width: 800px;
}

.hero h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 25px;
    color: var(--primary);
}

.hero h1 span {
    color: var(--secondary);
    display: block;
}

.hero p {
    font-size: 1.4rem;
    margin-bottom: 40px;
    color: var(--text-light);
}

.hero-btns {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.btn {
    padding: 15px 40px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--secondary);
    transform: translateY(-3px);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

/* Flavor Grid */
.flavor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.flavor-card {
    background: var(--bg-white);
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.flavor-card:hover {
    transform: translateY(-10px);
}

.flavor-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

/* Sizes Table */
.size-table-container {
    background: var(--bg-white);
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    overflow-x: auto;
}

.size-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.size-table th {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    padding: 20px;
    border-bottom: 2px solid var(--secondary);
    color: var(--primary);
}

.size-table td {
    padding: 20px;
    border-bottom: 1px solid #eee;
}

/* Product Cards */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
}

.product-card {
    background: var(--bg-white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-10px);
}

.product-img {
    height: 300px;
    background-size: cover;
    background-position: center;
    background-color: #ddd;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.product-card:hover .product-img {
    transform: scale(1.1);
}

#img-pastel-lujo {
    background-image: url('pastel.png');
}

#img-cupcakes {
    background-image: url('cupcakes.png');
}

#img-cheesecake {
    background-image: url('torta_queso_completa.png');
}

#img-carrotcake {
    background-image: url('torta_zanahoria.png');
}

#img-vainilla {
    background-image: url('torta_artesanal.jfif');
}

#img-quesillo {
    background-image: url('quesillo_completo.png');
}

#img-imposible {
    background-image: url('torta_imposible.jfif');
}

#img-galletas {
    background-image: url('galletas_artesanales_v2.png');
}

#img-cinnamon {
    background-image: url('roles_de_canela.jfif');
}

#img-macarons {
    background-image: url('macarons.png');
}

.product-info {
    padding: 30px;
}

.product-info h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--primary);
}

.product-info-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.price {
    font-weight: 700;
    color: var(--secondary);
    font-size: 1.3rem;
}

.btn-add-cart {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-add-cart:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(62, 39, 35, 0.2);
}

.size-selector {
    width: 100%;
    padding: 8px 12px;
    margin-top: 10px;
    margin-bottom: 5px;
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 8px;
    background-color: var(--bg-light);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.size-selector:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(62, 39, 35, 0.1);
}

.flavor-selector {
    width: 100%;
    padding: 8px 12px;
    margin-top: 8px;
    margin-bottom: 5px;
    border: 1px solid rgba(212, 175, 55, 0.5);
    border-radius: 8px;
    background-color: #FFF9F0;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    background-image: linear-gradient(to right, var(--bg-light), #fff9f0);
}

.flavor-selector:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
}

/* Contact Section */
.contact-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
}

.contact-form {
    background: var(--bg-white);
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
}

/* Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 3rem;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background: var(--bg-white);
        padding: 20px 0;
        box-shadow: var(--shadow);
        gap: 20px;
    }

    .nav-links.active {
        display: flex;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
    }
}

/* Testimonials */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.testimonial-card {
    background: var(--bg-white);
    padding: 35px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    position: relative;
    border: 1px solid rgba(212, 175, 55, 0.1);
}

.stars {
    color: var(--secondary);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.testimonial-card p {
    font-style: italic;
    color: var(--text-light);
    margin-bottom: 20px;
}

.client-info strong {
    display: block;
    color: var(--primary);
    font-size: 1.1rem;
}

.client-info span {
    font-size: 0.9rem;
    color: var(--secondary);
}

/* Shopping Cart Icon */
.cart-icon-wrapper {
    margin-left: 10px;
}

.cart-icon {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.cart-icon:hover {
    transform: scale(1.1);
}

#cart-count {
    position: absolute;
    top: -5px;
    right: -10px;
    background: var(--accent);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 50%;
    font-weight: 700;
}

/* Cart Drawer */
.cart-drawer {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100%;
    background: var(--bg-white);
    z-index: 2000;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    transition: 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
}

.cart-drawer.open {
    right: 0;
}

.cart-header {
    padding: 25px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-light);
}

.cart-items {
    flex: 1;
    padding: 25px;
    overflow-y: auto;
}

.empty-msg {
    text-align: center;
    color: var(--text-light);
    margin-top: 50px;
}

.cart-footer {
    padding: 25px;
    border-top: 1px solid #eee;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
}

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: 0.4s;
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

.btn-block {
    width: 100%;
}

/* ===== WHY US SECTION ===== */
.why-us {
    background: linear-gradient(135deg, var(--primary) 0%, #5D4037 100%);
    color: white;
}

.why-us .section-title {
    color: white;
}

.why-us .section-subtitle {
    color: rgba(255, 255, 255, 0.75);
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.why-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    transition: var(--transition);
    backdrop-filter: blur(5px);
}

.why-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-8px);
    border-color: var(--secondary);
}

.why-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

.why-number {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 700;
    color: var(--secondary);
    line-height: 1;
    margin-bottom: 10px;
}

.why-card h3 {
    font-size: 1.2rem;
    color: white;
    margin-bottom: 10px;
}

.why-card p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
}

/* ===== SCROLL TO TOP BUTTON ===== */
.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    right: 105px;
    background: var(--secondary);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 9998;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top-btn:hover {
    background: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(62, 39, 35, 0.3);
}

/* ===== TYPING INDICATOR ===== */
.typing-indicator {
    display: flex;
    gap: 5px;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-white);
    border-radius: 15px;
    border-bottom-left-radius: 5px;
    align-self: flex-start;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(212, 175, 55, 0.1);
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--secondary);
    animation: typing 1.2s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {

    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: 0.4;
    }

    30% {
        transform: translateY(-6px);
        opacity: 1;
    }
}

@media (max-width: 480px) {
    .cart-drawer {
        width: 100%;
        right: -100%;
    }

    /* --- CHATBOT --- */
    .chatbot-toggle {
        position: fixed;
        bottom: 30px;
        right: 30px;
        background: var(--primary);
        color: white;
        border: none;
        padding: 15px 25px;
        border-radius: 50px;
        font-size: 1.1rem;
        font-family: 'Inter', sans-serif;
        font-weight: 600;
        cursor: pointer;
        box-shadow: 0 5px 15px rgba(62, 39, 35, 0.4);
        z-index: 9999;
        transition: var(--transition);
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .chatbot-toggle:hover {
        transform: translateY(-5px) scale(1.05);
        background: var(--secondary);
        box-shadow: 0 8px 25px rgba(212, 175, 55, 0.5);
    }

    .chatbot-container {
        position: fixed;
        bottom: 90px;
        right: 30px;
        width: 350px;
        height: 480px;
        background: var(--bg-white);
        border-radius: 20px;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
        z-index: 10000;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        transform: translateY(20px);
        transition: var(--transition);
        border: 1px solid rgba(212, 175, 55, 0.2);
    }

    .chatbot-container.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .chat-header {
        background: linear-gradient(135deg, var(--primary), #5D4037);
        color: white;
        padding: 15px 20px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .bot-info {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .bot-avatar {
        font-size: 1.8rem;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 50%;
        width: 40px;
        height: 40px;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .bot-title {
        font-family: 'Playfair Display', serif;
        font-size: 1.2rem;
        font-weight: 700;
    }

    .close-chat {
        background: none;
        border: none;
        color: white;
        font-size: 2rem;
        cursor: pointer;
        line-height: 1;
        transition: var(--transition);
    }

    .close-chat:hover {
        color: var(--secondary);
        transform: scale(1.1);
    }

    .chat-body {
        flex: 1;
        padding: 20px;
        overflow-y: auto;
        background: var(--bg-light);
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .chat-body::-webkit-scrollbar {
        width: 6px;
    }

    .chat-body::-webkit-scrollbar-thumb {
        background: rgba(62, 39, 35, 0.2);
        border-radius: 10px;
    }

    .chat-message {
        max-width: 80%;
        padding: 12px 16px;
        border-radius: 15px;
        font-size: 0.95rem;
        line-height: 1.4;
        animation: fadeIn 0.3s ease;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translateY(10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .chat-message.bot {
        background: var(--bg-white);
        color: var(--text-main);
        align-self: flex-start;
        border-bottom-left-radius: 5px;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
        border: 1px solid rgba(212, 175, 55, 0.1);
    }

    .chat-message.user {
        background: var(--primary);
        color: white;
        align-self: flex-end;
        border-bottom-right-radius: 5px;
        box-shadow: 0 2px 5px rgba(62, 39, 35, 0.2);
    }

    .chat-footer {
        padding: 15px;
        background: white;
        border-top: 1px solid #eee;
        display: flex;
        gap: 10px;
    }

    #chat-input {
        flex: 1;
        padding: 12px 15px;
        border: 1px solid #ddd;
        border-radius: 25px;
        font-family: inherit;
        font-size: 0.95rem;
        transition: var(--transition);
    }

    #chat-input:focus {
        outline: none;
        border-color: var(--secondary);
        box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
    }

    .send-btn {
        background: var(--secondary);
        color: white;
        border: none;
        padding: 0 20px;
        border-radius: 25px;
        font-weight: 600;
        cursor: pointer;
        transition: var(--transition);
    }

    .send-btn:hover {
        background: var(--primary);
    }

}

/* End @media (max-width: 480px) -- chatbot block */

/* Footer Improvements */
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 40px;
}

.footer-info p {
    margin-top: 10px;
    color: var(--text-light);
}

.footer-links h4 {
    font-family: 'Playfair Display', serif;
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.social-icon {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
}

.social-icon:hover {
    color: var(--secondary);
    transform: translateX(5px);
}

/* Footer & Mobile Optimizations */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .chatbot-container {
        width: calc(100% - 40px);
        right: 20px;
        bottom: 80px;
    }

    .chatbot-toggle {
        bottom: 90px;
        right: 20px;
    }

    .scroll-top-btn {
        right: 20px;
        bottom: 155px;
    }
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    width: 60px;
    height: 60px;
    line-height: 60px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    transition: var(--transition);
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    background-color: #128c7e;
    color: #FFF;
}

@media (max-width: 480px) {
    .whatsapp-float {
        bottom: 20px;
        left: 20px;
        width: 50px;
        height: 50px;
        font-size: 25px;
    }
}

/* ===== LOGO ENTRANCE ANIMATION ===== */
@keyframes logoEntrance {
    0% {
        opacity: 0;
        transform: translateY(-30px) scale(0.8);
        letter-spacing: 8px;
    }

    60% {
        opacity: 1;
        transform: translateY(5px) scale(1.03);
        letter-spacing: -0.5px;
    }

    80% {
        transform: translateY(-3px) scale(1.01);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        letter-spacing: -0.5px;
    }
}

.logo {
    animation: logoEntrance 1.2s cubic-bezier(0.165, 0.84, 0.44, 1) both;
}

.logo span {
    animation: logoEntrance 1.2s cubic-bezier(0.165, 0.84, 0.44, 1) 0.15s both;
}