:root {
    /* Color Palette */
    --navy: #1A365D;
    --navy-light: #2c4a7c;
    --navy-deep: #0f172a;
    --orange: #E65100;
    --orange-light: #ff8c00;
    --orange-main: #f97316;
    --orange-hover: #ea580c;
    --accent: #10B981;
    --bg-color: #f4f7f6;
    --surface: #ffffff;
    --text-main: #2d3748;
    --text-muted: #718096;
    
    /* Glassmorphism & Shadows */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.4);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 25px -5px rgba(26, 54, 93, 0.1);
    --shadow-orange: 0 10px 25px -5px rgba(230, 81, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', 'Inter', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    overflow-x: hidden;
    /* Usar 100dvh soluciona el scroll fantasma en móviles. Flex hace que los contenedores llenen el espacio sobrante sin dejar huecos blancos */
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

/* ==========================================================================
   STICKY HEADER & NAVIGATION
   ========================================================================== */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    padding: 0.8rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    height: 80px;
}

.logo-container {
    height: 100%;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.logo-container img {
    height: 50px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

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

.search-container {
    flex: 1;
    max-width: 500px;
    margin: 0 2rem;
    position: relative;
}

.search-bar {
    width: 100%;
    padding: 0.8rem 1.2rem 0.8rem 2.5rem;
    border-radius: 50px;
    border: 1px solid #e2e8f0;
    background: var(--surface);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.search-bar:focus {
    border-color: var(--orange);
    box-shadow: var(--shadow-orange);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.status-btn {
    background: var(--surface);
    color: var(--navy);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.status-btn:hover {
    border-color: var(--navy);
    background: var(--navy);
    color: white;
}

.cart-btn {
    background: var(--orange);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    cursor: pointer;
    position: relative;
    border: none;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.cart-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-orange);
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--navy);
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--surface);
}

/* ==========================================================================
   HERO FULLSCREEN & DOCK NAV
   ========================================================================== */
.hero-section {
    min-height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0;
    margin-bottom: 0;
    background: radial-gradient(circle at 80% 20%, var(--navy-light) 0%, var(--navy) 60%);
    position: relative;
    overflow: hidden;
    border-radius: 0;
}

/* Subtle glowing background orbs */
.hero-section::before, .hero-section::after {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(100px);
    z-index: 1;
    animation: float 20s infinite ease-in-out;
}
.hero-section::before {
    top: -200px; left: -200px;
    background: rgba(230, 81, 0, 0.2);
}
.hero-section::after {
    bottom: -200px; right: -200px;
    background: rgba(16, 185, 129, 0.15);
    animation-delay: -10s;
}
@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(100px, 50px); }
}

.hero-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 100%;
    margin: 0;
    flex: 1;
    padding: 2rem 5%; /* Padding simétrico para dar margen derecho a la imagen */
    gap: 3rem;
    position: relative;
    z-index: 2;
}

.hero-text-area {
    flex: 1;
    min-width: 300px;
    max-width: 700px;
    color: white;
    text-align: left;
}

.hero-text-area h1 {
    font-size: 3.8rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -1.5px;
}

