/* ========================================
   DulcesSiSaFashion - Minimalist Professional Styling
   ======================================== */

/* ========== Design System ========== */
:root {
    /* Color Palette */
    --primary-rose: #E8B4B8;
    --primary-rose-dark: #D4A5A5;
    --secondary-cream: #FAF6F1;
    --secondary-beige: #F5E6D3;
    --accent-deep-rose: #C67C7C;
    --text-primary: #333333;
    --text-secondary: #666666;
    --white: #FFFFFF;
    --overlay-dark: rgba(0, 0, 0, 0.5);

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ========== Reset & Base ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    /* Sin scroll suave global: evita saltos no deseados y el usuario controla el desplazamiento */
    scroll-behavior: auto;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Prevent scroll when modal is open */
body.modal-open {
    overflow: hidden;
}

/* ========== Typography ========== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Playfair Display', serif;
    line-height: 1.2;
    font-weight: 700;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

p {
    font-size: clamp(1rem, 2vw, 1.125rem);
}

/* Ancla #cta-whatsapp: menú «Presupuesto» y hero — el nav sticky no tapa el botón */
#cta-whatsapp {
    scroll-margin-top: 5.5rem;
}

@media (max-width: 768px) {
    #cta-whatsapp {
        scroll-margin-top: 4.75rem;
    }
}

/* ========== Video Slider Enhancements ========== */
#hero {
    position: relative;
    /* Altura base escritorio; mediaqueries la reducen en móvil */
    height: 600px;
    overflow: hidden;
    margin: 0;
    padding: 0;
    /* 1 px negativo para cerrar el subpíxel entre la nav sticky y el hero */
    margin-top: -1px;
    background-color: #0f0a14;
    transition: background 1s ease;
}

/* El contenedor de slides ocupa exactamente el hero, sin gaps */
#hero #video-slides {
    position: absolute;
    inset: 0;          /* top:0; right:0; bottom:0; left:0 */
    overflow: hidden;
    margin: 0;
    padding: 0;
}

/* Cada slide ocupa también todo el contenedor */
.video-slide {
    position: absolute;
    inset: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

/* El vídeo rellena el slide de esquina a esquina, sin hueco */
.video-slide video {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    opacity: 0.85;
}

/* La capa de texto queda por encima del vídeo */
.video-slide > div.absolute {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========== CTA Button Animation ========== */
@keyframes ctaPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(232, 180, 184, 0.7);
        transform: scale(1);
    }

    50% {
        box-shadow: 0 0 0 20px rgba(232, 180, 184, 0);
        transform: scale(1.05);
    }
}

.cta-button {
    animation: ctaPulse 2s infinite;
    transition: all var(--transition-normal);
}

.cta-button:hover {
    transform: scale(1.1) !important;
    box-shadow: var(--shadow-lg) !important;
}

/* ========== Modal/Popup Styles ========== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 9998;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius-lg);
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding: var(--space-2xl);
    position: relative;
    transform: scale(0.9);
    transition: transform var(--transition-normal);
    box-shadow: var(--shadow-lg);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    background: var(--text-secondary);
    color: var(--white);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-fast);
    z-index: 10;
}

.modal-close:hover {
    background: var(--text-primary);
}

/* ========== Cake Gallery Slider ========== */
.cake-slider-container {
    position: relative;
    overflow: hidden;
    padding: var(--space-xl) 0;
}

.cake-slider {
    display: flex;
    gap: var(--space-md);
    transition: transform var(--transition-slow);
    touch-action: pan-y;
    cursor: grab;
    -webkit-user-select: none;
    user-select: none;
}

.cake-slider.cake-slider-dragging {
    cursor: grabbing;
}

.cake-card {
    flex: 0 0 calc(25% - var(--space-md));
    cursor: pointer;
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

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

.cake-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    -webkit-user-drag: none;
    pointer-events: none;
}

@media (max-width: 1024px) {
    .cake-card {
        flex: 0 0 calc(33.333% - var(--space-md));
    }
}

