@import url('https://fonts.googleapis.com/css2?family=Mulish:ital,wght@0,200..1000;1,200..1000&display=swap');
:root {
    --bg-color: #ffffff;
    --text-color: #333333;
    --accent-color: #000000;
    --border-color: #e0e0e0;
    --hover-bg: #f5f5f5;
    --color-blanco: #ffffff;
    --color-negro: #000000;
    --fuente-principal: 'Mulish', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--fuente-principal);
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
}

/* --- CABECERA --- */
.main-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background-color: var(--bg-color);
    z-index: 100;
}

.logo h2 {
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

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

.search-container input {
    width: 100%;
    padding: 0.8rem 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 25px;
    outline: none;
    transition: border-color 0.3s;
}

.search-container input:focus {
    border-color: var(--accent-color);
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.btn-auth {
    padding: 0.6rem 1.2rem;
    border: 1px solid var(--accent-color);
    background-color: transparent;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
}

.btn-auth:hover {
    background-color: var(--accent-color);
    color: var(--bg-color);
}

.hidden {
    display: none !important;
}

/* --- MENÚ DESPLEGABLE (HOVER) --- */
.dropdown {
    position: relative;
    display: inline-block;
}

.hamburger-btn {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
}

.submenu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background-color: var(--bg-color);
    min-width: 200px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.1);
    z-index: 1;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.5rem 0;
}

/* Aplicación de Flexbox en columna al pasar el mouse */
.dropdown:hover .submenu {
    display: flex;
    flex-direction: column;
}

.submenu a {
    color: var(--text-color);
    padding: 12px 16px;
    text-decoration: none;
    transition: background-color 0.2s;
}

.submenu a:hover {
    background-color: var(--hover-bg);
}

/* --- SCROLL DE IMÁGENES (55vh) --- */
.hero-scroll {
    width: 100%;
    height: 35vh; 
    overflow: hidden;
}

.scroll-container {
    display: flex;
    width: 100%;
    height: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none; /* Ocultar scrollbar en Firefox */
}

.scroll-container::-webkit-scrollbar {
    display: none; /* Ocultar scrollbar en Chrome/Safari */
}

.slide {
    flex: 0 0 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    scroll-snap-align: start;
}