.hero-text-area .highlight {
    background: linear-gradient(135deg, #ffb74d, var(--orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-text-area p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.85);
    max-width: 500px;
    line-height: 1.6;
}

.hero-animation-area {
    flex: 1;
    min-width: 300px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    position: relative;
    perspective: 1000px;
}

/* CSS AUTO-FADING CAROUSEL */
.css-carousel {
    position: relative;
    /* Limitamos matemáticamente al máximo tamaño posible sin causar scroll (100vh - header - padding) ni pisar el texto (50vw) */
    width: min(50vw, calc(100vh - 170px));
    height: min(50vw, calc(100vh - 170px));
    transform-style: preserve-3d;
    animation: gentleFloat 6s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes gentleFloat {
    0% { transform: translateY(0) rotateY(-5deg); }
    100% { transform: translateY(-15px) rotateY(5deg); }
}

.carousel-slide {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: transparent;
    border: none;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    opacity: 0;
}

.carousel-slide img {
    max-width: 65%;
    margin-bottom: 1rem;
    filter: drop-shadow(0 15px 25px rgba(0,0,0,0.3));
}

.carousel-slide i {
    font-size: 5rem;
    margin-bottom: 1.5rem;
    color: var(--orange);
    filter: drop-shadow(0 10px 20px rgba(230,81,0,0.3));
}

.carousel-slide h3 {
    color: white;
    font-size: 1.6rem;
    font-weight: 900;
    line-height: 1.2;
    padding: 0 1rem;
    text-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* Animaciones dinámicas controladas por JS en <style id="dynamic-hero-styles"> */

/* BOTTOM DOCK NAV */
.hero-bottom-nav {
    width: 100%;
    margin-top: calc(2.5rem + 120px); /* 4 valores hacia abajo (120px) */
    margin-left: -30px; /* 1 valor hacia la izquierda (30px) */
    display: flex;
    justify-content: center; /* Centra el dock en relacion al bloque de texto superior */
    z-index: 10;
}

.nav-dock {
    display: flex;
    gap: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1rem 2rem;
    border-radius: 35px;
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.5);
}

.dock-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    width: 110px;
}

.dock-item:hover {
    color: white;
    transform: translateY(-12px);
}

.dock-icon {
    width: 65px;
    height: 65px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 22px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    transition: all 0.3s;
    border: 1px solid rgba(255,255,255,0.05);
}

.dock-item:hover .dock-icon {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}

.dock-item.primary { color: white; }
.dock-item.primary .dock-icon {
    background: var(--orange);
    box-shadow: var(--shadow-orange);
    border: none;
}
.dock-item.primary:hover .dock-icon {
    background: var(--orange-light);
}

.dock-item span {
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
}

/* ==========================================================================
   STORE CONTAINER & SIDEBAR (DESKTOP)
   ========================================================================== */
.store-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem 4rem 2rem;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    align-items: start;
}

.sidebar-categories {
    background: var(--surface);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid #edf2f7;
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.categories-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Estilos para el Acordeón Nativo (Details/Summary) */
.mobile-cat-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    list-style: none; /* Oculta la flecha nativa */
    user-select: none;
    padding: 10px 5px;
    background: transparent;
}

.mobile-cat-summary::-webkit-details-marker {
    display: none;
}

.mobile-cat-details[open] .chevron-icon {
    transform: rotate(180deg);
}

