/* =============================================
   TC PRODUCT CARDS — shared styles
   Used in: showBySize, productInformation (similar products)
   ============================================= */

.tc-product-card {
    background: transparent;
    border-radius: 14px;
    box-shadow: none;
    overflow: visible;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform .22s ease;
    border: none;
}
.tc-product-card:hover {
    transform: translateY(-3px);
}

/* Image area */
.tc-card-img-wrap {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow: visible;
    background: transparent;
    height: 175px;
    padding-top: 6px;
    text-decoration: none;
}
.tc-card-img {
    width: 100%;
    max-width: 230px;
    height: 210px;
    object-fit: contain;
    mix-blend-mode: multiply;
    transform: translateX(-30%);
}
.tc-card-no-img {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f7f7f8;
    color: #d1d5db;
    font-size: 2.5rem;
}

/* Discount badge */
.tc-discount-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #dc2626;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 9px;
    border-radius: 20px;
    z-index: 2;
    letter-spacing: .4px;
    box-shadow: 0 2px 6px rgba(220,38,38,.3);
}

/* Card body — translucent glass panel overlapping the tire */
.tc-card-body {
    background: rgba(255,255,255,.7);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    border: 1px solid rgba(255,255,255,.6);
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(17,17,17,.07);
    padding: 13px 14px 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 6px;
    position: relative;
    z-index: 1;
    margin-top: -50px;
    width: 80%;
    margin-left: auto;
    min-width: 0;
    box-sizing: border-box;
}

@media (max-width: 991.98px) {
    .tc-card-img { transform: none; }
    .tc-card-body { width: 100%; margin-left: 0; margin-top: 8px; }
}

/* Phones: tire on the left, translucent info panel on the right, one card per row */
@media (max-width: 767.98px) {
    .tc-product-card {
        flex-direction: row;
        align-items: stretch;
        gap: 12px;
        background: rgba(255,255,255,.7);
        backdrop-filter: blur(14px) saturate(160%);
        -webkit-backdrop-filter: blur(14px) saturate(160%);
        border: 1px solid rgba(255,255,255,.6);
        border-radius: 14px;
        box-shadow: 0 4px 18px rgba(17,17,17,.07);
        padding: 10px;
    }
    .tc-card-img-wrap {
        width: 38%;
        flex-shrink: 0;
        height: auto;
        padding-top: 0;
        align-items: center;
    }
    .tc-card-img {
        max-width: 100%;
        height: 130px;
    }
    .tc-card-body {
        width: auto;
        flex: 1;
        min-width: 0;
        margin: 0;
        background: transparent;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        border: none;
        box-shadow: none;
        padding: 0;
    }
    .tc-card-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .tc-card-actions .tc-qty-group {
        width: 100%;
        justify-content: space-between;
    }
    .tc-card-actions .tc-btn-cart {
        width: 100%;
    }
}

/* Brand + stock row */
.tc-card-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 6px;
    min-height: 28px;
    min-width: 0;
}
.tc-brand-logo {
    height: 26px;
    width: auto;
    object-fit: contain;
    max-width: 90px;
}

/* Stock badges — mismo patrón translúcido+borde que el stock de las
   tarjetas de producto (.tc-tire-card-stock en tire-card.css) en vez del
   relleno pastel sólido de antes (pedido explícito, "no se ve muy bien":
   un bloque de color sólido como ese desentonaba con el resto, mucho más
   sutil/con borde). */
