/* Estilos específicos para la página de Casas Comerciales */

/* Contenedor principal */
.content {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Sección del slider */
.slider-section {
    background: #fff;
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 100%;
    overflow: hidden;
    padding-bottom: 50px !important;
}

.slider-section h2 {
    text-align: center;
    color: #2c3e50;
    font-size: 1.8rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #eee;
}

/* Configuración del Swiper */
.swiper {
    padding: 2rem 2.5rem;
}

.swiper-slide {
    height: auto;
    transition: transform 0.3s ease;
}

/* Tarjetas de productos */
.product-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
}

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

/* Imagen del producto */
.product-image {
    width: 100%;
    height: 250px;
    object-fit: contain;
    background: #f8f9fa;
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

/* Información del producto */
.product-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.product-code {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

/* Lista de precios */
.price-list {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
}

.price-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px solid #eee;
}

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

.price-value {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.1rem;
}

.store-name {
    color: #666;
    font-size: 0.9rem;
}

/* Mejor precio destacado */
.price-item:first-child {
    background: #f8fff8;
    margin: -0.8rem -1.5rem 0.8rem -1.5rem;
    padding: 0.8rem 1.5rem;
    border-left: 4px solid #28a745;
}

.price-item:first-child .price-value {
    color: #28a745;
    font-size: 1.2rem;
}

/* Controles del Swiper */
.swiper-button-next,
.swiper-button-prev {
    color: #2c3e50;
    background: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    top: 50%;
    transform: translateY(-50%);
}

.swiper-button-prev {
    left: -5px;
}

.swiper-button-next {
    right: -5px;
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 1.2rem;
}

.swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: #ccc;
    opacity: 0.5;
    margin: 0 4px !important;
}

.swiper-pagination-bullet-active {
    background: #2c3e50;
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .content {
        padding: 1rem;
    }

    .slider-section {
        padding: 1rem;
        margin: 1rem 0;
        padding-bottom: 40px !important;
    }

    .product-image {
        height: 200px;
    }

    .product-info {
        padding: 1rem;
    }

    .swiper-button-next,
    .swiper-button-prev {
        display: none;
    }

    .swiper-pagination {
        margin-top: 15px !important;
    }
}

/* Loading state */
.loading-indicator {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.loading-indicator i {
    margin-right: 0.5rem;
}

/* Error state */
.error-message {
    text-align: center;
    padding: 2rem;
    color: #dc3545;
    background: #fff;
    border-radius: 8px;
    margin: 2rem 0;
}

/* Añadir contador de productos */
.slider-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #eee;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.header-content h2 {
    margin: 0;
    border: none;
    padding: 0;
    font-size: 1.8rem;
}

.product-counter {
    background: #2c3e50;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .header-content h2 {
        font-size: 1.2rem;
        width: 100%;
    }

    .product-counter {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
}

/* Nuevos estilos para Insight Cards (agregados al final del archivo) */
.insights-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0 40px 0;
    padding: 0 20px;
}

.insight-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s ease;
}

.insight-card:hover {
    transform: translateY(-5px);
}

.insight-icon {
    background: #f8f9fa;
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.insight-icon i {
    font-size: 24px;
    color: #2c3e50;
}

.insight-content {
    flex: 1;
}

.insight-content h3 {
    font-size: 0.9rem;
    color: #666;
    margin: 0 0 5px 0;
}

.insight-content div {
    font-size: 1.2rem;
    color: #2c3e50;
    font-weight: 600;
}

.tiendas-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    max-height: 150px;
    overflow-y: auto;
}

.tienda-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    padding: 2px 0;
}

.tienda-nombre {
    color: #666;
}

.tienda-count {
    font-weight: 600;
    color: #2c3e50;
}

/* Responsive para las cards */
@media (max-width: 768px) {
    .insights-container {
        grid-template-columns: 1fr;
        padding: 0 10px;
    }
}

.product-card.duplicated-store {
    background-color: rgba(255, 0, 0, 0.1);
    border: 1px solid rgba(255, 0, 0, 0.3);
}

