/* ==========================================================================
   CONFIGURACIÓN GENERAL Y VARIABLES
   ========================================================================== */
:root {
    --primary-color: #1e293b;
    --accent-color: #ff9900;
    --success-color: #10b981;
    --text-main: #0f172a;
    --text-muted: #475569;
    --bg-site: #f8fafc;
    --bg-card: #ffffff;
    --border-color: #cbd5e1;
    --radius-md: 12px;
    --radius-sm: 6px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-site);
    color: var(--text-main);
    min-height: 100vh;
}

/* ==========================================================================
   BARRA DE NAVEGACIÓN (NAVBAR BLANCO)
   ========================================================================== */
.navbar {
    background-color: #ffffff;
    padding: 14px 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.nav-logo-img {
    height: 45px;
    object-fit: contain;
}

.search-box {
    flex: 1;
    max-width: 500px;
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon-left {
    position: absolute;
    left: 14px;
    color: #64748b;
    display: flex;
    align-items: center;
}

.search-box input {
    width: 100%;
    padding: 10px 16px 10px 42px;
    border: 1px solid var(--border-color);
    border-radius: 30px;
    background-color: #f1f5f9;
    color: var(--text-main);
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-box input:focus {
    background-color: #ffffff;
    border-color: var(--accent-color);
    outline: none;
}

.header-right-actions {
    display: flex;
    align-items: center;
    gap: 24px;
}

.social-icons-group {
    display: flex;
    gap: 14px;
}

.social-link {
    color: #475569;
    font-size: 18px;
    transition: color 0.2s;
}

.social-link:hover {
    color: var(--accent-color);
}

.mobile-cart-btn {
    position: relative;
    color: #334155;
    display: flex;
    align-items: center;
    text-decoration: none;
    padding: 8px;
    border-radius: 50%;
    background: #f1f5f9;
    border: none;
    cursor: pointer;
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--accent-color);
    color: #ffffff;
    font-size: 11px;
    font-weight: bold;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================================================
   BARRA DE CATEGORÍAS
   ========================================================================== */
.category-bar {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 14px 24px;
}

.category-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 10px;
    overflow-x: auto;
}

.category-link {
    text-decoration: none;
    color: var(--text-main);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    background-color: #f1f5f9;
    border: 1px solid var(--border-color);
}

.category-link:hover, .active-pill {
    background-color: var(--accent-color);
    color: #ffffff;
    border-color: var(--accent-color);
}

/* ==========================================================================
   SECCIÓN BANNER PRINCIPAL (HOME)
   ========================================================================== */
.main-banner-section {
    max-width: 1200px;
    margin: 24px auto 12px auto;
    padding: 0 24px;
}

.banner-wrapper {
    width: 100%;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.banner-item img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* ==========================================================================
   SECCIÓN DE PROMOCIONES DESTACADAS
   ========================================================================== */
.promociones-section {
    max-width: 1200px;
    margin: 20px auto 10px auto;
    padding: 0 24px;
}

.promo-section-title {
    font-size: 22px;
    color: #1e293b;
    margin-bottom: 16px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
}

.promos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

.promo-card-box {
    border-radius: 12px;
    padding: 20px;
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.25s ease;
}

.promo-card-box:hover {
    transform: translateY(-3px);
}

.promo-orange {
    background: linear-gradient(135deg, #ff9900 0%, #ff5500 100%);
    box-shadow: 0 4px 15px rgba(255, 85, 0, 0.2);
}

.promo-dark {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    box-shadow: 0 4px 15px rgba(15, 23, 42, 0.15);
    border: 1px solid #cbd5e1;
}

.promo-tag {
    background: rgba(255,255,255,0.2);
    padding: 4px 8px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 8px;
}

.tag-orange {
    background: #ff9900;
}

.promo-card-box h3 {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 4px;
    line-height: 1.2;
}

.promo-card-box p {
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 12px;
}

.promo-info-left a {
    background: #ffffff;
    color: #ff5500;
    text-decoration: none;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: bold;
    border-radius: 6px;
    display: inline-block;
}

.promo-dark .promo-info-left a {
    background: rgba(255,255,255,0.1);
    color: #ffffff;
    border: 1px solid #ffffff;
}

.promo-bg-icon {
    position: absolute;
    right: -10px;
    bottom: -10px;
    font-size: 110px;
    color: rgba(255,255,255,0.1);
    transform: rotate(-15deg);
    z-index: 1;
}

/* ==========================================================================
   CATÁLOGO DE PRODUCTOS
   ========================================================================== */
.main-content {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 24px;
}

.section-title {
    font-size: 26px;
    color: var(--primary-color);
    margin-bottom: 24px;
    font-weight: 800;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 30px;
}

.product-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(15,23,42,0.08);
}

.product-id-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: #334155;
    color: #ffffff;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: bold;
    border-radius: var(--radius-sm);
    z-index: 5;
}

.product-img-wrapper {
    width: 100%;
    height: 250px;
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.product-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.no-img-box {
    width: 100%;
    height: 100%;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 14px;
}

.product-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-tags-row {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.tag-pill {
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    padding: 5px 10px;
    border-radius: 6px;
}

.accent-bg { background-color: #fee2e2; color: #ef4444; }
.secondary-bg { background-color: #e0f2fe; color: #0284c7; }

.product-name {
    font-size: 18px;
    color: #0f172a;
    font-weight: 700;
    margin-bottom: 6px;
    text-transform: capitalize;
}

.product-description {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.product-price {
    font-size: 22px;
    font-weight: 800;
    color: #10b981;
}

/* --- Bloque de precios con promoción --- */
.price-block {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.promo-badge-pill {
    display: inline-block;
    background: #ff5500;
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 20px;
    letter-spacing: 0.3px;
    width: fit-content;
}

.price-original {
    font-size: 13px;
    color: #94a3b8;
    text-decoration: line-through;
    font-weight: 500;
}

.price-final {
    font-size: 22px;
    font-weight: 800;
    color: #10b981;
    line-height: 1;
}

/* Borde naranja sutil en cards con promo activa */
.product-card.has-promo {
    border-color: #fed7aa;
    box-shadow: 0 2px 12px rgba(255, 102, 0, 0.08);
}

.product-card.has-promo:hover {
    border-color: #ff9900;
    box-shadow: 0 10px 24px rgba(255, 102, 0, 0.12);
}

/* Etiqueta "PROMO" flotante sobre la imagen */
.promo-corner-label {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #ff5500, #ff9900);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(255, 85, 0, 0.3);
}

/* Pill especial para "Promociones" en la barra de categorías */
.category-link.promo-pill {
    background: linear-gradient(135deg, #ff5500, #ff9900);
    color: #fff !important;
    font-weight: 700;
}

.category-link.promo-pill:hover,
.category-link.promo-pill.active-pill {
    background: linear-gradient(135deg, #e04800, #e08000);
    color: #fff !important;
}

.btn-add-submit {
    background-color: #ff9900;
    color: #ffffff;
    border: none;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ==========================================================================
   CARRITO LATERAL (SIDEBAR)
   ========================================================================== */

/* Overlay de fondo (elemento HTML separado) */
.cart-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 199;
    cursor: pointer;
}
.cart-overlay.is-visible { display: block; }

/* Panel del carrito */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 380px;
    height: 100vh;
    background-color: #ffffff;
    box-shadow: -4px 0 30px rgba(0,0,0,0.18);
    z-index: 200;
    display: flex;
    flex-direction: column;
    transition: right 0.38s cubic-bezier(0.16, 1, 0.3, 1);
}
.cart-sidebar.is-open { right: 0; }

/* Cabecera */
.cart-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
}
.cart-title { font-size: 18px; font-weight: 700; color: var(--primary-color); display: flex; align-items: center; gap: 10px; }

/* Botón X de cerrar */
.cart-close-btn {
    background: #f1f5f9;
    border: none;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #475569;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}
.cart-close-btn:hover { background: #fee2e2; color: #ef4444; }

/* Cuerpo y footer — color unificado blanco */
.cart-items-container { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 16px; background: #ffffff; }
.cart-item { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--border-color); }
.cart-item-img { width: 55px; height: 55px; object-fit: contain; background: #f8fafc; border-radius: var(--radius-sm); border: 1px solid var(--border-color); flex-shrink: 0; }
.cart-item-details h4 { font-size: 14px; color: var(--primary-color); margin-bottom: 4px; }
.item-price-unit { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.cart-item-qty-controls { display: flex; align-items: center; gap: 10px; }
.btn-qty-btn { background-color: #f1f5f9; border: 1px solid var(--border-color); width: 24px; height: 24px; border-radius: 4px; font-weight: bold; cursor: pointer; }
.qty-number { font-size: 13px; font-weight: 600; }
.cart-item-right { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.item-subtotal { font-size: 14px; font-weight: 700; color: var(--primary-color); }
.btn-remove-btn { background: none; border: none; color: #ef4444; cursor: pointer; }
.cart-footer { padding: 24px; border-top: 2px solid var(--border-color); background-color: #ffffff; }
.cart-total-box { display: flex; justify-content: space-between; font-size: 16px; font-weight: bold; margin-bottom: 16px; }
.total-amount { font-size: 20px; color: #10b981; }
.input-checkout { width: 100%; padding: 10px 14px; border: 1px solid var(--border-color); border-radius: var(--radius-sm); margin-bottom: 10px; }
.btn-whatsapp { width: 100%; background-color: #25d366; color: #ffffff; border: none; padding: 14px; border-radius: var(--radius-sm); font-size: 14px; font-weight: bold; cursor: pointer; text-align: center; }
.btn-disabled { background-color: #cbd5e1; color: #94a3b8; cursor: not-allowed; }
.btn-limpiar-carrito { width: 100%; margin-top: 10px; background: none; border: 1px solid #fca5a5; color: #ef4444; border-radius: var(--radius-sm); padding: 10px; font-size: 13px; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; transition: background 0.2s, color 0.2s; }
.btn-limpiar-carrito:hover { background: #fef2f2; border-color: #ef4444; }
.cart-no-img { width: 55px; height: 55px; background: #e2e8f0; border-radius: 6px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: #94a3b8; font-size: 10px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   FOOTER DE LA TIENDA
   ========================================================================== */
.site-footer {
    background-color: #0f172a;
    color: #94a3b8;
    margin-top: 64px;
}

.footer-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 56px 24px 40px;
    display: grid;
    grid-template-columns: 1.8fr 1fr 1fr 1fr;
    gap: 48px;
}

/* Columna izquierda: marca */
.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-logo {
    height: 42px;
    width: auto;
    object-fit: contain;
    object-position: left;
    filter: brightness(0) invert(1);
}

.footer-brand-desc {
    font-size: 0.875rem;
    line-height: 1.75;
    color: #94a3b8;
    max-width: 260px;
}

.footer-powered {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid #1e293b;
}

.footer-powered-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #475569;
    white-space: nowrap;
}

.footer-goru-logo {
    height: 34px;
    width: auto;
    object-fit: contain;
    /* Invierte colores para que sea visible sobre fondo oscuro */
    filter: brightness(0) invert(0.7);
    opacity: 0.75;
    transition: opacity 0.2s, filter 0.2s;
}

.footer-goru-logo:hover {
    opacity: 1;
    filter: brightness(0) invert(1);
}

/* Columnas de links */
.footer-col-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 20px;
    letter-spacing: 0.02em;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links li a {
    font-size: 0.875rem;
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links li a:hover {
    color: #ff9900;
}

/* Divisor */
.footer-divider {
    border: none;
    border-top: 1px solid #1e293b;
    margin: 0;
}

/* Barra inferior */
.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.footer-copy {
    font-size: 0.8rem;
    color: #475569;
}

.footer-socials {
    display: flex;
    align-items: center;
    gap: 16px;
}

.footer-social-link {
    color: #475569;
    font-size: 17px;
    transition: color 0.2s;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.footer-social-link:hover { color: #ff9900; }

/* Responsive footer */
@media (max-width: 900px) {
    .footer-main {
        grid-template-columns: 1fr 1fr;
        gap: 36px;
    }
    .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
    .navbar-container {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
        row-gap: 12px;
        column-gap: 20px;
        align-items: center;
    }
    .nav-left {
        grid-column: 1;
        grid-row: 1;
        justify-self: start;
    }
    .header-right-actions {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
    }
    .search-box {
        grid-column: 1 / span 2;
        grid-row: 2;
        width: 100%;
        max-width: 100%;
    }
    .social-icons-group {
        display: none;
    }
    .promos-grid { grid-template-columns: 1fr !important; }
    .products-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
    .footer-main { grid-template-columns: 1fr; gap: 28px; padding: 36px 20px 24px; }
    .footer-brand { grid-column: auto; }
    .footer-bottom { flex-direction: column; text-align: center; gap: 12px; }
}

/* ==========================================
   ESTILOS: VISTA RÁPIDA (MODAL) ESTILO AMAZON
   ========================================== */
.modal-backdrop {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background-color: white;
    width: 90%;
    max-width: 850px;
    border-radius: 24px;
    position: relative;
    overflow: hidden;
    padding: 30px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.close-btn {
    position: absolute;
    top: 15px; right: 20px;
    font-size: 30px;
    background: #f1f5f9;
    border: none;
    width: 40px; height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    transition: all 0.2s;
}

.close-btn:hover {
    background-color: #e2e8f0;
    color: #0f172a;
}

.modal-body {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 30px;
}

@media(max-width: 768px) {
    .modal-body { grid-template-columns: 1fr; }
    .modal-content { overflow-y: auto; max-height: 90vh; padding: 20px; }
    .close-btn { top: 10px; right: 10px; }
}

.modal-img-container {
    background: #f8fafc;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
    height: 360px;
    padding: 20px;
}

.modal-img-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* DETALLES INTERNOS */
.tags {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.tag-cat {
    color: var(--accent-color);
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.tag-gender {
    background-color: var(--primary-color);
    color: white;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.product-name {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
}

.product-price {
    font-size: 24px;
    color: var(--accent-color);
    font-weight: 800;
    margin-bottom: 20px;
}

.description-section h3, .sizes-section h3 {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.description-section p {
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* SELECTOR DE TALLAS */
.size-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    margin-top: 8px;
}

.size-option {
    padding: 10px 16px;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    font-size: 13.5px;
    transition: all 0.2s;
    color: var(--text-main);
    min-width: 70px;
    text-align: center;
}

.size-option:hover {
    border-color: #cbd5e1;
    background-color: #f8fafc;
}

.size-option.selected {
    border-color: var(--accent-color);
    background-color: #fffbeb;
    color: var(--accent-color);
}

.size-option.out-of-stock {
    border: 2px dashed #cbd5e1;
    color: #94a3b8;
    cursor: not-allowed;
    opacity: 0.6;
    background: #f1f5f9;
}

.modal-action-btn {
    width: 100%;
    padding: 14px;
    background-color: #e2e8f0;
    color: #94a3b8;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14.5px;
    cursor: not-allowed;
    transition: all 0.2s ease;
}

.modal-action-btn.active {
    background-color: var(--accent-color);
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(255, 153, 0, 0.3);
}

.modal-action-btn.active:hover {
    background-color: #e08800;
    transform: translateY(-1px);
}