/* Shared visual language with CHR Offers. Native WooCommerce markup stays intact. */
body ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    align-items: stretch;
    gap: 22px !important;
}

body ul.products li.product:not(.product-category) {
    --chr-card-color: #1d00fd;
    --chr-card-padding: 16px;
    box-sizing: border-box;
    position: relative;
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    min-width: 0;
    width: auto !important;
    height: 100%;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e6e8ec;
    border-radius: 18px;
    box-shadow: 0 5px 18px rgb(15 23 42 / 6%);
    text-align: left;
    transition: box-shadow 160ms ease;
}

body ul.products li.product:not(.product-category):hover {
    box-shadow: 0 9px 24px rgb(15 23 42 / 10%);
}

body ul.products li.product > figure {
    box-sizing: border-box;
    position: relative;
    display: block;
    width: 100%;
    margin: 0 0 16px !important;
    padding: var(--chr-card-padding);
    background: #f7f9fb;
}

body ul.products li.product > figure .ct-media-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: #fff;
}

body ul.products li.product > figure img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1;
    object-fit: contain !important;
    transform: none !important;
}

body ul.products li.product .chr-catalog-sku {
    display: block;
    margin: 0 var(--chr-card-padding) 7px;
    color: #788493;
    font: 700 11px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    overflow-wrap: anywhere;
}

body ul.products li.product .woocommerce-loop-product__title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    min-height: 4.05em;
    margin: 0 var(--chr-card-padding) 18px !important;
    padding: 0;
    color: #131117;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

body ul.products li.product .woocommerce-loop-product__title a {
    color: inherit;
}

body ul.products li.product > .price {
    display: block;
    margin: 0 var(--chr-card-padding) 16px !important;
    color: var(--chr-card-color);
    font: 900 clamp(18px, 1.65vw, 24px)/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body ul.products li.product > .price::before {
    content: "PRECIO FINAL";
    display: block;
    margin-bottom: 10px;
    color: #718096;
    font: 800 10px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: .08em;
}

body ul.products li.product > .price .amount {
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
}

body ul.products li.product > .price bdi {
    white-space: nowrap;
}

body ul.products li.product > .price del {
    display: inline-block;
    margin: 0 5px 6px 0;
    color: #8994a3;
    opacity: 1;
    font-size: 14px;
    font-weight: 400;
}

body ul.products li.product > .price ins {
    color: var(--chr-card-color);
    background: transparent;
    text-decoration: none;
}

body ul.products li.product > .price .custom-tax-suffix,
body ul.products li.product > .price .woocommerce-price-suffix {
    display: block !important;
    margin-top: 10px;
    color: #788493;
    font-size: 12px !important;
    font-weight: 400 !important;
    line-height: 1.55;
}

body ul.products li.product .ct-woo-card-actions {
    position: static;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: auto;
    margin: auto var(--chr-card-padding) 12px !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}

body ul.products li.product .ct-woo-card-actions .button,
body ul.products li.product .ct-woo-card-actions .added_to_cart {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    min-height: 44px;
    margin: 0;
    padding: 11px 10px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: var(--chr-card-color);
    color: #fff;
    font: 800 13px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    text-align: center;
    text-decoration: none;
    white-space: normal;
}

body ul.products li.product .ct-woo-card-actions .button:hover {
    background: #1900d9;
    color: #fff;
}

body ul.products li.product .ct-woo-card-actions .added_to_cart {
    border-color: #e6e8ec;
    background: #f7f9fb;
    color: var(--chr-card-color);
}

body ul.products li.product a:focus-visible,
body ul.products li.product input:focus-visible {
    outline: 3px solid #8575ff;
    outline-offset: 3px;
}

body ul.products li.product .out-of-stock-badge,
body ul.products li.product .onsale {
    position: absolute;
    z-index: 2;
    top: 12px;
    left: 12px;
    right: auto;
    min-width: 0;
    min-height: 0;
    padding: 7px 11px;
    border: 0;
    border-radius: 30px;
    color: #fff;
    background: #293241;
    font: 800 11px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body ul.products li.product .onsale {
    background: #f51b40;
}

body ul.products li.product .bloque-compra-precision {
    box-sizing: border-box;
    width: auto;
    min-height: 36px;
    margin: 0 var(--chr-card-padding) 16px !important;
    padding: 0;
    font-size: 12px;
}

body ul.products li.product .aviso-stock-kodee {
    color: #788493;
    font-size: 12px;
}

@media (max-width: 1024px) {
    body ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}

@media (max-width: 680px) {
    body ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 14px !important; }
    body ul.products li.product { --chr-card-padding: 12px; border-radius: 14px; }
    body ul.products li.product .woocommerce-loop-product__title { font-size: 13px; }
    body ul.products li.product > .price { font-size: 19px; }
    body ul.products li.product .ct-woo-card-actions .button { font-size: 12px; }
}

@media (max-width: 380px) {
    body ul.products { grid-template-columns: minmax(0, 1fr) !important; }
}

@media (prefers-reduced-motion: reduce) {
    body ul.products li.product { transition: none; }
}
