/* ESTILOS COMPLETOS PARA JULIANA LINGERIE - VERSIÓN MÓVIL OPTIMIZADA */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', 'Roboto', -apple-system, sans-serif;
    -webkit-text-size-adjust: 100%; /* Previene zoom automático en iOS */
}

html {
    font-size: 16px;
}

body {
    background: linear-gradient(135deg, #fdf2f8 0%, #f9fafb 100%);
    color: #333;
    line-height: 1.6;
    padding: 0;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 80%, rgba(233, 30, 99, 0.05) 0%, transparent 20%), 
                radial-gradient(circle at 80% 20%, rgba(233, 30, 99, 0.05) 0%, transparent 20%);
    z-index: -1;
}

/* ========================= */
/*       HEADER GRANDE       */
/* ========================= */

.topbar {
    text-align: center;
    padding: 28px 20px 22px;
    background: linear-gradient(135deg, #0c0c0c 0%, #1a1a1a 100%);
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    border-bottom: 4px solid #e91e63;
}

.topbar h1 {
    font-size: 32px;
    font-weight: 300;
    letter-spacing: 1.5px;
    margin-bottom: 10px;
    color: #fff;
    position: relative;
    display: inline-block;
    line-height: 1.3;
}

.topbar h1::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 3px;
    background: #e91e63;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
}

.topbar p {
    font-size: 18px;
    font-weight: 300;
    letter-spacing: 0.5px;
    color: #e0e0e0;
    opacity: 0.9;
    margin-top: 8px;
    line-height: 1.4;
}

/* ========================= */
/*     FILTROS MÁS GRANDES   */
/* ========================= */

.filtros {
    margin: 25px 0;
    padding: 0 15px;
    text-align: center;
}

.categorias {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 15px;
}

.categorias button {
    padding: 22px 24px;
    margin: 0;
    border: none;
    background: linear-gradient(135deg, #e91e63 0%, #d81b60 100%);
    color: white;
    border-radius: 16px;
    cursor: pointer;
    font-size: 20px;
    font-weight: 500;
    letter-spacing: 0.3px;
    width: 100%;
    max-width: 420px;
    transition: all 0.3s ease;
    box-shadow: 0 6px 15px rgba(233, 30, 99, 0.25);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    min-height: 70px;
    position: relative;
}

.categorias button::before {
    content: '✦';
    font-size: 20px;
}

.categorias button:hover, .categorias button:active {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(233, 30, 99, 0.35);
    background: linear-gradient(135deg, #d81b60 0%, #c2185b 100%);
}

.categorias button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.4);
}

/* SUB-CATEGORÍAS MÁS GRANDES */
#subcategorias {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin-top: 25px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.subcategorias button {
    padding: 18px 22px;
    border: 2px solid #e0e0e0;
    background: white;
    color: #555;
    border-radius: 14px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 500;
    transition: all 0.2s ease;
    flex: 1;
    min-width: 140px;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
}

.subcategorias button:hover, .subcategorias button:active {
    background: #f8f8f8;
    color: #e91e63;
    border-color: #e91e63;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(233, 30, 99, 0.15);
}

.subcategorias button:focus {
    outline: none;
    border-color: #e91e63;
    box-shadow: 0 0 0 2px rgba(233, 30, 99, 0.2);
}

/* ========================= */
/*     PRODUCTOS MÁS GRANDES */
/* ========================= */

main {
    padding-bottom: 30px;
}

.grid-productos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 22px;
    margin-bottom: 50px;
    padding: 0 18px;
}

.producto {
    background: white;
    padding: 20px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.08);
    cursor: pointer;
}

.producto:hover {
    transform: translateY(-10px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.15);
}

.producto::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #e91e63, #ff4081);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.producto:hover::after {
    transform: scaleX(1);
}

.producto img {
    width: 100%;
    height: 240px;
    object-fit: contain;
    border-radius: 14px;
    margin-bottom: 18px;
    transition: transform 0.3s ease;
}

.producto:hover img {
    transform: scale(1.05);
}