.chevron-icon {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* En escritorio, el acordeón siempre está abierto y no se puede cerrar */
@media (min-width: 901px) {
    .mobile-cat-summary {
        pointer-events: none;
    }
    .chevron-icon {
        display: none;
    }
}

.cat-wrapper {
    display: flex;
    flex-direction: column;
}

.cat-item {
    padding: 0.8rem 1.2rem;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cat-item:hover {
    background: #f7fafc;
    color: var(--navy-deep);
    padding-left: 1.5rem;
}

.cat-item.active {
    background: var(--orange);
    color: white;
    box-shadow: var(--shadow-orange);
}

.cat-item.active:hover {
    padding-left: 1.2rem;
}

.subcat-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-left: 15px;
    margin-top: 5px;
    margin-bottom: 5px;
    border-left: 2px solid #edf2f7;
    padding-left: 10px;
}

.subcat-item {
    padding: 0.5rem 1rem;
    background: transparent;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
}

.subcat-item:hover {
    color: var(--orange);
    background: #fff5eb;
}

.subcat-item.active {
    color: var(--orange);
    font-weight: 700;
    background: #fff5eb;
}

.cat-group {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    border: 1px solid #edf2f7;
    margin-bottom: 30px;
    overflow: hidden;
    width: 100%;
    min-width: 0;
}

.cat-group-header {
    background: #f8f9fa;
    padding: 12px 20px;
    border-bottom: 2px solid var(--orange-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.cat-group-header h3 {
    margin: 0;
    color: var(--navy-deep);
    font-size: 1.2rem;
}

.cat-group-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    padding: 20px;
    width: 100%;
}

/* ==========================================================================
   PRODUCT GRID
   ========================================================================== */
.catalog-main {
    width: 100%;
    min-width: 0;
}

.catalog {
    /* Usamos flexbox en columna para que los grupos de categorías (cat-group) ocupen siempre el 100% del ancho en PC, 
       delegando la rejilla de productos a .cat-group-grid y evitando el bug visual de la columna colapsada */
    display: flex;
    flex-direction: column;
    gap: 25px;
    width: 100%;
    min-width: 0;
}

/* Mobile adjustments for the Store Container */
@media (max-width: 900px) {
    .store-container {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 1rem 3rem 1rem;
    }
    
    .sidebar-categories {
        position: static;
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0;
        margin-bottom: 5px;
    }

    /* Estilo del Dropdown/Acordeón en Celular */
    .mobile-cat-details {
        background: var(--surface);
        border: 1px solid #e2e8f0;
        border-radius: 16px;
        box-shadow: var(--shadow-sm);
        padding: 5px 15px;
    }
    
    .categories-list {
        flex-direction: column;
        overflow-x: hidden;
        padding-bottom: 10px;
        align-items: stretch;
    }
    .categories-list::-webkit-scrollbar { display: none; }
    
    .cat-wrapper {
        display: flex;
        flex-direction: column;
    }
    
    .cat-item {
        white-space: normal;
        background: transparent;
        border: none;
        border-radius: 8px;
        box-shadow: none;
        padding: 0.8rem 1rem;
    }
    .cat-item.active {
        background: var(--orange);
        color: white;
        box-shadow: var(--shadow-orange);
    }
    .cat-item:hover { padding-left: 1.2rem; }
    
    /* Rejilla a dos columnas para móviles (hyper-profesional) */
    .cat-group-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 10px;
    }
    
    .cat-group-header {
        padding: 10px;
    }
    
    .cat-group-header h3 {
        font-size: 1rem;
    }

    /* Ajuste de tarjeta de producto para dos columnas */
    .product-card {
        padding: 10px;
        border-radius: 12px;
    }
    
    .product-name {
        font-size: 0.75rem;
        height: 2.1rem;
        margin-bottom: 5px;
    }
    
    .product-price {
        font-size: 1rem;
    }
    
    .stock-badge {
        font-size: 0.6rem;
        padding: 0.2rem 0.4rem;
        margin-bottom: 0.5rem;
    }

    .qty-controls {
        height: 30px;
    }
    
    .qty-btn {
        padding: 0.2rem 0.5rem;
        font-size: 0.8rem;
    }
    
    .qty-input {
        width: 30px;
        font-size: 0.9rem;
    }
    
    .add-btn {
        padding: 0.5rem;
        font-size: 0.75rem;
        border-radius: 8px;
    }

    /* Reducir marca de agua del logo para que encaje bien en la tarjeta de móvil */
    .product-card img[alt="watermark"] {
        width: 45px !important;
    }
}

.product-card {
    background: var(--surface);
    border-radius: 20px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid #edf2f7;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(230,81,0,0.2);
}

.product-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 1rem;
    background: #f7fafc; /* placeholder if no image */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem; /* Reducido para evitar texto gigante si se rompe la imagen */
    color: #cbd5e0;
}

.product-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 0.5rem;
    height: 2.4rem;
    line-height: 1.2;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-price {
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--orange);
    margin-bottom: 0.5rem;
}

