/* catalogo/styles.css */
/* Rediseño Visual Premium (Estilo Moda y Retail de Alta Gama - Simon Shop & Anthonys) */

/* Paleta de Colores de Lujo y Estilo Minimalista */
:root {
    --primary-color: #111111;
    --secondary-color: #262626;
    --accent-color: #000000;
    --accent-hover: #333333;
    --success-color: #16a34a;
    --warning-color: #d97706;
    --error-color: #dc2626;
    
    --bg-body: #ffffff;
    --bg-card: #ffffff;
    --text-color: #171717;
    --text-muted: #737373;
    --border-color: #e5e5e5;
    --border-radius: 4px;
    --border-radius-btn: 2px;
    
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.02);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.04);
    --shadow-lg: 0 12px 30px rgba(0,0,0,0.08);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    padding-top: 147px; /* 32px (promo-bar) + 70px (header) + 45px (categories) */
    -webkit-font-smoothing: antialiased;
}

/* Tipografías de Acentuación Serif Premium */
h1, h2, h3, .hero-content h1, .prod-info-name {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
}

/* Utilidades generales */
.text-danger { color: var(--error-color); }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }

/* --- PROMO BAR --- */
.promo-bar {
    background-color: var(--primary-color);
    color: white;
    height: 32px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 101;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.promo-bar-content {
    overflow: hidden;
    white-space: nowrap;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes promoSlideUp {
    0% {
        opacity: 0;
        transform: translateY(12px);
    }
    12% {
        opacity: 1;
        transform: translateY(0);
    }
    88% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-12px);
    }
}

.promo-slide-active {
    animation: promoSlideUp 3.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
    display: inline-block;
}

/* --- HEADER PREMIUM --- */
.main-header {
    background-color: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 32px; left: 0; right: 0;
    height: 115px; /* 70px main header + 45px categories subheader */
    z-index: 100;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.header-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    gap: 30px;
}

.logo-area {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo-text {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -0.5px;
    transition: color 0.3s;
}

.search-bar-container {
    flex-grow: 1;
    max-width: 480px;
}

.search-box {
    display: flex;
    background: #fcfcfc;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-btn);
    overflow: hidden;
    height: 40px;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.search-box:focus-within {
    border-color: var(--primary-color);
    background: #ffffff;
    box-shadow: 0 0 0 1px var(--primary-color);
}

.search-box input {
    border: none;
    background: transparent;
    padding: 0 16px;
    flex-grow: 1;
    font-size: 13px;
    color: var(--text-color);
    outline: none;
}

.search-box button {
    border: none;
    background: transparent;
    width: 44px;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 13px;
    transition: color 0.2s;
}

.search-box button:hover {
    color: var(--primary-color);
}

.cart-toggle-btn-modern {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 18px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
}

.cart-toggle-btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    filter: brightness(1.15);
}

.cart-btn-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.1;
}

.cart-btn-label {
    font-size: 14px;
    font-weight: 800;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.4px;
    color: #ffffff;
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.6);
    text-underline-offset: 3px;
}

.cart-btn-total {
    font-size: 10px;
    font-weight: 600;
    opacity: 0.9;
    margin-top: 3px;
    letter-spacing: 0.2px;
}

.cart-btn-right {
    position: relative;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
}

.cart-toggle-btn-modern .cart-badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background-color: #ef4444;
    color: white;
    font-size: 9px;
    font-weight: 800;
    min-width: 17px;
    height: 17px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--primary-color);
}

/* --- ANIMACIÓN FLY-TO-CART (OBJETO VOLADOR AL CARRITO) --- */
.flying-cart-item {
    position: fixed;
    z-index: 9999;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-color: #ffffff;
    box-shadow: 0 10px 25px rgba(0,0,0,0.25);
    border: 2px solid var(--primary-color);
    pointer-events: none;
    transition: all 0.75s cubic-bezier(0.19, 1, 0.22, 1);
}

@keyframes cartBadgeBounce {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}

@keyframes cartButtonPulse {
    0% { transform: scale(1); }
    40% { transform: scale(1.12); }
    70% { transform: scale(0.96); }
    100% { transform: scale(1); }
}

