* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f5f5;
    color: #333;
    padding-top: 40px;
}

.promo-banner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(90deg, #FFD700, #FFA500);
    color: #000;
    text-align: center;
    padding: 8px;
    font-weight: 600;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    font-size: clamp(0.8rem, 2vw, 1rem);
}

header {
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    padding: clamp(1rem, 3vw, 2rem);
    text-align: center;
    color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: background 0.3s ease;
}

header.hombre {
    background: linear-gradient(135deg, #4a90e2, #5ca0eb);
}

h1 {
    margin-bottom: 1.5rem;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    text-transform: uppercase;
    letter-spacing: 2px;
}

nav {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

#gender-filter {
    margin-bottom: 1rem;
}

.gender-btn, .category-btn {
    padding: clamp(0.5rem, 2vw, 0.8rem) clamp(0.8rem, 3vw, 1.5rem);
    border: none;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: clamp(0.8rem, 2vw, 1rem);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.gender-btn {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
}

.gender-btn:hover, .category-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.gender-btn.active, .category-btn.active {
    background: white;
    color: #ff6b6b;
}

header.hombre .gender-btn.active,
header.hombre .category-btn.active {
    color: #4a90e2;
}

main {
    padding: clamp(1rem, 3vw, 2rem);
    max-width: 1400px;
    margin: 0 auto;
}

#catalog-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 1024px) {
    #catalog-container {
        grid-template-columns: 1fr 400px;
    }
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    max-height: none;
}

@media (min-width: 1024px) {
    .products-grid {
 
        padding-right: 1rem;
    }
}

.product-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    height: min-content;
}

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

.product-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.product-image:hover {
    transform: scale(1.05);
}

.product-info {
    padding: 1rem;
}

.product-title {
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    margin-bottom: 0.5rem;
}

.product-price {
    color: #ff6b6b;
    font-weight: bold;
    font-size: clamp(1.1rem, 2.5vw, 1.2rem);
}

header.hombre .product-price {
    color: #4a90e2;
}

.size-selector {
    margin: 0.5rem 0;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.5rem 0;
    padding: 0.5rem 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.2s ease;
}

.quantity-btn:hover {
    background: #f0f0f0;
}

.quantity-display {
    width: 40px;
    text-align: center;
    font-weight: bold;
}

.size-btn {
    padding: 0.3rem 0.6rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: clamp(0.8rem, 2vw, 1rem);
}

.size-btn:hover {
    border-color: #ff6b6b;
    color: #ff6b6b;
}

header.hombre .size-btn:hover {
    border-color: #4a90e2;
    color: #4a90e2;
}

.size-btn.selected {
    background: #ff6b6b;
    color: white;
    border-color: #ff6b6b;
}

header.hombre .size-btn.selected {
    background: #4a90e2;
    border-color: #4a90e2;
}

.try-on-btn {
    width: 100%;
    padding: 0.8rem;
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
    font-size: clamp(0.9rem, 2vw, 1rem);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

header.hombre .try-on-btn {
    background: #4a90e2;
}

.try-on-btn:hover {
    background: #ff8e8e;
}

header.hombre .try-on-btn:hover {
    background: #5ca0eb;
}

.virtual-try-on {
    background: white;
    padding: clamp(1rem, 3vw, 1.5rem);
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 2rem;  
    align-self: start;  
}

@media (max-width: 767px) {
    .virtual-try-on {
        position: fixed; /* Fijar en la parte inferior */
        bottom: 0;
        left: 0;
        right: 0;
        top: auto; /* Eliminar la propiedad top */
        z-index: 1000; /* Asegurar que esté por encima de otros elementos */
        padding: 0.5rem;
        border-radius: 0; /* Opcional: quitar bordes redondeados en la parte inferior */
        box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1); /* Sombra en la parte superior */
        display: flex;
        flex-direction: column; /* Cambiar a columna para apilar elementos */
        align-items: center;
        justify-content: flex-start; /* Alinear al inicio para el carrito */
        background-color: white; /* Asegurar un fondo para la visibilidad */
    }

    .model-container {
        display: none; /* Ocultar el contenedor del modelo */
    }

    .selected-items {
        width: 100%; /* Ocupar todo el ancho disponible */
        padding-bottom: 0.5rem; /* Añadir un poco de espacio inferior */
    }

    .selected-items h2 {
        font-size: 1rem;
        margin-bottom: 0.3rem;
        text-align: center;
    }

    #cart-items {
        /* Mantener estilos existentes o ajustarlos si es necesario */
    }

    .cart-total {
        text-align: center;
        margin-top: 0.5rem;
        padding-top: 0.5rem;
        border-top: 1px solid #eee;
        font-size: 1rem;
    }

    .discount-section {
        display: flex;
        flex-direction: row; /* Alinear input y botón horizontalmente */
        gap: 0.3rem;
        margin-bottom: 0.3rem;
    }

    .discount-input {
        flex-grow: 1;
        padding: 0.4rem;
        font-size: 0.9rem;
    }

    .discount-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }

    .cart-actions {
        display: flex;
        flex-direction: row; /* Alinear botones horizontalmente */
        gap: 0.3rem;
        margin-top: 0.3rem;
        width: 100%; /* Ocupar todo el ancho disponible */
    }

    .action-btn {
        flex-grow: 1; /* Distribuir espacio entre los botones */
        padding: 0.4rem;
        font-size: 0.8rem;
    }

    .action-btn i {
        font-size: 1rem;
    }
}
.model-container {
    position: relative;
    width: 100%;
    height: clamp(300px, 50vh, 500px);
    margin-bottom: 1.5rem;
    background: #f8f8f8;
    border-radius: 10px;
    overflow: hidden;
}