/* --- GALERÍA (CSS Grid) --- */
.gallery-section {
    padding: 4rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.gallery-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.gallery-grid {
    display: grid;
    /* 4 columnas en escritorio por defecto */
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.product-card {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 3/4;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
    background-color: var(--hover-bg); /* Placeholder de color mientras carga */
}

.product-card h3 {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.product-card p {
    color: #666;
    font-weight: bold;
}

/* Spinner individual por imagen */
.spinner {
    position: absolute;
    width: 25px;
    height: 25px;
    border: 3px solid var(--border);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
/* --- BOTÓN REGRESAR ARRIBA --- */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    background-color: var(--accent-color); /* Usa el negro del tema */
    color: var(--bg-color); /* Usa el blanco del tema */
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease, background-color 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.back-to-top svg {
    width: 20px;
    height: 20px;
}

/* Clase que se agrega con JS para mostrar el botón */
.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Efecto hover profesional */
.back-to-top.show:hover {
    background-color: #333333; /* Un gris oscuro sutil */
    transform: translateY(-3px); /* Pequeño salto hacia arriba */
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}
/* --- MODAL DE DETALLE DE PRENDA --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(6px); /* Tendencia actual de UI */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Estado activo del modal */
.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: var(--bg-color);
    width: 92%;
    max-width: 1100px;
    max-height: 90vh;
    border-radius: 16px;
    position: relative;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    padding: 2.5rem;
}

.close-modal {
    position: absolute;
    top: 1.2rem;
    right: 1.5rem;
    font-size: 2.2rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #888;
    transition: color 0.2s ease;
    z-index: 10;
}

.close-modal:hover {
    color: var(--accent-color);
}

.modal-body {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 3rem;
    margin-top: 1rem;
}

/* Lado Izquierdo: Galería vertical + Imagen grande */
.modal-left {
    display: flex;
    gap: 1.2rem;
    height: 600px; /* Mantiene proporciones estables */
}

.vertical-gallery {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    width: 85px;
    flex-shrink: 0;
    overflow-y: auto;
    scrollbar-width: none; /* Oculta barra en Firefox */
}

.vertical-gallery::-webkit-scrollbar {
    display: none; /* Oculta barra en Chrome/Safari */
}

.vertical-gallery .thumb {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.6;
    transition: border-color 0.2s, opacity 0.2s;
}

.vertical-gallery .thumb:hover,
.vertical-gallery .thumb.active {
    opacity: 1;
    border-color: var(--accent-color);
}

.main-image-container {
    flex-grow: 1;
    background-color: var(--hover-bg);
    border-radius: 10px;
    overflow: hidden;
}

.main-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.25s ease;
}

/* Lado Derecho: Información de la prenda */
.modal-right {
    display: flex;
    flex-direction: column;
}

.product-tag {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #888;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.product-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    line-height: 1.15;
}

.product-price {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 2rem;
}

.product-details h3,
.product-options h3 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-details p {
    color: #555;
    line-height: 1.6;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.product-options {
    margin-bottom: 2.5rem;
}

.size-selector {
    display: flex;
    gap: 0.6rem;
}

.size-selector button {
    padding: 0.6rem 1.2rem;
    border: 1px solid var(--border-color);
    background: none;
    cursor: pointer;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.size-selector button:hover,
.size-selector button.active {
    border-color: var(--accent-color);
    background-color: var(--accent-color);
    color: var(--bg-color);
}

.btn-add-to-cart {
    width: 100%;
    padding: 1.2rem;
    background-color: var(--accent-color);
    color: var(--bg-color);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: auto; /* Empuja el botón al final si hay espacio */
}

.btn-add-to-cart:hover {
    background-color: #222;
}

/* Responsivo para el Modal */
@media (max-width: 768px) {
    .modal-content {
        padding: 1.5rem;
        max-height: 95vh;
    }
    
    .modal-body {
        grid-template-columns: 1fr; /* Una columna en móvil */
        gap: 1.5rem;
    }
    
    .modal-left {
        height: 380px;
    }
    
    .vertical-gallery {
        width: 65px;
    }
}
#avisos{    
    width: 100%;
    text-align: center;   
}
.alerta{        
    font-weight: bold;
    text-align: center;
    font-size: 1rem;
    padding: 1rem .5rem;
    border-radius: 1rem;
    margin: .5rem auto ;
    width: 90%;
    
}
.bg_red{
    background-color: red;
    text-shadow: 1px 1px 1px var(--color-negro);
    color: var(--color-blanco);
}
.bg_green{
    background-color: #3fd33e;
    text-shadow: 1px 1px 1px var(--color-negro);
    color: var(--color-blanco);
}
/* --- CONTENEDOR PRINCIPAL --- */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f4f7f6; /* Ajusta según tu paleta */
}

.login-form {
    background-color: #ffffff;
    padding: 3rem 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 400px;
    
    /* Aplicando estructura Flexbox en columna */
    display: flex;
    flex-direction: column;
    gap: 1.8rem; 
}

.login-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.login-logo {
    max-width: 120px;
    height: auto;
    object-fit: contain;
}

.login-header h2 {
    font-size: 1.5rem;
    color: #7A7A7A;
    margin: 0;
}

/* --- ANIMACIÓN DE INPUTS (Superior Derecha) --- */
.input-group {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.input-field {
    width: 100%;
    padding: 1rem 1.2rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    background-color: transparent;
    outline: none;
    color: #333;
    transition: border-color 0.3s ease;
}

.input-field:focus {
    border-color: #000; /* Color de acento al seleccionar */
}

.input-label {
    position: absolute;
    left: 1.2rem;
    top: 1.1rem;
    color: #888;
    font-size: 1rem;
    pointer-events: none;
    background-color: #ffffff; /* Oculta la línea del borde trasero */
    padding: 0 0.5rem;
    
    /* Transición fluida para el movimiento */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Cuando el input tiene el foco, o NO está mostrando el placeholder (tiene texto):
  1. Sube el label (top negativo).
  2. Lo mueve a la derecha calculando el 100% del ancho menos el tamaño de la palabra.
*/
.input-field:focus ~ .input-label,
.input-field:not(:placeholder-shown) ~ .input-label {
    top: -0.6rem;
    left: calc(100% - var(--label-w));
    font-size: 0.85rem;
    font-weight: 600;
    color: #000;
}

/* --- BOTÓN DE LOGIN --- */
.btn-login {
    margin-top: 0.5rem;
    padding: 1rem;
    background-color: #3D857A;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
}

.btn-login:hover {
    background-color: #333;
}

.btn-login:active {
    transform: scale(0.98);
}
/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .main-header {
        flex-wrap: wrap;
        padding: 1rem;
    }
    
    .search-container {
        order: 3;
        max-width: 100%;
        margin: 1rem 0 0 0;
    }

    /* 2 columnas en móviles */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    .hero-scroll{
        height: 25vh; 
    }
}