/* Reemplazar los estilos de product-types-section por estos */
.product-types-section {
    background: #fff;
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 1400px;
}

.category-slicer {
    margin: 2rem 0;
    padding: 0.5rem;
}

.slicer-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding-bottom: 0.5rem;
    justify-content: center;
}

.category-chip {
    flex: 0 1 calc(33.333% - 1rem);
    min-width: 200px;
    max-width: 300px;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    color: #2c3e50;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-align: center;
    min-height: 60px;
    height: auto;
}

.category-chip .name {
    width: 100%;
    line-height: 1.2;
    word-wrap: break-word;
    hyphens: auto;
}

.category-chip .count {
    background: rgba(0, 0, 0, 0.1);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
}

.category-chip:hover {
    background: #e9ecef;
}

.category-chip.selected {
    background: #2c3e50;
    color: white;
    border-color: #2c3e50;
}

@media (max-width: 768px) {
    .category-chip {
        flex: 0 1 calc(50% - 1rem);
        min-width: 150px;
        padding: 0.6rem 1rem;
        min-height: 55px;
    }
    
    .category-chip .name {
        font-size: 0.65rem;
        line-height: 1.1;
    }

    .category-chip .count {
        font-size: 0.6rem;
        padding: 0.15rem 0.5rem;
    }
}

.products-table-container {
    margin-top: 2rem;
    overflow-x: auto;
}

#filtered-products-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 auto;
}

#filtered-products-table th,
#filtered-products-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

#filtered-products-table th {
    background-color: #f8f9fa;
    color: #2c3e50;
    font-weight: 600;
    position: sticky;
    top: 0;
}

#filtered-products-table tr:hover {
    background-color: #f8f9fa;
}

#filtered-products-table td:nth-child(3) {
    font-weight: 600;
    color: #2c3e50;
}

@media (max-width: 768px) {
    .product-types-section {
        padding: 1rem;
        margin: 1rem;
    }
    
    .category-chip {
        flex: 0 1 calc(50% - 1rem);
        min-width: 150px;
    }
}

/* Nuevo estilo para el grid de productos */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    padding: 1rem;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

.product-card-filtered {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    width: 100%;
    margin: 0 auto;
    position: relative;
}

.product-image-filtered-wrapper {
    width: 100%;
    height: 200px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
}

.product-image-filtered {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain !important;
    display: block;
}

.product-info-filtered {
    padding: 1rem;
}

.product-title-filtered {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.product-price-filtered {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.product-store-filtered {
    font-size: 0.9rem;
    color: #666;
}

/* Ajustes para móvil */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
        padding: 0.5rem;
        overflow-x: hidden;
    }

    .product-card-filtered {
        max-width: 200px; /* Ancho máximo fijo para móvil */
        margin: 0 auto; /* Centrar la tarjeta */
    }

    .product-image-filtered {
        height: 150px; /* Reducir altura de imagen */
    }

    .product-info-filtered {
        padding: 0.75rem; /* Reducir padding */
    }

    .product-title-filtered {
        font-size: 0.85rem;
        line-height: 1.2;
    }

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

    .product-store-filtered {
        font-size: 0.75rem;
    }

    .products-table-container {
        overflow-x: hidden;
        width: 100%;
        padding: 0;
    }
}

/* Ajuste adicional para pantallas muy pequeñas */
@media (max-width: 375px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }

    .product-card-filtered {
        max-width: 180px;
    }
}

/* Nuevos estilos para los tabs */
.tabs-container {
    margin: 2rem 0;
}

.tabs-header {
    display: flex;
    gap: 1rem;
    border-bottom: 2px solid #eee;
    margin-bottom: 2rem;
}

.tab-button {
    padding: 1rem 2rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    color: #666;
    font-size: 1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tab-button:hover {
    color: #2c3e50;
}

.tab-button.active {
    color: #2c3e50;
    border-bottom-color: #2c3e50;
    font-weight: 600;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-button::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #2c3e50;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.tab-button.active::after {
    transform: translateX(0);
}

/* Agregar estos estilos al final del archivo */

.analisis-precios {
    padding: 2rem;
}

.grid-tiendas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.tienda-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.tienda-card h3 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #eee;
}

