/* Custom Shop Plugin - Dark Theme Styles - Flexible */

/* Estilos para el scroll infinito */
.cs-loading-more {
    width: 100%;
    text-align: center;
    padding: 20px 0;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
    grid-column: 1 / -1;
}

.cs-loading-more .loading-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #c66028;
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 10px;
}

.cs-loading-more .loading-text {
    font-size: 0.9rem;
    color: #a0a0a0;
}

.cs-no-more-products {
    text-align: center;
    color: #a0a0a0;
    font-size: 0.9rem;
    padding: 20px 0;
    border-top: 1px solid #404040;
    margin-top: 20px;
}

.cs-load-error {
    background-color: rgba(255, 0, 0, 0.1);
    color: #ff6b6b !important;
    padding: 10px 15px;
    border-radius: 4px;
    text-align: center;
    margin: 15px 0;
    border-left: 3px solid #ff6b6b;
    font-size: 0.9rem;
}

/* Centinela para el IntersectionObserver */
#cs-infinite-scroll-sentinel {
    position: relative;
    width: 100%;
    height: 1px;
    background: transparent;
    pointer-events: none;
    margin: 0;
    padding: 0;
    border: none;
    outline: none;
    z-index: -1;
    opacity: 0;
}

/* Mejoras de rendimiento para la lista de productos */
.cs-shop-products {
    will-change: transform;
    contain: layout style;
}

/* Optimización para renderizado de tarjetas */
.cs-product-card {
    will-change: transform, opacity;
    backface-visibility: hidden;
    transform: translateZ(0);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #2d2d2d;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-top: 0; /* Asegurar que no hay margen superior */
}

/* Estilos para los enlaces de la tarjeta de producto */
.cs-product-image-link {
    display: block;
    position: relative;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    background: #3a3a3a;
    overflow: hidden;
    /* Usamos un contenedor con padding-bottom para mantener la relación de aspecto */
    position: relative;
    width: 100%;
    padding-bottom: 100%; /* Esto crea un cuadrado perfecto */
    height: 0; /* Necesario para que funcione el padding-bottom */
}

.cs-product-image-link:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* Contenido de la tarjeta */
.cs-product-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0; /* Evitar que el contenido se desborde */
    position: relative; /* Asegurar que el contenido se posicione correctamente */
    z-index: 1; /* Asegurar que el contenido esté por encima de la imagen */
}

/* Título del producto */
.cs-product-title {
    margin: 10px 0 8px 0;
    font-size: 14px;
    line-height: 1.3;
    font-weight: 500;
    color: #ffffff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 36px;
    position: relative;
    z-index: 2;
}

/* Precio del producto */
.cs-product-price {
    margin-top: auto;
    font-weight: 700;
    color: #c66028;
    font-size: 16px;
}

/* Contenedor de productos */
.cs-products-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    padding: 0 15px !important;
    margin: 0 auto -15px !important; /* Ajuste para compensar el margen inferior de las tarjetas */
    max-width: 1400px;
    width: 100%;
    border: none !important;
}

/* Contenedor de la imagen */
.cs-product-image-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    box-sizing: border-box;
}

/* Imagen del producto */
.cs-product-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
    display: block;
    margin: 0 auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Acciones del producto */
.cs-product-actions {
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Botón de añadir al carrito */
.cs-add-to-cart {
    background: #c66028;
    color: white !important;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    text-align: center;
    width: 100%;
}

.cs-add-to-cart:hover {
    background: #d46a30;
    transform: translateY(-1px);
}

/* Contenedor principal de productos */
#cs-shop-products {
    position: relative;
    min-height: 0; /* Eliminamos el min-height fijo */
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important; /* Aseguramos que el contenido no esté recortado */
}

/* Reset de márgenes para los elementos internos */
#cs-shop-products > *:first-child {
    margin-top: 0 !important;
}

/* Forzar la eliminación de cualquier min-height en el body */
body #cs-shop-products,
body #cs-shop-products .elementor-section-wrap,
body .elementor-section-wrap > .elementor-section {
    min-height: 0 !important;
    height: auto !important;
}

/* Asegurar que el contenedor de productos no tenga restricciones de altura */
.cs-products-container {
    min-height: 0 !important;
    height: auto !important;
    overflow: visible !important;
}

/* Contenedor de la tienda */
.cs-shop-products {
    margin: 0 !important;
    padding: 0 !important;
    min-height: 0 !important; /* Aseguramos que no tenga altura mínima fija */
    overflow: visible !important; /* Permitir que el contenido fluya normalmente */
}

/* Reset de márgenes en el body para asegurar que no haya espacios */
body #cs-shop-products {
    margin: 0 !important;
    padding: 0 !important;
}

/* Ajuste para el título de la tienda si existe */
.cs-shop-title {
    margin: 0 !important;
    padding: 20px 15px !important;
}

/* Reset de márgenes en el contenedor de WordPress */
#primary.content-area,
#main.site-main,
#main .site-content,
#content {
    margin: 0 !important;
    padding: 0 !important;
}

/* Asegurar que no haya márgenes en los elementos de WooCommerce */
.woocommerce-products-header,
.woocommerce-breadcrumb,
.woocommerce-notices-wrapper {
    display: none !important;
}

.cs-product-title-link {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.cs-product-title-link:hover {
    color: #c66028;
    text-decoration: none;
}

/* Asegurarse de que los elementos flotantes no interfieran con el enlace */
.cs-product-image .onsale,
.cs-product-image .out-of-stock {
    position: relative;
    z-index: 1;
}

/* Transiciones suaves para la carga de productos */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.cs-product-card {
    animation: fadeIn 0.3s ease-out forwards;
    opacity: 0;
}

/* Contenedor principal de productos */
#cs-shop-products {
    width: 100%;
    display: block;
    margin: 0;
    padding: 0;
    min-height: 0;
    overflow: hidden; /* Evitar desbordamientos */
}

/* Contenedor del grid de productos */
#cs-shop-products .cs-products-container {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    width: 100%;
    margin: 0;
    padding: 0;
    min-height: 0;
    align-items: stretch; /* Asegurar que los items se estiren para igualar la altura */
}

/* Estilo para cada tarjeta de producto */
.cs-product-card {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    position: relative;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Asegurar que el contenido de la tarjeta ocupe el espacio disponible */
.cs-product-card .cs-product-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 15px;
}

/* Asegurar que las acciones se queden en la parte inferior */
.cs-product-card .cs-product-actions {
    margin-top: auto;
    padding-top: 15px;
}

/* Asegurar que las imágenes mantengan su relación de aspecto */
.cs-product-image {
    position: relative;
    padding-top: 100%; /* Relación de aspecto 1:1 */
    overflow: hidden;
    background-color: #f8f8f8;
}

.cs-product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

/* Efecto hover en las tarjetas */
.cs-product-card:hover {
    /* Se eliminó el translateY para evitar movimiento */
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.cs-product-card:hover .cs-product-image img {
    transform: scale(1.05);
}

/* Ajustes responsivos */
@media (max-width: 1199px) {
    #cs-shop-products .cs-products-container {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 992px) {
    #cs-shop-products .cs-products-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 15px;
    }
    
    .cs-product-card {
        margin-bottom: 0;
    }
}

@media (max-width: 576px) {
    #cs-shop-products .cs-products-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .cs-product-card {
        max-width: 100%;
        margin: 0 auto;
    }
}
.cs-shop-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #ffffff;
    background-color: transparent;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
}

/* Estilos para shortcodes separados - Completamente flexibles */
#cs-shop-sidebar {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
}

#cs-shop-products {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
}

/* Eliminar todas las limitaciones de Bootstrap */
.cs-shop-container .row,
.cs-shop-container .container,
.cs-shop-container .container-fluid {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
}

