/* ============================================
   CATÁLOGO - ESTILOS
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --rojo: #9e0004;
    --azul: #1c3166;
    --amarillo: #f6d86b;
    --beige: #e1c78c;
    --marfil: #F6F4F0;
    --carbon: #1E1E1E;
    --gris: #8C8C8C;
    --font-display: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
}

body {
    margin: 0;
    padding: 0;
    background-color: #2c2c2c;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    font-family: var(--font-body);
}

/* MOBILE WRAPPER */
#mobile-wrapper {
    width: 100%;
    max-width: 430px;
    height: 932px;
    max-height: 95vh;
    background-color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 0 10px #1a1a1a, 0 0 0 12px #3a3a3a, 0 20px 60px rgba(0,0,0,0.5);
    border-radius: 40px;
}

#mobile-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 30px;
    background-color: #1a1a1a;
    border-radius: 0 0 20px 20px;
    z-index: 9999;
}

#mobile-content {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

#mobile-content::-webkit-scrollbar {
    display: none;
}

/* NAVEGACIÓN SUPERIOR */
.nav-header {
    position: sticky;
    top: 30px;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--beige);
    z-index: 100;
}

.nav-back {
    background: none;
    border: none;
    font-size: 16px;
    color: var(--azul);
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
}

.nav-title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 600;
    color: var(--azul);
}

.nav-action {
    font-size: 20px;
    cursor: pointer;
    position: relative;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--rojo);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* HERO DEL CATÁLOGO */
.catalog-hero {
    background: linear-gradient(135deg, var(--beige) 0%, var(--marfil) 100%);
    padding: 50px 30px 40px;
    text-align: center;
}

.catalog-title {
    font-family: var(--font-display);
    font-size: 40px;
    font-weight: 600;
    color: var(--azul);
    margin-bottom: 10px;
}

.catalog-subtitle {
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gris);
}

/* GRID DE PRODUCTOS */
.products-grid {
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 40px;
    background-color: white;
}

.product-card {
    background-color: var(--marfil);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--beige);
}

/* GALERÍA DE IMÁGENES DEL PRODUCTO */
.product-images-gallery {
    width: 100%;
    height: 400px;
    position: relative;
    overflow: hidden;
    background-color: var(--beige);
}

.gallery-track {
    display: flex;
    width: 200%;
    height: 100%;
    transition: transform 0.3s ease;
}

/* Galería con una sola imagen */
.product-images-gallery.single-image .gallery-track {
    width: 100%;
}

.product-image {
    width: 50%;
    height: 100%;
    object-fit: cover;
    flex-shrink: 0;
    background-color: var(--beige);
    background-image: linear-gradient(135deg, var(--beige) 0%, var(--marfil) 100%);
}

/* Imagen única ocupa 100% */
.product-images-gallery.single-image .product-image {
    width: 100%;
}

/* Indicadores (dots) */
.gallery-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background-color: var(--amarillo);
    width: 24px;
    border-radius: 4px;
}

.product-info {
    padding: 24px;
}

.product-name {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 600;
    color: var(--azul);
    margin-bottom: 6px;
}

.product-type {
    font-size: 13px;
    color: var(--gris);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.product-price {
    font-size: 22px;
    font-weight: 600;
    color: var(--rojo);
    margin-bottom: 24px;
}

.option-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--azul);
    margin-bottom: 10px;
}

/* SELECTOR DE TALLA */
.size-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.size-btn {
    flex: 1;
    padding: 14px;
    font-size: 14px;
    font-weight: 600;
    color: var(--azul);
    background-color: white;
    border: 2px solid var(--beige);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.size-btn:active,
.size-btn.active {
    background-color: var(--amarillo);
    color: var(--azul);
    border-color: var(--amarillo);
}

/* SELECTOR DE CANTIDAD */
.quantity-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.qty-btn {
    width: 44px;
    height: 44px;
    font-size: 20px;
    font-weight: 600;
    background-color: white;
    border: 2px solid var(--beige);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--azul);
}

.qty-btn:active {
    background-color: var(--amarillo);
    border-color: var(--amarillo);
}

.qty-input {
    flex: 1;
    height: 44px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    border: 2px solid var(--beige);
    border-radius: 4px;
    background-color: white;
    color: var(--azul);
}

/* BOTÓN AGREGAR AL CARRITO */
.btn-add-cart {
    width: 100%;
    padding: 18px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: white;
    background-color: var(--azul);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-add-cart:active {
    background-color: var(--rojo);
    transform: scale(0.98);
}

/* ============================================
   MODAL DEL CARRITO
   ============================================ */

.cart-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: none;
    align-items: flex-end;
}

.cart-modal.active {
    display: flex;
}

.cart-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
}

.cart-content {
    position: relative;
    width: 100%;
    max-height: 85vh;
    background-color: white;
    border-radius: 20px 20px 0 0;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 30px;
    border-bottom: 1px solid var(--beige);
}

.cart-title {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 600;
    color: var(--azul);
}

.cart-close {
    width: 36px;
    height: 36px;
    font-size: 24px;
    color: var(--gris);
    background: none;
    border: none;
    cursor: pointer;
}

.cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px 30px;
}

.cart-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--gris);
}

/* ITEMS DEL CARRITO */
.cart-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--beige);
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    background-color: var(--beige);
}

.cart-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.cart-item-name {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    color: var(--azul);
}

.cart-item-details {
    font-size: 13px;
    color: var(--gris);
}

.cart-item-price {
    font-size: 16px;
    font-weight: 600;
    color: var(--rojo);
}

.cart-item-remove {
    background: none;
    border: none;
    color: var(--gris);
    font-size: 12px;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
}

/* FOOTER DEL CARRITO */
.cart-footer {
    padding: 24px 30px;
    border-top: 2px solid var(--beige);
    background: linear-gradient(135deg, var(--beige) 0%, var(--marfil) 100%);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.total-label {
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--azul);
}

.total-amount {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 600;
    color: var(--rojo);
}

.btn-checkout {
    width: 100%;
    padding: 18px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-decoration: none;
    color: white;
    background-color: var(--rojo);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: block;
    text-align: center;
    transition: all 0.3s ease;
}

.btn-checkout:active {
    background-color: #7a0003;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    body {
        background-color: white;
        align-items: flex-start;
    }
    #mobile-wrapper {
        max-width: 100%;
        width: 100%;
        height: 100dvh;
        max-height: 100dvh;
        border-radius: 0;
        box-shadow: none;
    }
    #mobile-wrapper::before { display: none; }
    .nav-header { top: 0; }

    /* Productos en grid 2 columnas en tablets */
    @media (min-width: 500px) {
        .products-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
            padding: 20px;
        }
    }
}
}

/* FOOTER CRÉDITOS */
.footer-creditos {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 28px 20px;
    background-color: var(--marfil);
    border-top: 1px solid var(--beige);
}

.footer-by {
    font-family: 'Playfair Display', serif;
    font-size: 14px;
    font-weight: 400;
    font-style: italic;
    letter-spacing: 2px;
    color: #1c3166;
    margin: 0;
}

.footer-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 50%;
}

.footer-handle {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2.5px;
    color: #1c3166;
    margin: 0;
}