.tc-stock {
    font-size: 10.5px;
    font-weight: 700;
    padding: 3px 8px;
    /* Mismo redondeo que "Llega gratis el <día>" (.tc-service-badge--tight): pastilla completa. */
    border-radius: 999px;
    border: 1px solid transparent;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    line-height: 1.4;
    flex-shrink: 0;
}
.tc-stock i { color: inherit; } /* el ícono toma el color del estado (verde/ámbar/rojo), no el naranja global */
.tc-stock-in  { background: rgba(22, 163, 74, .12); border-color: rgba(22, 163, 74, .3); color: #16a34a; }
.tc-stock-low { background: rgba(217, 119, 6, .12); border-color: rgba(217, 119, 6, .3); color: #d97706; }
.tc-stock-out { background: rgba(220, 38, 38, .1); border-color: rgba(220, 38, 38, .28); color: #dc2626; }

/* Specs */
.tc-specs { display: flex; flex-direction: column; gap: 2px; }
.tc-range {
    font-size: 10px;
    color: #111827;
    text-transform: uppercase;
    letter-spacing: .6px;
    font-weight: 600;
}
.tc-measure-row {
    display: flex;
    align-items: baseline;
    gap: 4px;
    flex-wrap: wrap;
}
.tc-measurement {
    font-size: 13.5px;
    font-weight: 700;
    color: #111827;
    text-decoration: none;
    line-height: 1.3;
    flex-shrink: 0;
}
.tc-measurement:hover { color: #ff5c00; text-decoration: underline; }
.tc-utqg { font-size: 10px; color: #111827; display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; }
.tc-utqg-info { cursor: pointer; color: #d1d5db; transition: color .15s; }
.tc-utqg-info:hover { color: #ff5c00; }

/* Price block */
.tc-price-block {
    padding-top: 8px;
    border-top: 1px solid #f3f4f6;
    margin-top: auto;
}
.tc-price-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-bottom: 2px; }
.tc-price-old { font-size: 11.5px; color: #111827; text-decoration: line-through; }
.tc-savings-badge {
    font-size: 10px;
    font-weight: 700;
    color: #15803d;
    background: #dcfce7;
    padding: 2px 7px;
    border-radius: 20px;
}
.tc-price-main {
    font-size: 21px;
    font-weight: 800;
    color: #ff5c00;
    line-height: 1;
    letter-spacing: -.3px;
}
.tc-price-currency { font-size: 12px; font-weight: 400; color: #111827; margin-left: 2px; }
.tc-price-qty-total { font-size: 11.5px; color: #6b7280; margin-top: 2px; }
.tc-price-qty-amount { font-weight: 700; color: #111827; }

/* Actions */
.tc-actions { display: flex; flex-direction: column; gap: 7px; margin-top: 4px; }

.tc-qty-group {
    display: flex;
    align-items: stretch;
    height: 34px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: #fff;
    box-sizing: border-box;
}
.tc-qty-btn {
    background: #f9fafb;
    border: none;
    width: 32px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #374151;
    font-size: 15px;
    line-height: 1;
    transition: background .15s, color .15s;
    padding: 0;
    box-sizing: border-box;
}
.tc-qty-btn:hover { background: #fff0e8; color: #ff5c00; }
.tc-qty-input {
    width: 38px;
    height: 100%;
    border: none;
    border-left: 1.5px solid #e5e7eb;
    border-right: 1.5px solid #e5e7eb;
    text-align: center;
    font-weight: 700;
    font-size: 13px;
    line-height: 1;
    background: #fff;
    color: #111827;
    outline: none;
    padding: 0;
    box-sizing: border-box;
}

/* Bootstrap controls inside product cards */
.tc-product-card .btn-outline-dark {
    border-radius: 8px !important;
}
.tc-product-card .form-control {
    border-radius: 8px !important;
}

/* Cart button */
.tc-btn-cart {
    background: #ff5c00;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 9px 14px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background .18s, transform .15s;
    letter-spacing: .2px;
    width: 100%;
    text-decoration: none;
}
.tc-btn-cart:hover:not(:disabled) { background: #111827; color: #fff; }
.tc-btn-cart:active:not(:disabled) { transform: scale(.97); }
.tc-btn-cart:disabled,
.tc-btn-cart.tc-btn-disabled {
    background: #e5e7eb !important;
    color: #9ca3af !important;
    cursor: not-allowed;
    transform: none !important;
}

.tc-product-card .select-product-btn {
    border-radius: 8px !important;
    transition: background .15s ease, transform .1s ease !important;
}
.tc-product-card .select-product-btn:hover:not(:disabled) {
    background: #111827 !important;
}
.tc-product-card .select-product-btn:active:not(:disabled) {
    transform: scale(.98);
}

/* =============================================
   TC PRODUCT DETAIL PAGE
   ============================================= */

.tc-gallery-wrap {
    position: sticky;
    top: 80px;
}
/* Fondo de la galería blanco puro (no cambia con el tema): las fotos de
   producto traen fondo blanco de fábrica, así que sobre blanco se ven tal
   cual, sin el gris que dejaba el multiply sobre #f7f7f8. */
.tc-gallery-main {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    border: 1px solid #e5e7eb;
}
.tc-gallery-main img {
    max-height: 420px;
    width: 100%;
    object-fit: contain;
    padding: 20px;
    transition: transform .35s ease;
}
.tc-gallery-main:hover img { transform: scale(1.04); }
.tc-thumb {
    width: 68px;
    height: 68px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #e5e7eb;
    cursor: pointer;
    transition: border-color .15s, transform .15s;
    background: #fff;
    padding: 4px;
}
.tc-thumb:hover { transform: scale(1.05); border-color: var(--tc-p-orange); }
.tc-thumb.border-tireclick { border-color: var(--tc-p-orange); }

.tc-detail-panel {
    padding: 32px 28px 32px 20px;
}
@media (max-width: 991px) {
    .tc-detail-panel { padding: 24px 16px; }
}

/* Resto del panel informativo: adaptado a modo oscuro/claro con las
   variables compartidas de navbar-footer.css. */
/* Sin fondo/borde naranja (pedido explícito, "no me encantan tantos
   colores") — el precio ya destaca solo por tamaño/peso, no necesita una
   caja de color encima. */
.tc-detail-price-card {
    padding: 0;
    margin-bottom: 18px;
}
/* Mismo acomodo que el sidebar del carrito y checkout (tc-cart-pop-price-old/
   -main-row/-discount-chip en app.css): tachado arriba en su propia línea,
   precio grande + chip VERDE de descuento juntos abajo — pedido explícito de
   unificar. La badge roja "-X%" (antes .tc-detail-price-pct) ya no se usa en
   ningún otro lado del sitio, se reemplaza por el mismo chip verde. */
.tc-detail-price-old { display: block; font-size: 15px; font-weight: 500; color: var(--tc-p-text-dim); text-decoration: line-through; margin-bottom: 2px; }
/* nowrap + flex-shrink:0 en el chip, pedido explícito: el "9% OFF" debe
   quedar a la derecha del precio en el mismo renglón, nunca abajo. */
/* flex-end en vez de center: con center el chip quedaba a medio camino del
   número grande (38px); pedido explícito de que quede a la altura de "MXN"
   (el texto chico junto al precio), que vive cerca de la base del bloque. */
.tc-detail-price-main-row { display: flex; align-items: flex-end; gap: 10px; flex-wrap: nowrap; }
.tc-detail-discount-chip { flex-shrink: 0; }
.tc-detail-discount-chip {
    display: inline-flex;
    align-items: center;
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    background: #00a650;
    border-radius: 4px;
    padding: 3px 8px;
    white-space: nowrap;
}
/* Pedido explícito: ya no naranja — blanco en oscuro, negro en claro (el
   naranja se queda para el chip de descuento/CTA, no para el precio). */
.tc-detail-price-main {
    font-size: 38px;
    font-weight: 800;
    color: #fff;
    line-height: 1.05;
    letter-spacing: -.5px;
    /* Como flex item (junto al chip de descuento) podía encogerse por debajo
       del ancho de su propio texto y el "MXN" se iba a su propia línea —
       nowrap lo mantiene siempre junto al número. */
    white-space: nowrap;
}
:root[data-theme="light"] .tc-detail-price-main { color: #16161c; }
.tc-detail-currency { font-size: 17px; font-weight: 400; color: var(--tc-p-text-dim); margin-left: 3px; }
.tc-detail-savings { font-size: 13px; font-weight: 600; color: #2ecc71; }
.tc-price-note { font-size: 11.5px; color: var(--tc-p-text-dim); margin-top: 5px; }

.tc-detail-cta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}
.tc-detail-qty {
    display: inline-flex;
    align-items: center;
    border: 2px solid var(--tc-p-border);
    border-radius: 10px;
    overflow: hidden;
    height: 48px;
    flex-shrink: 0;
}
.tc-detail-qty-btn {
    background: rgba(255,255,255,.06);
    border: none;
    width: 44px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--tc-p-text-dim);
    font-size: 20px;
    transition: background .15s, color .15s;
}
.tc-detail-qty-btn:hover { background: rgba(255,92,0,.12); color: var(--tc-p-orange); }
.tc-detail-qty-input {
    width: 52px;
    height: 48px;
    border: none;
    border-left: 2px solid var(--tc-p-border);
    border-right: 2px solid var(--tc-p-border);
    text-align: center;
    font-weight: 800;
    font-size: 16px;
    background: transparent !important;
    color: inherit !important;
    outline: none;
    padding: 0;
}
.tc-detail-btn-cart {
    flex: 1;
    background: var(--tc-p-orange);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 0 24px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background .18s, transform .15s;
    height: 48px;
    letter-spacing: .2px;
    text-decoration: none;
}
.tc-detail-btn-cart:hover:not(:disabled) { opacity: .9; }
.tc-detail-btn-cart:disabled {
    background: var(--tc-p-border);
    color: var(--tc-p-text-dim);
    cursor: not-allowed;
}

.tc-trust {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 14px 0 0;
    border-top: 1px solid var(--tc-p-border);
}
.tc-trust-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    color: var(--tc-p-text-dim);
    background: rgba(255,255,255,.06);
    border: 1px solid var(--tc-p-border);
    border-radius: 8px;
    padding: 7px 12px;
    flex: 1;
    min-width: 120px;
    font-weight: 600;
}
.tc-trust-item i { font-size: 18px; color: var(--tc-p-orange); flex-shrink: 0; }
:root[data-theme="light"] .tc-trust-item,
:root[data-theme="light"] .tc-detail-qty-btn { background: rgba(0,0,0,.04); }

.tc-utqg-row {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,.06);
    border: 1px solid var(--tc-p-border);
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 13px;
    color: var(--tc-p-text-dim);
}
.tc-utqg-row strong { color: inherit; }
:root[data-theme="light"] .tc-utqg-row { background: rgba(0,0,0,.04); }