/* Flexbox para adaptación automática */
.cs-shop-container .row {
    display: flex !important;
    flex-wrap: wrap !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Columnas flexibles */
.cs-shop-container .col-12,
.cs-shop-container .col-md-3,
.cs-shop-container .col-md-4,
.cs-shop-container .col-md-8,
.cs-shop-container .col-md-9,
.cs-shop-container .col-lg-3,
.cs-shop-container .col-lg-9 {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
    flex: 1 1 auto !important;
}

/* Wrappers flexibles para sidebar y contenido */
.cs-sidebar-wrapper {
    flex: 0 0 auto !important;
    width: 25% !important;
    min-width: 250px !important;
    max-width: 350px !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

.cs-content-wrapper {
    flex: 1 1 auto !important;
    width: auto !important;
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

/* Sidebar completamente flexible */
#cs-shop-sidebar {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

/* Estado base del sidebar (visible en desktop) */
#cs-shop-sidebar.cs-sidebar-mobile-hidden {
    display: block;
}

/* En móvil, oculto por defecto y visible cuando .active */
@media (max-width: 768px) {
    #cs-shop-sidebar.cs-sidebar-mobile-hidden {
        display: none;
    }
    #cs-shop-sidebar.cs-sidebar-mobile-hidden.active {
        display: block;
    }
}

/* Contenido principal flexible */
.cs-shop-container main {
    flex: 1 1 auto !important;
    width: auto !important;
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Grid de productos */
#cs-shop-products .cs-products-container {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Ajustes responsivos */
@media (max-width: 1199px) {
    #cs-shop-products .cs-products-container {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    #cs-shop-products .cs-products-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 15px;
    }
}

/* Asegurar que las tarjetas ocupen todo el espacio disponible */
.cs-product-card {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* 3 columnas en tablets grandes */
@media (max-width: 1199px) {
    #cs-shop-products .cs-products-container {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

/* 2 columnas en tablets/móviles */
@media (max-width: 768px) {
    #cs-shop-products .cs-products-container {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

/* 2 columnas en móviles pequeños (>=400px) */
@media (max-width: 575px) {
    #cs-shop-products .cs-products-container {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px !important;
    }
    /* Card: layout vertical optimizado */
    .cs-product-card {
        display: flex;
        flex-direction: column;
    }
    .cs-product-content {
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding: 12px 12px 10px !important;
    }
    .cs-product-image-container img.cs-product-image {
        width: 100%;
        height: auto;
        aspect-ratio: 1/1;
        object-fit: cover;
        display: block;
    }
    .cs-product-rating-price {
        display: flex;
        align-items: center !important;
        justify-content: space-between;
        gap: 8px;
        margin-bottom: 8px !important;
        width: 100%;
    }
    .cs-product-rating { flex: 1 1 auto; min-width: 0; }
    .cs-product-rating .stars,
    .cs-product-rating .rating-text {
        font-size: 12px !important;
        line-height: 1 !important;
        white-space: nowrap;
    }
    /* Altura de estrellas solicitada */
    .cs-star-rating {
        height: 0.5em !important;
    }
    /* Si el HTML proviene de Woo (wc_get_rating_html) */
    .cs-product-rating .star-rating {
        font-size: 16px !important;
        height: 1em !important;
        line-height: 1 !important;
        margin: 0 !important;
    }
    .cs-product-price {
        margin: 0 !important;
        font-size: 16px !important;
        font-weight: 700 !important;
        text-align: right;
    }
    .cs-product-actions {
        order: 3;
        margin-top: auto;
        padding: 0 0px 0px !important;
    }
    .cs-product-actions .button {
        width: 100%;
        justify-content: center;
        padding: 8px 10px !important;
        font-size: 12px !important;
        border-radius: 8px !important;
        text-overflow: ellipsis;
        display: inline-block;
        max-width: 100%;
    }
    .cs-product-actions .button .cart-icon {
        width: 14px !important;
        height: 14px !important;
    }
    /* Consistencia altura del cuerpo para empujar el botón al fondo */
    .cs-product-card .cs-product-body {
        min-height: 120px;
    }
}

/* < 400px = 1 columna */
@media (max-width: 399px) {
    #cs-shop-products .cs-products-container {
        grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }
    .cs-product-card .button {
        padding: 7px 9px !important;
        font-size: 11px !important;
        line-height: 1.1 !important;
        border-radius: 6px !important;
    }
    /* En pantallas muy pequeñas, eliminar ícono para reducir altura */
    .cs-product-actions .button .cart-icon { display: none !important; }
    .cs-product-title { font-size: 12px !important; }
    .cs-product-price { font-size: 16px !important; }
    .cs-product-body { padding: 10px 12px !important; }
    .cs-product-actions { padding: 0 12px 12px !important; }
    .cs-product-actions .button .cart-icon { width: 12px !important; height: 12px !important; }
    .cs-product-card .cs-product-body { min-height: 110px; }
}

/* Tarjetas de productos - Altura automática */
.cs-product-card {
    background: #2d2d2da1 !important;
    border: 1px solid #404040 !important;
    border-radius: 12px !important;
    transition: all 0.3s ease;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    position: relative;
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    margin-bottom: 0 !important;
}

/* Mejoras adicionales para el grid de productos - Sin huecos */

/* Asegurar que las tarjetas de productos tengan altura consistente */
.cs-product-card {
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

/* Optimizar el contenido de las tarjetas para evitar diferencias de altura */
.cs-product-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Asegurar que el botón esté siempre en la parte inferior */
.cs-product-card .button {
    margin-top: auto;
}

/* Mejorar la distribución del espacio en las tarjetas */
.cs-product-title {
    flex-shrink: 0;
    margin-bottom: 8px;
    color: #ffffff !important;
}

.cs-product-rating-price {
    flex-shrink: 0;
    margin-bottom: 12px;
}

/* Optimización para imágenes con diferentes proporciones */
.cs-product-image-container {
    position: relative;
    overflow: hidden;
    background: #1a1a1a;
}

.cs-product-image-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.02) 50%, transparent 70%);
    z-index: 1;
    pointer-events: none;
}

/* Estilos para imágenes de producto */
.cs-product-image {
    opacity: 1;
    transition: none; /* Sin transición en la carga inicial */
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Aplicar transición solo después de la carga */
.cs-products-container.loaded .cs-product-image {
    transition: opacity 0.3s ease;
}

/* Mejorar la transición de las tarjetas */
.cs-product-card {
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
    will-change: opacity;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Efecto hover sutil */
.cs-product-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Asegurar que no haya transformaciones no deseadas */
.cs-product-image,
.cs-product-card,
.cs-product-image img {
    transform: none !important;
}

/* Optimización para el contenedor principal */
.cs-shop-container .row {
    contain: layout style paint;
    will-change: auto;
}

/* Mejoras de rendimiento */
.cs-product-card * {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Barra de filtros superior - Mejorada para fondo negro */
.cs-top-filters {
    background: linear-gradient(145deg, #2a2a2a, #1e1e1e);
    border: 1px solid #404040;
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 24px;
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.4),
        0 4px 12px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.cs-top-filters::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    z-index: 1;
}

.cs-top-filters .row {
    position: relative;
    z-index: 2;
}

.cs-filter-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cs-filter-label {
    color: #ffffff;
    font-weight: 600;
    margin: 0;
    white-space: nowrap;
    font-size: 0.95rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.cs-filter-select {
    background: linear-gradient(145deg, #3a3a3a, #2a2a2a);
    border: 1px solid #555555;
    color: #ffffff;
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 0.9rem;
    min-width: 200px;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.cs-filter-select:focus {
    background: linear-gradient(145deg, #404040, #303030);
    border-color: #007bff;
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.2),
        0 0 0 3px rgba(0, 123, 255, 0.2);
    color: #ffffff;
    outline: none;
}

.cs-filter-select option {
    background-color: #2a2a2a;
    color: #ffffff;
    padding: 8px;
}

.cs-results-info {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    color: #ffffff;
    font-weight: 600;
    font-size: 1rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.cs-results-text {
    color: #888888;
    font-size: 0.9rem;
    font-style: italic;
}

/* Sidebar Styles - Minimalista */
#cs-shop-sidebar .card {
    background: #1a1a1a;
    border: 1px solid #333333;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 20px;
    transition: all 0.3s ease;
}

#cs-shop-sidebar .card:hover {
    border-color: #c66028;
    box-shadow: 0 6px 20px rgba(198, 96, 40, 0.2);
}

#cs-shop-sidebar .card-body {
    background: transparent;
    padding: 24px;
}

#cs-shop-sidebar .card-title {
    color: #ffffff;
    font-weight: 600;
    margin-bottom: 20px;
    font-size: 1.1rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#cs-shop-sidebar .card-title i {
    color: #c66028;
    font-size: 1.2rem;
}

#cs-shop-sidebar label {
    color: #ffffff;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

#cs-shop-sidebar label i {
    color: #c66028;
    font-size: 0.9rem;
    width: 14px;
}

#cs-shop-sidebar .form-control {
    background: #2a2a2a;
    border: 1px solid #444444;
    border-radius: 8px;
    color: #ffffff;
    padding: 10px 12px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

#cs-shop-sidebar .form-control:focus {
    background: #333333;
    border-color: #c66028;
    box-shadow: 0 0 0 2px rgba(198, 96, 40, 0.2);
    color: #ffffff;
}

#cs-shop-sidebar .form-control::placeholder {
    color: #888888;
}

