/* ===== TIENDA ONLINE - ESTILOS ESPECÍFICOS ===== */

/* Variables específicas de tienda */
:root {
    --tienda-bg: #F8F9FA;
    --tienda-card-bg: #ffffff;
    --tienda-border: #E8E8E8;
    --tienda-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --tienda-shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.15);
    --tienda-price: #B7410E;
    --tienda-sale: #DC3545;
    --tienda-stock: #28A745;
    --tienda-out: #6C757D;
}

/* ===== HEADER DE TIENDA ===== */
/* ===== HEADER DE TIENDA PREMIUM ===== */
.tienda-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d3436 100%);
    padding: 80px 0;
    margin-top: 80px;
    position: relative;
    overflow: hidden;
    color: var(--white);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Variante con imagen de fondo y overlay */
.tienda-header-hero {
    background-image: linear-gradient(135deg, rgba(0, 0, 0, 0.85) 0%, rgba(20, 20, 20, 0.7) 100%), url('../images/headers/tienda-online-dimajardin.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.tienda-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(circle, rgba(154, 205, 50, 0.1) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
}

.tienda-header-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.tienda-title {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #ffffff, #dcdcdc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    letter-spacing: 2px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.tienda-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
    letter-spacing: 0.5px;
    line-height: 1.6;
}

/* ===== FILTROS Y BÚSQUEDA ===== */
.tienda-filters {
    background: linear-gradient(180deg, var(--white) 0%, var(--light-color) 100%);
    padding: 1.5rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
    /* position: sticky; */
    /* top: 160px; */
    position: relative;
    z-index: 101;
    border-top: 3px solid var(--primary-color);
    overflow: visible;
}

/* Botones rápidos de marca */
.quick-filters-container {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-light);
}

.quick-filters-label {
    font-weight: 600;
    color: var(--steel-color);
    margin-right: 1rem;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.quick-filters-buttons {
    display: inline-flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.quick-filter-btn {
    padding: 10px 24px;
    background: var(--white);
    color: var(--steel-color);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
}

.quick-filter-btn:hover {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 15px rgba(154, 205, 50, 0.25);
}

.quick-filter-btn.active {
    background: linear-gradient(135deg, var(--primary-color), #8cb820);
    color: var(--white);
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(154, 205, 50, 0.35);
}

.filters-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
    overflow: visible;
    position: relative;
}

/* Asegurar que el wrapper del select personalizado ocupe el espacio del select nativo */
.custom-select-wrapper {
    flex: 1;
    min-width: 200px;
    display: block;
    visibility: visible;
    opacity: 1;
}

.search-box {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 12px 16px 12px 45px;
    border: 2px solid var(--gray-light);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
    background: var(--white);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(154, 205, 50, 0.1);
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-color);
    font-size: 1.2rem;
}

.filter-select {
    padding: 14px 20px 14px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--steel-color);
    background: var(--white);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 14px 14px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(154, 205, 50, 0.15);
    transform: translateY(-1px);
}

.filter-select:hover {
    border-color: var(--primary-color);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.05);
}

/* ===== SELECT PERSONALIZADO DE CATEGORÍAS ===== */
.custom-select-wrapper {
    position: relative;
    width: 100%;
    z-index: 10000;
}

.custom-select-wrapper.active {
    z-index: 999999;
    /* Aumentar z-index cuando el dropdown está abierto */
}

.custom-select-trigger {
    padding: 14px 20px 14px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    font-size: 0.95rem;
    background: var(--white);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 52px;
}

.custom-select-trigger:hover {
    border-color: var(--primary-color);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.05);
}

.custom-select-trigger:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(154, 205, 50, 0.1), 0 4px 12px rgba(0, 0, 0, 0.08);
}

.filter-btn-reset {
    flex: 0 0 auto;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--primary-color), #8cb820);
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(154, 205, 50, 0.3);
    height: 52px;
}

.filter-btn-reset:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(154, 205, 50, 0.4);
    background: linear-gradient(135deg, #8cb820, var(--primary-color));
}

.custom-select-trigger.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(154, 205, 50, 0.1), 0 4px 12px rgba(0, 0, 0, 0.08);
}

.custom-select-value {
    flex: 1;
    color: var(--text-color);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.custom-select-trigger.active .custom-select-value {
    color: var(--primary-color);
}

.custom-select-arrow {
    display: flex;
    align-items: center;
    margin-left: 12px;
    color: var(--gray-color);
    transition: transform 0.3s ease;
}

.custom-select-trigger.active .custom-select-arrow {
    transform: rotate(180deg);
    color: var(--primary-color);
}

.custom-select-dropdown {
    position: fixed !important;
    background: var(--white);
    border: 2px solid var(--gray-light);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), 0 4px 16px rgba(0, 0, 0, 0.1);
    z-index: 999999 !important;
    max-height: 400px;
    min-width: 300px;
    display: none;
    flex-direction: column;
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    isolation: isolate;
}