.producto h3 {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 12px;
    color: #333;
    line-height: 1.5;
    flex-grow: 1;
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}

.producto p {
    font-size: 22px;
    font-weight: 600;
    color: #e91e63;
    margin: 15px 0 0;
    padding: 12px 0;
    border-top: 2px solid #f0f0f0;
}

/* ========================= */
/*       MODAL MÁS GRANDE    */
/* ========================= */

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
    padding: 20px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-contenido {
    background: white;
    padding: 25px;
    border-radius: 24px;
    width: 95%;
    max-width: 450px;
    max-height: 90vh;
    text-align: center;
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    animation: slideUp 0.3s ease;
    overflow: hidden;
    overflow-y: auto;
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-contenido img {
    max-width: 100%;
    max-height: 65vh;
    border-radius: 16px;
    margin-bottom: 25px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.cerrar {
    font-size: 42px;
    font-weight: 300;
    cursor: pointer;
    position: absolute;
    top: 15px;
    right: 20px;
    color: #777;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    z-index: 2;
    line-height: 1;
    background: rgba(255, 255, 255, 0.9);
}

.cerrar:hover {
    color: #e91e63;
    background: rgba(255, 255, 255, 0.95);
    transform: rotate(90deg);
}

.btn-whatsapp {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 15px;
    background: linear-gradient(135deg, #25D366 0%, #1ebe5d 100%);
    color: white;
    text-decoration: none;
    padding: 22px 28px;
    border-radius: 16px;
    font-weight: 600;
    font-size: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.35);
    gap: 12px;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.btn-whatsapp::before {
    content: '💬';
    font-size: 24px;
}

.btn-whatsapp::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 30%;
    height: 200%;
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(30deg);
    transition: all 0.5s ease;
}

.btn-whatsapp:hover::after, .btn-whatsapp:active::after {
    left: 130%;
}

.btn-whatsapp:hover, .btn-whatsapp:active {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.45);
    background: linear-gradient(135deg, #1ebe5d 0%, #1aad56 100%);
}

/* ========================= */
/*    MÓVIL - MÁS GRANDE     */
/* ========================= */

@media (max-width: 768px) {
    html {
        font-size: 18px; /* Aumenta tamaño base para móvil */
    }
    
    .topbar {
        padding: 30px 18px 24px;
    }
    
    .topbar h1 {
        font-size: 36px;
        margin-bottom: 12px;
    }
    
    .topbar p {
        font-size: 22px;
    }
    
    .filtros {
        padding: 0 12px;
        margin: 30px 0;
    }
    
    .categorias {
        gap: 20px;
    }
    
    .categorias button {
        padding: 26px 20px;
        font-size: 22px;
        max-width: 100%;
        border-radius: 20px;
        min-height: 80px;
    }
    
    .grid-productos {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding: 0 15px;
    }
    
    .producto {
        padding: 18px;
        border-radius: 18px;
    }
    
    .producto img {
        height: 200px;
    }
    
    .producto h3 {
        font-size: 20px;
        min-height: 60px;
    }
    
    .producto p {
        font-size: 24px;
        padding: 15px 0;
    }
    
    #subcategorias {
        padding: 22px 18px;
        border-radius: 22px;
        margin-top: 30px;
    }
    
    .subcategorias button {
        padding: 20px 18px;
        font-size: 20px;
        min-width: 160px;
        min-height: 70px;
        border-radius: 16px;
    }
    
    .modal-contenido {
        width: 96%;
        padding: 22px;
        border-radius: 22px;
    }
    
    .btn-whatsapp {
        padding: 24px;
        font-size: 22px;
        border-radius: 18px;
    }
    
    .cerrar {
        font-size: 44px;
        width: 50px;
        height: 50px;
    }
}

/* PARA PANTALLAS MUY PEQUEÑAS */
@media (max-width: 480px) {
    html {
        font-size: 16px;
    }
    
    .grid-productos {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 0 15px;
    }
    
    .producto {
        padding: 22px;
    }
    
    .producto img {
        height: 250px;
    }
    
    .producto h3 {
        font-size: 22px;
        min-height: auto;
        margin-bottom: 15px;
    }
    
    .producto p {
        font-size: 26px;
    }
    
    .categorias button {
        padding: 28px 22px;
        font-size: 24px;
        min-height: 85px;
    }
    
    .topbar h1 {
        font-size: 32px;
    }
    
    .topbar p {
        font-size: 20px;
    }
    
    .subcategorias button {
        min-width: 100%;
        font-size: 18px;
        padding: 22px 15px;
    }
    
    #subcategorias {
        flex-direction: column;
    }
}