/* Estilos para lista de categorías - Sin scroll */
.cs-categories-list {
    padding: 8px;
    background: #222222;
    border-radius: 8px;
    border: 1px solid #333333;
    margin-top: 8px;
}

.cs-categories-list .form-check {
    margin-bottom: 8px;
    padding: 6px 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.cs-categories-list .form-check:hover {
    background: #2a2a2a;
}

.cs-categories-list .form-check-input {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    background: #2a2a2a;
    border: 1px solid #555555;
    border-radius: 3px;
    transition: all 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    position: relative;
}

.cs-categories-list .form-check-input:checked {
    background-color: #c66028;
    border-color: #c66028;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'><path d='M3 8l3 3 7-7' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 12px 12px;
}

.cs-categories-list .form-check-label {
    color: #ffffff;
    font-weight: 400;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cs-category-count {
    color: #888888;
    font-size: 0.75rem;
    background: #333333;
    padding: 2px 6px;
    border-radius: 8px;
}

/* Estilos para el slider de rango de precios */
.cs-price-range-container {
    background: #222222;
    border: 1px solid #333333;
    border-radius: 8px;
    padding: 12px;
    margin-top: 8px;
}

.cs-price-display {
    text-align: center;
    margin-bottom: 12px;
    font-size: 1rem;
    font-weight: 600;
    color: #00d4aa;
}

.cs-price-separator {
    margin: 0 8px;
    color: #888888;
}

.cs-price-slider-container {
    position: relative;
    margin-bottom: 12px;
    height: 20px;
    display: flex;
    align-items: center;
}

.cs-price-slider {
    width: 100%;
    height: 6px;
    background: transparent;
    outline: none;
    position: relative;
    z-index: 2;
    -webkit-appearance: none;
    appearance: none;
}

.cs-price-slider::-webkit-slider-track {
    height: 6px;
    background: #444444;
    border-radius: 3px;
}

.cs-price-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: #c66028;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.cs-price-slider::-webkit-slider-thumb:hover {
    background: #a04d20;
    transform: scale(1.1);
}

.cs-price-slider::-moz-range-track {
    height: 6px;
    background: #444444;
    border-radius: 3px;
    border: none;
}

.cs-price-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #c66028;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.cs-price-slider::-moz-range-thumb:hover {
    background: #a04d20;
    transform: scale(1.1);
}

/* Barra de progreso del slider */
.cs-price-slider-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #007bff 0%, #007bff 50%, #444444 50%, #444444 100%);
    border-radius: 3px;
    transform: translateY(-50%);
    pointer-events: none;
}

#cs-shop-sidebar .btn-primary {
    background: #c66028;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    padding: 10px 16px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    width: 100%;
    margin-bottom: 8px;
}

#cs-shop-sidebar .btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

#cs-shop-sidebar .btn-primary:hover::before {
    left: 100%;
}

#cs-shop-sidebar .btn-primary:hover {
    background: #a04d20;
    transform: translateY(-1px);
}

/* Iconos SVG personalizados mejorados */
.cs-icon {
    width: 16px;
    height: 16px;
    fill: #c66028;
    transition: all 0.3s ease;
    display: inline-block;
    vertical-align: middle;
}

.cs-icon-small {
    width: 14px;
    height: 14px;
}

.cs-icon-large {
    width: 20px;
    height: 20px;
}

.cs-icon-white {
    fill: #ffffff;
}

.cs-icon-muted {
    fill: #888888;
}

.cs-icon-warning {
    fill: #ffc107;
}

/* Iconos específicos */
.cs-icon-filter {
    width: 18px;
    height: 18px;
}

.cs-icon-search {
    width: 14px;
    height: 14px;
}

.cs-icon-tags {
    width: 14px;
    height: 14px;
}

.cs-icon-dollar {
    width: 14px;
    height: 14px;
}

.cs-icon-star {
    width: 12px;
    height: 12px;
}

.cs-icon-arrow-right {
    width: 12px;
    height: 12px;
}

/* Asegurar que los iconos SVG se muestren correctamente */
svg.cs-icon {
    display: inline-block !important;
    vertical-align: middle !important;
    fill: currentColor !important;
}
.cs-price-range-container {
    background: #222222;
    border: 1px solid #333333;
    border-radius: 8px;
    padding: 12px;
    margin-top: 8px;
}

/* Filtros de categoría y marca */
.cs-filter-section {
    margin-bottom: 25px;
    padding: 15px;
    background: rgba(45, 45, 45, 0.6);
    border-radius: 8px;
    border: 1px solid #404040;
}

.cs-filter-section h4 {
    margin: 0 0 15px 0;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    padding-bottom: 8px;
    border-bottom: 1px solid #404040;
}

.cs-filter-options {
    max-height: 250px;
    overflow-y: auto;
    padding: 5px;
}

.cs-filter-options label {
    display: block;
    margin: 8px 0;
    color: #e0e0e0;
    cursor: pointer;
    font-size: 14px;
    transition: color 0.2s ease;
}

.cs-filter-options label:hover {
    color: #ffffff;
}

.cs-filter-options input[type="checkbox"] {
    margin-right: 10px;
    position: relative;
    top: 2px;
}

/* Botón de mostrar/ocultar sin stock */
.cs-outofstock-toggle {
    display: flex;
    align-items: center;
    margin: 15px 0;
    padding: 10px 15px;
    background: rgba(45, 45, 45, 0.6);
    border-radius: 8px;
    border: 1px solid #404040;
    color: #e0e0e0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cs-outofstock-toggle:hover {
    background: rgba(60, 60, 60, 0.8);
    color: #ffffff;
}

.cs-outofstock-toggle input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
}

/* Toggle para móviles */
.cs-toggle-filters {
    display: none;
    background: #c66028;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    cursor: pointer;
}

@media (max-width: 768px) {
    .cs-toggle-filters {
        display: block;
    }
    
    .cs-shop-sidebar {
        display: none;
    }
    
    .cs-shop-sidebar.active {
        display: block;
        margin-bottom: 20px;
    }
}

/* Contador de productos */
.cs-products-count {
    color: #a0a0a0;
    font-size: 14px;
    margin-bottom: 15px;
}

.cs-price-options {
    margin-bottom: 16px;
}