.custom-select-dropdown.active {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.custom-select-search {
    position: relative;
    padding: 12px;
    border-bottom: 1px solid var(--gray-light);
    background: var(--light-color);
}

.custom-select-search-input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    border: 2px solid var(--gray-light);
    border-radius: 8px;
    font-size: 0.9rem;
    background: var(--white);
    transition: all 0.3s ease;
}

.custom-select-search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(154, 205, 50, 0.1);
}

.custom-select-search-icon {
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-color);
    pointer-events: none;
}

.custom-select-options {
    max-height: 320px;
    overflow-y: auto;
    padding: 8px 0;
    position: relative;
    z-index: 1;
}

.custom-select-options::-webkit-scrollbar {
    width: 8px;
}

.custom-select-options::-webkit-scrollbar-track {
    background: var(--light-color);
}

.custom-select-options::-webkit-scrollbar-thumb {
    background: var(--gray-light);
    border-radius: 4px;
}

.custom-select-options::-webkit-scrollbar-thumb:hover {
    background: var(--gray-color);
}

.custom-select-option {
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.custom-select-option:last-child {
    border-bottom: none;
}

.custom-select-option:hover {
    background: rgba(154, 205, 50, 0.1);
}

.custom-select-option.selected {
    background: rgba(154, 205, 50, 0.15);
    font-weight: 600;
    color: var(--primary-color);
}

.custom-select-option-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    width: 24px;
    text-align: center;
}

.custom-select-option-content {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.custom-select-option-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.custom-select-option-count {
    flex-shrink: 0;
    padding: 4px 10px;
    background: var(--light-color);
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-color);
}

.custom-select-option.selected .custom-select-option-count {
    background: var(--primary-color);
    color: var(--white);
}

.custom-select-option[data-count="0"] .custom-select-option-count {
    background: rgba(108, 117, 125, 0.2);
    color: var(--gray-color);
}

.filter-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    box-shadow: 0 4px 12px rgba(154, 205, 50, 0.25);
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    transition: left 0.5s ease;
    z-index: -1;
}

.filter-btn:hover {
    box-shadow: 0 6px 20px rgba(154, 205, 50, 0.35);
    transform: translateY(-2px);
}

.filter-btn:hover::before {
    left: 0;
}

.filter-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(154, 205, 50, 0.25);
}

/* ===== GRID DE PRODUCTOS ===== */
.tienda-content {
    background: var(--tienda-bg);
    padding: 3rem 0;
    min-height: 60vh;
    position: relative;
    z-index: 1;
}

/* Asegurar que en móvil el dropdown esté por encima de tienda-content */
@media (max-width: 640px) {
    .filters-container {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-btn-reset {
        width: 100%;
    }

    .tienda-content {
        z-index: 0;
    }

    .custom-select-wrapper.active {
        z-index: 999999 !important;
        /* Asegurar z-index alto en móvil cuando está abierto */
    }

    .custom-select-dropdown {
        z-index: 999999 !important;
    }

    .custom-select-options {
        z-index: 1000000;
        position: relative;
    }
}

.productos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.productos-stats {
    padding-bottom: 10px;
}

.producto-card {
    background: var(--tienda-card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--tienda-shadow);
    transition: var(--transition);
    border: 1px solid var(--tienda-border);
    position: relative;
}

.producto-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--tienda-shadow-hover);
}

.producto-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    z-index: 1;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.producto-card:hover::before {
    transform: scaleX(1);
}

.producto-imagen {
    height: 260px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 1.25rem;
    box-sizing: border-box;
    border-radius: 18px;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.producto-imagen img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.3s ease;
}

.producto-imagen:hover img {
    transform: scale(1.05);
}

.producto-imagen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        linear-gradient(45deg, transparent 48%, rgba(112, 128, 144, 0.03) 49%, rgba(112, 128, 144, 0.03) 51%, transparent 52%),
        linear-gradient(-45deg, transparent 48%, rgba(112, 128, 144, 0.03) 49%, rgba(112, 128, 144, 0.03) 51%, transparent 52%);
    background-size: 20px 20px;
}

.producto-icono {
    font-size: 4rem;
    color: var(--metal-color);
    filter: none;
    z-index: 0;
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-radius: 14px;
    padding: 0.75rem;
    box-shadow: none;
}