.stock-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-transform: uppercase;
}
.stock-high { background: #e6ffed; color: #10B981; border: 1px solid #10B981; }
.stock-low { background: #fff5eb; color: var(--orange); border: 1px solid var(--orange); }
.stock-out { background: #fee2e2; color: #ef4444; border: 1px solid #ef4444; }

.product-actions {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: auto;
}

.qty-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.qty-btn {
    background: transparent;
    border: none;
    padding: 0.5rem 0.8rem;
    cursor: pointer;
    color: var(--navy);
    transition: all 0.2s ease;
}

.qty-btn:hover:not(:disabled) {
    background: #e2e8f0;
}

.qty-btn:disabled {
    color: #cbd5e0;
    cursor: not-allowed;
}

.qty-input {
    width: 40px;
    text-align: center;
    border: none;
    background: transparent;
    font-weight: 700;
    color: var(--navy);
    font-size: 1rem;
}
.qty-input:focus {
    outline: none;
}

.add-btn {
    background: var(--bg-color);
    color: var(--navy);
    border: 2px solid transparent;
    padding: 0.8rem;
    border-radius: 12px;
    width: 100%;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.product-card:hover .add-btn {
    background: var(--navy);
    color: white;
}

.add-btn:active {
    transform: scale(0.95);
}

/* ==========================================================================
   OFFCANVAS CART (SIDEBAR)
   ========================================================================== */
.cart-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -450px;
    width: 100%;
    max-width: 400px;
    height: 100%;
    background: var(--surface);
    z-index: 2001;
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    transition: right 0.4s cubic-bezier(0.175, 0.885, 0.32, 1);
    display: flex;
    flex-direction: column;
}

.cart-sidebar.active {
    right: 0;
}

.cart-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #edf2f7;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h2 {
    font-weight: 900;
    color: var(--navy);
    font-size: 1.5rem;
}

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

.close-cart:hover {
    color: red;
}

.cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #edf2f7;
}

.cart-item-img {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    background: #f7fafc;
    object-fit: cover;
}

.cart-item-info {
    flex: 1;
}

.cart-item-title {
    font-weight: 700;
    color: var(--navy);
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
}

.cart-item-qty {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.cart-item-price {
    font-weight: 900;
    color: var(--orange);
}

.cart-item-remove {
    background: rgba(255, 0, 0, 0.1);
    color: red;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.cart-item-remove:hover {
    background: red;
    color: white;
}

.cart-footer {
    padding: 2rem;
    border-top: 1px solid #edf2f7;
    background: #f8fafc;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--navy);
}

.checkout-btn {
    background: var(--accent);
    color: white;
    width: 100%;
    padding: 1.2rem;
    border-radius: 15px;
    border: none;
    font-weight: 900;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3);
}

.checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px rgba(16, 185, 129, 0.4);
}

/* ==========================================================================
   MODALS (Tracker & Impresiones Wizard)
   ========================================================================== */
.overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal {
    background: var(--surface);
    width: 95%;
    max-width: 600px;
    border-radius: 24px;
    padding: 2rem;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: zoomIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes zoomIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal h2 {
    color: var(--navy);
    margin-bottom: 1.5rem;
    font-weight: 900;
}

/* Re-using some of the existing modal classes for the Print Wizard */
.wizard-sub-menu {
    display: flex;
    gap: 10px;
    margin-bottom: 1.5rem;
}

.btn-upload-area {
    width: 100%;
    padding: 2rem;
    border: 2px dashed var(--orange);
    border-radius: 18px;
    background: rgba(230, 81, 0, 0.05);
    color: var(--orange);
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.btn-upload-area:hover {
    background: rgba(230, 81, 0, 0.1);
    transform: translateY(-2px);
}

.btn-upload-area i {
    font-size: 2.5rem;
}

/* Forms & Inputs in modals */
.input-field {
    width: 100%;
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid #ddd;
    margin-bottom: 10px;
    font-size: 1rem;
    outline: none;
    transition: 0.3s;
}

.input-field:focus {
    border-color: var(--orange);
}

/* Old styles to keep compatibility with existing JS for the Printing Module */
.batch-card {
    background: white;
    border: 1px solid #eee;
    border-radius: 18px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    position: relative;
}
.batch-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}
.batch-card-controls {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.batch-attr-btn {
    background: #f8f9fa;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 10px 5px;
    text-align: center;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 65px;
}
.batch-attr-btn:hover { background: #f0f0f0; border-color: #ddd; }
.batch-attr-btn.disabled { opacity: 0.4; pointer-events: none; background: #eee; }
.batch-attr-btn span { display: block; font-size: 0.6rem; color: #777; font-weight: 700; text-transform: uppercase; margin-bottom: 4px; line-height: 1.1; }
.batch-attr-btn b { display: block; font-size: 0.75rem; color: var(--navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#uiBackdrop { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); z-index: 10000; }
#uiBubble { display: none; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 90%; max-width: 360px; background: white; border-radius: 28px; box-shadow: 0 25px 70px rgba(0,0,0,0.4); z-index: 10001; padding: 25px; }

/* Status Tracker specialized styles */
.tracker-card {
    background: var(--bg-color);
    border-radius: 20px;
    padding: 1.5rem;
    margin: 1rem 0;
    border: 1px solid #edf2f7;
}

.step-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 1rem;
}

.step {
    display: flex;
    align-items: center;
    gap: 15px;
    opacity: 0.3;
}

.step.active { opacity: 1; }
.step.done { opacity: 1; color: var(--accent); }

.step-icon {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #eee;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.9rem;
}

.step.active .step-icon { background: var(--navy); color: white; }
.step.done .step-icon { background: var(--accent); color: white; }

.batch-qty-stepper {
    display: flex;
    align-items: center;
    background: #f0f0f0;
    border-radius: 12px;
    padding: 4px;
    gap: 8px;
    justify-content: center;
}
.batch-qty-stepper button {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: none;
    background: white;
    color: var(--navy);
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.bubble-options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 15px;
}
.bubble-option {
    background: #fff;
    border: 2px solid #eee;
    border-radius: 18px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.bubble-option:hover {
    border-color: var(--orange);
    background: #fff9f2;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}
.bubble-option.active {
    border-color: var(--orange);
    background: #fff9f2;
}

/* ==========================================================================
   MOBILE RESPONSIVENESS
   ========================================================================== */
@media (max-width: 768px) {
    header { padding: 0.8rem 1rem; }
    .search-container { display: none; }
    
    .hero-section { min-height: calc(100vh - 70px); padding-bottom: 2rem; }
    .hero-content { padding: 2rem 1rem; flex-direction: column; text-align: center; gap: 2rem; }
    
    .hero-text-area h1 { font-size: 2.5rem; }
    .hero-text-area p { font-size: 1.1rem; margin: 0 auto; }
    .hero-text-area { text-align: center; }
    
    .hero-animation-area { max-width: 100%; justify-content: center; margin: 0 auto; transform: none; }
    .css-carousel { width: 300px; height: 300px; }
    
    .hero-bottom-nav { margin-top: 1rem; padding: 0 1rem; }
    .nav-dock { padding: 0.8rem; gap: 0.5rem; border-radius: 20px; width: 100%; justify-content: space-between; }
    .dock-item { width: auto; flex: 1; }
    .dock-icon { width: 50px; height: 50px; font-size: 1.4rem; border-radius: 15px; }
    .dock-item span { font-size: 0.75rem; }
    
    .catalog { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 15px; }
}

/* ==========================================================================
   EDITOR FOTOGRÁFICO (CANVAS FABRIC.JS)
   ========================================================================== */
.editor-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    color: white;
    font-family: 'Inter', sans-serif;
    animation: fadeIn 0.15s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.editor-top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: linear-gradient(to bottom, rgba(0,0,0,0.5), transparent);
}

.editor-close-btn {
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    width: 40px; height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
}
.editor-close-btn:hover { background: rgba(255,255,255,0.2); transform: scale(1.05); }

.editor-title {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 1px;
}

/* DROPZONE */
.editor-dropzone {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.dropzone-content {
    background: rgba(255,255,255,0.03);
    border: 2px dashed rgba(255,255,255,0.2);
    border-radius: 30px;
    padding: 4rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
    max-width: 400px;
}
.dropzone-content:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.4);
    box-shadow: 0 0 30px rgba(255,255,255,0.05);
}

.glow-icon-wrap {
    width: 80px; height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--orange), #ff9800);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 10px 25px rgba(255, 107, 53, 0.4);
    animation: pulseGlow 2s infinite alternate;
}
@keyframes pulseGlow {
    from { box-shadow: 0 0 10px rgba(255, 107, 53, 0.4); transform: scale(1); }
    to { box-shadow: 0 0 30px rgba(255, 107, 53, 0.8); transform: scale(1.05); }
}

.dropzone-icon { font-size: 2rem; color: white; }
.dropzone-content h3 { font-size: 1.4rem; margin-bottom: 0.5rem; font-weight: 600; }
.dropzone-content p { color: rgba(255,255,255,0.5); font-size: 0.9rem; }

/* WORKSPACE */
.editor-workspace {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.editor-sheet-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    background: rgba(0,0,0,0.5);
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.editor-sheet-controls select {
    background: rgba(255,255,255,0.1);
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
    padding: 5px 8px;
    border-radius: 5px;
    outline: none;
}
.editor-sheet-controls select option {
    background: var(--navy);
    color: white;
}

.zoom-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.05);
    padding: 2px 8px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.1);
}
.zoom-controls span {
    font-weight: 600;
    min-width: 45px;
    text-align: center;
}

.add-img-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s;
}
.add-img-btn:hover { background: rgba(255,255,255,0.2); }

/* ==========================================================================
   TABS MULTI-HOJA DEL EDITOR
   ========================================================================== */
.editor-tabs-container {
    display: flex;
    background: #0f172a;
    padding: 10px 15px 0 15px;
    gap: 5px;
    border-bottom: 2px solid #1e293b;
    overflow-x: auto;
}

.editor-tab {
    padding: 8px 20px;
    background: #1e293b;
    color: #94a3b8;
    border-radius: 10px 10px 0 0;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.9rem;
    transition: 0.3s;
    user-select: none;
    border: 1px solid transparent;
    border-bottom: none;
}

.editor-tab:hover {
    background: #334155;
    color: #fff;
}

.editor-tab.active {
    background: #1e293b; /* Igualaremos el fondo del contenedor principal del workspace si fuera gris, pero es azul oscuro. Mejor blanco o azul vibrante */
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.add-tab-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    padding: 0 15px;
    border-radius: 10px 10px 0 0;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.add-tab-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.editor-canvas-container {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto; /* Permite scrollear si la hoja es grande */
    padding: 2rem;
    background: repeating-linear-gradient(45deg, rgba(255,255,255,0.02) 0px, rgba(255,255,255,0.02) 20px, transparent 20px, transparent 40px);
}

/* Envolvemos el canvas real para darle la sombra y el aspecto de hoja física */
.canvas-container {
    box-shadow: 0 0 30px rgba(0,0,0,0.5) !important;
    background: white !important;
    border-radius: 2px;
}

/* BARRA INFERIOR */
.editor-bottom-bar {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.print-instructions textarea {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    padding: 10px;
    border-radius: 8px;
    resize: none;
    height: 60px;
    font-family: inherit;
    font-size: 0.9rem;
}
.print-instructions textarea:focus {
    border-color: var(--orange);
    outline: none;
}

.editor-tools-scroll {
    display: flex;
    gap: 0.8rem;
    overflow-x: auto;
    align-items: center;
    justify-content: space-between;
}
.editor-tools-scroll::-webkit-scrollbar { display: none; }

.dock-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
    padding: 0.6rem 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}
.dock-btn:hover { background: rgba(255,255,255,0.1); }

.dock-confirm-btn {
    background: linear-gradient(90deg, #10b981, #059669);
    border: none;
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 100px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
}
.dock-confirm-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6); }

/* Forzar SweetAlert por encima del Editor Overlay (z-index 9999) */
.swal2-container {
    z-index: 10000 !important;
}

/* ==========================================================================
   PRINT PREFERENCES MODAL (Salto Cuántico)
   ========================================================================== */
.print-pref-modal {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(10, 15, 30, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 9000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    animation: fadeInModal 0.3s forwards;
}

@keyframes fadeInModal {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.print-pref-content {
    background: white;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    border-radius: 20px;
    padding: 30px;
    position: relative;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
    overflow-y: auto;
}

.pref-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0,0,0,0.05);
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    color: #666;
    transition: 0.2s;
}
.pref-close-btn:hover { background: #e74c3c; color: white; }

.pref-subtitle {
    color: #666;
    font-size: 1rem;
    margin-bottom: 25px;
}

.pref-step {
    margin-bottom: 25px;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #eee;
}

.pref-step h3 {
    color: var(--navy-deep);
    font-size: 1.1rem;
    margin-bottom: 15px;
    font-weight: 700;
}

/* Radio Cards (Paper, Color) */
.paper-grid, .weight-grid, .color-grid {
    display: grid;
    gap: 10px;
}
.paper-grid { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.weight-grid { grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); }
.color-grid { grid-template-columns: repeat(2, 1fr); }

.paper-card, .color-card, .weight-card {
    position: relative;
    cursor: pointer;
}

.paper-card input, .color-card input, .weight-card input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.card-body {
    background: white;
    border: 2px solid #ddd;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    transition: all 0.2s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--navy-deep);
    font-weight: 700;
}

.paper-card input:checked ~ .card-body,
.color-card input:checked ~ .card-body,
.weight-card input:checked ~ .card-body {
    border-color: var(--orange-main);
    background: rgba(255, 152, 0, 0.05);
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.2);
}

.card-body i {
    font-size: 2rem;
    color: #999;
    margin-bottom: 10px;
    transition: 0.2s;
}

.paper-card input:checked ~ .card-body i,
.color-card input:checked ~ .card-body i {
    color: var(--orange-main);
}

.card-body h4 {
    font-size: 1rem;
    color: var(--navy-deep);
    margin-bottom: 5px;
}

.card-body p {
    font-size: 0.75rem;
    color: #777;
    line-height: 1.3;
    margin: 0;
}

.pref-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(230,81,0,0.3);
}

/* ==========================================================================
   CONFIGURADOR PREMIUM (NUEVO LAYOUT A DOS COLUMNAS)
   ========================================================================== */

.glass-modal-premium {
    max-width: 1100px;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.configurator-layout {
    display: flex;
    flex-direction: row;
    height: 100%;
    min-height: 600px;
}

/* LEFT COLUMN */
.configurator-controls {
    flex: 1.2;
    padding: 40px;
    background: #fdfdfd;
    overflow-y: auto;
    max-height: 85vh;
}

.configurator-controls::-webkit-scrollbar {
    width: 6px;
}
.configurator-controls::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.premium-title {
    color: var(--navy-deep);
    font-size: 1.8rem;
    font-weight: 900;
    margin-bottom: 5px;
}

.premium-subtitle {
    color: #666;
    margin-bottom: 30px;
}

/* RIGHT COLUMN (Live Preview) */
.configurator-preview {
    flex: 1;
    background: linear-gradient(135deg, var(--navy-deep) 0%, var(--navy) 100%);
    position: relative;
    display: flex;
    flex-direction: column;
    color: white;
}

.preview-stage {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    position: relative;
}

/* EL PAPEL EN 3D */
.paper-mockup {
    position: relative;
    width: 250px;
    height: 350px;
    background: #fff;
    border-radius: 2px;
    box-shadow: -15px 25px 40px rgba(0,0,0,0.4);
    transform: perspective(1000px) rotateY(-15deg) rotateX(10deg);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

/* Textura aplicada por JS */
.mockup-content {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    border-radius: 2px;
    position: absolute;
    top: 0; left: 0;
    z-index: 2;
    overflow: hidden;
    transition: filter 0.5s ease;
}

.mockup-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--navy-deep);
    font-size: 1.2rem;
    font-weight: 700;
}
.mockup-image-placeholder i {
    font-size: 3rem;
    color: var(--orange-main);
    margin-bottom: 15px;
}

/* El grosor del papel animado (Gramaje) */
.paper-thickness-edge {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 2px; /* Cambia dinamicamente */
    background: #e0e0e0;
    transform-origin: right center;
    transform: rotateY(90deg);
    transition: width 0.4s ease, background 0.4s ease;
}

/* EFECTOS DE TINTA (Añadidos dinámicamente) */
.filter-bw {
    filter: grayscale(100%) contrast(110%);
}

/* INFORMACIÓN DEL VISUALIZADOR */
.preview-info {
    padding: 30px 40px;
    background: rgba(0,0,0,0.2);
    border-top: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
}

.preview-info h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #fff;
}

.preview-info p {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.7);
    line-height: 1.5;
    margin-bottom: 20px;
}