.cs-price-option {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    margin-bottom: 6px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.cs-price-option:hover {
    background: #2a2a2a;
    border-color: #c66028;
}

.cs-price-option input[type="radio"] {
    margin-right: 10px;
    accent-color: #c66028;
}

.cs-price-option label {
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 400;
    cursor: pointer;
    margin: 0;
    flex: 1;
}

.cs-price-option .price-count {
    color: #888888;
    font-size: 0.8rem;
    background: #333333;
    padding: 2px 6px;
    border-radius: 8px;
}

.cs-price-custom {
    border-top: 1px solid #333333;
    padding-top: 12px;
}

.cs-price-custom-label {
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 8px;
    display: block;
}

.cs-price-inputs-custom {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cs-price-input-custom {
    flex: 1;
    background: #2a2a2a;
    border: 1px solid #444444;
    border-radius: 6px;
    color: #ffffff;
    padding: 8px 12px;
    font-size: 0.9rem;
    text-align: center;
}

.cs-price-input-custom:focus {
    background: #333333;
    border-color: #c66028;
    box-shadow: 0 0 0 2px rgba(198, 96, 40, 0.2);
    color: #ffffff;
    outline: none;
}

.cs-price-input-custom::placeholder {
    color: #888888;
}

.cs-price-separator-custom {
    color: #888888;
    font-weight: 500;
}

.cs-price-apply-btn {
    background: #c66028;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.cs-price-apply-btn:hover {
    background: #a04d20;
    transform: scale(1.1);
}

.cs-price-apply-btn i {
    font-size: 0.9rem;
}

/* Contenedor de productos completamente flexible para Elementor */
.cs-product-item {
    width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    flex: none !important;
    max-width: none !important;
    min-width: auto !important;
}

/* Eliminar todas las limitaciones de Bootstrap en productos */
.cs-product-item .card,
.cs-product-item .product-card {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

/* Grid de productos con Bootstrap - 4 en PC, 2 en móvil */
.cs-shop-container .row {
    display: flex !important;
    flex-wrap: wrap !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Grid responsivo mejorado - Sin huecos */
.cs-shop-container .row .col-md-3 {
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box;
    width: auto !important;
    max-width: none !important;
    min-width: auto !important;
    flex: none !important;
}

/* Grid responsivo - 4 productos por fila en pantallas grandes */
@media (max-width: 1200px) {
    .cs-shop-container .row {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 14px !important;
    }
}

@media (max-width: 768px) {
    .cs-shop-container .row {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
}

@media (max-width: 480px) {
    .cs-shop-container .row {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
}

#cs-shop-sidebar .btn-light {
    background: linear-gradient(145deg, #4a4a4a, #3a3a3a);
    border: 2px solid #666666;
    color: #ffffff;
    border-radius: 12px;
    font-weight: 600;
    padding: 12px 20px;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

#cs-shop-sidebar .btn-light::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

#cs-shop-sidebar .btn-light:hover::before {
    opacity: 1;
}

#cs-shop-sidebar .btn-light:hover {
    background: linear-gradient(145deg, #5a5a5a, #4a4a4a);
    border-color: #777777;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 
        0 6px 16px rgba(0, 0, 0, 0.4),
        0 3px 6px rgba(0, 0, 0, 0.3);
}

/* Clases personalizadas para reemplazar Bootstrap - Grid mejorado */
.cs-product-card {
    background: #2d2d2da1 !important;
    border: 1px solid #404040 !important;
    border-radius: 12px !important;
    transition: all 0.3s ease;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    position: relative;
    height: auto;
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-bottom: 0; /* Eliminar margen inferior para evitar huecos */
}

/* Optimización para móvil - Grid automático */
@media (max-width: 768px) {
    .cs-product-card {
        width: 100% !important;
    }
    
    /* En móvil, la altura de las imágenes es automática */
    .cs-product-image {
        max-height: none !important;
        height: auto !important;
    }
}

.cs-product-body {
    background: transparent !important;
    padding: 16px;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
    flex-grow: 1;
}

.cs-product-title {
    color: #ffffff;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.3;
    font-size: 0.95rem;
}

.cs-product-title a {
    color: #ffffff !important;
    text-decoration: none;
    transition: color 0.3s ease;
}

.cs-product-title a:hover {
    color: #c66028;
    text-decoration: none;
}

.cs-product-image-container {
    background-color: transparent !important;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
    position: relative;
    height: 200px; /* Altura fija para la imagen */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0; /* Sin padding para que ocupe todo el espacio */
    width: 100%;
}

.cs-product-image {
    max-width: 100%;
    width: 100%; /* Usar todo el ancho disponible */
    height: 100%; /* Usar toda la altura disponible */
    max-height: 240px !important; /* Altura máxima de 240px */
    object-fit: contain; /* Mostrar la imagen completa manteniendo proporción */
    object-position: center;
    transition: all 0.3s ease;
    border-radius: 0; /* Sin border radius para ocupar todo el espacio */
}

/* Layout de estrellas y precio en la misma línea */
.cs-product-rating-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.cs-product-rating {
    display: flex;
    align-items: center;
}

.cs-product-price {
    color: #ffffff !important;
    font-weight: 700;
    font-size: 1.1rem;
    text-align: right;
    margin: 0.5rem 0;
}

/* Para imágenes cuadradas específicamente */
.cs-product-image-container img[src*="1000x1000"],
.cs-product-image-container img[width="1000"],
.cs-product-image-container img[height="1000"] {
    max-width: 100%;
    width: 100%;
    height: 100%;
    object-fit: contain; /* Mostrar la imagen completa */
    object-position: center;
}

/* Clase personalizada específica para sobrescribir Bootstrap */
.cs-shop-container .row .col-6 .card,
.cs-shop-container .row .col-md-3 .card,
.cs-shop-container .product-card.card,
.cs-shop-container .card.product-card {
    background-color: #2d2d2da1 !important;
    border: 1px solid #404040 !important;
    border-radius: 12px !important;
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    min-width: 0 !important;
    word-wrap: break-word !important;
    background-clip: border-box !important;
}

/* Product Cards - Estilo como en la imagen */
.cs-shop-container .product-card {
    background: #2d2d2da1 !important;
    border: 1px solid #404040 !important;
    border-radius: 12px !important;
    transition: all 0.3s ease;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Asegurar que Bootstrap no sobrescriba el fondo */
.cs-shop-container .card {
    background: #2d2d2da1 !important;
    border: 1px solid #404040 !important;
    border-radius: 12px !important;
}

.cs-shop-container .card-body {
    background: transparent !important;
}

.cs-shop-container .product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #c66028, #00d4aa, #ff6b6b);
    z-index: 1;
}

.cs-shop-container .product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    border-color: #555555;
}

.cs-shop-container .product-card .card-img-top {
    object-fit: contain;
    object-position: center;
    height: auto;
    width: auto;
    max-width: 100%;
    max-height: 100%;
    background-color: transparent;
    border-radius: 0;
    transition: transform 0.3s ease;
    padding: 0;
}

.cs-product-image-container {
    background-color: transparent !important;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
    position: relative;
    height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

.cs-product-image-container a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.cs-product-image-container img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
    transition: all 0.3s ease;
    border-radius: 4px;
}

/* Optimización específica para imágenes cuadradas */
.cs-product-image-container img[src*="1000x1000"],
.cs-product-image-container img[width="1000"],
.cs-product-image-container img[height="1000"] {
    max-width: 170px;
    max-height: 170px;
    width: 170px;
    height: 170px;
    object-fit: cover;
    object-position: center;
}

/* Para imágenes cuadradas en general */
.cs-product-image-container img {
    aspect-ratio: 1 / 1;
    max-width: 170px;
    max-height: 170px;
}

/* Efecto de carga para imágenes */
.cs-product-image-container img {
    opacity: 0;
    animation: fadeInImage 0.5s ease-in-out forwards;
}

@keyframes fadeInImage {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.cs-shop-container .product-card:hover .card-img-top {
    transform: scale(1.05);
}

.cs-shop-container .product-card .card-body {
    background: transparent !important;
    padding: 16px;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
}

.cs-shop-container .product-card .card-title {
    color: #ffffff;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.3;
    font-size: 0.95rem;
}

.cs-shop-container .product-card .card-title a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.cs-shop-container .product-card .card-title a:hover {
    color: #c66028;
    text-decoration: none;
}

.cs-shop-container .product-card .card-text {
    color: #b0b0b0;
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 12px;
    flex-grow: 1;
}

.cs-shop-container .product-card .price {
    color: #ffffff;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 12px;
}

.cs-shop-container .product-card .button {
    background: #404040;
    border: none;
    color: #ffffff;
    border-radius: 8px;
    font-weight: 500;
    padding: 12px 16px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
    margin-top: auto;
    text-transform: none;
    letter-spacing: normal;
}

.cs-shop-container .product-card .button:hover {
    background: #555555;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    color: #ffffff;
}

/* Loading States - Mejorado */
.spinner-border {
    color: #c66028;
    width: 2rem;
    height: 2rem;
    border-width: 0.2em;
}

#cs-infinite-loader {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 9999 !important;
    padding: 2rem !important;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.95), rgba(42, 42, 42, 0.95)) !important;
    border-radius: 12px !important;
    backdrop-filter: blur(15px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
    margin: 0 !important;
    width: auto !important;
    height: auto !important;
}

#cs-infinite-loader .spinner-border {
    color: #c66028;
    width: 2.5rem;
    height: 2.5rem;
    border-width: 0.25em;
}

#cs-no-more {
    padding: 2rem 0;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.6), rgba(42, 42, 42, 0.6));
    border-radius: 12px;
    margin: 1rem 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#cs-no-more p {
    color: #888888;
    font-style: italic;
    margin: 0;
    font-size: 0.95rem;
}

