/* ==========================================================================
   Unified Product Card Styles (XtremeTec PC)
   ========================================================================== */

.xt-product-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0 !important;
    padding: 14px 14px 14px 14px;
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    min-width: 0 !important;
    position: relative;
    box-sizing: border-box;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    text-align: left;
}

@media (hover: hover) and (pointer: fine) {
    .xt-product-card:hover {
        border-color: #cbd5e1;
        box-shadow: 0 8px 24px -2px rgba(0, 0, 0, 0.12), 0 3px 8px rgba(0, 0, 0, 0.04);
        transform: translateY(-4px);
        z-index: 10;
    }
}

/* Accessibility: Focus visible & Keyboard Navigation (Tab) */
.xt-product-card:focus-within,
.xt-product-card:focus {
    border-color: #e74c3c !important;
    outline: 2px solid #e74c3c !important;
    outline-offset: -1px;
    box-shadow: 0 0 0 3px rgba(248, 72, 74, 0.25), 0 10px 24px -4px rgba(0, 0, 0, 0.12) !important;
    z-index: 25 !important;
}

/* Eliminate default browser black focus rings on inner links and buttons */
.xt-card-image-box a:focus,
.xt-card-image-box a:focus-visible {
    outline: none !important;
}

.xt-card-title a:focus,
.xt-card-title a:focus-visible {
    outline: none !important;
    color: #e74c3c !important;
    text-decoration: underline !important;
}

.owl-thumb-item:focus,
.owl-thumb-item:focus-visible {
    outline: 2px solid #e74c3c !important;
    outline-offset: 2px !important;
}

.xt-card-btn:focus,
.xt-card-btn:focus-visible {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(248, 72, 74, 0.4), 0 0 0 1px #e74c3c !important;
}

/* Floating Ribbon Tags (Pegados a la orilla izquierda con espacio en el top) */
.xt-product-card > .ribbon {
    position: absolute !important;
    top: 10px !important;
    left: 0 !important;
    z-index: 10 !important;
    padding: 3px 12px 3px 10px !important;
    margin: 0 !important;
    line-height: 20px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    pointer-events: none !important;
    background: transparent !important;
}

.xt-product-card > .ribbon span {
    position: relative !important;
    z-index: 2 !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 11px !important;
    display: inline-block !important;
    text-transform: uppercase !important;
}

.xt-product-card > .ribbon:after {
    content: "" !important;
    display: inline-block !important;
    border-top-width: 26px !important;
    border-top-style: solid !important;
    border-left: 0 !important;
    border-right: 14px solid transparent !important;
    height: 0 !important;
    min-width: 65px !important;
    width: 100% !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 1 !important;
}

.xt-product-card > .ribbon.red:after {
    border-top-color: #e74c3c !important;
}

.xt-product-card > .ribbon.yellow:after {
    border-top-color: #ffbf00 !important;
}

.xt-product-card > .ribbon.green:after {
    border-top-color: #10b981 !important;
}

.xt-product-card > .ribbon.primary:after {
    border-top-color: #3b82f6 !important;
}

/* Image Container */
.xt-card-image-box {
    width: 100%;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 10px 0;
    overflow: hidden;
    min-width: 0 !important;
}

.xt-card-image-box a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.xt-card-image-box .producto-image-bg {
    width: 100%;
    max-width: 150px;
    height: 100%;
}

.xt-card-image-box img {
    max-height: 150px;
    max-width: 150px;
    width: auto;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    transition: transform 0.25s ease;
}

@media (hover: hover) and (pointer: fine) {
    .xt-product-card:hover .xt-card-image-box img {
        transform: scale(1.04);
    }
}

/* Meta: SKU */
.xt-card-meta {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    font-size: 11px;
    color: #64748b;
    margin-bottom: 6px;
    gap: 6px;
    line-height: 1.2;
    min-width: 0 !important;
}

.xt-card-sku {
    color: #64748b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0 !important;
}

.xt-card-sku strong {
    color: #0f172a;
    font-weight: 700;
}

/* Title & Model */
.xt-card-title-wrap {
    margin-bottom: 4px;
    min-width: 0 !important;
}

.xt-card-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 36px;
    text-decoration: none;
    transition: color 0.15s ease;
    word-break: break-word;
    min-width: 0 !important;
}