.cart-bounce-active {
    animation: cartButtonPulse 0.45s ease-in-out;
}

.cart-badge-bounce {
    animation: cartBadgeBounce 0.45s ease-in-out;
}

/* --- HERO BANNER (SLIDER PREMIUM Y ORGANIZADO) --- */
.hero-banners-section {
    position: relative;
    max-width: 1200px;
    margin: 20px auto 30px auto;
    height: 340px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.08);
}

.hero-slider {
    width: 100%;
    height: 100%;
    position: relative;
}

.hero-slide {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0; left: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), visibility 0.8s;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-color: #0f172a;
    display: flex;
    align-items: center;
    padding: 0 60px;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.1) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 520px;
    color: #ffffff;
}

.hero-content h1 {
    font-size: 38px;
    line-height: 1.15;
    margin-bottom: 14px;
    letter-spacing: -0.5px;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero-content p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 22px;
    line-height: 1.5;
}

.hero-btn {
    display: inline-block;
    padding: 12px 28px;
    background-color: var(--primary-color);
    color: white;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 1px;
    text-decoration: none;
    border-radius: var(--border-radius-btn);
    transition: all 0.3s;
}

.hero-btn:hover {
    background-color: #333333;
}

/* Default slide */
.hero-slide-default {
    width: 100%;
    height: 100%;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #171717;
}

.default-hero-content h1 {
    font-size: 36px;
    margin-bottom: 12px;
}

.default-hero-content p {
    font-size: 14px;
    color: #737373;
}

/* Flechas del Slider */
.slider-arrows {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 30px;
    right: 30px;
    display: flex;
    justify-content: space-between;
    z-index: 10;
    pointer-events: none;
}

.slider-arrow {
    background: white;
    border: 1px solid var(--border-color);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
    pointer-events: auto;
}

.slider-arrow:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.slider-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #d4d4d4;
    cursor: pointer;
    transition: all 0.3s;
}

.slider-dot.active {
    width: 18px;
    background: var(--primary-color);
    border-radius: 3px;
}

/* --- MAIN CONTENT LAYOUT CENTRADO Y ALINEADO --- */
.catalog-main-container,
.main-content-layout {
    max-width: 1200px;
    width: 100%;
    margin: 30px auto;
    padding: 0 24px;
}

.catalog-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 0 2px;
}

/* Categorías (Scroll Horizontal Integrado en Header - Estilo Ropa) */
.categories-nav-wrapper {
    width: 100%;
    height: 45px;
    border-top: 1px solid var(--border-color);
    background-color: #ffffff;
    display: flex;
    align-items: center;
}

.categories-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 24px;
}

.categories-scroll-container {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    scroll-behavior: smooth;
    align-items: center;
}

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

.cat-tab {
    position: relative;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 12px 16px;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 1.2px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.3s;
}

.cat-tab::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%;
    width: 0; height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease, left 0.3s ease;
}

.cat-tab:hover, .cat-tab.active {
    color: var(--primary-color);
}

.cat-tab:hover::after, .cat-tab.active::after {
    width: 100%;
    left: 0;
}

/* Cabecera resultados */
.catalog-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 10px;
}

