/**
 * Theme Name: Blocksy Child
 * Description: Blocksy Child theme
 * Author: Creative Themes
 * Template: blocksy
 * Text Domain: blocksy
 */

/* ==========================================================================
   FACELIFT PREMIUM - CATEGORÍAS Y LISTADO DE PRODUCTOS (ONTRONIC)
   ========================================================================== */

/* Ajustar el grid de productos para corregir el espacio excesivo de 79px */
.products {
    gap: 20px !important; /* Separación horizontal estándar */
    row-gap: 28px !important; /* Separación vertical */
}

/* 1. Tarjeta de producto general */
.products.columns-4 li.product, 
.products li.product {
    background: var(--theme-palette-color-8, #ffffff) !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 16px !important;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.01) !important;
    box-sizing: border-box !important;
}

/* Efecto hover en tarjeta */
.products.columns-4 li.product:hover,
.products li.product:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 10px 20px rgba(2, 89, 155, 0.08) !important;
    border-color: var(--theme-palette-color-1, #02599B) !important;
}

/* 2. Imagen de producto */
.products li.product figure {
    margin: 0 0 12px 0 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    background-color: transparent !important;
    order: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    height: 180px !important;
}

.products li.product figure img {
    transition: transform 0.5s ease !important;
    max-height: 100% !important;
    width: auto !important;
    object-fit: contain !important;
}

.products li.product:hover figure img {
    transform: scale(1.04) !important;
}

/* 3. Categorías */
.products li.product ul.entry-meta { 
    order: 2 !important; 
    margin: 0 0 6px 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.products li.product ul.entry-meta li.meta-categories {
    font-size: 11px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.8px !important;
    font-weight: 700 !important;
    color: #94a3b8 !important;
}

.products li.product ul.entry-meta li.meta-categories a {
    color: #94a3b8 !important;
    pointer-events: none;
}

/* 4. Título del producto */
.products li.product h2.woocommerce-loop-product__title {
    order: 3 !important;
    font-size: 14px !important;
    line-height: 1.35 !important;
    font-weight: 500 !important;
    margin: 0 0 12px 0 !important;
    flex-grow: 1 !important;
}

.products li.product h2.woocommerce-loop-product__title a {
    color: #1e293b !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

.products li.product h2.woocommerce-loop-product__title a:hover {
    color: var(--theme-palette-color-1, #02599B) !important;
}

/* 5. Precios */
.products li.product .price {
    order: 4 !important;
    display: block !important;
    margin: 0 0 12px 0 !important;
}

.products li.product .price > .amount,
.products li.product .price ins .amount {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: var(--theme-palette-color-1, #02599B) !important;
}

.products li.product .price del .amount {
    font-size: 13px !important;
    color: #94a3b8 !important;
    font-weight: 400 !important;
}

.products li.product .price small.woocommerce-price-suffix {
    font-size: 11px !important;
    color: #64748b !important;
    margin-top: 2px !important;
    display: block !important;
}

/* 6. Stock en tarjeta */
.products li.product .ct-woo-card-stock {
    order: 5 !important;
    margin: 0 0 16px 0 !important;
}

.products li.product .ct-woo-card-stock p.stock {
    font-size: 11px !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin: 0 !important;
    padding: 3px 8px !important;
    border-radius: 20px !important;
}

.products li.product .ct-woo-card-stock p.stock.in-stock {
    color: #166534 !important;
    background-color: #f0fdf4 !important;
}

.products li.product .ct-woo-card-stock p.stock.in-stock::before {
    content: "" !important;
    display: inline-block !important;
    width: 6px !important;
    height: 6px !important;
    background-color: #22c55e !important;
    border-radius: 50% !important;
}

.products li.product .ct-woo-card-stock p.stock.out-of-stock {
    color: #991b1b !important;
    background-color: #fef2f2 !important;
}

.products li.product .ct-woo-card-stock p.stock.out-of-stock::before {
    content: "" !important;
    display: inline-block !important;
    width: 6px !important;
    height: 6px !important;
    background-color: #ef4444 !important;
    border-radius: 50% !important;
}

/* 7. Botones de acción */
.products li.product .ct-woo-card-actions {
    order: 6 !important;
    margin-top: auto !important;
}

.products li.product .ct-woo-card-actions a.button {
    width: 100% !important;
    text-align: center !important;
    background-color: var(--theme-palette-color-1, #02599B) !important;
    color: #ffffff !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 12px !important;
    padding: 10px 16px !important;
    border: none !important;
    transition: all 0.2s ease !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    box-shadow: 0 2px 4px rgba(2, 89, 155, 0.1) !important;
}

.products li.product .ct-woo-card-actions a.button:hover {
    background-color: #014375 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(2, 89, 155, 0.2) !important;
}

/* ==========================================================================
   FACELIFT PREMIUM - FILTROS EN BARRA LATERAL (WOOCOMMERCE BLOCKS)
   ========================================================================== */

.wp-block-woocommerce-product-filters {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 24px !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.01) !important;
}

.wp-block-woocommerce-product-filters h3.wp-block-heading {
    font-size: 13px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.8px !important;
    color: #1e293b !important;
    border-bottom: 2px solid #f1f5f9 !important;
    padding-bottom: 8px !important;
    margin-top: 0 !important;
    margin-bottom: 20px !important;
}

.wp-block-woocommerce-product-filters > div {
    margin-bottom: 28px !important;
}
.wp-block-woocommerce-product-filters > div:last-child {
    margin-bottom: 0 !important;
}

.wc-block-product-filter-price-slider__range .range-bar {
    background-color: var(--theme-palette-color-1, #02599B) !important;
    height: 4px !important;
}

.wc-block-product-filter-price-slider__range input[type="range"]::-webkit-slider-thumb {
    background-color: #ffffff !important;
    border: 2px solid var(--theme-palette-color-1, #02599B) !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15) !important;
    width: 16px !important;
    height: 16px !important;
    cursor: pointer !important;
    transition: transform 0.1s ease !important;
}
.wc-block-product-filter-price-slider__range input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2) !important;
}

.wc-block-product-filter-price-slider__content input.min,
.wc-block-product-filter-price-slider__content input.max {
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    padding: 6px 10px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #334155 !important;
    text-align: center !important;
    background-color: #f8fafc !important;
}

.wc-block-product-filter-checkbox-list__label {
    font-size: 14.5px !important; /* Más legible */
    font-weight: 500 !important;
    color: #334155 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
}

.wc-block-product-filter-checkbox-list__text-wrapper {
    font-size: 14.5px !important; /* Aumentado tamaño del texto de categoría */
    color: #1e293b !important;
}

.wc-block-product-filter-checkbox-list__input-wrapper {
    margin-right: 10px !important;
}

.wc-block-product-filter-checkbox-list__input {
    border-radius: 4px !important;
    border: 1px solid #cbd5e1 !important;
    width: 16px !important;
    height: 16px !important;
    cursor: pointer !important;
}
.wc-block-product-filter-checkbox-list__input:checked {
    background-color: var(--theme-palette-color-1, #02599B) !important;
    border-color: var(--theme-palette-color-1, #02599B) !important;
}

.wc-block-product-filter-clear-button .wp-block-button__link {
    background-color: transparent !important;
    color: #64748b !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    padding: 8px 16px !important;
    transition: all 0.2s ease !important;
    width: 100% !important;
    cursor: pointer !important;
}
.wc-block-product-filter-clear-button .wp-block-button__link:hover {
    background-color: #f1f5f9 !important;
    color: #1e293b !important;
    border-color: #94a3b8 !important;
}

/* ==========================================================================
   FACELIFT PREMIUM - TABLA DE PRECIOS POR VOLUMEN Y RESUMEN DE COMPRA
   ========================================================================== */

.tiered-pricing-wrapper {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 24px !important;
    margin: 25px 0 !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px -1px rgba(0, 0, 0, 0.01) !important;
}

.tiered-pricing-wrapper h3 {
    font-size: 13px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.8px !important;
    color: #1e293b !important;
    border-bottom: 2px solid #f1f5f9 !important;
    padding-bottom: 10px !important;
    margin: 0 0 16px 0 !important;
}

.tiered-pricing-table {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    border: 1px solid #e2e8f0 !important;
    margin-bottom: 0 !important;
}

.tiered-pricing-table th {
    background-color: #f8fafc !important;
    color: #475569 !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    padding: 12px 16px !important;
    border-bottom: 2px solid #cbd5e1 !important;
    border-top: none !important;
}

/* Ocultar la columna de Descuento (segunda columna) */
.tiered-pricing-table th:nth-child(2),
.tiered-pricing-table td:nth-child(2) {
    display: none !important;
}

.tiered-pricing-table td {
    padding: 12px 16px !important;
    font-size: 14px !important;
    border-bottom: 1px solid #f1f5f9 !important;
    vertical-align: middle !important;
    background-color: #ffffff !important;
}

/* Forzar color oscuro en las celdas normales y sus textos internos (precios, etc) */
.tiered-pricing-table td,
.tiered-pricing-table td *,
.tiered-pricing-table td .amount,
.tiered-pricing-table td bdi {
    color: #334155 !important;
}

.tiered-pricing-table tbody tr:last-child td {
    border-bottom: none !important;
}

/* Fila activa del rango actual (Azul celeste suave corporativo) */
table.tiered-pricing-table[id] tr.tiered-pricing--active td,
table.tiered-pricing-table[id] tr.tiered-pricing--active:hover td {
    background-color: #e0f2fe !important;
}

table.tiered-pricing-table[id] tr.tiered-pricing--active td *,
table.tiered-pricing-table[id] tr.tiered-pricing--active:hover td *,
table.tiered-pricing-table[id] tr.tiered-pricing--active td .amount,
table.tiered-pricing-table[id] tr.tiered-pricing--active td bdi {
    color: #0369a1 !important;
    font-weight: 600 !important;
}

/* Hover en las filas normales */
.tiered-pricing-table tbody tr:hover td {
    background-color: #f8fafc !important;
}

/* Caja de Resumen de Compra Dinámico */
.tier-pricing-summary-table {
    background: #f8fafc !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 20px !important;
    margin: 20px 0 !important;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.01) !important;
    transition: all 0.3s ease !important;
}

.tier-pricing-summary-table h4 {
    font-size: 13px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: #475569 !important;
    margin: 0 0 14px 0 !important;
    border-bottom: 1px dashed #cbd5e1 !important;
    padding-bottom: 8px !important;
}

.tier-pricing-summary-table__top {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    font-size: 14px !important;
    color: #64748b !important;
    padding-bottom: 10px !important;
    margin-bottom: 12px !important;
    border-bottom: 1px dashed #e2e8f0 !important;
}

.tier-pricing-summary-table__bottom {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

.tier-pricing-summary-table__bottom div b span {
    font-size: 14.5px !important;
    font-weight: 600 !important;
    color: #1e293b !important;
}

.tier-pricing-summary-table__total {
    font-size: 22px !important;
    font-weight: 800 !important;
    color: var(--theme-palette-color-1, #02599B) !important;
    display: flex !important;
    align-items: center !important;
}

/* Caja de Resumen de Compra Dinámico a medida (Ontronic) */
.ontronic-total-summary {
    background: #f8fafc !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 20px !important;
    margin: 20px 0 !important;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.01) !important;
    transition: all 0.3s ease !important;
    clear: both !important;
}

.ontronic-total-summary .summary-label {
    font-size: 13px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: #475569 !important;
    margin: 0 0 14px 0 !important;
    border-bottom: 1px dashed #cbd5e1 !important;
    padding-bottom: 8px !important;
}

.ontronic-total-summary .summary-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    font-size: 14px !important;
    color: #64748b !important;
    margin-bottom: 8px !important;
}

.ontronic-total-summary .summary-total-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    border-top: 1px dashed #cbd5e1 !important;
    padding-top: 10px !important;
    margin-top: 8px !important;
}

.ontronic-total-summary .summary-total-row span {
    font-weight: 600 !important;
    color: #1e293b !important;
}

.ontronic-total-summary .ontronic-summary-total {
    font-size: 22px !important;
    font-weight: 800 !important;
    color: var(--theme-palette-color-1, #02599B) !important;
}