#model {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#clothing-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.selected-items {
    padding-top: 1rem;
    border-top: 2px solid #f0f0f0;
}

.selected-items h2 {
    margin-bottom: 1rem;
    color: #333;
    font-size: clamp(1.1rem, 2.5vw, 1.2rem);
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    background: #f8f8f8;
    border-radius: 5px;
    position: relative;
    font-size: clamp(0.8rem, 2vw, 1rem);
}

.cart-item img {
    width: clamp(40px, 10vw, 50px);
    height: clamp(40px, 10vw, 50px);
    object-fit: cover;
    margin-right: 1rem;
    border-radius: 5px;
}

.cart-item .remove-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: #ff4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.cart-total {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    font-weight: bold;
    font-size: clamp(1.1rem, 2.5vw, 1.2rem);
    text-align: right;
    margin-bottom: 1rem;
}

.discount-section {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.discount-input {
    flex: 1;
    min-width: 150px;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: clamp(0.9rem, 2vw, 1rem);
}

.discount-btn {
    padding: 0.8rem 1.2rem;
    background: #6c5ce7;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    font-size: clamp(0.9rem, 2vw, 1rem);
}

.discount-btn:hover {
    background: #5f4dd3;
}

.cart-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.action-btn {
    width: 100%;
    padding: clamp(0.8rem, 2vw, 1rem);
    border: none;
    border-radius: 5px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: clamp(0.9rem, 2vw, 1rem);
}

.action-btn i {
    font-size: clamp(1.1rem, 2.5vw, 1.2rem);
}

.action-btn:hover {
    transform: translateY(-2px);
}

.action-btn.whatsapp {
    background: #25D366;
}

.action-btn.payment {
    background: #4CAF50;
}

.action-btn.whatsapp:hover {
    background: #128C7E;
}

.action-btn.payment:hover {
    background: #388E3C;
}

/* Ajustes adicionales para pantallas muy pequeñas */
@media (max-width: 360px) {
    .gender-btn, .category-btn {
        width: 100%;
        justify-content: center;
    }

    nav {
        flex-direction: column;
        gap: 0.5rem;
    }

    .cart-item {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }

    .cart-item img {
        margin: 0 0 0.5rem 0;
    }

    .cart-item .remove-btn {
        position: static;
        transform: none;
        margin-top: 0.5rem;
        width: 100%;
        border-radius: 5px;
    }
}

.logo-container {
    margin-bottom: 1rem;
}

.logo {
    max-width: 150px;
    height: auto;
}

.discount-info {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background-color: #f8f9fa;
    border-radius: 5px;
    font-size: 0.9rem;
    color: #666;
    display: none;
}

.discount-info.active {
    display: block;
}

.site-footer {
    background: #333;
    color: white;
    padding: 3rem 1rem 1rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding-bottom: 2rem;
}

.footer-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-section h3 {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: white;
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #ff6b6b;
}

header.hombre .social-links a:hover {
    color: #4a90e2;
}

.footer-link {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: #999;
}

header.hombre ~ main .try-on-btn {
    background: #4a90e2;
}

header.hombre ~ main .try-on-btn:hover {
    background: #5ca0eb;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    max-width: 90%;
    width: 400px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: scale(0.7);
    opacity: 0;
    transition: all 0.3s ease;
}

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

.modal-icon {
    font-size: 3rem;
    color: #4CAF50;
    margin-bottom: 1rem;
}

.modal-title {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 1rem;
}

.modal-description {
    color: #666;
    margin-bottom: 1.5rem;
}

.modal-button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.modal-button:hover {
    background-color: #45a049;
}