.results-count {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.active-filters-row {
    display: flex;
    gap: 8px;
}

.filter-badge {
    background: #fafafa;
    border: 1px solid var(--border-color);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.filter-badge i {
    cursor: pointer;
    color: var(--error-color);
}

/* --- GRID DE PRODUCTOS PREMIUM --- */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

/* Spinner */
.loading-grid-spinner {
    grid-column: 1 / -1;
    padding: 100px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

.loading-grid-spinner i {
    font-size: 20px;
    margin-bottom: 12px;
    display: block;
    color: var(--primary-color);
}

/* Tarjeta de Producto (Estilo Moderno, Organizado y Limpio) */
.product-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
    border-color: #d1d5db;
}

/* Badges */
.product-card-badge {
    position: absolute;
    top: 18px; left: 18px;
    z-index: 5;
    padding: 4px 10px;
    font-size: 9px;
    font-weight: 800;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.badge-offer { background-color: var(--error-color); }
.badge-featured { background-color: #111827; color: #fff; }

/* Contenedor de Imagen de Producto */
.product-card-image-wrapper {
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
    background-color: #ffffff;
    border-radius: 10px;
    border: 1px solid #f1f5f9;
    padding: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card-image {
    width: 100%;
    height: 100%;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Cuerpo de la Tarjeta */
.product-card-body {
    padding: 14px 4px 0 4px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-category {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 4px;
}

.product-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 6px;
    cursor: pointer;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 40px;
    line-height: 1.4;
    transition: color 0.2s;
}

.product-title:hover {
    color: var(--primary-color);
}

/* Indicadores de stock */
.stock-indicator {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 10px;
}
.stock-indicator.stock-in { color: var(--success-color); }
.stock-indicator.stock-low { color: var(--warning-color); }
.stock-indicator.stock-out { color: var(--error-color); }

/* Precios */
.product-prices-row {
    margin-bottom: 12px;
}

.price-regular {
    font-size: 17px;
    font-weight: 800;
    color: var(--primary-color);
}

.price-offer-container {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.price-old {
    font-size: 12px;
    text-decoration: line-through;
    color: var(--text-muted);
}

.price-promo {
    font-size: 17px;
    font-weight: 800;
    color: var(--error-color);
}

/* Botón de Compra */
.btn-add-to-cart {
    width: 100%;
    height: 40px;
    border: none;
    background-color: var(--primary-color);
    color: white;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.8px;
    font-weight: 800;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
    margin-top: 6px;
}

.btn-add-to-cart:hover {
    background-color: #262626;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

.btn-add-to-cart:active {
    transform: scale(0.98);
}

/* --- PAGINACIÓN --- */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
}

.btn-pagination {
    padding: 10px 20px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    border-radius: var(--border-radius-btn);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-color);
    transition: all 0.2s;
}

.btn-pagination:hover:not(:disabled) {
    background-color: #fafafa;
    border-color: var(--primary-color);
}

.btn-pagination:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.page-number-info {
    font-size: 12px;
    color: var(--text-muted);
}

/* --- FOOTER --- */
.main-footer {
    background-color: #f9f9f9;
    border-top: 1px solid var(--border-color);
    margin-top: 100px;
    padding-top: 60px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px 50px 24px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
}

.footer-col-info h4, .footer-col-contact h4 {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 16px;
}

.footer-col-info p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
    max-width: 360px;
}

.social-links-row {
    display: flex;
    gap: 12px;
}

.social-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: white;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.social-btn:hover {
    transform: translateY(-2px);
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.contact-list {
    list-style: none;
}

.contact-list li {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.contact-list li i {
    color: var(--primary-color);
    margin-top: 4px;
}

.footer-bottom-bar {
    border-top: 1px solid var(--border-color);
    padding: 20px 24px;
    background-color: #ffffff;
}

.footer-bottom-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-bottom-container p {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

/* --- WHATSAPP FAB FIJO --- */
.whatsapp-fixed-fab {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background-color: #25D366;
    color: white;
    position: fixed;
    bottom: 30px; right: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.35);
    z-index: 90;
    transition: all 0.3s;
    text-decoration: none;
}

.whatsapp-fixed-fab:hover {
    transform: scale(1.08) translateY(-3px);
    background-color: #20ba5a;
}

/* --- CART DRAWER LATERAL SLIDE-OVER (ESTILO SHOPIFY / ZARA) --- */
.cart-drawer-backdrop {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
    z-index: 250;
    display: flex;
    justify-content: flex-end;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s;
}

.cart-drawer-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.cart-drawer-panel {
    width: 100%;
    max-width: 440px;
    height: 100%;
    background-color: #ffffff;
    box-shadow: -10px 0 35px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.cart-drawer-backdrop.active .cart-drawer-panel {
    transform: translateX(0);
}

/* Header del Drawer */
.cart-drawer-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
}

.cart-drawer-title {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-items-count-tag {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 600;
    background: #f5f5f5;
    color: var(--text-muted);
    padding: 3px 8px;
    border-radius: 12px;
}

.close-drawer-btn {
    background: transparent;
    border: none;
    font-size: 26px;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.2s;
    line-height: 1;
}

.close-drawer-btn:hover {
    color: var(--primary-color);
}

/* Barra de Progreso de Envío Gratis */
.cart-free-shipping-bar {
    background: #fafafa;
    padding: 14px 24px;
    border-bottom: 1px solid var(--border-color);
    font-size: 12px;
}

.free-shipping-text {
    color: var(--text-color);
    margin-bottom: 6px;
    line-height: 1.3;
}

.free-shipping-text strong {
    color: var(--primary-color);
}

.free-shipping-progress {
    height: 6px;
    background: #e5e5e5;
    border-radius: 3px;
    overflow: hidden;
}

.free-shipping-fill {
    height: 100%;
    background: var(--success-color);
    border-radius: 3px;
    transition: width 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Cuerpo Scrolleable del Drawer */
.cart-drawer-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 24px;
}

/* Items del Carrito */
.cart-items-list {
    margin-bottom: 24px;
}

.cart-item-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid #f0f0f0;
}

.cart-item-row:last-child {
    border-bottom: none;
}

.cart-item-img {
    width: 64px;
    height: 64px;
    background-color: #f6f6f6;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}

.cart-item-details {
    flex-grow: 1;
}

.cart-item-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 4px;
    line-height: 1.3;
}

.cart-item-price {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-color);
}

.cart-item-qty-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.qty-btn {
    border: 1px solid var(--border-color);
    background: #ffffff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.qty-btn:hover {
    background-color: #f5f5f5;
    border-color: var(--primary-color);
}

.qty-val {
    font-size: 12px;
    font-weight: 700;
    min-width: 18px;
    text-align: center;
}

.remove-item-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 13px;
    margin-left: 6px;
    transition: color 0.2s;
}

.remove-item-btn:hover {
    color: var(--error-color);
}

/* Footer Fijo Sticky */
.cart-drawer-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
    background: #ffffff;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.03);
}

.subtotal-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    color: var(--text-muted);
}

.subtotal-amount {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
}

/* MODAL DE DETALLE Y OTROS MODALES */
.modal-backdrop {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.modal-content-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.modal-backdrop.active .modal-content-card {
    transform: translateY(0);
}

.modal-product-width {
    width: 100%;
    max-width: 780px;
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-modal-btn {
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.2s;
}

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

.modal-body {
    padding: 24px;
    overflow-y: auto;
}

/* --- DETALLES INTERNOS DEL CARRITO --- */
.cart-items-list {
    max-height: 220px;
    overflow-y: auto;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.cart-item-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
}

.cart-item-row:last-child {
    border-bottom: none;
}

.cart-item-img {
    width: 50px;
    height: 50px;
    background-color: #fafafa;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 2px;
    border: 1px solid var(--border-color);
}

.cart-item-details {
    flex-grow: 1;
}

.cart-item-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-color);
}

.cart-item-price {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
}

.cart-item-qty-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qty-btn {
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.qty-btn:hover {
    background-color: #f5f5f5;
    border-color: var(--primary-color);
}

.qty-val {
    font-size: 12px;
    font-weight: 700;
    min-width: 16px;
    text-align: center;
}

.cart-summary-totals {
    background-color: #f9f9f9;
    padding: 14px;
    border-radius: var(--border-radius);
    margin-bottom: 24px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 700;
}

/* Formulario Checkout */
.checkout-form-section h4 {
    font-family: 'Playfair Display', serif;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-btn);
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
}

.form-control:focus {
    border-color: var(--primary-color);
}

.form-group label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    display: block;
}

.btn-checkout-submit {
    width: 100%;
    height: 44px;
    border: none;
    background-color: #25D366;
    color: white;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
    border-radius: var(--border-radius-btn);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    transition: background-color 0.2s;
}

.btn-checkout-submit:hover {
    background-color: #20ba5a;
}

/* --- DETALLES INTERNOS DEL DETALLE DE PRODUCTO --- */
.product-detail-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

@media (min-width: 600px) {
    .product-detail-layout {
        grid-template-columns: 1.1fr 0.9fr;
    }
}

.prod-gallery-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.prod-main-img {
    width: 100%;
    height: 320px;
    background-color: #fafafa;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.prod-thumbs-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
}

.prod-thumb {
    width: 55px;
    height: 55px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    border: 1px solid var(--border-color);
    border-radius: 2px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.prod-thumb.active, .prod-thumb:hover {
    border-color: var(--primary-color);
}

.prod-info-container {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.prod-info-name {
    font-size: 24px;
    line-height: 1.2;
    color: var(--text-color);
    margin-bottom: 6px;
}

.prod-info-cat {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.prod-info-prices {
    margin-bottom: 20px;
}

.prod-info-price-reg {
    font-size: 22px;
    font-weight: 700;
}

.prod-info-price-promo {
    font-size: 24px;
    font-weight: 700;
    color: var(--error-color);
}

.prod-info-desc {
    font-size: 13px;
    color: #404040;
    margin-bottom: 24px;
    line-height: 1.7;
}

.prod-info-stock-badge {
    display: inline-block;
    align-self: flex-start;
    padding: 4px 10px;
    font-size: 9px;
    font-weight: 700;
    color: white;
    background-color: var(--success-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
}

.stock-out { background-color: var(--text-muted); }
.stock-low { background-color: var(--warning-color); }

/* --- RESPONSIVIDAD GENERAL --- */
@media (max-width: 580px) {
    body {
        padding-top: 65px;
    }
    .main-header {
        height: 65px;
    }
    .header-container {
        padding: 0 16px;
        gap: 15px;
    }
    .logo-text {
        font-size: 20px;
    }
    .search-box {
        height: 36px;
    }
    .search-box input {
        padding: 0 12px;
        font-size: 12px;
    }
    .search-box button {
        width: 36px;
    }
    .hero-banners-section {
        height: 220px;
    }
    .hero-slide {
        padding: 0 30px;
    }
    .hero-content h1 {
        font-size: 24px;
        margin-bottom: 8px;
    }
    .hero-content p {
        font-size: 12px;
        margin-bottom: 14px;
    }
    .hero-btn {
        padding: 8px 18px;
        font-size: 10px;
    }
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
    }
    .product-card-image-wrapper {
        height: 180px;
    }
}

/* --- GOOGLE AUTH & 2-STEP CHECKOUT STYLES --- */
.btn-google-login {
    background: #ffffff;
    color: #333333;
    border: 1px solid #e0e0e0;
    padding: 7px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    transition: all 0.2s ease;
}

.btn-google-login i {
    color: #4285F4;
    font-size: 14px;
}

.btn-google-login:hover {
    background: #f8f9fa;
    border-color: #cccccc;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.user-profile-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f5f5f5;
    padding: 4px 10px 4px 5px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.user-profile-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
}

.user-profile-name {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-color);
}

.btn-logout-icon {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 11px;
    padding: 2px 4px;
    transition: color 0.2s;
}

.btn-logout-icon:hover {
    color: var(--error-color);
}

/* 2-Step Cart Drawer Views */
.cart-step-view {
    display: flex;
    flex-direction: column;
    height: calc(100% - 65px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cart-step-back-bar {
    padding: 10px 24px;
    background: #f9f9f9;
    border-bottom: 1px solid var(--border-color);
}

.btn-step-back {
    background: transparent;
    border: none;
    color: var(--text-color);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    transition: color 0.2s;
}

.btn-step-back:hover {
    color: var(--primary-color);
}

.checkout-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.checkout-header-row h4 {
    margin-bottom: 0;
}

.btn-whatsapp-green {
    background-color: #25D366 !important;
    color: white !important;
}

.btn-whatsapp-green:hover {
    background-color: #20ba5a !important;
}

/* Profile Dropdown Menu & Orders History Styles */
.user-dropdown-container {
    position: relative;
    display: inline-block;
}

.user-profile-badge {
    cursor: pointer;
    user-select: none;
}

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
    min-width: 220px;
    z-index: 1000;
    padding: 8px 0;
    display: none;
}

/* Puente transparente para que nunca se pierda el hover al bajar el mouse */
.user-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 10px;
    background: transparent;
}

.user-dropdown-container:hover .user-dropdown-menu,
.user-dropdown-menu.show {
    display: block;
}

.user-dropdown-header {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 4px;
}

.user-dropdown-header strong {
    display: block;
    font-size: 13px;
    color: var(--text-color);
}

.user-dropdown-header span {
    font-size: 11px;
    color: var(--text-muted);
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-color);
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease;
}

.user-dropdown-item:hover {
    background: #f5f5f7;
    color: var(--primary-color);
}

.user-dropdown-item.text-danger:hover {
    background: #fef2f2;
    color: var(--error-color);
}

/* Order History Cards */
.order-history-card {
    background: #f9fafb;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 14px;
}

.order-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.order-id-badge {
    font-weight: 800;
    font-size: 13px;
    color: var(--primary-color);
}

.order-status-badge {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    background: #e0f2fe;
    color: #0369a1;
}

.order-items-list {
    margin: 10px 0;
    font-size: 12px;
}

.order-item-subrow {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
    color: var(--text-color);
}

.order-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px dashed var(--border-color);
    padding-top: 10px;
    margin-top: 10px;
    font-size: 12px;
}

/* --- BARRA INTERACTIVA DEMO DE RUBROS --- */
.demo-rubro-switcher-bar {
    background: #0f172a;
    color: #ffffff;
    padding: 10px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 99;
}

.demo-switcher-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #38bdf8;
}

.demo-rubro-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.demo-rubro-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #f1f5f9;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.demo-rubro-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    transform: translateY(-1px);
}

