:root {
    --primary: #7d2038;
    --secondary: #e8a6b1;
    --accent: #b04e63;
    --green: #40916c;
    --bg-light: #fcf4f5;
    --bg-white: #ffffff;
    --text-dark: #2a1116;
    --text-muted: #6e4e54;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    --transition: all 0.3s ease;
    --shadow: 0 10px 30px rgba(0,0,0,0.08);
}

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

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--bg-white);
    scroll-behavior: smooth;
}

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--primary);
    margin-bottom: 1rem;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 5rem 0;
}

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

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

.mb-4 {
    margin-bottom: 1.5rem;
}

.mt-4 {
    margin-top: 1.5rem;
}
.mt-3 {
    margin-top: 1rem;
}
.w-100 {
    width: 100%;
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    transition: var(--transition);
}

header.scrolled {
    padding: 1rem 5%;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

nav a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    margin-left: 2rem;
    transition: var(--transition);
}

nav a:hover {
    color: var(--primary);
}

/* Hero */
.hero {
    height: 100vh;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(42, 17, 22, 0.4), rgba(125, 32, 56, 0.7));
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 0 2rem;
    animation: fadeIn 1s ease-out;
}

.hero-content h1 {
    font-size: 4rem;
    color: white;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.3);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 5px rgba(0,0,0,0.3);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    font-size: 1rem;
}

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

.btn-primary:hover {
    background-color: #a81c1c;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(214, 40, 40, 0.4);
}

.btn-primary:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

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

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

/* Filosofia */
.section-title {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

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

.philosophy-quote {
    font-size: 1.5rem;
    font-style: italic;
    font-family: var(--font-heading);
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.filosofia-content {
    max-width: 800px;
    margin: 0 auto;
}

/* Grid & Cards */
/* Grid & Cards (Horizontal Carousel) */
.grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 2rem;
    padding-bottom: 2rem;
    -webkit-overflow-scrolling: touch;
}

/* Custom Scrollbar for Carousel */
.grid::-webkit-scrollbar {
    height: 8px;
}
.grid::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.05);
    border-radius: 4px;
}
.grid::-webkit-scrollbar-thumb {
    background-color: var(--secondary);
    border-radius: 4px;
}

.card {
    flex: 0 0 calc(33.333% - 1.35rem);
    scroll-snap-align: start;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

.card img {
    width: 100%;
    height: 220px;
    max-height: 220px;
    object-fit: contain !important;
    background-color: #faf5f6;
    padding: 10px;
    display: block;
}


.card-body {
    padding: 1rem 1.25rem 1.25rem;
    text-align: center;
}


.card img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    background-color: #faf5f6;
    padding: 10px;
}



/* Custom Scrollbar for Carousel */
.grid::-webkit-scrollbar {
    height: 8px;
}
.grid::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.05);
    border-radius: 4px;
}
.grid::-webkit-scrollbar-thumb {
    background-color: var(--secondary);
    border-radius: 4px;
}

.card {
    flex: 0 0 calc(33.333% - 1.35rem);
    scroll-snap-align: start;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.05);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.12);
}

.card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.card-body {
    padding: 1.5rem;
    text-align: center;
}

.card-body h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.card-body p {
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.price {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--green);
    margin-bottom: 1rem;
}

/* Builder */
.colorful-bg {
    background: linear-gradient(135deg, #fcf4f5 0%, #f4d8d8 100%);
}

.builder-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: start;
}

.flowers-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
}

.flower-item {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: var(--transition);
    border: 2px solid transparent;
}

.flower-item:hover {
    transform: scale(1.03);
    border-color: var(--accent);
}

.flower-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.flower-item h4 {
    margin-bottom: 0.25rem;
    font-size: 1.1rem;
    color: var(--text-dark);
}

.flower-price {
    color: var(--green);
    font-weight: 600;
}

.flower-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 1rem;
    gap: 0.5rem;
}

.qty-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: var(--bg-light);
    color: var(--primary);
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

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

.qty-display {
    font-weight: 600;
    width: 20px;
}

.cart-summary {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: var(--shadow);
    position: sticky;
    top: 100px;
}

