/* 
 * Estilos para IMCO Ofertas
 * Diseño moderno, limpio, inspirado en Apple
 */

.imco-offers-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 0 auto;
    padding: 10px 0;
}

/* Responsive Columns based on CSS variable passed from shortcode */
@media (min-width: 600px) {
    .imco-offers-grid {
        gap: 24px;
        padding: 20px 0;
    }
}
@media (min-width: 992px) {
    .imco-offers-grid {
        grid-template-columns: repeat(var(--imco-cols, 4), 1fr);
    }
}

.imco-offer-card {
    background: #ffffff;
    border: 1px solid #f0f0f0;
    border-radius: 16px;
    padding: 12px;
    position: relative;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

@media (min-width: 600px) {
    .imco-offer-card {
        padding: 24px;
    }
}

.imco-offer-card:hover {
    box-shadow: 0 12px 32px rgba(0,0,0,0.08);
    transform: translateY(-4px);
    border-color: #e2e8f0;
}

/* Badge Superior Derecho (Estilo de la imagen) */
/* Removido en v1.2.4: Ahora se usa .imco-badge-strip con estilos en línea en el core */

/* Estilos para el badge global en WooCommerce */
.woocommerce ul.products li.product,
.woocommerce div.product div.images {
    position: relative;
}

/* Imagen del Producto */
.imco-product-image {
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.imco-product-image img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    transition: transform 0.4s ease;
}

.imco-offer-card:hover .imco-product-image img {
    transform: scale(1.04);
}

/* Título del Producto */
.imco-product-title {
    font-size: 15px;
    font-weight: 500;
    color: #1d1d1f;
    line-height: 1.4;
    margin: 0 0 12px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.imco-product-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.imco-product-title a:hover {
    color: #cc0000 !important;
}

/* Contenedor de Precios */
.imco-price-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.imco-price-container del,
.imco-price-container del .amount {
    color: #64748b !important;
    text-decoration: line-through !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    opacity: 0.8 !important;
}

.imco-price-container ins,
.imco-price-container ins .amount {
    color: #cc0000 !important; /* Rojo Kairos */
    font-size: 16px !important;
    font-weight: 800 !important;
    text-decoration: none !important;
}

.imco-price-container ins {
    background-color: #fff0f0 !important;
    padding: 4px 8px !important;
    border-radius: 6px !important;
}

.imco-old-price {
    color: #64748b;
    text-decoration: line-through;
    font-size: 14px;
    font-weight: 500;
    opacity: 0.8;
}

.imco-new-price {
    color: #cc0000; /* Rojo Kairos */
    font-size: 16px;
    font-weight: 800;
    background-color: #fff0f0;
    padding: 4px 8px;
    border-radius: 6px;
}

.imco-regular-price {
    color: #1d1d1f;
    font-size: 18px;
    font-weight: 700;
}

/* Botón Añadir al Carrito */
.imco-add-to-cart {
    margin-top: auto;
}

.imco-add-to-cart .button,
.imco-add-to-cart .added_to_cart {
    background-color: #0f172a; /* Azul muy oscuro / Negro */
    color: #ffffff;
    border-radius: 999px; /* Forma de píldora */
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    width: 100%;
    text-align: center;
}

.imco-add-to-cart .button:hover,
.imco-add-to-cart .added_to_cart:hover {
    background-color: #1e293b;
    transform: scale(1.02);
}

@media (max-width: 599px) {
    .imco-product-title {
        font-size: 13px;
        margin-bottom: 8px;
    }
    .imco-price-container {
        gap: 6px;
        margin-bottom: 12px;
    }
    .imco-price-container ins .amount {
        font-size: 14px !important;
    }
    .imco-price-container del .amount {
        font-size: 12px !important;
    }
    .imco-add-to-cart .button,
    .imco-add-to-cart .added_to_cart {
        padding: 8px 12px;
        font-size: 12px;
    }
}

.imco-no-offers {
    text-align: center;
    padding: 40px;
    color: #64748b;
    font-size: 16px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px dashed #cbd5e1;
}

/* Paginación */
.imco-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    margin-bottom: 20px;
    width: 100%;
}

.imco-pagination a.page-numbers,
.imco-pagination span.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 16px;
    border-radius: 999px !important; /* Pill shape */
    background: #f8fafc !important;
    color: #475569 !important;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none !important;
    border: none !important;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04) !important;
}

.imco-pagination a.page-numbers:hover {
    background: #e2e8f0 !important;
    color: #0f172a !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.08) !important;
}

.imco-pagination span.page-numbers.current {
    background: #cc0000 !important; /* Rojo Kairos */
    color: white !important;
    box-shadow: 0 4px 12px rgba(204, 0, 0, 0.3) !important;
}

.imco-pagination .next,
.imco-pagination .prev {
    padding: 0 16px;
}

/* Filtros (Cápsulas) */
.imco-filters-wrapper {
    margin-bottom: 15px;
}

.imco-filters-toggle {
    display: inline-flex;
    width: auto;
    background: #cc0000 !important;
    color: #ffffff !important;
    border: none !important;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color 0.1s ease !important;
}

@media (max-width: 600px) {
    .imco-filters-toggle {
        width: 100%;
    }
}

.imco-filters-toggle:hover {
    background: #990000 !important;
}

.imco-filters-toggle.is-active {
    background: #111111 !important;
}

.imco-filters-toggle svg {
    width: 18px;
    height: 18px;
}

.imco-filters-container {
    display: none;
    flex-direction: column;
    gap: 20px;
    background: #ffffff;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    border: 1px solid #f0f0f0;
    margin-top: 16px;
}

.imco-filters-container.is-open {
    display: flex;
}

@media (max-width: 991px) {
    /* Las reglas de visualización ahora se aplican a todas las pantallas */
}

.imco-filter-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.imco-filter-label {
    font-weight: 700;
    font-size: 13px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.imco-filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.imco-filter-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 18px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    cursor: pointer;
}

.imco-filter-pill:hover {
    background: #e2e8f0;
    color: #0f172a;
    transform: translateY(-1px);
}

.imco-filter-pill.active {
    background: #cc0000;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(204, 0, 0, 0.25);
}

/* Forzar centrado global del contador y la franja de oferta en cualquier vista */
.product .price,
.imco-offer-card .price,
.woocommerce ul.products li.product .price {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
}

.product .temu-countdown-container,
.imco-offer-card .temu-countdown-container,
.woocommerce ul.products li.product .temu-countdown-container {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    flex-basis: 100% !important;
    margin-top: 8px !important;
    clear: both !important;
}

.product .imco-badge-strip-wrapper,
.woocommerce ul.products li.product .imco-badge-strip-wrapper {
    display: block !important;
    width: 100% !important;
    flex-basis: 100% !important;
    text-align: center !important;
    margin: 8px 0 !important;
}