@media (max-width: 768px) {
    .cake-card {
        flex: 0 0 calc(50% - var(--space-md));
    }

    .cake-card img {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .cake-card {
        flex: 0 0 100%;
    }
}

/* ========== Slider Dots — círculos iguales en móvil y escritorio ========== */
.slider-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: var(--space-md);
    padding: 10px 16px 20px;
    max-width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.slider-dots::-webkit-scrollbar {
    display: none;
}

/* Botón táctil con área mínima de 44px para facilitar el toque */
.slider-dot {
    flex: 0 0 auto;
    box-sizing: border-box;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    font: inherit;
    color: inherit;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: opacity 0.2s ease;
}

/* El punto visual: círculo perfecto, no estirado */
.slider-dot::before {
    content: '';
    display: block;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: rgba(180, 120, 120, 0.28);
    box-shadow: 0 0 0 1.5px rgba(180, 120, 120, 0.18);
    transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
    flex-shrink: 0;
}

.slider-dot:hover::before {
    background: rgba(180, 120, 120, 0.45);
}

.slider-dot:focus-visible {
    outline: 2px solid rgba(198, 124, 124, 0.5);
    outline-offset: 2px;
    border-radius: 50%;
}

/* Punto activo: más grande y con color de marca */
.slider-dot.active::before {
    width: 15px;
    height: 15px;
    background: var(--accent-deep-rose);
    box-shadow: 0 2px 6px rgba(198, 124, 124, 0.4);
    transform: scale(1);
}

.slider-dot.active:hover::before {
    background: #b86a6a;
}

/* ========== Video Modal ========== */
.video-modal .modal-content {
    max-width: 900px;
    padding: var(--space-lg);
}

.video-modal video {
    width: 100%;
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
}

.video-description {
    line-height: 1.8;
    color: var(--text-secondary);
}

/* ========== Testimonial Popups (móvil: overrides abajo; escritorio: estilos base) ========== */
.testimonial-popup {
    position: fixed;
    left: var(--space-lg);
    bottom: 100px;
    width: 320px;
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    z-index: 9000;
    opacity: 0;
    transform: translateX(-110%);
    transition: all 0.3s ease;
}

.testimonial-popup.show {
    opacity: 1;
    transform: translateX(0);
}

.testimonial-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.testimonial-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.85rem;
}

.testimonial-close {
    background: none;
    border: none;
    font-size: 1rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition-fast);
    flex-shrink: 0;
}

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

.testimonial-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.testimonial-rating {
    color: #FFD700;
    font-size: 0.75rem;
}

.testimonial-event {
    font-size: 0.72rem;
    color: var(--primary-rose-dark);
    font-weight: 500;
}

.testimonial-text {
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.5;
    margin-bottom: 0.4rem;
}

.testimonial-disclaimer {
    font-size: 0.6rem;
    color: #9ca3af;
    font-weight: 400;
    margin: 0;
    opacity: 0.7;
    font-style: italic;
}

@media (max-width: 768px) {
    .testimonial-popup {
        display: block !important;
        visibility: visible !important;
        pointer-events: auto !important;
        /* Pie de pantalla: franja baja, no tapa CTAs ni el FAB WhatsApp (hueco a la derecha) */
        left: 8px;
        right: calc(68px + env(safe-area-inset-right, 0px));
        bottom: calc(10px + env(safe-area-inset-bottom, 0px));
        top: auto;
        width: auto;
        max-width: none;
        padding: 5px 7px 5px 8px;
        border-radius: 10px;
        box-shadow: 0 -2px 14px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.06);
        border: 1px solid rgba(236, 72, 153, 0.12);
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        z-index: 28;
        /* Entra desde abajo (estilo aviso de pie), no desde el lateral */
        transform: translateY(calc(100% + 20px));
        overflow: hidden;
    }

    .testimonial-popup.show {
        transform: translateY(0);
    }

    .testimonial-name {
        font-size: 0.58rem;
        line-height: 1.15;
    }

    .testimonial-text {
        font-size: 0.54rem;
        line-height: 1.28;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
        line-clamp: 3;
        overflow: hidden;
        margin: 0;
    }

    .testimonial-rating {
        font-size: 0.48rem;
    }

    .testimonial-event {
        font-size: 0.46rem;
    }

    .testimonial-meta {
        gap: 2px;
        margin-bottom: 2px;
        flex-wrap: wrap;
    }

    .testimonial-header {
        margin-bottom: 1px;
    }

    .testimonial-close {
        width: 15px;
        height: 15px;
        font-size: 0.72rem;
    }
}