/* Marca de agua (logotipo) - visible solo cuando no hay imagen o mientras se carga */
.producto-icono .producto-watermark {
    width: 60%;
    height: auto;
    object-fit: contain;
    opacity: 0.05;
    filter: grayscale(100%);
    pointer-events: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Watermark visible: cuando no hay imagen o la imagen falló */
.producto-icono .producto-watermark.watermark-visible {
    opacity: 0.05;
    visibility: visible;
}

/* Watermark loading: mientras se carga la imagen */
.producto-icono .producto-watermark.watermark-loading {
    opacity: 0.05;
    visibility: visible;
}

/* Watermark hidden: cuando la imagen se cargó correctamente */
.producto-icono .producto-watermark.watermark-hidden {
    opacity: 0;
    visibility: hidden;
}

.producto-card:hover .producto-watermark.watermark-visible,
.producto-card:hover .producto-watermark.watermark-loading {
    opacity: 0.1;
}

/* Imágenes de producto - por encima de la marca de agua */
.producto-icono img:not(.producto-watermark),
.producto-imagen .producto-img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: none;
    position: relative;
    z-index: 1;
}

.producto-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 3rem;
    color: var(--metal-color);
    position: relative;
    z-index: 1;
}

.producto-badges {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 2;
}

.producto-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-destacado {
    background: linear-gradient(135deg, var(--rust-color), #D2691E);
    color: var(--white);
}

.badge-oferta {
    background: var(--tienda-sale);
    color: var(--white);
}

.badge-nuevo {
    background: var(--tienda-stock);
    color: var(--white);
}

.producto-info {
    padding: 1.5rem;
}

.producto-marca {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.producto-nombre {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--steel-color);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.producto-descripcion {
    color: var(--gray-color);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Cuando el texto está expandido, quitar el line-clamp para mostrar el texto completo sin puntos suspensivos */
.producto-descripcion[data-state="full"] {
    display: block;
    -webkit-line-clamp: none;
    line-clamp: none;
    -webkit-box-orient: initial;
    overflow: visible;
}

/* Cuando está en transición, mantener el comportamiento de truncado */
.producto-descripcion.is-transitioning {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Cuando está en transición Y expandido, mostrar todo el texto */
.producto-descripcion.is-transitioning[data-state="full"] {
    display: block;
    -webkit-line-clamp: none;
    line-clamp: none;
    -webkit-box-orient: initial;
    overflow: hidden;
    /* Mantener hidden durante la transición para la animación de altura */
}

.producto-precio-wrapper {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.producto-precio {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--tienda-price);
    margin-bottom: 0;
}

.producto-precio-oferta {
    color: var(--tienda-price);
    font-size: 1.5rem;
}

.producto-precio-anterior {
    font-size: 1rem;
    color: var(--gray-color);
    text-decoration: line-through;
    margin-right: 0;
}

.producto-stock {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: none !important;
    /* Siempre oculto - productos se piden bajo pedido directamente al proveedor */
}

.stock-disponible {
    color: var(--tienda-stock);
}

.stock-agotado {
    color: var(--tienda-out);
}

.producto-acciones {
    display: flex;
    gap: 0.5rem;
}

.btn-producto {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
}

.btn-ver {
    background: var(--white);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-ver:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(154, 205, 50, 0.3);
}

.btn-ver:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.btn-carrito {
    background: var(--dark-color);
    color: var(--white);
    border: 1px solid var(--dark-color);
}

.btn-carrito:hover {
    background: var(--steel-color);
    transform: translateY(-2px);
}

.btn-carrito:disabled {
    background: var(--gray-color);
    cursor: not-allowed;
    transform: none;
}

/* ===== CARGA INFINITA ===== */
.productos-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 2.5rem;
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.95rem;
    transition: opacity 0.3s ease;
}

.productos-loader .loader-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary-color);
    animation: loaderPulse 1s ease-in-out infinite;
}

.productos-loader .loader-text {
    letter-spacing: 0.5px;
}

.productos-sentinel {
    width: 100%;
    height: 1px;
    margin-top: 1px;
}

@keyframes loaderPulse {
    0% {
        transform: scale(0.95);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
    }

    100% {
        transform: scale(0.95);
        opacity: 0.5;
    }
}

/* ===== CARRITO FLOTANTE ===== */
.carrito-flotante {
    position: fixed;
    bottom: 190px;
    right: 20px;
    background: var(--primary-color);
    color: var(--white);
    padding: 1rem 1.5rem;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: var(--transition);
    z-index: 1000;
    display: none;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
}

.carrito-flotante:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
}

.carrito-icono {
    font-size: 1.5rem;
}