.preview-price-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255,255,255,0.1);
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 25px;
}

.price-label {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.8);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.price-value {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--orange-main);
}

.premium-btn {
    width: 100%;
    font-size: 1.1rem;
    padding: 18px;
    border-radius: 15px;
    text-transform: uppercase;
    font-weight: 900;
    letter-spacing: 1px;
    background: linear-gradient(135deg, var(--orange-main), var(--orange-hover));
    border: none;
    color: white;
    box-shadow: 0 10px 20px rgba(230,81,0,0.3);
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .glass-modal-premium {
        overflow-y: auto; /* Que todo el modal sea escroleable */
        height: auto;
    }
    .configurator-layout {
        flex-direction: column;
        height: auto;
        min-height: auto;
    }
    .configurator-preview {
        order: -1; /* Muestra el preview arriba en móviles */
        flex: none; /* No comprimir */
        min-height: auto;
    }
    .configurator-controls {
        flex: none;
        overflow-y: visible; /* Eliminar scroll interno */
        max-height: none;
        padding: 20px;
    }
    .preview-stage {
        padding: 20px 10px;
        transform: scale(0.85); /* Escalar un poco para móviles */
        transform-origin: top center;
        min-height: 350px;
    }
    .preview-info {
        padding: 20px;
        padding-bottom: 90px; /* Espacio para el botón flotante si se superpone */
    }
    .pref-submit-btn {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        border-radius: 0;
        border-top-left-radius: 20px;
        border-top-right-radius: 20px;
        padding: 22px;
        z-index: 99999;
        margin: 0;
        box-shadow: 0 -10px 30px rgba(0,0,0,0.5);
    }
    .configurator-controls {
        flex: none;
        overflow-y: visible; /* Eliminar scroll interno */
        max-height: none;
        padding: 20px;
        padding-bottom: 100px; /* Extra padding abajo para que no lo tape el botón fijo */
    }
}