.xt-card-title a {
    color: inherit;
    text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
    .xt-card-title a:hover {
        color: #e74c3c;
    }
}

.xt-card-model,
.xt-card-brand {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin: 2px 0 6px 0;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-height: 14px;
    min-width: 0 !important;
}

/* Specs / Bullet points */
.xt-card-specs {
    list-style: none;
    padding: 0;
    margin: 0 0 6px 0;
    font-size: 11px;
    color: #64748b;
    line-height: 1.4;
    min-height: 48px;
    min-width: 0 !important;
}

.xt-card-specs li {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 2px;
    min-width: 0 !important;
}

.xt-card-specs li::before {
    content: "• ";
    color: #94a3b8;
    font-weight: 700;
    margin-right: 2px;
}

/* Price Section */
.xt-card-price-section {
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid #f1f5f9;
    min-width: 0 !important;
}

.xt-card-price-label {
    display: none !important;
}

.xt-card-price-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 10px; /* mismo espacio visual que de la línea a los números */
    min-width: 0 !important;
}

.xt-card-price-main {
    font-size: 23px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.15;
    letter-spacing: -0.5px;
    white-space: nowrap;
    overflow: visible !important;
    min-width: 0 !important;
    text-align: right;
    margin-left: auto;
}

.xt-card-price-main .price-symbol {
    font-size: 18px;
    margin-right: 1px;
    font-weight: 700;
}

.xt-card-price-main sup.price-cents {
    font-size: 13px;
    font-weight: 700;
    vertical-align: top;
    position: relative;
    top: 2px;
    line-height: 1;
}

.xt-card-warehouse-icon {
    color: #475569;
    font-size: 16px;
    margin-right: 6px;
    margin-left: 0;
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
}

.xt-card-old-price {
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.2;
    margin-bottom: 2px;
    text-align: right;
    text-decoration: none;
}

.xt-card-old-price span:not(.badge-saving),
.xt-card-old-price del {
    text-decoration: line-through;
}

.xt-card-old-price .badge-saving {
    text-decoration: none !important;
    display: inline-block;
}

/* Button */
.xt-card-action {
    width: 100%;
}

.xt-card-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 7px 10px;
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    outline: none;
    line-height: 1.2;
    text-decoration: none !important;
}

.xt-card-btn-primary {
    background-color: #e74c3c;
    border-color: #e74c3c;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(248, 72, 74, 0.2);
}

@media (hover: hover) and (pointer: fine) {
    .xt-card-btn-primary:hover {
        background-color: #d33d3f;
        border-color: #d33d3f;
        color: #ffffff !important;
        box-shadow: 0 4px 12px rgba(248, 72, 74, 0.3);
    }
}

.xt-card-btn-primary:active {
    background-color: #bf3436;
    border-color: #bf3436;
    color: #ffffff !important;
}

.xt-card-btn-added,
.xt-card-btn.active {
    background-color: #10b981 !important;
    border-color: #10b981 !important;
    color: #ffffff !important;
}

.xt-card-btn-disabled,
.xt-card-btn[disabled] {
    background-color: #f1f5f9 !important;
    border-color: #e2e8f0 !important;
    color: #94a3b8 !important;
    cursor: not-allowed;
    box-shadow: none !important;
}

/* Big Box Modern Adaptation */
.grid-big-card {
    min-width: 0 !important;
    width: 100% !important;
    height: 100% !important;
}

.grid-big-card .producto-gallery {
    width: 100%;
    min-width: 0;
    overflow: hidden;
}

.grid-big-card .owl-carousel {
    width: 100%;
    min-width: 0;
}

.grid-big-card .imagen-slider {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.grid-big-card .xt-card-title {
    font-size: 18px;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    min-height: 46px;
}

.grid-big-card .xt-card-price-main {
    font-size: 28px;
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .xt-product-card {
        padding: 10px 10px 12px 10px;
    }

    .xt-card-image-box {
        height: 120px;
    }

    .xt-card-image-box img {
        max-height: 120px;
        max-width: 120px;
    }

    .xt-card-title {
        font-size: 12.5px;
        min-height: 32px;
    }

    .xt-card-price-main {
        font-size: 19px;
    }

    .xt-card-price-main sup.price-cents {
        font-size: 11px;
    }

    .xt-card-btn {
        font-size: 11.5px;
        padding: 6px 6px;
    }

    .xt-card-specs {
        display: none;
    }
}