/* Mensaje cuando no se encuentran productos */
.cs-no-products-message {
    padding: 40px 20px;
    text-align: center;
}

.cs-no-products-message svg {
    color: #666666;
    opacity: 0.7;
}

.cs-no-products-message h4 {
    color: #888888;
    font-weight: 600;
    margin-bottom: 12px;
}

.cs-no-products-message p {
    color: #666666;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Responsive para el mensaje */
@media (max-width: 768px) {
    .cs-no-products-message {
        padding: 30px 15px;
    }
    
    .cs-no-products-message svg {
        width: 48px;
        height: 48px;
    }
    
    .cs-no-products-message h4 {
        font-size: 1.1rem;
    }
    
    .cs-no-products-message p {
        font-size: 0.9rem;
    }
}

/* Botón para limpiar filtros */
.cs-clear-filters-btn {
    background: linear-gradient(135deg, #c66028, #a04d20) !important;
    border: 1px solid #c66028 !important;
    color: #ffffff !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    padding: 10px 20px !important;
    font-size: 0.9rem !important;
    transition: all 0.3s ease !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.cs-clear-filters-btn:hover {
    background: linear-gradient(135deg, #a04d20, #8a3f1a) !important;
    border-color: #a04d20 !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(198, 96, 40, 0.4) !important;
}

.cs-clear-filters-btn:focus {
    box-shadow: 0 0 0 3px rgba(198, 96, 40, 0.3) !important;
    outline: none !important;
}
/* Pantallas extra grandes (1200px+) - Grid mejorado */
@media (min-width: 1200px) {
    .cs-product-image-container {
        height: 180px;
    }
    
    .cs-sidebar-wrapper {
        width: 20% !important;
        min-width: 250px !important;
        max-width: 300px !important;
    }
    
    /* Grid CSS - 4 productos por fila en pantallas grandes */
    .cs-shop-container .row {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 18px !important;
    }
}

/* Pantallas ultra grandes (1400px+) - Grid mejorado */
@media (min-width: 1400px) {
    .cs-product-image-container {
        height: 200px;
    }
    
    .cs-sidebar-wrapper {
        width: 18% !important;
        min-width: 250px !important;
        max-width: 350px !important;
    }
    
    /* Grid CSS - 4 productos por fila en pantallas ultra grandes */
    .cs-shop-container .row {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 20px !important;
    }
}

/* Pantallas ultra anchas (1600px+) - Grid mejorado */
@media (min-width: 1600px) {
    .cs-product-image-container {
        height: 220px;
    }
    
    .cs-sidebar-wrapper {
        width: 15% !important;
        min-width: 250px !important;
        max-width: 400px !important;
    }
    
    /* Grid CSS - 4 productos por fila en pantallas ultra anchas */
    .cs-shop-container .row {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 22px !important;
    }
}

/* Pantallas grandes (992px - 1199px) - Grid mejorado */
@media (min-width: 992px) and (max-width: 1199px) {
    .cs-product-image-container {
        height: 170px;
    }
    
    .cs-sidebar-wrapper {
        width: 25% !important;
        min-width: 200px !important;
        max-width: 300px !important;
    }
    
    /* Grid CSS - 4 productos por fila en pantallas grandes */
    .cs-shop-container .row {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 16px !important;
    }
}

/* Pantallas medianas (768px - 991px) - Grid mejorado */
@media (min-width: 768px) and (max-width: 991px) {
    .cs-product-image-container {
        height: 160px;
    }
    
    .cs-sidebar-wrapper {
        width: 30% !important;
        min-width: 200px !important;
        max-width: 250px !important;
    }
    
    /* Grid CSS - 2 productos por fila en pantallas medianas */
    .cs-shop-container .row {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 14px !important;
    }
}

/* Pantallas pequeñas (576px - 767px) - Grid mejorado */
@media (min-width: 576px) and (max-width: 767px) {
    .cs-sidebar-wrapper {
        order: 2;
        margin-top: 20px;
        width: 100% !important;
        max-width: none !important;
    }
    
    .cs-product-image-container {
        height: 150px;
    }
    
    /* Grid CSS - 2 productos por fila en pantallas pequeñas */
    .cs-shop-container .row {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
    
    .cs-shop-container .product-card .card-body {
        padding: 12px;
    }
    
    /* Ajustar barra de filtros en pantallas pequeñas */
    .cs-top-filters .row {
        flex-direction: column;
        gap: 12px;
    }
    
    .cs-top-filters .col-md-6 {
        width: 100%;
        text-align: left !important;
    }
    
    .cs-filter-group {
        justify-content: space-between;
    }
    
    .cs-filter-select {
        min-width: 180px;
    }
}

/* Pantallas extra pequeñas (hasta 575px) - Grid mejorado */
@media (max-width: 575px) {
    .cs-sidebar-wrapper {
        order: 2;
        margin-top: 15px;
        width: 100% !important;
        max-width: none !important;
    }
    
    .cs-product-image-container {
        height: 140px;
    }
    
    /* Grid CSS - 2 productos por fila en móviles pequeños */
    .cs-shop-container .row {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    
    .cs-shop-container .product-card .card-title {
        font-size: 0.95rem;
    }
    
    .cs-shop-container .product-card .card-text {
        font-size: 0.85rem;
    }
    
    /* Ajustar barra de filtros en móviles */
    .cs-top-filters {
        padding: 12px 16px;
    }
    
    .cs-top-filters .row {
        flex-direction: column;
        gap: 10px;
    }
    
    .cs-top-filters .col-md-6 {
        width: 100%;
        text-align: left !important;
    }
    
    .cs-filter-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .cs-filter-select {
        min-width: 100%;
        width: 100%;
    }
    
    .cs-results-info {
        justify-content: flex-start;
    }
}

/* Widget Styles */
#cs-shop-sidebar .widget {
    background-color: #1a1a1a;
    border: 1px solid #333333;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

#cs-shop-sidebar .widget-title {
    color: #ffffff;
    font-weight: 600;
    margin-bottom: 12px;
    font-size: 1rem;
}

/* Estilos específicos para Elementor y Page Builders */
.elementor-widget-container .cs-shop-container,
.elementor-widget-container .cs-sidebar-wrapper,
.elementor-widget-container .cs-content-wrapper,
.elementor-widget-container #cs-shop-sidebar,
.elementor-widget-container #cs-shop-products {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

/* Flexbox para contenedores de Elementor */
.elementor-widget-container .cs-shop-container .row {
    display: flex !important;
    flex-wrap: wrap !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 0 !important;
}

/* Wrappers flexibles para Elementor */
.elementor-widget-container .cs-sidebar-wrapper {
    flex: 0 0 auto !important;
    width: 25% !important;
    min-width: 250px !important;
    max-width: 350px !important;
}

.elementor-widget-container .cs-content-wrapper {
    flex: 1 1 auto !important;
    width: auto !important;
    max-width: none !important;
}

/* Asegurar que los productos se adapten al contenedor */
.elementor-widget-container .cs-shop-container .row .col-6 {
    flex: 1 1 auto !important;
    width: auto !important;
    max-width: none !important;
    min-width: 200px !important;
}

/* Grid automático basado en el ancho del contenedor */
.elementor-widget-container .cs-shop-container .row .col-6:nth-child(1n) {
    flex-basis: calc(100% / var(--products-per-row, 4)) !important;
    max-width: calc(100% / var(--products-per-row, 4)) !important;
}

/* Variables CSS para control dinámico */
.cs-shop-container {
    --products-per-row: 4;
    --sidebar-width: 25%;
    --content-width: 75%;
}

/* Ajustes automáticos según el ancho del contenedor */
@media (max-width: 1200px) {
    .cs-shop-container {
        --products-per-row: 3;
        --sidebar-width: 30%;
        --content-width: 70%;
    }
}

@media (max-width: 768px) {
    .cs-shop-container {
        --products-per-row: 2;
        --sidebar-width: 100%;
        --content-width: 100%;
    }
}

@media (max-width: 480px) {
    .cs-shop-container {
        --products-per-row: 1;
        --sidebar-width: 100%;
        --content-width: 100%;
    }
}

/* Efectos adicionales para el sidebar */
#cs-shop-sidebar .form-group {
    margin-bottom: 24px;
    position: relative;
}

#cs-shop-sidebar .form-group::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

#cs-shop-sidebar .form-group:last-child::after {
    display: none;
}

/* Animación de entrada para elementos del sidebar */
#cs-shop-sidebar .form-group {
    animation: slideInLeft 0.6s ease-out;
    animation-fill-mode: both;
}

#cs-shop-sidebar .form-group:nth-child(1) { animation-delay: 0.1s; }
#cs-shop-sidebar .form-group:nth-child(2) { animation-delay: 0.2s; }
#cs-shop-sidebar .form-group:nth-child(3) { animation-delay: 0.3s; }
#cs-shop-sidebar .form-group:nth-child(4) { animation-delay: 0.4s; }

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Estilos para estrellas de reviews */
.cs-product-rating {
    display: flex;
    align-items: center;
    gap: 2px;
}

.cs-product-rating .stars {
    display: flex;
    align-items: center;
    gap: 1px;
}

.cs-product-rating .stars i {
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.cs-product-rating .stars i.fas.fa-star {
    color: #ffc107 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.cs-product-rating .stars i.fas.fa-star-half-alt {
    color: #ffc107 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.cs-product-rating .stars i.far.fa-star {
    color: #666666 !important;
}

.cs-product-rating .rating-text {
    color: #888888;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Efecto de partículas flotantes */
#cs-shop-sidebar .card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(0, 123, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 212, 170, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 60%, rgba(255, 107, 107, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
    animation: floatParticles 8s ease-in-out infinite;
}

@keyframes floatParticles {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg);
        opacity: 0.3;
    }
    50% { 
        transform: translateY(-10px) rotate(180deg);
        opacity: 0.6;
    }
}

#cs-shop-sidebar .form-group:last-child {
    margin-bottom: 0;
}