.demo-rubro-btn.active {
    background: #38bdf8;
    color: #0f172a;
    border-color: #38bdf8;
    box-shadow: 0 2px 10px rgba(56, 189, 248, 0.4);
}

/* --- WIDGETS ESPECIALIZADOS DE RUBRO --- */
.industry-widget-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 20px 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.widget-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.widget-title-row h3 {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 800;
    margin: 0;
    color: #1e293b;
}

.tire-search-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    align-items: end;
}

.tire-field-group label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.tire-field-group select {
    width: 100%;
    height: 42px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    padding: 0 12px;
    font-weight: 700;
    color: #1e293b;
}

.btn-tire-search {
    height: 42px;
    background: #f97316;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-weight: 800;
    font-size: 13px;
    text-transform: uppercase;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s;
}

.btn-tire-search:hover {
    background: #ea580c;
}

/* --- 12. NAVEGACIÓN DE GALERÍA Y VISOR LIGHTBOX ZOOM --- */
.prod-main-img {
    position: relative;
    cursor: zoom-in;
}

/* Flechas flotantes sobre la foto principal */
.gallery-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.gallery-nav-btn:hover {
    background: rgba(15, 23, 42, 0.95);
    transform: translateY(-50%) scale(1.1);
    color: #ffffff;
}