.carrito-contador {
    background: var(--rust-color);
    color: var(--white);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 800;
}

/* ===== ESTADOS VACÍOS ===== */
.tienda-vacia {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--gray-color);
}

/* Utilidades */
.is-hidden {
    display: none !important;
}

.tienda-vacia-icono {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.tienda-vacia-titulo {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--steel-color);
}

.tienda-vacia-texto {
    font-size: 1rem;
    margin-bottom: 2rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 968px) {
    .filters-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .tienda-title {
        font-size: 2rem;
    }

    .productos-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
    }
}

/* Botón toggle: oculto por defecto en desktop */
.filter-toggle {
    display: none;
    position: relative;
    z-index: 110;
    background: var(--white);
    padding: 1rem 1.5rem;
    border-bottom: 2px solid var(--primary-color);
    border-top: 2px solid var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin: 0;
}

.filter-toggle:hover {
    background: linear-gradient(to bottom, var(--light-color), var(--white));
}

.filter-toggle-icon {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    color: var(--steel-color);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.filter-toggle-icon::before {
    content: '🔽';
    font-size: 1.3rem;
    transition: transform 0.3s ease;
}

.filter-toggle.active {
    background: linear-gradient(to bottom, rgba(154, 205, 50, 0.05), var(--white));
}

.filter-toggle.active .filter-toggle-icon::before {
    transform: rotate(180deg);
}

@media (max-width: 640px) {

    /* Mostrar botón toggle en móvil */
    .filter-toggle {
        display: flex !important;
        position: relative !important;
        background: var(--white) !important;
        border-bottom: 2px solid var(--primary-color) !important;
        border-top: 2px solid var(--primary-color) !important;
        padding: 1rem 1.5rem !important;
    }

    /* Los estilos de .search-filters están definidos en las secciones responsive anteriores */

    /* Ocultar filtros avanzados por defecto */
    .tienda-filters {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease, padding 0.4s ease;
        padding: 0;
        border-top: none;
    }

    .tienda-filters.active {
        max-height: 800px;
        padding: 1rem 1.5rem;
        border-top: none;
    }

    .tienda-header {
        padding: 40px 0 30px;
    }

    .tienda-title {
        font-size: 1.5rem;
    }

    .tienda-subtitle {
        font-size: 1rem;
    }

    .productos-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .producto-acciones {
        flex-direction: column;
    }

    .carrito-flotante {
        bottom: 180px;
        right: 20px;
        padding: 0.8rem 1.2rem;
    }
}

/* ===== SEARCH SECTION ===== */
.search-section {
    background: var(--white);
    padding: 2rem 0 20px;
    border-bottom: 1px solid var(--gray-light);
    position: sticky;
    top: 80px;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    /* Optimizaciones para evitar vibración en scroll */
    backface-visibility: hidden;
    transform: translateZ(0);
    will-change: transform, top;
}

.search-loading {
    color: var(--primary-color);
    font-weight: 600;
    padding: 0.5rem 0;
    text-align: center;
    font-size: 0.9rem;
}

.search-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
    padding-top: 10px;
    max-width: 800px;
    margin: 0 auto;
}

.search-bar {
    display: flex;
    max-width: 700px;
    width: 100%;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    border-radius: 50px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    /* Estabilización */
    transform: translateZ(0);
}

.search-bar:hover {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.search-input {
    flex: 1;
    padding: 16px 30px;
    border: 1px solid #eee;
    border-right: none;
    border-radius: 50px 0 0 50px;
    font-size: 1.1rem;
    transition: var(--transition);
    background: var(--white);
    color: var(--text-color);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: #fff;
}

.search-btn {
    padding: 12px 30px;
    background: linear-gradient(135deg, var(--primary-color), #8cb820);
    color: var(--white);
    border: none;
    border-radius: 0 50px 50px 0;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 80px;
}

.search-btn:hover {
    background: linear-gradient(135deg, #8cb820, var(--primary-color));
    transform: none;
    /* Already handled by wrapper hover */
}

.search-filters {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0 0 0;
    background: linear-gradient(to bottom, rgba(154, 205, 50, 0.03), var(--white));
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(154, 205, 50, 0.1);
}

.search-filters .filter-btn {
    padding: 10px 20px;
    background: var(--white);
    color: var(--steel-color);
    border: 2px solid var(--gray-light);
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: relative;
}

.search-filters .filter-btn::before {
    display: none;
}

.search-filters .filter-btn:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(154, 205, 50, 0.3);
}

.search-filters .filter-btn:hover::before {
    display: none;
}

.search-filters .filter-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(154, 205, 50, 0.35);
}

/* ===== SEARCH RESULTS ===== */
.search-results {
    padding: 1rem 0;
    text-align: center;
    color: var(--gray-color);
    font-weight: 500;
}

.no-results {
    text-align: center;
    padding: 3rem 0;
    color: var(--gray-color);
}

.no-results h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--steel-color);
}

