/* ==========================================================================
   LIDEART - COMPONENTE REUTILIZABLE DE TARJETA DE PRODUCTO (.ld-card)
   Paleta Oficial Lideart:
     - Azul Corporativo:  #0088C1 / #005F8D
     - Turquesa Acento:   #0D8EAE
     - Azul Petróleo:     #072A40
     - Carbón / Ink:      #111827
     - Superficie / Borde:#FFFFFF / #E2EAF0
   ========================================================================== */

.ld-card {
    background: #ffffff;
    border: 1px solid #e2eaf0;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    width: 100%;
    height: 100%;
    font-family: 'Poppins', sans-serif;
    transition: transform 0.22s cubic-bezier(0.2, 0, 0, 1),
                box-shadow 0.22s ease,
                border-color 0.22s ease;
}

.ld-card:hover {
    transform: translateY(-4px);
    border-color: #7cc7e8;
    box-shadow: 0 16px 32px rgba(7, 42, 64, 0.1);
}

.ld-card-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    z-index: 3;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 6px;
    pointer-events: none;
}

.ld-card-badges-left,
.ld-card-badges-right {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
}

.ld-card-badges-right {
    justify-content: flex-end;
    margin-left: auto;
}

.ld-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    line-height: 1.2;
    white-space: nowrap;
}

.ld-badge-preventa {
    background: linear-gradient(135deg, #072a40 0%, #005f8d 100%);
    color: #ffffff;
    box-shadow: 0 3px 8px rgba(7, 42, 64, 0.22);
}

.ld-badge-nuevo {
    background: linear-gradient(135deg, #0088c1 0%, #0d8eae 100%);
    color: #ffffff;
    box-shadow: 0 3px 8px rgba(0, 136, 193, 0.22);
}

.ld-badge-axb {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: #ffffff;
    box-shadow: 0 3px 8px rgba(234, 88, 12, 0.22);
}

.ld-badge-discount {
    background: #dc2626;
    color: #ffffff;
    box-shadow: 0 3px 8px rgba(220, 38, 38, 0.24);
}

.ld-badge-promo {
    background: #e6f4fb;
    color: #005f8d;
    border: 1px solid #bfe3f5;
}

.ld-card-media {
    background: #ffffff;
    padding: 22px 18px 14px;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-bottom: 1px solid #f1f5f9;
}

.ld-card-media a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.ld-card-img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.35s cubic-bezier(0.2, 0, 0, 1);
}

.ld-card:hover .ld-card-img {
    transform: scale(1.045);
}

.ld-card-body {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
    text-align: left;
}

.ld-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
    min-height: 18px;
}

.ld-card-sku {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 11.5px;
    font-weight: 600;
    color: #64748b;
    letter-spacing: 0.3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ld-stock-dot {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.ld-stock-dot.is-ok {
    color: #0f766e;
}

.ld-stock-dot.is-out {
    color: #be123c;
}

.ld-card-title {
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 14px;
    min-height: 41px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ld-card-title a {
    color: #111827 !important;
    text-decoration: none !important;
    transition: color 0.18s ease;
}

.ld-card-title a:hover {
    color: #0088c1 !important;
}

.ld-card-pricing {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
    margin-bottom: 14px;
}

.ld-price-row {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
}

.ld-price-current {
    font-size: 21px;
    font-weight: 700;
    color: #072a40;
    letter-spacing: -0.3px;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

.ld-price-old {
    font-size: 13.5px;
    color: #94a3b8;
    text-decoration: line-through;
    font-variant-numeric: tabular-nums;
}

.ld-price-note {
    display: block;
    font-size: 11.5px;
    color: #64748b;
    margin-top: 2px;
}

.ld-price-save {
    display: block;
    font-size: 11.5px;
    font-weight: 600;
    color: #0d8eae;
    margin-top: 2px;
}

.ld-card-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 11px 16px;
    border-radius: 10px;
    background: #111827;
    color: #ffffff !important;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
    letter-spacing: 0.2px;
    transition: background-color 0.2s ease, transform 0.18s ease, box-shadow 0.2s ease;
}

.ld-card-cta:hover {
    background: #0088c1;
    box-shadow: 0 6px 16px rgba(0, 136, 193, 0.28);
    color: #ffffff !important;
}

.ld-card-cta.is-out {
    background: #f1f5f9;
    color: #475569 !important;
    border: 1px solid #e2e8f0;
}

.ld-card-cta.is-out:hover {
    background: #e2e8f0;
    box-shadow: none;
    color: #111827 !important;
}

/* --------------------------------------------------------------------------
   Variante Compacta (para carruseles / Home 4-5 columnas / Relacionados)
   -------------------------------------------------------------------------- */
.ld-card.ld-card--compact {
    border-radius: 14px;
}

.ld-card.ld-card--compact .ld-card-badges {
    top: 10px;
    left: 10px;
    right: 10px;
}

.ld-card.ld-card--compact .ld-badge {
    padding: 3px 8px;
    font-size: 10px;
}

.ld-card.ld-card--compact .ld-card-media {
    padding: 16px 14px 10px;
}

.ld-card.ld-card--compact .ld-card-body {
    padding: 12px 14px 14px;
}

.ld-card.ld-card--compact .ld-card-title {
    font-size: 13.5px;
    min-height: 38px;
    margin-bottom: 10px;
}

.ld-card.ld-card--compact .ld-card-pricing {
    padding-top: 10px;
    margin-bottom: 11px;
}

.ld-card.ld-card--compact .ld-price-current {
    font-size: 18px;
}

.ld-card.ld-card--compact .ld-price-old {
    font-size: 12px;
}

.ld-card.ld-card--compact .ld-card-cta {
    padding: 9px 12px;
    font-size: 12px;
    border-radius: 9px;
}

@media (max-width: 575.98px) {
    .ld-card-body {
        padding: 12px 14px 14px;
    }
    .ld-price-current {
        font-size: 18px;
    }
}