/* ========== Scroll to Top Button ========== */
.scroll-top-btn {
    position: fixed;
    bottom: 120px;
    /* Higher up to avoid WhatsApp button */
    right: 32px;
    width: 56px;
    height: 56px;
    background: var(--accent-deep-rose);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: scale(0);
    transition: all var(--transition-normal);
    z-index: 9999;
}

.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.scroll-top-btn:hover {
    background: var(--primary-rose-dark);
    transform: scale(1.1);
}

/* ========== WhatsApp Pre-Message Popup ========== */
.whatsapp-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-lg);
    z-index: 10000;
    max-width: 400px;
    width: 90%;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.whatsapp-popup.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.whatsapp-popup h3 {
    color: var(--accent-deep-rose);
    margin-bottom: var(--space-md);
    font-size: 1.5rem;
}

.whatsapp-popup p {
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
    line-height: 1.8;
}

.whatsapp-popup-buttons {
    display: flex;
    gap: var(--space-md);
}

.whatsapp-popup-buttons button {
    flex: 1;
    padding: var(--space-md) var(--space-lg);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 600;
    transition: all var(--transition-fast);
}

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

.btn-continue:hover {
    background: #20BA5A;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-cancel {
    background: var(--secondary-cream);
    color: var(--text-secondary);
}

.btn-cancel:hover {
    background: var(--secondary-beige);
}

/* ========== Legal Pages Modal ========== */
.legal-modal .modal-content {
    max-width: 800px;
}

.legal-content {
    line-height: 1.8;
}

.legal-content h2 {
    margin-top: var(--space-xl);
    margin-bottom: var(--space-md);
    color: var(--accent-deep-rose);
}

.legal-content h3 {
    margin-top: var(--space-lg);
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
}

.legal-content p {
    margin-bottom: var(--space-md);
    color: var(--text-secondary);
}

.legal-content ul {
    margin-left: var(--space-xl);
    margin-bottom: var(--space-md);
}

.legal-content ul li {
    margin-bottom: var(--space-sm);
    color: var(--text-secondary);
}

/* ========== Utility Classes ========== */
.section-padding {
    padding: var(--space-3xl) var(--space-lg);
}

@media (max-width: 768px) {
    .section-padding {
        padding: var(--space-2xl) var(--space-md);
    }
}

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

.hidden {
    display: none !important;
}

/* ========== Accessibility ========== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus styles for keyboard navigation */
button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--accent-deep-rose);
    outline-offset: 2px;
}

/* ========== Hamburger Menu (Mobile & Tablet) ========== */

#mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    flex-shrink: 0;
    transition: background 0.2s ease;
}

#mobile-menu-btn:hover {
    background: rgba(236, 72, 153, 0.08);
}

#mobile-menu-btn .bar {
    display: block;
    width: 24px;
    height: 2px;
    background: #374151;
    border-radius: 2px;
    transition: all 0.3s ease;
    margin: 5px 0;
}

#mobile-menu-btn.open .bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

#mobile-menu-btn.open .bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

#mobile-menu-btn.open .bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile dropdown animation via max-height */
#mobile-menu {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.35s ease, opacity 0.3s ease;
}

#mobile-menu.open {
    max-height: 320px;
    opacity: 1;
}

.mobile-menu a {
    display: block;
    padding: 0.65rem 0;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
    font-weight: 500;
    transition: color 0.2s ease, padding-left 0.2s ease;
}

.mobile-menu a:last-child {
    border-bottom: none;
}

.mobile-menu a:hover {
    color: #ec4899;
    padding-left: 6px;
}

/* Brand name responsive */
.brand-name {
    font-size: clamp(1.1rem, 3.5vw, 2rem);
    white-space: nowrap;
    flex-shrink: 0;
}

/* ========== TABLET (768px - 1023px): hamburger ========== */
@media (max-width: 1023px) {
    #mobile-menu-btn {
        display: block;
    }
}