/* ==========================================================================
   OPTIMIZACIÓN ULTRA-PROFESIONAL PARA MÓVILES (HERO SECTION)
   ========================================================================== */
@media (max-width: 768px) {
    .hero-section {
        /* Al ser el body un contenedor flex de 100dvh, flex: 1 hace que esta sección absorba TODO el espacio restante exacto, eliminando la franja blanca sin cálculos matemáticos propensos a error */
        flex: 1;
        overflow: hidden;
        padding-top: 10px;
        /* Por las dudas forzamos que no genere scrollbar */
        max-height: calc(100dvh - 85px); 
    }
    
    .hero-bottom-nav {
        order: 4;
        /* Limpiamos el margen gigante de 120px que empujaba los botones fuera de la pantalla */
        margin-top: 0 !important;
        margin-left: 0 !important;
        width: 100%;
        display: flex;
        justify-content: center;
    }
    
    .hero-content {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        /* Reducimos sutilmente los espacios muertos para acomodar los elementos sin barra de scroll */
        padding: 0.5rem 5% 1rem 5%;
        gap: 1rem;
    }

    /* "Rompemos" la caja contenedora de texto para reordenar sus elementos internos de forma independiente */
    .hero-text-area {
        display: contents; 
    }

    .hero-text-area h1 {
        order: 1;
        font-size: 2.8rem;
        margin-bottom: 0;
        text-align: center;
        line-height: 1.1;
    }

    .hero-text-area p {
        order: 2;
        text-align: center;
        margin-bottom: 0;
        font-size: 1.1rem;
        padding: 0 10px;
    }

    .hero-animation-area {
        order: 3;
        width: 100%;
        flex: 1; 
        min-height: 0; 
        margin: 0;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    /* Solución nativa: Usar unidades explícitas (vw/vh) en vez de % para que NO colapse a 0px */
    .css-carousel {
        position: relative;
        /* Reducimos un poco el tamaño para dar más aire y asegurar que no empuje nada */
        width: min(80vw, 38vh);
        height: min(80vw, 38vh);
        transform: none; 
    }

    /* Ajustamos el tamaño interno de los elementos para este nuevo contenedor fluido */
    .carousel-slide img {
        max-width: 90%;
    }
    
    .carousel-slide i {
        font-size: 3.5rem;
    }
    
    .carousel-slide h3 {
        font-size: 1.3rem;
    }

    .hero-bottom-nav {
        order: 4;
        width: 100%;
        margin-top: auto; 
        margin-left: 0; /* Reset del margin-left negativo de escritorio */
        padding-bottom: 5px;
    }
    
    .nav-dock {
        justify-content: space-between;
        flex-wrap: nowrap; /* CRUCIAL: Fuerza a que estén todos en 1 sola fila */
        gap: 5px;
        padding: 10px;
    }

    .dock-item {
        flex: 1;
        min-width: 0; /* Permite que los botones se encojan si es necesario */
        padding: 10px 2px;
    }
    
    .dock-item span {
        font-size: 0.7rem;
        line-height: 1.2;
    }
}