.stats {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.label {
    color: #666;
}

.value {
    font-weight: 600;
    color: #2c3e50;
}

.value.aumento {
    color: #dc3545;
}

.value.disminucion {
    color: #28a745;
}

.cambios-container {
    margin-top: 1rem;
}

.cambios-bar {
    height: 8px;
    background: #eee;
    border-radius: 4px;
    display: flex;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.cambios-bar .aumentos {
    background: #dc3545;
}

.cambios-bar .sin-cambio {
    background: #6c757d;
}

.cambios-bar .disminuciones {
    background: #28a745;
}

.leyenda {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}

.leyenda span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.leyenda .aumentos {
    color: #dc3545;
}

.leyenda .sin-cambio {
    color: #6c757d;
}

.leyenda .disminuciones {
    color: #28a745;
}

@media (max-width: 768px) {
    .analisis-precios {
        padding: 1rem;
    }
    
    .grid-tiendas {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Agregar estos estilos para el loading */
.loading-overlay {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    text-align: center;
    color: #666;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2c3e50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

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

.error-message {
    text-align: center;
    padding: 2rem;
    color: #dc3545;
}

.retry-button {
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: #2c3e50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.retry-button:hover {
    background: #1a252f;
}

/* Agregar estos estilos para los items de precio clickeables */
.price-item[onclick] {
    transition: background-color 0.2s ease;
}

.price-item[onclick]:hover {
    background-color: #f8f9fa;
}

.price-item[onclick] .price-value {
    display: flex;
    align-items: center;
    gap: 5px;
}

.price-item[onclick] .fa-external-link-alt {
    opacity: 0.6;
}

.price-item[onclick]:hover .fa-external-link-alt {
    opacity: 1;
}

/* Estilos para la tabla pivot */
.pivot-section {
    margin-top: 4rem;
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.pivot-section h2 {
    margin-bottom: 2.5rem;
    color: #2c3e50;
    font-size: 1.5rem;
}

.pivot-table-wrapper {
    overflow-x: auto;
    margin-top: 1rem;
}

.pivot-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.pivot-table th,
.pivot-table td {
    padding: 0.75rem;
    border: 1px solid #eee;
    text-align: right;
}

.pivot-table th:first-child,
.pivot-table td:first-child {
    text-align: left;
    position: sticky;
    left: 0;
    background: white;
    z-index: 1;
}

.pivot-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.producto-titulo {
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.producto-titulo a {
    color: #2c3e50;
    text-decoration: none;
}

.producto-titulo a:hover {
    text-decoration: underline;
}

.precio-celda {
    position: relative;
}

.variacion {
    font-size: 0.8em;
    margin-left: 0.5rem;
}

.variacion.aumento {
    color: #dc3545;
}

.variacion.disminucion {
    color: #28a745;
}

.precio-celda.aumento {
    background-color: rgba(220, 53, 69, 0.1);
}

.precio-celda.disminucion {
    background-color: rgba(40, 167, 69, 0.1);
}

@media (max-width: 768px) {
    .pivot-section {
        padding: 1rem;
        margin-top: 2rem;
    }
    
    .pivot-table {
        font-size: 0.8rem;
    }
    
    .pivot-table th,
    .pivot-table td {
        padding: 0.5rem;
    }
}

/* Agregar estos estilos para el slicer */
.slicer-container {
    margin-bottom: 2.5rem;
}

.slicer-container h3 {
    margin-bottom: 1.2rem;
    color: #2c3e50;
}

.tienda-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tienda-chip {
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tienda-chip:hover {
    background: #e9ecef;
}

.tienda-chip.selected {
    background: #2c3e50;
    color: white;
    border-color: #2c3e50;
}

/* Actualizar estilos existentes de la tabla */
.tienda-celda {
    font-weight: 500;
    color: #666;
}

.pivot-table th:nth-child(2),
.pivot-table td:nth-child(2) {
    position: sticky;
    left: 300px; /* Ajustar según el ancho de la primera columna */
    background: white;
    z-index: 1;
}

@media (max-width: 768px) {
    .tienda-chips {
        gap: 0.3rem;
    }

    .tienda-chip {
        padding: 0.3rem 0.8rem;
        font-size: 0.9rem;
    }
}

.pivot-table td {
    white-space: nowrap;
    min-width: 120px;
}

.precio-celda {
    text-align: right;
    font-family: monospace;
}

.variacion {
    display: inline-block;
    margin-left: 8px;
    font-size: 0.85em;
}

/* Ajustes para el contenedor del Swiper */
.swiper.mySwiper {
    width: 100%;
    position: relative;
    padding: 0 50px;
    overflow: visible;
}

.swiper-wrapper {
    display: flex;
    align-items: center;
}

.swiper-slide {
    width: 280px !important;
    display: flex !important;
    justify-content: center !important;
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

.swiper-slide-active {
    opacity: 1;
}

@media (max-width: 768px) {
    .swiper.mySwiper {
        padding: 0 35px;
    }

    .swiper-slide {
        width: 240px !important;
    }

    .product-card {
        max-width: 240px;
    }
}

/* Asegurar que los botones de navegación estén sobre las tarjetas */
.swiper-button-next,
.swiper-button-prev {
    z-index: 20 !important;
}

/* Contenedor de precio y tienda */
.price-store-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

/* Flechas de navegación */
.swiper-button-next,
.swiper-button-prev {
    position: absolute;
    margin-top: 0;
    top: 200px !important;
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    color: #2c3e50;
    z-index: 10;
}

.swiper-button-prev {
    left: 0 !important;
}

.swiper-button-next {
    right: 0 !important;
}

/* Ajustes responsive */
@media (max-width: 768px) {
    .swiper.mySwiper {
        padding: 0 35px;
    }

    .swiper-slide {
        width: 240px !important;
    }

    .product-card {
        max-width: 240px;
    }

    .price-store-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .store-name {
        font-size: 0.85rem;
        color: #666;
    }

    .swiper-button-next,
    .swiper-button-prev {
        top: 150px !important;
        width: 30px;
        height: 30px;
    }
}

/* Estilos para la tabla pivot responsive */
@media (max-width: 768px) {
    .pivot-table-wrapper {
        display: none; /* Ocultar tabla en móvil */
    }
    
    .mobile-pivot-view {
        display: block;
        padding: 1rem 0;
    }
    
    .product-accordion {
        border: 1px solid #eee;
        border-radius: 8px;
        margin-bottom: 1rem;
        overflow: hidden;
    }
    
    .product-accordion-header {
        padding: 0.75rem;
        background: #fff;
        display: flex;
        justify-content: space-between;
        align-items: center;
        cursor: pointer;
    }
    
    .product-accordion-title {
        font-size: 0.65rem;
        color: #2c3e50;
        flex: 1;
        margin-right: 1rem;
        line-height: 1.1;
    }
    
    .change-indicator {
        padding: 0.2rem 0.4rem;
        border-radius: 15px;
        font-size: 0.6rem;
        font-weight: 600;
        white-space: nowrap;
    }
    
    .change-indicator.positive {
        background: rgba(40, 167, 69, 0.1);
        color: #28a745;
    }
    
    .change-indicator.negative {
        background: rgba(220, 53, 69, 0.1);
        color: #dc3545;
    }
    
    .product-accordion-content {
        display: none;
        padding: 0.75rem;
        background: #f8f9fa;
        border-top: 1px solid #eee;
    }
    
    .product-accordion.active .product-accordion-content {
        display: block;
    }
    
    .price-evolution {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .price-point {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.4rem;
        background: white;
        border-radius: 6px;
    }
    
    .price-date {
        font-size: 0.6rem;
        color: #666;
    }
    
    .price-value {
        font-weight: 600;
        color: #2c3e50;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-size: 0.65rem;
    }
    
    .price-change {
        font-size: 0.6rem;
        padding: 0.15rem 0.3rem;
        border-radius: 12px;
    }
}

@media (min-width: 769px) {
    .mobile-pivot-view {
        display: none; /* Ocultar vista móvil en desktop */
    }
}

/* Estilos para los indicadores de cambio de precio */
.change-indicator,
.price-change {
    padding: 0.2rem 0.4rem;
    border-radius: 15px;
    font-size: 0.6rem;
    font-weight: 600;
}

/* Estilo para aumentos de precio (rojo) */
.change-indicator.negative,
.price-change.negative {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;  /* Rojo */
}

/* Estilo para disminuciones de precio (verde) */
.change-indicator.positive,
.price-change.positive {
    background-color: rgba(40, 167, 69, 0.1);
    color: #28a745;  /* Verde */
}

@media (max-width: 768px) {
    .change-indicator,
    .price-change {
        padding: 0.2rem 0.4rem;
        font-size: 0.6rem;
    }
}

/* Toggle period buttons for historical charts */
.historico-period-toggle {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
.historico-period-toggle button {
    padding: 0.6rem 1.2rem;
    border: none;
    background-color: #e2e8f0;
    color: #1e293b;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.historico-period-toggle button:hover {
    background-color: #cbd5e1;
}
.historico-period-toggle button.active {
    background-color: #1e293b;
    color: #f8fafc;
}

/* Grid de categorías en escritorio */
.category-list-vertical {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    max-width: 100%;
    width: 100%;
    list-style: none;
    padding: 0;
    margin: 0 auto 1.5rem auto;
    align-items: stretch;
}
@media (max-width: 768px) {
    .category-list-vertical {
        display: flex;
        flex-direction: column;
        gap: 0.3rem;
        max-width: 100%;
    }
}

/* Combo box de categorías estilizado */
.category-combobox {
    width: 100%;
    max-width: 400px;
    margin: 0 auto 1.5rem auto;
    display: block;
    padding: 0.8rem 1.2rem;
    font-size: 1.1rem;
    border-radius: 18px;
    border: 2px solid #e9ecef;
    background: #f8f9fa;
    color: #2c3e50;
    font-weight: 500;
    outline: none;
    transition: border-color 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.category-combobox:focus {
    border-color: #2c3e50;
}
@media (max-width: 768px) {
    .category-combobox {
        font-size: 0.95rem;
        padding: 0.6rem 0.7rem;
        border-radius: 14px;
    }
}

.bajas-slider-section {
    margin-bottom: 40px !important;
}
.bajas-slider-section .swiper-wrapper {
    gap: 2.5rem !important;
}
.bajas-slider-section .swiper-slide {
    margin-right: 32px !important;
}
.bajas-slider-section .product-card {
    margin-bottom: 18px;
    padding-bottom: 18px;
}

.category-list-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 18px;
    padding: 1.1rem 1.2rem;
    font-size: 1rem;
    color: #2c3e50;
    cursor: pointer;
    transition: all 0.2s, box-shadow 0.2s;
    gap: 0.5rem;
    box-shadow: 0 2px 8px rgba(44,62,80,0.06);
    min-height: 70px;
    margin: 0;
    text-align: center;
}
.category-list-item.selected {
    background: #2196F3;
    color: #fff;
    border-color: #1769aa;
    box-shadow: 0 4px 16px rgba(33,150,243,0.13);
}
.category-list-item:hover {
    background: #f0f7ff;
    border-color: #2196F3;
    box-shadow: 0 4px 16px rgba(33,150,243,0.10);
}
.category-icon {
    font-size: 1.7rem;
    margin-bottom: 0.5rem;
    min-width: unset;
    margin-right: 0;
}
.category-name {
    font-weight: 500;
    margin-bottom: 0.3rem;
    text-align: center;
    flex: unset;
}
.category-count {
    background: rgba(33,150,243,0.08);
    border-radius: 12px;
    padding: 0.2rem 0.7rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
}
@media (max-width: 768px) {
    .category-list-item {
        font-size: 0.92rem;
        padding: 0.6rem 0.7rem;
        border-radius: 14px;
        min-height: 55px;
    }
    .category-icon {
        font-size: 1.1rem;
        min-width: 1.3rem;
    }
    .category-count {
        font-size: 0.7rem;
        padding: 0.15rem 0.5rem;
    }
} 