.no-results p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* ===== RESPONSIVE SEARCH - DESKTOP/TABLET ===== */
@media (min-width: 641px) and (max-width: 968px) {

    /* TABLET */
    .search-section {
        top: 80px;
        z-index: 100;
    }

    .tienda-filters {
        /* top: 160px; */
        z-index: 101;
    }

    .quick-filters-container {
        margin-bottom: 1rem;
    }

    .filters-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .search-container {
        gap: 1rem;
    }

    .search-bar {
        max-width: 100%;
    }

    .search-filters {
        gap: 0.5rem;
        padding: 1rem 1.25rem;
        margin: 0.75rem auto;
        max-width: 95%;
    }

    .search-filters .filter-btn {
        padding: 8px 16px;
        font-size: 0.8rem;
    }
}

/* ===== RESPONSIVE SEARCH - DESKTOP >= 969px ===== */
@media (min-width: 969px) {

    /* DESKTOP */
    .search-filters {
        gap: 0.75rem;
        padding: 1.25rem 1.5rem;
        margin: 1rem auto;
        max-width: 1200px;
    }

    .search-filters .filter-btn {
        padding: 10px 20px;
        font-size: 0.85rem;
    }
}

@media (max-width: 640px) {

    /* MÓVIL */
    .search-section {
        padding: 1rem 0;
        top: 80px;
        z-index: 100;
    }

    .tienda-filters {
        top: 0;
        position: relative;
        z-index: 110;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease, padding 0.4s ease;
        padding: 0;
        border-top: none;
    }

    .tienda-filters.active {
        max-height: 800px;
        padding: 1rem 0;
        border-top: none;
    }

    .quick-filters-container {
        padding: 0 1rem;
        margin-bottom: 1rem;
    }

    .quick-filters-label {
        display: block;
        margin-bottom: 0.75rem;
        font-size: 0.9rem;
    }

    .quick-filters-buttons {
        gap: 0.35rem;
    }

    .quick-filter-btn {
        padding: 6px 12px;
        font-size: 0.75rem;
    }

    .filters-container {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        padding: 0 1rem;
    }

    .search-input {
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    .search-btn {
        padding: 10px 16px;
        font-size: 1rem;
        min-width: 50px;
    }

    /* Contenedor colapsado */
    .search-filters {
        gap: 0.35rem;
        padding: 0;
        margin: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease, margin 0.4s ease, padding 0.4s ease;
        background: var(--white);
        border: none;
        box-shadow: none;
        border-radius: 0;
    }

    /* Contenedor activo (expandido) */
    .search-filters.active {
        max-height: 200px;
        gap: 0.35rem;
        padding: 1rem 0.75rem;
        margin: 0.5rem 0.75rem;
        background: linear-gradient(to bottom, rgba(154, 205, 50, 0.03), var(--white));
        border: 1px solid rgba(154, 205, 50, 0.15);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        border-radius: 12px;
    }

    .search-filters .filter-btn {
        padding: 6px 12px;
        font-size: 0.75rem;
        min-width: auto;
        white-space: nowrap;
    }
}

/* ===== COMPARISON SYSTEM ===== */
.comparison-floating {
    position: fixed;
    bottom: 110px;
    right: 20px;
    z-index: 1000;
    transition: var(--transition);
}

.comparison-floating.hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateY(100px);
}

.comparison-toggle {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 50px;
    padding: 15px 20px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 60px;
    justify-content: center;
}

.comparison-toggle:hover {
    background: var(--secondary-color);
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(154, 205, 50, 0.4);
}

.compare-icon {
    font-size: 1.2rem;
}

.compare-count {
    background: var(--rust-color);
    color: var(--white);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    margin-left: 5px;
}

/* ===== COMPARISON MODAL ===== */
.comparison-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.comparison-modal.active {
    display: flex;
}

.comparison-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

