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

.imco-offers-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 24px;
    margin: 0 auto;
    padding: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Responsive Columns based on CSS variable passed from shortcode */
@media (min-width: 600px) {
    .imco-offers-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@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: 24px;
    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;
}

.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) */
.imco-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    flex-direction: column;
    border-radius: 6px;
    overflow: hidden;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(204, 0, 0, 0.25);
}

.imco-badge-main {
    background-color: #cc0000;
    /* Rojo Kairos */
    color: #ffffff;
    display: block;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.3px;
    padding: 6px 10px;
    text-align: center;
}

.imco-badge-sub {
    background-color: #990000;
    /* Rojo oscuro para contraste */
    color: #ffffff;
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 4px 10px;
    text-align: center;
    text-transform: uppercase;
}

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

.imco-global-badge {
    top: 10px;
    right: 10px;
    z-index: 99;
    pointer-events: none;
}

/* 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: #009A44;
}

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

.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);
}

.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-container {
    margin-bottom: 30px;
    display: flex;
    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;
}

.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);
}