/* Price Input Styling */
#cs-shop-sidebar .d-flex .form-control {
    margin-right: 8px;
}

#cs-shop-sidebar .d-flex .form-control:last-child {
    margin-right: 0;
}

/* Error Messages */
.cs-shop-error {
    background-color: #dc3545;
    color: #ffffff;
    padding: 12px;
    border-radius: 6px;
    margin: 16px 0;
    font-size: 0.9rem;
}

/* Success Messages */
.cs-shop-success {
    background-color: #28a745;
    color: #ffffff;
    padding: 12px;
    border-radius: 6px;
    margin: 16px 0;
    font-size: 0.9rem;
}

/* Botón "Cargar Más" eliminado - Solo scroll infinito automático */

/* ===== SIDEBAR MÓVIL ===== */

/* Botón hamburguesa para móvil */
.cs-mobile-filter-toggle {
    position: sticky;
    top: 10px;
    z-index: 1000;
    margin-bottom: 15px;
}

#cs-toggle-sidebar {
    background: linear-gradient(135deg, #c66028, #a04d20);
    border: none;
    border-radius: 12px;
    color: #ffffff;
    font-weight: 600;
    padding: 12px 20px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(198, 96, 40, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

#cs-toggle-sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

#cs-toggle-sidebar:hover::before {
    left: 100%;
}

#cs-toggle-sidebar:hover {
    background: linear-gradient(135deg, #a04d20, #8a3f1a);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(198, 96, 40, 0.4);
}

/* Icono hamburguesa */
.cs-hamburger-icon {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 20px;
    height: 16px;
}

.cs-hamburger-icon span {
    width: 100%;
    height: 2px;
    background-color: #ffffff;
    border-radius: 1px;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* Animación del hamburguesa cuando está activo */
#cs-toggle-sidebar.active .cs-hamburger-icon span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

#cs-toggle-sidebar.active .cs-hamburger-icon span:nth-child(2) {
    opacity: 0;
}

#cs-toggle-sidebar.active .cs-hamburger-icon span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Sidebar móvil - Oculto por defecto */
.cs-sidebar-mobile-hidden {
    display: none;
}

/* Sidebar móvil - Visible cuando está activo */
.cs-sidebar-mobile-hidden.cs-sidebar-mobile-visible {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    padding: 20px;
    overflow-y: auto;
    animation: fadeInOverlay 0.3s ease-out;
}

/* Contenido del sidebar móvil */
.cs-sidebar-mobile-visible .card {
    position: relative;
    top: 0;
    max-height: 95vh;
    overflow-y: auto;
    animation: slideInFromTop 0.3s ease-out;
    margin-bottom: 0;
    width: 100%;
}

/* Asegurar que el contenido del sidebar sea completamente visible */
.cs-sidebar-mobile-visible .card-body {
    padding: 24px;
    max-height: none;
    overflow: visible;
    padding-bottom: 40px; /* Espacio extra para el botón cerrar */
}

/* Asegurar que todos los elementos del sidebar sean visibles */
.cs-sidebar-mobile-visible .form-group {
    margin-bottom: 24px;
    display: block;
}

.cs-sidebar-mobile-visible .cs-categories-list {
    max-height: none;
    overflow: visible;
    margin-bottom: 16px;
}

.cs-sidebar-mobile-visible .cs-categories-list .form-check {
    display: flex;
    align-items: flex-start;
    padding: 8px 12px;
    margin-bottom: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
    min-height: 44px;
}

.cs-sidebar-mobile-visible .cs-categories-list .form-check:hover {
    background: #2a2a2a;
}

.cs-sidebar-mobile-visible .cs-categories-list .form-check-input {
    margin-top: 2px;
    margin-right: 12px;
    flex-shrink: 0;
}

.cs-sidebar-mobile-visible .cs-categories-list .form-check-label {
    flex: 1;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.cs-sidebar-mobile-visible .cs-category-count {
    color: #888888;
    font-size: 0.75rem;
    background: #333333;
    padding: 2px 6px;
    border-radius: 8px;
    margin-left: 8px;
    flex-shrink: 0;
    white-space: nowrap;
}

.cs-sidebar-mobile-visible .cs-price-range-container {
    max-height: none;
    overflow: visible;
    margin-bottom: 16px;
}

/* Asegurar que las opciones de precio sean visibles */
.cs-sidebar-mobile-visible .cs-price-options {
    margin-bottom: 16px;
}

.cs-sidebar-mobile-visible .cs-price-option {
    margin-bottom: 8px;
    padding: 8px 12px;
}

.cs-sidebar-mobile-visible .cs-price-custom {
    padding-top: 16px;
    border-top: 1px solid #333333;
}

.cs-sidebar-mobile-visible .cs-price-inputs-custom {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.cs-sidebar-mobile-visible .cs-price-input-custom {
    flex: 1;
    padding: 8px 12px;
    font-size: 0.9rem;
}

.cs-sidebar-mobile-visible .cs-price-apply-btn {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

/* Botón cerrar en móvil */
#cs-close-sidebar {
    background: transparent;
    border: 1px solid #666666;
    color: #ffffff;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
}

#cs-close-sidebar:hover {
    background: #666666;
    border-color: #888888;
    transform: rotate(90deg);
}

/* Animaciones */
@keyframes fadeInOverlay {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive para el sidebar móvil */
@media (min-width: 768px) {
    .cs-mobile-filter-toggle {
        display: none !important;
    }
    
    .cs-sidebar-mobile-hidden {
        display: block !important;
        position: static !important;
        background: transparent !important;
        padding: 0 !important;
        overflow: visible !important;
    }
    
    #cs-close-sidebar {
        display: none !important;
    }
}

/* Mejoras para móvil pequeño */
@media (max-width: 480px) {
    .cs-sidebar-mobile-visible {
        padding: 10px;
    }
    
    .cs-sidebar-mobile-visible .card {
        max-height: 90vh;
        margin-bottom: 20px; /* Espacio para el botón cerrar */
    }
    
    .cs-sidebar-mobile-visible .card-body {
        padding: 16px;
        padding-bottom: 30px; /* Espacio extra para el botón cerrar */
    }
    
    #cs-toggle-sidebar {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    .cs-hamburger-icon {
        width: 18px;
        height: 14px;
    }
    
    /* Asegurar que todos los elementos sean visibles en móvil pequeño */
    .cs-sidebar-mobile-visible .form-group {
        margin-bottom: 16px;
    }
    
    .cs-sidebar-mobile-visible .cs-categories-list {
        max-height: none;
        overflow: visible;
        margin-bottom: 12px;
    }
    
    .cs-sidebar-mobile-visible .cs-categories-list .form-check {
        padding: 6px 10px;
        margin-bottom: 6px;
        min-height: 40px;
    }
    
    .cs-sidebar-mobile-visible .cs-categories-list .form-check-input {
        margin-right: 10px;
        width: 16px;
        height: 16px;
    }
    
    .cs-sidebar-mobile-visible .cs-categories-list .form-check-label {
        font-size: 0.8rem;
    }
    
    .cs-sidebar-mobile-visible .cs-category-count {
        font-size: 0.7rem;
        padding: 1px 4px;
        margin-left: 6px;
    }
    
    .cs-sidebar-mobile-visible .cs-price-range-container {
        max-height: none;
        margin-bottom: 12px;
    }
    
    .cs-sidebar-mobile-visible .cs-price-options {
        margin-bottom: 12px;
    }
    
    .cs-sidebar-mobile-visible .cs-price-option {
        margin-bottom: 6px;
        padding: 6px 10px;
        font-size: 0.85rem;
    }
    
    .cs-sidebar-mobile-visible .cs-price-custom {
        padding-top: 12px;
    }
    
    .cs-sidebar-mobile-visible .cs-price-inputs-custom {
        gap: 6px;
        margin-top: 6px;
    }
    
    .cs-sidebar-mobile-visible .cs-price-input-custom {
        padding: 6px 10px;
        font-size: 0.85rem;
    }
    
    .cs-sidebar-mobile-visible .cs-price-apply-btn {
        width: 32px;
        height: 32px;
    }
}

/* Mejoras adicionales para el sidebar móvil */
.cs-sidebar-mobile-visible .btn-primary {
    margin-bottom: 16px;
}

.cs-sidebar-mobile-visible .btn-light {
    margin-bottom: 16px;
}

/* Asegurar que el botón cerrar esté siempre visible */
.cs-sidebar-mobile-visible .d-flex.justify-content-between {
    position: sticky;
    top: 0;
    background: #1a1a1a;
    z-index: 10;
    padding: 16px 24px;
    margin: -24px -24px 20px -24px;
    border-bottom: 1px solid #333333;
}

/* Mejorar la visibilidad del contenido */
.cs-sidebar-mobile-visible .card-body {
    padding-top: 0; /* Eliminar padding superior ya que el header es sticky */
}

/* Asegurar que el scroll funcione correctamente */
.cs-sidebar-mobile-visible .card {
    -webkit-overflow-scrolling: touch; /* Scroll suave en iOS */
}

/* Mejorar la visibilidad de los labels */
.cs-sidebar-mobile-visible label {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 8px;
}

/* Asegurar que los inputs sean fáciles de usar en móvil */
.cs-sidebar-mobile-visible .form-control {
    font-size: 0.9rem;
    padding: 10px 12px;
    min-height: 44px; /* Tamaño mínimo recomendado para touch */
}

/* Mejorar la visibilidad de los checkboxes */
.cs-sidebar-mobile-visible .form-check-input {
    width: 18px;
    height: 18px;
    margin-right: 12px;
    margin-left: 0;
    flex-shrink: 0;
}

.cs-sidebar-mobile-visible .form-check-label {
    font-size: 0.85rem;
    line-height: 1.4;
    padding: 4px 0;
    margin-left: 0;
    flex: 1;
    min-width: 0;
    word-wrap: break-word;
}

/* Efecto de desenfoque en el fondo cuando el sidebar está abierto */
body.cs-sidebar-open {
    overflow: hidden;
}

/* Mejoras de accesibilidad */
#cs-toggle-sidebar:focus,
#cs-close-sidebar:focus {
    outline: 2px solid #c66028;
    outline-offset: 2px;
}