.comparison-container {
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    max-width: 1200px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    z-index: 1;
    animation: slideInUp 0.3s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.comparison-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.comparison-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.comparison-close {
    background: none;
    border: none;
    color: var(--white);
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.comparison-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.comparison-content {
    padding: 2rem;
    max-height: calc(90vh - 120px);
    overflow-y: auto;
}

.comparison-table-container {
    overflow-x: auto;
    margin-bottom: 2rem;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.comparison-table th,
.comparison-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-light);
    vertical-align: top;
}

.comparison-feature {
    background: var(--light-color);
    font-weight: 700;
    color: var(--steel-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
    width: 200px;
    position: sticky;
    left: 0;
    z-index: 10;
}

.comparison-product {
    background: var(--white);
    text-align: center;
    min-width: 250px;
    position: relative;
}

.product-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.product-image-placeholder {
    position: relative;
    width: 100%;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

/* Marca de agua en el modal de comparación */
.comparison-watermark {
    width: auto;
    height: auto;
    max-width: 60%;
    max-height: 60%;
    object-fit: contain;
    opacity: 0.15;
    filter: grayscale(100%);
    pointer-events: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
}

/* Contenedor de imagen de producto en comparación */
.product-image-container {
    position: relative;
    width: 100%;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.product-image-container .product-image {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 1;
}

.product-image-container .comparison-watermark {
    max-width: 50%;
    max-height: 50%;
    opacity: 0.1;
}

.product-info {
    text-align: center;
}

.product-brand {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.product-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--steel-color);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.product-price {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--rust-color);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Estilos para precios con oferta en la tabla de comparación */
.comparison-table .producto-precio-wrapper {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.comparison-table .producto-precio-anterior {
    font-size: 0.9rem;
    color: var(--gray-color);
    text-decoration: line-through;
}

.comparison-table .producto-precio-oferta {
    color: var(--tienda-price);
    font-size: 1.2rem;
    font-weight: 800;
}

.comparison-table .producto-precio {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--rust-color);
}

.remove-product {
    position: absolute;
    top: -10px;
    right: -10px;
    background: var(--rust-color);
    color: var(--white);
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    opacity: 0;
}

.comparison-product:hover .remove-product {
    opacity: 1;
}

.remove-product:hover {
    background: #a52a2a;
    transform: scale(1.1);
}

.comparison-value {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-color);
    line-height: 1.4;
}

.comparison-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-light);
}

/* Estilos específicos para botones del modal de comparación */
.comparison-actions .btn-secondary {
    background: var(--light-color);
    color: var(--steel-color);
    border: 2px solid var(--gray-light);
    font-weight: 600;
    padding: 12px 24px;
}

.comparison-actions .btn-secondary:hover {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(154, 205, 50, 0.3);
}

.comparison-actions .btn-primary {
    font-weight: 600;
    padding: 12px 24px;
}

/* Estilos para botones dentro de la tabla de comparación */
.comparison-table .btn-secondary,
.comparison-value .btn-secondary {
    background: var(--light-color);
    color: var(--steel-color);
    border: 2px solid var(--gray-light);
    font-weight: 600;
}

.comparison-table .btn-secondary:hover,
.comparison-value .btn-secondary:hover {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(154, 205, 50, 0.3);
}

.comparison-table .btn-secondary:disabled,
.comparison-table .btn-secondary.disabled,
.comparison-value .btn-secondary:disabled,
.comparison-value .btn-secondary.disabled {
    background: var(--gray-light);
    color: var(--gray-color);
    border-color: var(--gray-light);
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
}

.comparison-table .btn-secondary:disabled:hover,
.comparison-table .btn-secondary.disabled:hover,
.comparison-value .btn-secondary:disabled:hover,
.comparison-value .btn-secondary.disabled:hover {
    background: var(--gray-light);
    color: var(--gray-color);
    border-color: var(--gray-light);
    transform: none;
    box-shadow: none;
}

.comparison-table .btn-sm,
.comparison-value .btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

/* ===== COMPARISON BUTTONS IN PRODUCT CARDS ===== */
.btn-compare {
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    background: var(--light-color);
    color: var(--steel-color);
    border: 2px solid var(--gray-light);
}

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

.btn-compare.added {
    background: var(--rust-color);
    color: var(--white);
    border-color: var(--rust-color);
}

.btn-compare.added:hover {
    background: #a52a2a;
    border-color: #a52a2a;
}

.compare-icon {
    margin-right: 0.5rem;
}

/* ===== PRODUCT ACTIONS LAYOUT ===== */
.producto-acciones {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.btn-producto {
    padding: 8px 16px;
    border: 2px solid var(--gray-light);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-ver {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.btn-ver:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: translateY(-2px);
}

.btn-carrito {
    background: var(--white);
    color: var(--steel-color);
    border-color: var(--gray-light);
}

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

.btn-carrito:disabled {
    background: var(--gray-light);
    color: var(--gray-color);
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-carrito:disabled:hover {
    transform: none;
    background: var(--gray-light);
    color: var(--gray-color);
    border-color: var(--gray-light);
}

/* ===== RESPONSIVE COMPARISON ===== */
@media (max-width: 968px) {
    .comparison-container {
        margin: 10px;
        max-height: 95vh;
    }

    .comparison-content {
        padding: 1rem;
    }

    .comparison-table {
        min-width: 600px;
    }

    .comparison-feature {
        width: 150px;
    }

    .comparison-product {
        min-width: 200px;
    }

    .comparison-actions {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 640px) {
    .comparison-floating {
        bottom: 100px;
        right: 20px;
    }

    .comparison-toggle {
        padding: 12px 16px;
        font-size: 0.9rem;
    }

    /* Ajustar botón back-to-top para evitar solapamiento */
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .comparison-container {
        margin: 5px;
        max-height: 98vh;
    }

    .comparison-header {
        padding: 1rem 1.5rem;
    }

    .comparison-header h2 {
        font-size: 1.2rem;
    }

    .comparison-content {
        padding: 0.5rem;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 0.5rem;
    }

    .comparison-feature {
        width: 120px;
        font-size: 0.8rem;
    }

    .comparison-product {
        min-width: 150px;
    }

    .product-image-placeholder {
        font-size: 2rem;
    }

    .product-name {
        font-size: 0.9rem;
    }

    .product-price {
        font-size: 1rem;
    }

    /* Mejoras adicionales para móviles */
    .tienda-header {
        padding: 40px 0 30px;
    }

    .tienda-title {
        font-size: 2rem;
        line-height: 1.2;
    }

    .tienda-subtitle {
        font-size: 1rem;
    }

    /* Estilos de filtros móviles ya definidos arriba en la sección @media (max-width: 640px) */

    .filters-container {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        padding: 0 1rem;
    }

    .search-input {
        padding: 12px 16px 12px 45px;
        font-size: 16px;
        /* Previene zoom en iOS */
    }

    .filter-select {
        padding: 10px 12px;
        font-size: 14px;
    }

    .custom-select-trigger {
        padding: 12px 16px 12px 14px;
        font-size: 14px;
        min-height: 48px;
    }

    .custom-select-dropdown {
        max-height: 60vh;
        min-width: auto !important;
        left: 10px !important;
        right: 10px !important;
        width: auto !important;
        max-width: calc(100vw - 20px);
        z-index: 999999 !important;
        /* Asegurar que esté por encima de todo en móvil */
    }

    .custom-select-options {
        max-height: calc(60vh - 80px);
        position: relative;
        z-index: 1000000;
        /* Asegurar que las opciones estén por encima */
    }

    .custom-select-option {
        padding: 12px 16px;
        font-size: 0.95rem;
        min-height: 44px;
    }

    .custom-select-trigger {
        min-height: 48px;
        font-size: 0.95rem;
        padding: 12px 16px;
    }

    .custom-select-search {
        padding: 10px;
    }

    .custom-select-search-input {
        padding: 10px 14px 10px 36px;
        font-size: 16px;
        /* Previene zoom en iOS */
    }

    .filter-btn {
        padding: 10px 16px;
        font-size: 0.85rem;
    }

    /* Mejoras para productos móviles */
    .products-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1rem;
    }

    .product-card {
        margin: 0;
        padding: 1rem;
    }

    .product-image {
        height: 200px;
        margin-bottom: 1rem;
    }

    .product-content {
        padding: 0;
    }

    .product-name {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }

    .product-description {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }

    .product-price {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }

    .product-actions {
        flex-direction: column;
        gap: 0.5rem;
    }

    .product-actions .btn {
        width: 100%;
        padding: 12px 20px;
    }

    /* Mejoras para carrito móvil */
    .cart-item {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .cart-item-image {
        width: 100%;
        height: 150px;
    }

    .cart-item-details {
        width: 100%;
        text-align: center;
    }

    .cart-item-actions {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }

    .cart-item-actions .btn {
        width: 100%;
    }

    .cart-summary {
        padding: 1rem;
        margin: 1rem;
    }

    .cart-total {
        font-size: 1.3rem;
    }

    /* Mejoras para checkout móvil */
    .checkout-container {
        padding: 1rem;
    }

    .checkout-form {
        padding: 1rem;
    }

    .form-group {
        margin-bottom: 1rem;
    }

    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 12px 16px;
        font-size: 16px;
        /* Previene zoom en iOS */
        border-radius: 8px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .payment-methods {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .payment-method {
        padding: 1rem;
    }

    .order-summary {
        padding: 1rem;
        margin: 1rem 0;
    }

    /* Mejoras para búsqueda móvil */
    /* Los estilos de .search-section ya están definidos arriba en el media query de móvil */

    .search-container {
        padding: 0 1rem;
    }

    .search-results {
        padding: 1rem;
    }

    .search-result {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    /* Mejoras para paginación móvil */
    .pagination {
        padding: 1rem;
        justify-content: center;
    }

    .pagination-btn {
        padding: 8px 12px;
        font-size: 0.9rem;
    }

    .pagination-info {
        font-size: 0.9rem;
        margin: 0 1rem;
    }

    /* Mejoras para modales móviles */
    .modal {
        padding: 1rem;
    }

    .modal-content {
        margin: 1rem;
        max-width: calc(100vw - 2rem);
    }

    .modal-header {
        padding: 1rem;
    }

    .modal-body {
        padding: 1rem;
    }

    .modal-footer {
        padding: 1rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    .modal-footer .btn {
        width: 100%;
    }

    /* Mejoras para notificaciones móviles */
    .notification {
        margin: 1rem;
        padding: 1rem;
        font-size: 0.9rem;
    }

    .notification-close {
        width: 24px;
        height: 24px;
        font-size: 1rem;
    }

    /* Mejoras para breadcrumbs móviles */
    .breadcrumbs {
        padding: 1rem;
        font-size: 0.9rem;
    }

    .breadcrumb-item {
        margin-right: 0.5rem;
    }

    /* Mejoras para filtros avanzados móviles */
    .filters-advanced {
        padding: 1rem;
    }

    .filter-group {
        margin-bottom: 1rem;
    }

    .filter-group h4 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .filter-options {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .filter-option {
        padding: 8px 12px;
        font-size: 0.9rem;
    }

    /* Mejoras para ordenación móvil */
    .sort-controls {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }

    .sort-select {
        width: 100%;
        padding: 12px 16px;
        font-size: 16px;
    }

    .view-toggle {
        justify-content: center;
    }
}

/* ===== FOOTER Z-INDEX FIX ===== */
.footer {
    position: relative;
    z-index: 110;
}

/* ===== MARCAS DESTACADAS ===== */
.marcas-destacadas-section {
    padding: 60px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.marcas-destacadas-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.marcas-destacadas-subtitle {
    text-align: center;
    color: var(--gray-color);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

.marcas-destacadas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.marca-destacada-card {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--tienda-shadow);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.marca-destacada-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--tienda-shadow-hover);
    border-color: var(--primary-color);
}

.marca-destacada-logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
}

.marca-destacada-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.marca-destacada-logo .marca-placeholder {
    font-size: 3rem;
}

.marca-destacada-nombre {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.marca-destacada-descripcion {
    font-size: 0.9rem;
    color: var(--gray-color);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.marca-destacada-productos {
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 500;
}

.marca-destacada-badge {
    display: inline-block;
    background: var(--primary-color);
    color: var(--white);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

@media (max-width: 768px) {
    .marcas-destacadas-section {
        padding: 40px 0;
    }

    .marcas-destacadas-title {
        font-size: 2rem;
    }

    .marcas-destacadas-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .marcas-destacadas-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1.5rem;
    }

    .marca-destacada-card {
        padding: 1.5rem;
    }

    .marca-destacada-logo {
        width: 100px;
        height: 100px;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.producto-card {
    animation: fadeIn 0.6s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
    opacity: 0;
    /* Start hidden for animation */
}

/* Stagger animations based on child index (up to 12 items) */
.producto-card:nth-child(1) {
    animation-delay: 0.05s;
}

.producto-card:nth-child(2) {
    animation-delay: 0.1s;
}

.producto-card:nth-child(3) {
    animation-delay: 0.15s;
}

.producto-card:nth-child(4) {
    animation-delay: 0.2s;
}

.producto-card:nth-child(5) {
    animation-delay: 0.25s;
}

.producto-card:nth-child(6) {
    animation-delay: 0.3s;
}

.producto-card:nth-child(7) {
    animation-delay: 0.35s;
}

.producto-card:nth-child(8) {
    animation-delay: 0.4s;
}

.producto-card:nth-child(9) {
    animation-delay: 0.45s;
}

.producto-card:nth-child(10) {
    animation-delay: 0.5s;
}

.producto-card:nth-child(11) {
    animation-delay: 0.55s;
}

.producto-card:nth-child(12) {
    animation-delay: 0.6s;
}

.btn-compare {
    background: transparent;
    color: var(--gray-color);
    border: 1px solid var(--gray-color);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-compare:hover {
    background: var(--light-color);
    border-color: var(--steel-color);
    color: var(--steel-color);
    transform: translateY(-2px);
}

.btn-compare.added {
    background: rgba(154, 205, 50, 0.1);
    color: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 700;
}