/* ========== DESKTOP (1024px+): keep original ========== */
@media (min-width: 1024px) {

    /* Ocultar hamburguesa y menu mobile */
    #mobile-menu-btn {
        display: none !important;
    }

    #mobile-menu {
        display: none !important;
    }

    /* Restaurar menu de navegacion desktop (anula .hidden de custom CSS) */
    nav .hidden {
        display: revert;
    }

    nav .hidden.md\:flex,
    nav div.hidden {
        display: flex !important;
    }

    nav a.hidden {
        display: inline-flex !important;
    }

    /* Ocultar CTA y botones solo-mobile en desktop */
    nav .md\:hidden {
        display: none !important;
    }
}

/* ========== Hero - Mobile & Tablet ========== */
@media (max-width: 1023px) {
    #hero {
        height: 440px;
    }

    #hero h1 {
        font-size: clamp(1.6rem, 5.5vw, 2.8rem) !important;
        line-height: 1.2 !important;
        margin-bottom: 1rem !important;
    }

    #hero p {
        font-size: clamp(0.9rem, 3vw, 1.1rem) !important;
        margin-bottom: 1.5rem !important;
    }

    #hero a {
        font-size: clamp(0.85rem, 2.8vw, 1rem) !important;
        padding: 10px 22px !important;
    }

    #hero .max-w-4xl {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

@media (max-width: 480px) {
    #hero {
        height: 360px;
    }

    #hero h1 {
        font-size: clamp(1.3rem, 6vw, 1.8rem) !important;
    }

    #hero p {
        font-size: 0.85rem !important;
    }
}

/* Móvil: puntos visibles pero un poco más compactos (mismo estilo que escritorio) */
@media (max-width: 767px) {
    .slider-dots {
        gap: 10px;
        padding: 8px 12px 16px;
    }
}

/* ========== Navigation - Mobile ========== */
@media (max-width: 1023px) {
    .brand-name {
        font-size: clamp(0.95rem, 3.5vw, 1.3rem) !important;
    }
}

/* ========== Especialidades - Mobile ========== */
@media (max-width: 767px) {
    #especialidades .grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    #especialidades [class*="p-8"] {
        padding: 1.25rem !important;
    }
}

/* ========== Cake Gallery Slider ========== */
@media (max-width: 1023px) {
    .cake-card {
        flex: 0 0 calc(33.333% - var(--space-md));
    }
}

@media (max-width: 767px) {
    .cake-card {
        flex: 0 0 calc(50% - var(--space-md));
    }

    .cake-card img {
        height: 180px;
    }
}

@media (max-width: 480px) {
    .cake-card {
        flex: 0 0 calc(100% - var(--space-md));
    }

    .cake-card img {
        height: 220px;
    }
}

/* ========== Pedido / CTA Section - Mobile ========== */
@media (max-width: 767px) {
    #pedido h2 {
        font-size: clamp(1.75rem, 6vw, 2.5rem) !important;
    }

    #pedido .grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    #pedido .flex.gap-4 {
        flex-direction: column !important;
        gap: 0.75rem !important;
    }
}

/* ========== Modal - Mobile ========== */
@media (max-width: 767px) {
    .modal-content {
        max-width: 96% !important;
        max-height: 85vh !important;
        padding: 1.25rem !important;
        border-radius: 12px !important;
    }

    .video-modal .modal-content {
        padding: 1rem !important;
    }

    .modal-close {
        top: 0.6rem !important;
        right: 0.6rem !important;
        width: 30px !important;
        height: 30px !important;
        font-size: 1.1rem !important;
    }

    .whatsapp-popup {
        max-width: 92% !important;
        padding: 1.25rem !important;
    }

    .whatsapp-popup-buttons {
        flex-direction: column !important;
    }
}

/* Pantallas muy estrechas: mismo pie, un poco más ajustado al FAB */
@media (max-width: 380px) {
    .testimonial-popup {
        left: 6px !important;
        right: calc(64px + env(safe-area-inset-right, 0px)) !important;
        bottom: calc(8px + env(safe-area-inset-bottom, 0px)) !important;
        padding: 4px 6px !important;
        border-radius: 9px !important;
    }

    .testimonial-name {
        font-size: 0.54rem !important;
    }

    .testimonial-text {
        font-size: 0.5rem !important;
        line-height: 1.22 !important;
        -webkit-line-clamp: 3 !important;
        line-clamp: 3 !important;
    }

    .testimonial-rating {
        font-size: 0.44rem !important;
    }

    .testimonial-event {
        font-size: 0.42rem !important;
    }
}