/* Transición suave para el contenido */
.cs-sidebar-mobile-visible .card-body {
    animation: fadeInContent 0.4s ease-out 0.1s both;
}

@keyframes fadeInContent {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   ESTILOS PARA EL GRID DE PRODUCTOS (4 columnas)
   ========================================== */

/* Grid de productos - 4 columnas */
.cs-products-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px 30px;
    width: calc(100% + 30px);
}

.cs-product-col {
    flex: 0 0 25%;
    max-width: 25%;
    padding: 0 15px;
    margin-bottom: 30px;
    box-sizing: border-box;
}

/* Estilos responsivos */
@media (max-width: 1024px) {
    .cs-product-col {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
}

@media (max-width: 768px) {
    .cs-product-col {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 480px) {
    .cs-product-col {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Columnas vacías (para mantener el grid alineado) */
.cs-empty-col {
    visibility: hidden;
    height: 0;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
}

/* Estilos para el contenedor de productos */
#cs-shop-products {
    padding: 0;
    margin: 0;
    width: 100%;
}

/* Estilos para cada producto */
.cs-product-item {
    background: #2d2d2d;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: relative;
}

.cs-product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.cs-product-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.cs-product-link {
    display: block;
    text-decoration: none;
    color: #ffffff;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* Estilos para la imagen del producto */
.cs-product-image-wrap {
    position: relative;
    padding-top: 100%; /* Relación de aspecto 1:1 */
    overflow: hidden;
    background: #1a1a1a;
}

.cs-product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.cs-product-item:hover .cs-product-image {
    transform: scale(1.05);
}

/* Estilos para la etiqueta de oferta */
.onsale {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #c66028;
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    z-index: 2;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Estilos para el título del producto */
.cs-sidebar-mobile-visible .cs-product-title {
    font-size: 1rem;
    margin: 12px 0 8px;
    line-height: 1.4;
    color: #ffffff !important; /* Color blanco para el título */
}

.cs-product-price {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 10px 0;
    color: #ffffff !important; /* Color blanco para el precio */
}

/* Estilos para la valoración con estrellas */
/* Contenedor principal del grid */
.cs-products-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 20px 0;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

/* Estilos responsivos */
@media (max-width: 1024px) {
    .cs-products-container {
        grid-template-columns: repeat(3, 1fr);
        padding: 20px 15px;
    }
}

@media (max-width: 768px) {
    .cs-products-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .cs-products-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .cs-product-card {
        max-width: 350px;
        margin: 0 auto;
        width: 100%;
    }
}

/* Tarjeta de producto */
.cs-product-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.cs-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

/* Imagen del producto */
.cs-product-image {
    position: relative;
    padding-top: 100%; /* Relación de aspecto 1:1 */
    overflow: hidden;
}

.cs-product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.cs-product-card:hover .cs-product-image img {
    transform: scale(1.05);
}

/* Contenido de la tarjeta */
.cs-product-content {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.cs-product-title {
    font-size: 14px;
    font-weight: 500;
    margin: 0 0 10px;
    color: #333;
    line-height: 1.4;
    flex-grow: 1;
}

.cs-product-price {
    font-size: 18px;
    font-weight: 700;
    color: #c66028;
    margin: 12px 0 15px;
    font-family: 'Arial', sans-serif;
}

.cs-product-price ins {
    text-decoration: none;
    color: #ffffff !important;
}

.cs-product-price del {
    color: #cccccc !important;
    opacity: 0.8;
    margin-right: 8px;
    font-size: 0.9em;
    text-decoration: line-through;
}

.cs-product-price del {
    color: #cccccc !important; /* Color gris más claro para el precio tachado */
    font-weight: 400;
    opacity: 0.8;
}

/* Valoración con estrellas */
.cs-product-rating {
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    font-size: 12px;
    color: #ffb900;
}

/* Usar fuentes de estrellas de WooCommerce */
@font-face {
    font-family: 'star';
    src: url('https://implementacion.barbershop.com.co/wp-content/plugins/woocommerce/assets/fonts/star.eot');
    src: url('https://implementacion.barbershop.com.co/wp-content/plugins/woocommerce/assets/fonts/star.eot?#iefix') format('embedded-opentype'),
         url('https://implementacion.barbershop.com.co/wp-content/plugins/woocommerce/assets/fonts/star.woff') format('woff'),
         url('https://implementacion.barbershop.com.co/wp-content/plugins/woocommerce/assets/fonts/star.ttf') format('truetype'),
         url('https://implementacion.barbershop.com.co/wp-content/plugins/woocommerce/assets/fonts/star.svg#star') format('svg');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Asegurar que el contenedor de estrellas tenga el tamaño correcto */
.cs-product-rating {
    height: 1em;
    line-height: 1;
    position: relative;
    width: 5.4em;
    font-family: 'star';
    font-size: 12px;
    margin: 0 0 10px;
}

.cs-star-rating {
    position: relative;
    height: 1em;
    line-height: 1;
    font-size: 1em;
    width: 5.4em;
    font-family: 'star';
}

.cs-star-rating::before {
    content: '\73\73\73\73\73';
    color: #dd773c;
    float: left;
    top: 0;
    left: 0;
    position: absolute;
}

.cs-star-rating span {
    overflow: hidden;
    float: left;
    top: 0;
    left: 0;
    position: absolute;
    padding-top: 1.5em;
}

.cs-star-rating span::before {
    content: '\53\53\53\53\53';
    top: 0;
    position: absolute;
    left: 0;
    color: #ffb900;
}

.cs-star-rating {
    position: relative;
    height: 0em;
    line-height: 1;
    font-size: 1em;
    width: 5.4em;
    font-family: star;
    color: #d3ced2;
    margin-right: 8px;
}

.cs-star-rating::before {
    content: "\73\73\73\73\73";
    float: left;
    top: 0;
    left: 0;
    position: absolute;
}

.cs-star-rating span {
    overflow: hidden;
    float: left;
    top: 0;
    left: 0;
    position: absolute;
    padding-top: 1.5em;
}

.cs-star-rating span::before {
    content: "\53\53\53\53\53";
    top: 0;
    position: absolute;
    left: 0;
    color: #ffb900;
}

.cs-review-count {
    color: #a0a0a0;
    font-size: 0.9em;
    margin-left: 5px;
}

/* Estilos para el precio */
.cs-product-price {
    margin: 0 15px 15px;
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
}

.cs-product-rating-price {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
}

/* Asegurar que el precio no se desplace hacia abajo respecto a las estrellas */
.cs-product-rating-price .cs-product-price {
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    line-height: 1 !important;
    white-space: nowrap;
    flex: 0 0 auto; /* no se encoge el precio */
    margin-left: 8px !important;
    text-align: right;
}
.cs-product-rating-price .cs-product-price .price {
    display: inline !important;
    margin: 0 !important;
    line-height: 1 !important;
}
.cs-product-rating-price .cs-product-price del,
.cs-product-rating-price .cs-product-price ins,
.cs-product-rating-price .cs-product-price span {
    line-height: 1 !important;
    vertical-align: middle;
}

/* Alinear estrellas de WooCommerce (wc_get_rating_html) */
.cs-product-rating-price .star-rating {
    display: inline-flex !important;
    align-items: center !important;
    line-height: 1 !important;
    margin: 0 !important;
}

.cs-product-rating {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0; /* permite truncar si es necesario */
}

.cs-product-rating .stars {
    display: inline-flex;
    align-items: center;
}

.cs-product-rating .rating-text {
    font-size: 12px;
    line-height: 1;
    color: #a0a0a0;
    white-space: nowrap;
}

.cs-product-price .price {
    display: block;
}

.cs-product-price del {
    opacity: 0.7;
    margin-right: 5px;
    font-size: 0.9em;
}

.cs-product-price ins {
    text-decoration: none;
    color: #ffffff !important;
    font-weight: 700;
}

/* Botones de acción */
.cs-product-actions {
    padding: 20px 0px 5px;
    display: flex;
    gap: 8px;
    margin-top: auto;
}

.cs-product-actions .button {
    background: linear-gradient(135deg, #c66028, #e07a3f);
    color: white !important;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.5em 1em;
    padding: 12px 15px;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 5px rgba(198, 96, 40, 0.3);
    position: relative;
    overflow: hidden;
}

.cs-product-actions .button:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: 0.5s;
}

.cs-product-actions .button:hover:before {
    left: 100%;
}

.cs-product-actions .button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(198, 96, 40, 0.4);
}

.cs-product-actions .button:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(198, 96, 40, 0.3);
}

/* Estilos para el ícono del carrito */
.cart-icon {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.add-to-cart:hover .cart-icon {
    transform: scale(1.1);
}

.add-to-cart.loading .cart-icon {
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Estilo para el texto del botón */
.add-to-cart-text {
    transition: all 0.3s ease;
}

/* Estilo para el estado de carga */
.add-to-cart.loading .add-to-cart-text {
    opacity: 0.8;
}

.cs-product-actions .button:disabled {
    background: #666666 !important;
    cursor: not-allowed;
    transform: none !important;
    opacity: 0.7;
    box-shadow: none !important;
}

.cs-add-to-cart:hover {
    background: #a84f1f;
    transform: translateY(-2px);
}

.cs-add-to-cart:disabled {
    background: #666666;
    cursor: not-allowed;
    transform: none;
}

.cs-add-to-cart i {
    font-size: 14px;
}

.cs-quick-view {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #3a3a3a;
    border: none;
    border-radius: 6px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cs-quick-view:hover {
    background: #4a4a4a;
    color: #c66028;
}

/* Estilo para productos agotados */
.out-of-stock {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    z-index: 2;
}

/* Tooltip para las estrellas */
[data-toggle="tooltip"] {
    cursor: help;
    position: relative;
}

/* Estilos para el loading */
.cs-loading {
    text-align: center;
    padding: 30px;
    color: #a0a0a0;
    font-size: 1.1em;
}

.cs-loading i {
    margin-right: 10px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Asegurar que los productos tengan la misma altura en cada fila */
.cs-products-row {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
}

.cs-product-col {
    display: flex;
    flex-direction: column;
}

.cs-product-item {
    flex: 1;
}

/* Mejoras de accesibilidad para botones */
.cs-add-to-cart:focus,
.cs-quick-view:focus {
    outline: 2px solid #c66028;
    outline-offset: 2px;
}

/* Mejoras para pantallas pequeñas */
@media (max-width: 480px) {
    .cs-product-title {
        font-size: 14px;
    }
    
    .cs-product-price {
        font-size: 16px;
    }
    
    .cs-add-to-cart {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    .cs-quick-view {
        width: 38px;
        height: 38px;
    }
}