/* ============================================
   DULCES MAZZA - ESTILOS PRINCIPALES
   Organización por secciones para mantenimiento
   ============================================ */

/* ============================================
   01. VARIABLES CSS
   ============================================ */
:root {
    /* Fondo principal */
    --fondo: #f5f0e8;
    --fondo-oscuro: #e8e0d5;
    --fondo-card: #ffffff;
    --fondo-card-alt: var(--fondo-card-alt);

    /* Colores principales */
    --salmon: #d4898f;
    --rosa: #0b9588d4;
    --amarillo: #dcae1a;
    --blanco: #ffffff;
    --dark: #3d3d3d;
    --dark-alt: #555555;
    --gray: #666666;
    --gray-light: #888888;

    /* Texto */
    --texto: #3d3d3d;
    --texto-claro: #555555;
    --texto-gris: #777777;

    /* Colores con opacidad */
    --salmon-10: rgba(212, 137, 143, 0.1);
    --salmon-15: rgba(212, 137, 143, 0.15);
    --salmon-20: rgba(212, 137, 143, 0.2);
    --salmon-30: rgba(212, 137, 143, 0.3);
    --salmon-40: rgba(212, 137, 143, 0.4);

    /* Fondos alternativos */
    --dark-hero: #e8e0d5;
    --dark-card: #ffffff;
    --dark-footer: #3d3d3d;

    /* WhatsApp */
    --whatsapp: #25D366;
    --whatsapp-dark: #128C7E;
    --whatsapp-shadow-30: rgba(37, 211, 102, 0.3);
    --whatsapp-shadow-40: rgba(37, 211, 102, 0.4);

    /* Sombras */
    --sombra-10: rgba(0, 0, 0, 0.05);
    --sombra-20: rgba(0, 0, 0, 0.08);
    --sombra-30: rgba(0, 0, 0, 0.12);
    --sombra-40: rgba(0, 0, 0, 0.15);
    --sombra-50: rgba(0, 0, 0, 0.2);

    /* Bordes */
    --borde-claro-03: rgba(0, 0, 0, 0.03);
    --borde-claro-05: rgba(0, 0, 0, 0.05);
    --borde-claro-08: rgba(0, 0, 0, 0.08);
    --borde-claro-10: rgba(0, 0, 0, 0.1);
    --borde-claro-15: rgba(0, 0, 0, 0.15);

    /* Fondo modal */
    --fondo-modal: rgba(245, 240, 232, 0.97);
}

/* ============================================
   02. ESTILOS BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', system-ui, sans-serif;
    background: var(--fondo);
    color: var(--texto);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

a, button {
    -webkit-tap-highlight-color: transparent;
}

/* ============================================
   03. ANIMACIONES
   ============================================ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes loaderRotate {
    0% { opacity: 0; transform: scale(0.5) rotate(0deg); }
    20% { opacity: 1; transform: scale(1) rotate(0deg); }
    80% { opacity: 1; transform: scale(1) rotate(180deg); }
    100% { opacity: 0; transform: scale(0.5) rotate(180deg); }
}

@keyframes loaderDots {
    0% { content: ''; }
    25% { content: '.'; }
    50% { content: '..'; }
    75% { content: '...'; }
    100% { content: ''; }
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-80px * 10)); }
}

/* ============================================
   04. HERO SECTION
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(180deg, var(--fondo) 0%, var(--dark-hero) 100%);
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at 50% 30%, var(--salmon-15) 0%, transparent 60%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: fadeInUp 0.8s ease-out both;
}

.hero-icon img {
    width: 120px;
    height: 120px;
    object-fit: contain;
}

.hero h1 {
    font-family: 'Cinzel', serif;
    font-size: 3rem;
    font-weight: 500;
    margin-bottom: 15px;
    letter-spacing: 6px;
    animation: fadeInUp 0.8s ease-out 0.1s both;
    color: var(--texto);
}

.hero h1 span {
    color: var(--salmon);
}

.hero p {
    font-size: 1.1rem;
    color: var(--texto-claro);
    max-width: 500px;
    margin: 0 auto 35px;
    line-height: 1.8;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-cta {
    display: inline-block;
    padding: 16px 45px;
    background: var(--salmon);
    color: var(--blanco);
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    animation: fadeInUp 0.8s ease-out 0.3s both;
    border-radius: 30px;
}

.hero-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px var(--salmon-40);
}

.hero-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 35px;
    background: linear-gradient(135deg, var(--whatsapp) 0%, var(--whatsapp-dark) 100%);
    color: var(--blanco);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-radius: 30px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px var(--whatsapp-shadow-30);
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

.hero-whatsapp:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px var(--whatsapp-shadow-40);
}

/* ============================================
   05. ESTILOS GENERALES DE SECCIONES
   ============================================ */