/* PARA PANTALLAS EXTRA PEQUEÑAS (iPhone SE, etc) */
@media (max-width: 375px) {
    .topbar h1 {
        font-size: 28px;
    }
    
    .topbar p {
        font-size: 18px;
    }
    
    .categorias button {
        font-size: 20px;
        padding: 24px 18px;
        min-height: 75px;
    }
    
    .producto h3 {
        font-size: 20px;
    }
    
    .producto p {
        font-size: 24px;
    }
    
    .subcategorias button {
        font-size: 16px;
        padding: 20px 12px;
        min-height: 65px;
    }
}

/* ANIMACIONES MEJORADAS */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.producto {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.producto:nth-child(1) { animation-delay: 0.1s; }
.producto:nth-child(2) { animation-delay: 0.2s; }
.producto:nth-child(3) { animation-delay: 0.3s; }
.producto:nth-child(4) { animation-delay: 0.4s; }
.producto:nth-child(5) { animation-delay: 0.5s; }
.producto:nth-child(6) { animation-delay: 0.6s; }
.producto:nth-child(7) { animation-delay: 0.7s; }
.producto:nth-child(8) { animation-delay: 0.8s; }
.producto:nth-child(9) { animation-delay: 0.9s; }
.producto:nth-child(10) { animation-delay: 1.0s; }

/* MEJORAS DE ACCESIBILIDAD - TAMAÑOS MÍNIMOS PARA BOTONES */
button, .btn-whatsapp {
    min-height: 50px;
    touch-action: manipulation; /* Mejora respuesta táctil */
    user-select: none;
}

/* AUMENTAR ÁREA DE TOQUE EN MÓVIL */
@media (max-width: 768px) {
    button, .btn-whatsapp, .producto {
        cursor: pointer;
    }
    
    /* Mejorar la experiencia táctil */
    .categorias button,
    .subcategorias button,
    .producto {
        -webkit-tap-highlight-color: rgba(233, 30, 99, 0.2);
    }
    
    /* Evitar zoom en inputs en iOS */
    input, textarea, select, button {
        font-size: 16px;
    }
}

/* Scroll más visible */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #e91e63, #d81b60);
    border-radius: 5px;
    border: 2px solid #f5f5f5;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #d81b60, #c2185b);
}

/* ESTILOS PARA ESTADOS DE CARGA */
.cargando {
    position: relative;
    overflow: hidden;
}

.cargando::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: loading 1.5s infinite;
    z-index: 1;
}

@keyframes loading {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ESTILOS PARA MENSAJES INFORMATIVOS */
.mensaje-vacio {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 18px;
    background: white;
    border-radius: 20px;
    margin: 30px 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.mensaje-vacio::before {
    content: '✨';
    font-size: 32px;
    display: block;
    margin-bottom: 15px;
}

/* MEJORAS DE RENDIMIENTO */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* SOPORTE PARA DARK MODE (opcional) */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
        color: #f0f0f0;
    }
    
    .producto {
        background: #2a2a2a;
        border-color: #333;
    }
    
    .producto h3 {
        color: #f0f0f0;
    }
    
    #subcategorias {
        background: rgba(42, 42, 42, 0.85);
    }
    
    .subcategorias button {
        background: #333;
        color: #ddd;
        border-color: #444;
    }
    
    .subcategorias button:hover {
        background: #3a3a3a;
        color: #e91e63;
    }
}