.cart-summary h3 {
    border-bottom: 2px solid var(--bg-light);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.cart-items {
    list-style: none;
    margin-bottom: 1.5rem;
    max-height: 300px;
    overflow-y: auto;
}

.cart-items li {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px dashed #eee;
}

.empty-cart {
    color: var(--text-muted);
    font-style: italic;
    border: none !important;
}

.cart-totals {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 10px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.grand-total {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    border-top: 2px solid white;
    padding-top: 1rem;
    margin-top: 0.5rem;
}

/* Contacto */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.contact-list {
    list-style: none;
    margin-top: 1.5rem;
}

.contact-list li {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

/* Footer */
footer {
    background: var(--text-dark);
    color: white;
    padding: 2rem 0;
}

/* Responsive */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        padding: 1rem;
    }
    nav {
        margin-top: 1rem;
    }
    nav a {
        margin: 0 1rem;
    }
    .hero-content h1 {
        font-size: 2.5rem;
    }
    .builder-container {
        grid-template-columns: 1fr;
    }
    .contact-grid {
        grid-template-columns: 1fr;
    }
    .grid {
        gap: 1rem;
    }
    .card {
        flex: 0 0 85%; /* Muestra un producto y un "trocito" del siguiente para incitar a deslizar */
        scroll-snap-align: center;
    }
}

/* Formulario de Contacto */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-group input, .form-group textarea {
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-family: var(--font-body);
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 5px rgba(125, 32, 56, 0.3);
}

/* Chatbot Styles */
.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.chat-button {
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-button:hover {
    transform: scale(1.1);
    background-color: var(--accent);
}

.chat-window {
    background: white;
    width: 350px;
    height: 450px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin-bottom: 15px;
    display: none;
    border: 1px solid rgba(0,0,0,0.1);
}

.chat-window.active {
    display: flex;
}

.chat-header {
    background: var(--primary);
    color: white;
    padding: 1rem;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-chat {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.chat-messages {
    flex-grow: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--bg-light);
}

.message {
    padding: 10px 15px;
    border-radius: 15px;
    max-width: 85%;
    word-wrap: break-word;
    font-size: 0.95rem;
}

.message.bot {
    background: white;
    align-self: flex-start;
    border-bottom-left-radius: 5px;
    border: 1px solid #eee;
}

.message.user {
    background: var(--primary);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 5px;
}

.chat-input {
    display: flex;
    padding: 10px;
    border-top: 1px solid #eee;
    background: white;
}

.chat-input input {
    flex-grow: 1;
    border: 1px solid #ccc;
    padding: 10px;
    border-radius: 20px;
    margin-right: 10px;
    outline: none;
}

.chat-input button {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.chat-input button:hover {
    background: var(--accent);
}

/* WhatsApp Button */
.whatsapp-button {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
    background-color: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-decoration: none;
}

.whatsapp-button:hover {
    transform: scale(1.1);
    background-color: #1ebe57;
    color: white;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

/* ==========================================================================
   ADAPTACIÓN PARA TELÉFONOS MÓVILES
   ========================================================================== */
@media (max-width: 900px) {
    header {
        flex-direction: column;
        align-items: center;
        padding: 0.75rem 1rem 0.5rem;
        gap: 0.5rem;
    }

    .card img {
    width: 100%;
    height: 190px;
    max-height: 190px;
    object-fit: contain !important;
    background-color: #faf5f6;
    padding: 6px;
    display: block;
    }

    .card-body {
    padding: 1rem 1.25rem 1.25rem;
    text-align: center;
    }

    .logo {
        font-size: 1.4rem;
    }

    #dynamic-nav {
        display: flex;
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        gap: 0.5rem;
        padding: 0.3rem 0.5rem 0.5rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    #dynamic-nav::-webkit-scrollbar {
        display: none;
    }

    nav a {
        margin-left: 0;
        font-size: 0.85rem;
        padding: 0.35rem 0.85rem;
        background: #fdf4f5;
        border: 1px solid #f3d7dc;
        border-radius: 20px;
        color: var(--primary);
        display: inline-block;
        flex-shrink: 0;
    }

    nav a:hover, nav a:active {
        background: var(--primary);
        color: white;
    }

    .hero-content h1 {
        font-size: 2.2rem;
        line-height: 1.2;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .builder-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .cart-summary {
        position: static;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .section {
        padding: 3.5rem 0;
        scroll-margin-top: 110px;
    }
}