.gallery-nav-btn.nav-prev {
    left: 10px;
}

.gallery-nav-btn.nav-next {
    right: 10px;
}

/* Botón flotante para agrandar la imagen (Zoom) */
.gallery-zoom-trigger {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.7);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
}

.gallery-zoom-trigger:hover {
    background: var(--primary-color, #0284c7);
    transform: scale(1.1);
}

/* Modal Lightbox Fullscreen */
.lightbox-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox-modal.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-close-btn {
    position: absolute;
    top: 24px; right: 28px;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 36px;
    cursor: pointer;
    z-index: 10001;
    opacity: 0.8;
    transition: opacity 0.2s, transform 0.2s;
}

.lightbox-close-btn:hover {
    opacity: 1;
    transform: scale(1.15);
}

.lightbox-content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 90vw;
    max-height: 85vh;
}

.lightbox-img-content {
    max-width: 85vw;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox-caption {
    margin-top: 16px;
    color: #f1f5f9;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-align: center;
    background: rgba(0, 0, 0, 0.4);
    padding: 6px 16px;
    border-radius: 20px;
}

.lightbox-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10000;
    transition: all 0.2s ease;
}

.lightbox-nav-btn:hover {
    background: var(--primary-color, #0284c7);
    border-color: transparent;
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev { left: 30px; }
.lightbox-next { right: 30px; }