/* ========== Floating Buttons - Mobile ========== */
@media (max-width: 767px) {
    .floating-whatsapp {
        width: 52px !important;
        height: 52px !important;
        bottom: 16px !important;
        right: 16px !important;
        font-size: 1.4rem !important;
    }

    .scroll-top-btn {
        width: 44px !important;
        height: 44px !important;
        bottom: 82px !important;
        right: 16px !important;
        font-size: 1.1rem !important;
    }
}

/* ========== Global Sections - Mobile ========== */
@media (max-width: 767px) {
    section {
        padding-top: 2.5rem !important;
        padding-bottom: 2.5rem !important;
    }

    .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    section h2 {
        font-size: clamp(1.5rem, 5.5vw, 2rem) !important;
        margin-bottom: 0.75rem !important;
    }

    .mb-16 {
        margin-bottom: 2rem !important;
    }
}

/* ========== Typography - Mobile ========== */
@media (max-width: 640px) {
    h2 {
        font-size: 1.6rem !important;
    }

    h3 {
        font-size: 1.25rem !important;
    }

    p {
        font-size: 0.92rem !important;
        line-height: 1.6 !important;
    }
}

/* ========== Print Styles ========== */
@media print {

    .floating-whatsapp,
    .scroll-top-btn,
    .testimonial-popup,
    nav {
        display: none !important;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== Scroll Animations — GPU-accelerated, sin layout thrashing ========== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

.animate-on-scroll.slide-left {
    transform: translateX(-40px);
    opacity: 0;
}

.animate-on-scroll.slide-right {
    transform: translateX(40px);
    opacity: 0;
}

.animate-on-scroll.slide-left.animated,
.animate-on-scroll.slide-right.animated {
    transform: translateX(0);
    opacity: 1;
}

.animate-on-scroll.zoom-in {
    transform: scale(0.91);
    opacity: 0;
}

.animate-on-scroll.zoom-in.animated {
    transform: scale(1);
    opacity: 1;
}

.animate-on-scroll.fade-up-sm {
    transform: translateY(16px);
    opacity: 0;
}

.animate-on-scroll.fade-up-sm.animated {
    transform: translateY(0);
    opacity: 1;
}

/* Stagger delays para grids y listas */
.animate-on-scroll[data-delay="0"]   { transition-delay: 0ms; }
.animate-on-scroll[data-delay="80"]  { transition-delay: 80ms; }
.animate-on-scroll[data-delay="120"] { transition-delay: 120ms; }
.animate-on-scroll[data-delay="160"] { transition-delay: 160ms; }
.animate-on-scroll[data-delay="200"] { transition-delay: 200ms; }
.animate-on-scroll[data-delay="240"] { transition-delay: 240ms; }
.animate-on-scroll[data-delay="320"] { transition-delay: 320ms; }

/* Accesibilidad: sin animaciones si el usuario las desactiva */
@media (prefers-reduced-motion: reduce) {
    .animate-on-scroll {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ========== FAQ Section ========== */
.faq-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.faq-item {
    background: var(--white);
    border: 1.5px solid #f3e8ed;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-normal), border-color var(--transition-normal);
}

.faq-item:hover,
.faq-item.open {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-rose);
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    padding: 20px 24px;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    font-family: 'Poppins', sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: color var(--transition-fast), background var(--transition-fast);
}

.faq-question:hover {
    color: var(--accent-deep-rose);
    background: #fdf5f7;
}

.faq-item.open .faq-question {
    color: var(--accent-deep-rose);
    background: #fdf5f7;
}

.faq-icon {
    flex-shrink: 0;
    color: var(--accent-deep-rose);
    font-size: 0.85rem;
    transition: transform var(--transition-normal);
}

.faq-item.open .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4,0,0.2,1), padding 0.4s ease;
    padding: 0 24px;
}

.faq-item.open .faq-answer {
    max-height: 400px;
    padding: 0 24px 20px;
}

.faq-answer p {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 0.97rem;
}

@media (max-width: 768px) {
    .faq-question {
        padding: 16px 18px;
        font-size: 0.95rem;
    }

    .faq-answer {
        padding: 0 18px;
    }

    .faq-item.open .faq-answer {
        padding: 0 18px 16px;
    }
}

/* ========== Google Maps Section ========== */
.map-wrapper {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.map-click-link {
    display: block;
    position: relative;
    text-decoration: none;
}

.map-click-link iframe {
    display: block;
    pointer-events: none;
}

.map-overlay-btn {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #ec4899, #e11d48);
    color: white;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    font-family: 'Poppins', sans-serif;
    box-shadow: 0 4px 20px rgba(236, 72, 153, 0.45);
    transition: all var(--transition-normal);
    white-space: nowrap;
    pointer-events: none;
}

.map-click-link:hover .map-overlay-btn {
    background: linear-gradient(135deg, #db2777, #be123c);
    transform: translateX(-50%) translateY(-3px);
    box-shadow: 0 8px 28px rgba(236, 72, 153, 0.5);
}

@media (max-width: 768px) {
    .map-wrapper iframe {
        height: 300px !important;
    }

    .map-overlay-btn {
        font-size: 0.85rem;
        padding: 10px 20px;
    }
}

/* ========== Cookie Banner GDPR ========== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    background: rgba(17, 17, 17, 0.97);
    color: white;
    padding: 18px 24px;
    transform: translateY(100%);
    transition: transform 0.45s cubic-bezier(0.4,0,0.2,1);
    backdrop-filter: blur(8px);
    border-top: 2px solid rgba(236, 72, 153, 0.5);
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.cookie-text {
    flex: 1;
    min-width: 240px;
}

.cookie-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 4px;
    color: #f9a8d4;
}

.cookie-text p {
    font-size: 0.88rem;
    color: #d1d5db;
    line-height: 1.5;
    margin: 0;
}

.cookie-link {
    background: none;
    border: none;
    color: #f9a8d4;
    cursor: pointer;
    text-decoration: underline;
    font-size: inherit;
    padding: 0;
    font-family: inherit;
}

.cookie-link:hover {
    color: #fbcfe8;
}

.cookie-buttons {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.btn-accept-cookies {
    background: linear-gradient(135deg, #ec4899, #e11d48);
    color: white;
    border: none;
    padding: 10px 22px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: 'Poppins', sans-serif;
}

.btn-accept-cookies:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(236, 72, 153, 0.4);
}

.btn-reject-cookies {
    background: transparent;
    color: #9ca3af;
    border: 1.5px solid #4b5563;
    padding: 10px 18px;
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: 'Poppins', sans-serif;
}

.btn-reject-cookies:hover {
    border-color: #9ca3af;
    color: white;
}

.btn-customize-cookies {
    background: transparent;
    color: #f9a8d4;
    border: 1.5px solid #ec4899;
    padding: 10px 18px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: 'Poppins', sans-serif;
}

.btn-customize-cookies:hover {
    background: rgba(236, 72, 153, 0.12);
    color: white;
}

/* ===== Cookie Customizer Modal ===== */
.cookie-customizer-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(0, 0, 0, 0.72);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.cookie-customizer-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.cookie-customizer-modal {
    background: #1a1a2e;
    border: 1.5px solid rgba(236, 72, 153, 0.4);
    border-radius: 20px;
    width: min(520px, 92vw);
    max-height: 88vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

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

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

.cookie-customizer-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #f9a8d4;
    margin: 0;
}

.cookie-customizer-close {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 1.6rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
    transition: color 0.2s;
}

.cookie-customizer-close:hover {
    color: white;
}

.cookie-customizer-body {
    padding: 16px 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.cookie-option {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    background: rgba(255,255,255,0.04);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.06);
}

.cookie-option-info strong {
    display: block;
    color: #f1f5f9;
    font-size: 0.92rem;
    margin-bottom: 4px;
}

.cookie-option-info p {
    font-size: 0.8rem;
    color: #9ca3af;
    margin: 0;
    line-height: 1.45;
}

/* Toggle switch */
.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
    flex-shrink: 0;
    cursor: pointer;
}

.cookie-toggle.disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.cookie-slider {
    position: absolute;
    inset: 0;
    background: #374151;
    border-radius: 26px;
    transition: background 0.25s;
}

.cookie-slider::before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: transform 0.25s;
}

.cookie-toggle input:checked + .cookie-slider {
    background: #ec4899;
}

.cookie-toggle input:checked + .cookie-slider::before {
    transform: translateX(20px);
}

.cookie-customizer-footer {
    display: flex;
    gap: 12px;
    padding: 16px 24px 22px;
    border-top: 1px solid rgba(255,255,255,0.08);
    flex-wrap: wrap;
}

.btn-save-cookies {
    flex: 1;
    background: linear-gradient(135deg, #ec4899, #e11d48);
    color: white;
    border: none;
    padding: 11px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: 'Poppins', sans-serif;
}

.btn-save-cookies:hover {
    box-shadow: 0 4px 16px rgba(236, 72, 153, 0.45);
    transform: translateY(-1px);
}

.btn-accept-all-modal {
    background: transparent;
    color: #f9a8d4;
    border: 1.5px solid #ec4899;
    padding: 11px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: 'Poppins', sans-serif;
}

.btn-accept-all-modal:hover {
    background: rgba(236, 72, 153, 0.12);
    color: white;
}

/* ===== Legal footer links - horizontal row ===== */
.legal-links-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 4px;
}

.legal-footer-btn {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: 0.82rem;
    padding: 2px 0;
    font-family: 'Poppins', sans-serif;
    transition: color 0.2s;
    text-align: left;
}

.legal-footer-btn:hover {
    color: #f472b6;
}

.legal-sep {
    color: #4b5563;
    font-size: 0.8rem;
    line-height: 1;
}

/* ========== Mobile ≤768px — bloque único consolidado ========== */
@media (max-width: 768px) {
    /* Cookie banner */
    .cookie-content {
        flex-direction: column;
        gap: 14px;
        align-items: flex-start;
    }
    .cookie-buttons {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 8px;
    }
    .cookie-banner { padding: 16px 18px; }
    .btn-customize-cookies { font-size: 0.82rem; padding: 9px 14px; }

    /* Hero texto */
    #hero h1 { font-size: clamp(1.75rem, 6vw, 2.5rem) !important; line-height: 1.2; }
    #hero p  { font-size: clamp(0.9rem, 3vw, 1.1rem) !important; }
    #hero a  { font-size: clamp(0.9rem, 3vw, 1rem) !important; padding: 12px 24px !important; }

    /* Nav */
    nav { padding: 0 !important; }
    nav .container { padding-left: 1rem !important; padding-right: 1rem !important; }
    .brand-name { font-size: 1.25rem !important; flex-shrink: 0; }
    nav a[href="#pedido"].md\\:hidden { padding: 0.375rem 0.75rem !important; font-size: 0.75rem !important; white-space: nowrap; }
    nav a[href="#pedido"].md\\:hidden i { font-size: 0.75rem !important; }
    #mobile-menu-btn { flex-shrink: 0; }

    /* Botones flotantes */
    .floating-whatsapp { width: 56px !important; height: 56px !important; bottom: 20px !important; right: 20px !important; font-size: 1.5rem !important; }
    .scroll-top-btn { width: 48px !important; height: 48px !important; bottom: 90px !important; right: 20px !important; font-size: 1.2rem !important; }

    /* Secciones */
    section { padding-top: 3rem !important; padding-bottom: 3rem !important; }
    .container { padding-left: 1.5rem !important; padding-right: 1.5rem !important; }

    /* Modales */
    .modal-content { max-width: 95% !important; padding: 1.5rem !important; }
    .whatsapp-popup { max-width: 90% !important; padding: 1.5rem !important; }
}

/* ========== Extra small ≤480px ========== */
@media (max-width: 480px) {
    .brand-name { font-size: 1.1rem !important; }
    nav a[href="#pedido"].md\\:hidden { padding: 0.3rem 0.6rem !important; font-size: 0.7rem !important; }
    nav a[href="#pedido"].md\\:hidden span { font-size: 0.7rem !important; }
}

/* ========== Tipografía ≤640px ========== */
@media (max-width: 640px) {
    h2 { font-size: 1.75rem !important; }
    h3 { font-size: 1.35rem !important; }
    p  { font-size: 0.95rem !important; }
}

/* ========== Print ========== */
@media print {
    .floating-whatsapp,
    .scroll-top-btn,
    .testimonial-popup,
    nav { display: none !important; }
}