.section {
    padding: 80px 20px;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    font-family: 'Cinzel', serif;
    font-size: 2.2rem;
    color: var(--texto);
    margin-bottom: 15px;
    letter-spacing: 3px;
}

.section-subtitle {
    color: var(--texto-gris);
    font-size: 0.95rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ============================================
   06. CATEGORIES SECTION
   ============================================ */
.categories-section {
    background: var(--fondo-oscuro);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.category-card {
    background: linear-gradient(145deg, var(--fondo-card) 0%, var(--fondo-card-alt) 100%);
    border-radius: 15px;
    padding: 30px 20px;
    text-align: center;
    border: 1px solid var(--borde-claro-08);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    min-height: 180px;
    padding: 25px 15px;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    bottom: 15px;
    border: 1px solid var(--card-color);
    border-radius: 10px;
    opacity: 0.3;
    transition: all 0.3s ease;
}

.category-card:hover::before {
    opacity: 0.6;
}

.category-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--card-color);
}

.category-card:hover {
    transform: translateY(-8px);
    border-color: var(--card-color);
    box-shadow: 0 20px 40px var(--sombra-30);
}

.category-card.salmon { --card-color: var(--salmon); }
.category-card.rosa { --card-color: var(--rosa); }
.category-card.amarillo { --card-color: var(--amarillo); }

.category-name {
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    color: var(--texto);
    margin-bottom: 20px;
    letter-spacing: 2px;
    text-transform: uppercase;
    position: relative;
    z-index: 1;
}

.category-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 25px;
    background: transparent;
    border: 2px solid var(--card-color);
    color: var(--card-color);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 25px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.category-cta:hover {
    background: var(--card-color);
    color: var(--blanco);
    transform: scale(1.05);
}

/* ============================================
   07. SLIDER SECTION
   ============================================ */
.slider-section {
    background: linear-gradient(180deg, var(--fondo) 0%, var(--fondo-oscuro) 50%, var(--fondo) 100%);
    padding: 60px 20px;
    position: relative;
}

.slider-section::before,
.slider-section::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 80px;
    pointer-events: none;
}

.slider-section::before {
    top: 0;
    background: linear-gradient(to bottom, var(--fondo), transparent);
}

.slider-section::after {
    bottom: 0;
    background: linear-gradient(to top, var(--fondo), transparent);
}

.slider-container {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    padding: 20px;
    background: var(--borde-claro-03);
    border-radius: 20px;
    border: 1px solid var(--salmon-15);
    box-shadow: 0 20px 60px var(--sombra-20);
}

.slider-wrapper {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Slider Loader */
.slider-loader {
    min-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

.loader-icons {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
}

.loader-icons i {
    font-size: 2rem;
    color: var(--salmon);
    animation: loaderRotate 2s ease-in-out infinite;
    opacity: 0;
}

.loader-icons i:nth-child(1) { animation-delay: 0s; }
.loader-icons i:nth-child(2) { animation-delay: 0.2s; }
.loader-icons i:nth-child(3) { animation-delay: 0.4s; }
.loader-icons i:nth-child(4) { animation-delay: 0.6s; }
.loader-icons i:nth-child(5) { animation-delay: 0.8s; }

.loader-text {
    font-size: 1.2rem;
    color: var(--texto-gris);
    letter-spacing: 2px;
}

.loader-dots::after {
    content: '';
    animation: loaderDots 1.5s steps(4, end) infinite;
}

.slider-slide {
    min-width: 100%;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-slide img {
    width: 100%;
    max-height: 450px;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 10px 40px var(--sombra-20);
}

.slider-slide img:hover {
    transform: scale(1.03);
        box-shadow: 0 15px 50px var(--salmon-20);
}

.slider-container:hover .slider-wrapper {
    animation-play-state: paused;
}

.slider-nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 25px;
}

.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--borde-claro-10);
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    border: 2px solid transparent;
}

.slider-dot.active {
    background: var(--salmon);
    transform: scale(1.3);
    border-color: var(--salmon-40);
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: var(--salmon-15);
    border: 2px solid var(--salmon-30);
    border-radius: 50%;
    color: var(--salmon);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-arrow:hover {
    background: var(--salmon);
    color: var(--blanco);
    transform: translateY(-50%) scale(1.1);
}

.slider-arrow.prev { left: 15px; }
.slider-arrow.next { right: 15px; }

/* Decorative Carousel */
.decorative-carousel {
    background: var(--fondo-oscuro);
    padding: 30px 0;
    overflow: hidden;
    position: relative;
}

.decorative-carousel::before,
.decorative-carousel::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100px;
    z-index: 2;
    pointer-events: none;
}

