/* =========================================
   1. VARIABLES Y CONFIGURACIÓN BASE
   ========================================= */
:root {
    --primary-gradient: linear-gradient(180deg, #240c0c 0%, #290202 100%);
    --bg-white: #ffffff;
    --card-bg: #f8f8f8;
    --text-dark: #3b0606;
    --accent-purple: #831616;
    --gray-light: #eee;
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    background-color: #f0f0f0; /* Fondo gris para resaltar el contenedor */
    display: flex;
    justify-content: center;
}

/* Contenedor Principal (Fluido) */
.mobile-container {
    width: 100%;
    max-width: 1200px; /* Ancho máximo en PC */
    background-color: var(--bg-white);
    min-height: 100vh;
    position: relative;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

/* =========================================
   2. ENCABEZADO (HEADER)
   ========================================= */
.main-header {
    background: var(--primary-gradient);
    padding: 18px 20px;
    color: white;
    border-radius: 0 0 28px 28px;
    position: sticky;
    top: 0;
    z-index: 60;
}

.logo-img {
    width: 58px;
    max-width: 58px;
    height: auto;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.25);
}

.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    text-decoration: none;
    color: inherit;
}

.brand-text h1 {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    margin: 0;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.brand-text p {
    font-size: 0.75rem;
    margin: 5px 0 0 0;
    opacity: 0.9;
    letter-spacing: 0.4px;
}

.contact-menu {
    position: relative;
    margin-left: auto;
}

.contact-toggle {
    background: #ffffff;
    color: var(--text-dark);
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.contact-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
}

.contact-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 170px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.2);
    padding: 8px;
    display: none;
    z-index: 20;
}

.contact-dropdown.open {
    display: block;
}

.contact-dropdown a {
    display: block;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    padding: 10px 12px;
    border-radius: 10px;
}

.contact-dropdown a:hover {
    background: rgba(131, 22, 22, 0.08);
}

/* =========================================
   3. CUERPO Y SECCIÓN DE TÍTULO
   ========================================= */
.content {
    padding: 20px 0;
}

.section-title {
    font-family: 'Playfair Display', serif;
    text-align: center;
    color: var(--text-dark);
    margin: 30px 0;
    font-size: 1.6rem;
}

/* =========================================
   4. GRILLA DE PRODUCTOS (RESPONSIVA)
   ========================================= */
.product-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 16px;
    padding: 0 32px 12px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-padding-left: 32px;
    scroll-padding-right: 32px;
}

.product-card {
    background: transparent;
    display: flex;
    flex-direction: column;
    color: #3b0606;
    flex: 0 0 180px;
    scroll-snap-align: start;
    cursor: pointer;
}

.product-grid::-webkit-scrollbar {
    height: 8px;
}

.product-grid::-webkit-scrollbar-thumb {
    background: rgba(59, 6, 6, 0.35);
    border-radius: 999px;
}

.product-grid::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.06);
    border-radius: 999px;
}

.product-card:hover .image-wrapper img {
    transform: scale(1.03);
}

.image-wrapper {
    background-color: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 1 / 1; /* Cuadrado perfecto siempre */
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-info h3 {
    font-size: 0.8rem;
    font-weight: 600;
    margin: 12px 0 8px 0;
    color: inherit;
    text-transform: uppercase;
    min-height: 40px; /* Alineación de títulos */
}

.size-selector {
    display: flex;
    gap: 6px;
    margin: 2px 0 8px;
}

.size-option {
    border: 1px solid rgba(59, 6, 6, 0.35);
    background: #fff;
    color: #3b0606;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.size-option:hover {
    transform: translateY(-1px);
}

.size-option.active {
    background: #3b0606;
    border-color: #3b0606;
    color: #fff;
}

.price {
    display: inline-block;
    font-weight: 700;
    font-size: 1rem;
    color: inherit;
}

.product-price,
.btn-outline {
    color: inherit;
}

/* =========================================
   5. BANNER DE PRODUCTO
   ========================================= */
.product-banner {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 80;
}

.product-banner.open {
    display: flex;
}

.banner-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.banner-content {
    position: relative;
    width: min(460px, 100%);
    background: #fff;
    border-radius: 22px;
    padding: 18px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.banner-close {
    position: absolute;
    top: 10px;
    right: 10px;
    border: 0;
    background: rgba(0, 0, 0, 0.08);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
}

.banner-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 14px;
}

.banner-title {
    margin: 0;
    color: var(--text-dark);
    font-size: 1.1rem;
    text-transform: uppercase;
}

.banner-description {
    margin: 10px 0;
    color: #5a2424;
    line-height: 1.45;
    font-size: 0.95rem;
}

.banner-size-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 6px 0 12px;
}

.banner-size-selector[hidden] {
    display: none !important;
}

.banner-size-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #5a2424;
}

.size-selector-modal {
    margin: 0;
}

.banner-price {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #6d0b0b;
}

/* =========================================
   6. BADGE DE AGOTADO
   ========================================= */
.out-of-stock-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-align: center;
    pointer-events: none;
}

.image-wrapper {
    position: relative;
}

.product-card.out-of-stock .image-wrapper img {
    opacity: 0.4;
}

/* =========================================
   7. BADGE DE DESCUENTO
   ========================================= */
.discount-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #ff4444;
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(255, 68, 68, 0.4);
}

.original-price {
    text-decoration: line-through;
    font-size: 0.85rem;
    color: #999;
    display: block;
    margin: 0;
}

.discounted-price {
    color: #831616;
    font-weight: 700;
    font-size: 1.05rem;
    display: block;
    margin: 0;
    margin-top: 0px;
}