.decorative-carousel::before {
    left: 0;
    background: linear-gradient(to right, var(--fondo-oscuro), transparent);
}

.decorative-carousel::after {
    right: 0;
    background: linear-gradient(to left, var(--fondo-oscuro), transparent);
}

.carousel-track {
    display: flex;
    animation: scroll 25s linear infinite;
    width: calc(80px * 20);
}

.carousel-track:hover {
    animation-play-state: paused;
}

.carousel-item {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 5px;
    flex-shrink: 0;
}

.carousel-item i {
    font-size: 2rem;
    color: var(--salmon-40);
    transition: all 0.3s ease;
}

.carousel-item:hover i {
    color: var(--salmon);
    transform: scale(1.2);
}

/* ============================================
   08. LOCATION SECTION
   ============================================ */
.location-section {
    background: var(--fondo-oscuro);
}

.location-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.location-map {
    width: 100%;
    height: 350px;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 30px;
}

.location-map iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.location-info {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

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

.location-item i {
    font-size: 1.5rem;
    color: var(--salmon);
    margin-bottom: 10px;
}

.location-item p {
    color: var(--texto-gris);
    font-size: 0.9rem;
}

/* ============================================
   09. MODAL
   ============================================ */
.modal-image {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--fondo-modal);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-image.active {
    display: flex;
    opacity: 1;
}

.modal-image img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 10px 50px var(--sombra-30);
}

.modal-image-close {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--borde-claro-10);
    border: none;
    border-radius: 50%;
    color: var(--texto);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-image-close:hover {
    background: var(--salmon);
    color: var(--blanco);
    transform: rotate(90deg);
}

/* ============================================
   10. FOOTER
   ============================================ */
footer {
    padding: 50px 20px;
    text-align: center;
    background: var(--dark-footer);
    border-top: 1px solid var(--borde-claro-05);
}

.footer-logo {
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    color: var(--salmon);
    margin-bottom: 10px;
    letter-spacing: 4px;
}

.footer-text {
    color: var(--gray-light);
    font-size: 0.9rem;
    margin-bottom: 25px;
}

.footer-projects {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.footer-project {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    padding: 15px 20px;
    background: var(--borde-claro-03);
    border: 1px solid var(--borde-claro-08);
    border-radius: 12px;
    transition: all 0.3s ease;
    min-width: 130px;
}

.footer-project:hover {
    background: var(--borde-claro-08);
    border-color: var(--salmon);
    transform: translateY(-3px);
}

.footer-project-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-project-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.footer-project-name {
    font-family: 'Cinzel', serif;
    font-size: 0.75rem;
    color: var(--blanco);
    letter-spacing: 1px;
}

.footer-project-label {
    font-size: 0.6rem;
    color: var(--gray-light);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ============================================
   11. BOTONES FLOTANTES
   ============================================ */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--salmon);
    color: var(--blanco);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 15px var(--salmon-30);
}

.back-to-top.visible {
    opacity: 0.8;
    visibility: visible;
}

.back-to-top:hover {
    opacity: 1;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px var(--salmon-40);
}

.whatsapp-contact {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 30px;
    background: linear-gradient(135deg, var(--whatsapp) 0%, var(--whatsapp-dark) 100%);
    color: var(--blanco);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 30px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px var(--whatsapp-shadow-30);
}

.whatsapp-contact:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--whatsapp-shadow-40);
}

.whatsapp-float {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--whatsapp) 0%, var(--whatsapp-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blanco);
    font-size: 1.8rem;
    text-decoration: none;
    box-shadow: 0 4px 15px var(--whatsapp-shadow-40);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.whatsapp-float.visible {
    opacity: 1;
    visibility: visible;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

/* ============================================
   12. RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.2rem;
        letter-spacing: 4px;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 12px;
    }

    .hero-whatsapp {
        width: 100%;
        max-width: 220px;
        justify-content: center;
        animation-delay: 0.4s;
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .slider-slide img {
        height: auto;
        max-height: 300px;
    }

    .location-info {
        gap: 25px;
    }
}

@media (max-width: 480px) {
    .categories-grid {
        grid-template-columns: 1fr;
    }

    .slider-slide img {
        max-height: 220px;
        border-radius: 10px;
    }

    .footer-projects {
        flex-direction: column;
        align-items: center;
    }
}
