/* =========================================
   OFIT - Tienda (/tienda/)
   Usa además /css/estilos.css (encabezado, pie, base)
   ========================================= */

body.tienda { background: #eef2f7; color: #0f172a; }
body.tienda .site-header { position: relative; }

:root {
    --t-azul: #0ea5e9;
    --t-azul-osc: #0284c7;
    --t-navy: #0f172a;
    --t-gris: #64748b;
    --t-borde: #e2e8f0;
    --t-naranja: #f97316;
    --t-verde: #16a34a;
}

/* ENCABEZADO DE TIENDA (blanco: logo, categorías, buscador, cuenta y pedido) */
.t-bar { background: #fff; border-bottom: 1px solid var(--t-borde); position: sticky; top: 0; z-index: 40; }
.t-bar-inner { max-width: 1280px; margin: 0 auto; padding: 0 16px; height: 70px; display: flex; gap: 18px; align-items: center; }
.t-logo { flex-shrink: 0; display: flex; }
.t-logo img { height: 30px; width: auto; }
.t-cat-btn {
    display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0;
    background: var(--t-navy); color: #fff; border: 0; border-radius: 10px;
    padding: 11px 16px; font: 700 14px 'Inter', sans-serif; cursor: pointer;
}
.t-cat-btn:hover { background: #1e293b; }
.t-search { flex: 1; position: relative; min-width: 0; }
.t-search input {
    width: 100%; padding: 12px 52px 12px 16px; border-radius: 12px; border: 2px solid var(--t-borde);
    font: 500 14px 'Inter', sans-serif; background: #fff; color: var(--t-navy); outline: none;
}
.t-search input:focus { border-color: var(--t-azul); }
.t-search input::-webkit-search-cancel-button { margin-right: 4px; }
.t-search button { position: absolute; right: 6px; top: 6px; bottom: 6px; width: 40px; border: 0; border-radius: 8px; background: var(--t-azul); color: #fff; cursor: pointer; }
.t-search button:hover { background: var(--t-azul-osc); }
@media (max-width: 560px) {
    .t-bar-inner { gap: 10px; height: auto; flex-wrap: wrap; padding: 10px 16px; }
    .t-logo { margin-right: auto; }
    .t-search { order: 5; flex-basis: 100%; }
    .t-logo img { height: 24px; }
    .t-cat-btn span { display: none; } .t-cat-btn { padding: 11px 13px; }
    .t-search input { padding: 10px 44px 10px 12px; font-size: 13.5px; }
    .t-search button { width: 34px; }
}
/* MEGA MENÚ */
.t-mega { position: fixed; inset: 0; z-index: 60; background: rgba(2,6,23,.55); display: flex; justify-content: center; padding: 24px 16px; }
.t-mega[hidden] { display: none; }
.t-mega-box {
    width: 100%; max-width: 1180px; max-height: calc(100vh - 48px);
    background: #0b1220; color: #e2e8f0; border: 1px solid rgba(255,255,255,.08);
    border-radius: 16px; display: flex; flex-direction: column; overflow: hidden;
    box-shadow: 0 30px 80px rgba(0,0,0,.5);
}
.t-mega-top { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,.08); }
.t-mega-search { flex: 1; max-width: 380px; position: relative; }
.t-mega-search i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #94a3b8; font-size: 13px; }
.t-mega-search input {
    width: 100%; padding: 10px 12px 10px 34px; border-radius: 10px; background: #111a2e;
    border: 1px solid rgba(255,255,255,.12); color: #fff; font: 500 14px 'Inter', sans-serif; outline: none;
}
.t-mega-search input:focus { border-color: var(--t-azul); }
.t-mega-close { margin-left: auto; background: none; border: 0; color: #94a3b8; font-size: 20px; cursor: pointer; padding: 6px 10px; }
.t-mega-close:hover { color: #fff; }
.t-mega-body { display: grid; grid-template-columns: 270px 1fr; min-height: 0; flex: 1; }
.t-mega-cats { list-style: none; padding: 10px; overflow-y: auto; border-right: 1px solid rgba(255,255,255,.08); }
.t-mega-cats button {
    width: 100%; display: flex; align-items: center; gap: 12px; text-align: left;
    background: none; border: 0; color: #cbd5e1; padding: 11px 12px; border-radius: 10px;
    font: 600 14px 'Inter', sans-serif; cursor: pointer;
}
.t-mega-cats button i.ic { width: 18px; text-align: center; color: #94a3b8; }
.t-mega-cats button .fa-chevron-right { margin-left: auto; font-size: 11px; opacity: .5; }
.t-mega-cats button:hover, .t-mega-cats button.activa { background: #1e3a8a; color: #fff; }
.t-mega-cats button.activa i.ic { color: #fff; }
.t-mega-subs { padding: 18px 24px 24px; overflow-y: auto; }
.t-mega-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.t-mega-head h3 { font-size: 18px; color: #fff; }
.t-mega-head a { font-size: 13px; color: var(--t-azul); text-decoration: none; font-weight: 600; }
.t-mega-head a:hover { text-decoration: underline; }
.t-mega-back { display: none; background: none; border: 0; color: #94a3b8; font-size: 16px; cursor: pointer; }
.t-mega-cols { columns: 4 190px; column-gap: 28px; }
.t-mega-grupo { break-inside: avoid; margin-bottom: 20px; }
.t-mega-grupo h4 { font-size: 14px; font-weight: 700; color: #fff; margin-bottom: 8px; }
.t-mega-grupo a { display: block; color: #94a3b8; text-decoration: none; font-size: 14px; padding: 4px 0; }
.t-mega-grupo a:hover { color: var(--t-azul); }
.t-mega-grupo a small { color: #475569; margin-left: 4px; }
.t-mega-vacio { color: #94a3b8; font-size: 14px; }

@media (max-width: 760px) {
    .t-mega { padding: 0; }
    .t-mega-box { max-height: 100vh; height: 100%; border-radius: 0; }
    .t-mega-body { grid-template-columns: 1fr; }
    .t-mega-cats { border-right: 0; }
    .t-mega-subs { display: none; }
    .t-mega.ver-subs .t-mega-cats { display: none; }
    .t-mega.ver-subs .t-mega-subs { display: block; }
    .t-mega-back { display: inline-block; }
    .t-mega-cols { columns: 1; }
}

/* AVISO EJEMPLO */
.t-aviso { max-width: 1280px; margin: 14px auto 0; padding: 10px 16px; font-size: 13px; color: #92400e; background: #fef3c7; border: 1px solid #fde68a; border-radius: 10px; }
@media (max-width: 1312px) { .t-aviso { margin: 14px 16px 0; } }
.t-aviso[hidden] { display: none; }

/* LAYOUT */
.t-main { max-width: 1280px; margin: 0 auto; padding: 20px 16px 60px; min-height: 60vh; }
.t-loading { text-align: center; color: var(--t-gris); padding: 80px 0; }
.t-migas { font-size: 13px; color: var(--t-gris); margin-bottom: 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.t-migas a { color: var(--t-gris); text-decoration: none; }
.t-migas a:hover { color: var(--t-azul); }
.t-migas span.sep { opacity: .5; }

.t-listado { display: grid; grid-template-columns: 250px 1fr; gap: 24px; align-items: start; }
@media (max-width: 900px) { .t-listado { grid-template-columns: 1fr; } }

/* FILTROS */
.t-filtros { background: #fff; border: 1px solid var(--t-borde); border-radius: 14px; padding: 18px; position: sticky; top: 76px; }
.t-filtros h2 { font-size: 18px; margin-bottom: 2px; }
.t-filtros .cuenta { font-size: 13px; color: var(--t-gris); margin-bottom: 14px; }
.t-fgrupo { border-top: 1px solid var(--t-borde); padding: 12px 0; }
.t-fgrupo summary { font-weight: 700; font-size: 14px; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.t-fgrupo summary::-webkit-details-marker { display: none; }
.t-fgrupo summary::after { content: '\f107'; font-family: 'Font Awesome 6 Free'; font-weight: 900; color: var(--t-gris); transition: transform .2s; }
.t-fgrupo[open] summary::after { transform: rotate(180deg); }
.t-fopts { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; max-height: 240px; overflow-y: auto; }
.t-fopts a, .t-fopts label { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: #334155; text-decoration: none; cursor: pointer; padding: 3px 0; }
.t-fopts a:hover, .t-fopts label:hover { color: var(--t-azul); }
.t-fopts a.activa { color: var(--t-azul); font-weight: 700; }
.t-fopts label span { display: flex; gap: 8px; align-items: center; }
.t-fopts input { accent-color: var(--t-azul); }
.t-fopts small { color: #94a3b8; }
.t-limpiar { display: inline-block; margin-top: 8px; font-size: 13px; color: var(--t-azul); text-decoration: none; font-weight: 600; }
.t-filtros-cerrar { display: none; }

@media (max-width: 900px) {
    .t-filtros { position: fixed; inset: 0 auto 0 0; width: min(330px, 88vw); z-index: 70; border-radius: 0; overflow-y: auto; transform: translateX(-105%); transition: transform .25s; top: 0; }
    .t-filtros.abierto { transform: none; box-shadow: 20px 0 60px rgba(0,0,0,.3); }
    .t-filtros-cerrar { display: block; position: absolute; top: 12px; right: 12px; background: none; border: 0; font-size: 20px; color: var(--t-gris); cursor: pointer; }
}

/* CABECERA DE RESULTADOS */
.t-res-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.t-res-head h1 { font-size: clamp(22px, 3vw, 28px); font-weight: 800; }
.t-res-head p { font-size: 14px; color: var(--t-gris); }
.t-res-tools { display: flex; gap: 10px; align-items: center; }
.t-res-tools select, .t-btn-filtros {
    padding: 9px 12px; border: 1px solid var(--t-borde); border-radius: 10px; background: #fff;
    font: 600 13px 'Inter', sans-serif; color: var(--t-navy); cursor: pointer;
}
.t-btn-filtros { display: none; }
@media (max-width: 900px) { .t-btn-filtros { display: inline-flex; gap: 8px; align-items: center; } }
.t-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.t-chip { display: inline-flex; gap: 8px; align-items: center; background: #e0f2fe; color: #075985; border-radius: 50px; padding: 5px 12px; font-size: 12px; font-weight: 600; text-decoration: none; }
.t-chip i { font-size: 11px; }

/* GRILLA DE PRODUCTOS */
.t-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
@media (max-width: 480px) { .t-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } }
.t-card {
    background: #fff; border: 1px solid var(--t-borde); border-radius: 14px; overflow: hidden;
    display: flex; flex-direction: column; text-decoration: none; color: inherit; position: relative;
    transition: box-shadow .2s, transform .2s;
}
.t-card:hover { box-shadow: 0 12px 30px rgba(15,23,42,.12); transform: translateY(-2px); }
.t-badge { position: absolute; top: 10px; left: 10px; z-index: 2; background: var(--t-naranja); color: #fff; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 6px; }
.t-sinstock { position: absolute; top: 10px; right: 10px; z-index: 2; background: #475569; color: #fff; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 6px; }
.t-img { aspect-ratio: 1; background: #f8fafc; display: flex; align-items: center; justify-content: center; border-bottom: 1px solid var(--t-borde); }
.t-img img { width: 100%; height: 100%; object-fit: contain; padding: 14px; }
.t-img .ph { font-size: 54px; color: #cbd5e1; }
.t-card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.t-marca { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--t-gris); }
.t-nombre { font-size: 14px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 38px; }
.t-precio-ant { font-size: 12px; color: #94a3b8; text-decoration: line-through; margin-top: 6px; min-height: 16px; }
.t-precio { font-size: 22px; font-weight: 800; color: var(--t-navy); line-height: 1.1; }
.t-transf { margin-top: 6px; font-size: 12px; color: var(--t-verde); font-weight: 600; }
.t-cuotas { font-size: 12px; color: var(--t-azul-osc); font-weight: 600; }
@media (max-width: 480px) { .t-precio { font-size: 18px; } .t-nombre { font-size: 13px; } .t-card-body { padding: 10px; } }

.t-vacio { background: #fff; border: 1px dashed var(--t-borde); border-radius: 14px; padding: 50px 20px; text-align: center; color: var(--t-gris); }
.t-vacio i { font-size: 36px; margin-bottom: 12px; color: #cbd5e1; }

/* PAGINACIÓN */
.t-pag { display: flex; justify-content: center; gap: 6px; margin-top: 26px; flex-wrap: wrap; }
.t-pag a, .t-pag span { min-width: 38px; text-align: center; padding: 8px 12px; border-radius: 10px; background: #fff; border: 1px solid var(--t-borde); text-decoration: none; color: var(--t-navy); font-size: 14px; font-weight: 600; }
.t-pag a:hover { border-color: var(--t-azul); color: var(--t-azul); }
.t-pag span.actual { background: var(--t-azul); border-color: var(--t-azul); color: #fff; }

/* PORTADA DE TIENDA */
.t-portada h1 { font-size: clamp(24px, 3.5vw, 32px); font-weight: 800; margin-bottom: 6px; }
.t-portada > p { color: var(--t-gris); margin-bottom: 22px; }
.t-cats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin-bottom: 36px; }
.t-cat-card { background: #fff; border: 1px solid var(--t-borde); border-radius: 14px; padding: 20px 16px; text-decoration: none; color: var(--t-navy); display: flex; flex-direction: column; gap: 10px; transition: border-color .2s, transform .2s; }
.t-cat-card:hover { border-color: var(--t-azul); transform: translateY(-2px); }
.t-cat-card i { font-size: 26px; color: var(--t-azul); }
.t-cat-card strong { font-size: 15px; }
.t-cat-card small { color: var(--t-gris); font-size: 12px; }
.t-seccion-tit { font-size: 20px; font-weight: 800; margin-bottom: 14px; }

/* FICHA DE PRODUCTO */
.t-ficha { background: #fff; border: 1px solid var(--t-borde); border-radius: 16px; padding: 24px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; }
@media (max-width: 860px) { .t-ficha { grid-template-columns: 1fr; padding: 16px; gap: 20px; } }
.t-galeria { display: grid; grid-template-columns: 70px 1fr; gap: 12px; }
.t-thumbs { display: flex; flex-direction: column; gap: 8px; }
.t-thumbs button { aspect-ratio: 1; border: 2px solid var(--t-borde); border-radius: 10px; background: #f8fafc; cursor: pointer; padding: 4px; }
.t-thumbs button.activa { border-color: var(--t-azul); }
.t-thumbs img { width: 100%; height: 100%; object-fit: contain; }
.t-principal { aspect-ratio: 1; background: #f8fafc; border-radius: 14px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.t-principal img { width: 100%; height: 100%; object-fit: contain; padding: 20px; }
.t-principal .ph { font-size: 110px; color: #cbd5e1; }
@media (max-width: 560px) { .t-galeria { grid-template-columns: 1fr; } .t-thumbs { flex-direction: row; order: 2; } .t-thumbs button { width: 60px; } }

.t-info h1 { font-size: clamp(20px, 2.6vw, 26px); font-weight: 800; line-height: 1.25; margin-bottom: 8px; }
.t-meta { font-size: 13px; color: var(--t-gris); display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.t-meta b { color: var(--t-navy); }
.t-info .t-precio-ant { font-size: 14px; }
.t-info .t-precio { font-size: 34px; display: flex; align-items: center; gap: 10px; }
.t-info .t-precio .t-badge { position: static; font-size: 12px; }
.t-pagos { margin: 14px 0; display: flex; flex-direction: column; gap: 8px; }
.t-pago { display: flex; gap: 10px; align-items: center; font-size: 14px; padding: 10px 12px; border-radius: 10px; background: #f8fafc; border: 1px solid var(--t-borde); }
.t-pago i { width: 18px; text-align: center; color: var(--t-azul); }
.t-pago.verde { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.t-pago.verde i { color: var(--t-verde); }
.t-stock { font-size: 14px; font-weight: 600; margin: 10px 0 14px; }
.t-stock.si { color: var(--t-verde); }
.t-stock.no { color: #dc2626; }
.t-acciones { display: flex; flex-direction: column; gap: 10px; }
.t-btn { display: flex; justify-content: center; align-items: center; gap: 10px; padding: 14px 18px; border-radius: 12px; font: 700 15px 'Inter', sans-serif; text-decoration: none; border: 0; cursor: pointer; }
.t-btn.wa { background: #22c55e; color: #fff; }
.t-btn.wa:hover { background: #16a34a; }
.t-btn.sec { background: #fff; color: var(--t-navy); border: 1px solid var(--t-borde); }
.t-btn.sec:hover { border-color: var(--t-azul); color: var(--t-azul); }
.t-envio { margin-top: 16px; font-size: 13px; color: var(--t-gris); display: flex; flex-direction: column; gap: 8px; }
.t-envio i { width: 18px; color: var(--t-gris); }

.t-detalle { margin-top: 20px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; }
@media (max-width: 860px) { .t-detalle { grid-template-columns: 1fr; } }
.t-panel { background: #fff; border: 1px solid var(--t-borde); border-radius: 16px; padding: 22px; }
.t-panel h2 { font-size: 18px; font-weight: 800; margin-bottom: 12px; }
.t-panel p { font-size: 14px; line-height: 1.7; color: #334155; }
.t-specs { width: 100%; border-collapse: collapse; font-size: 14px; }
.t-specs th, .t-specs td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--t-borde); }
.t-specs th { width: 42%; color: var(--t-gris); font-weight: 600; background: #f8fafc; }

.t-rel { margin-top: 28px; }
.t-rel .t-grid { grid-auto-flow: column; grid-auto-columns: minmax(200px, 230px); grid-template-columns: none; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.t-rel .t-card { scroll-snap-align: start; }
@media (max-width: 480px) { .t-rel .t-grid { grid-auto-columns: 46%; } }

/* =========================================================
   v2: estilo compacto + cuentas mayoristas
   ========================================================= */

/* Botones de cuenta y pedido en la barra */
.t-cuenta-wrap { position: relative; }
.t-icon-btn { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; color: var(--t-navy); cursor: pointer; padding: 6px 8px; border-radius: 10px; font-family: 'Inter', sans-serif; flex-shrink: 0; }
.t-icon-btn:hover { background: #f1f5f9; }
.t-icon-btn > i { font-size: 18px; color: var(--t-azul-osc); }
.t-icon-txt { display: flex; flex-direction: column; text-align: left; line-height: 1.15; }
.t-icon-txt small { font-size: 11px; color: var(--t-gris); font-weight: 500; }
.t-icon-txt b { font-size: 13px; color: var(--t-navy); max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-cuenta-menu { position: absolute; right: 0; top: calc(100% + 8px); background: #fff; border: 1px solid var(--t-borde); border-radius: 12px; box-shadow: 0 16px 40px rgba(15,23,42,.18); min-width: 220px; padding: 8px; z-index: 50; }
.t-cuenta-menu[hidden] { display: none; }
.t-cuenta-menu p { font-size: 12px; color: var(--t-gris); padding: 6px 10px 8px; border-bottom: 1px solid var(--t-borde); margin-bottom: 6px; }
.t-cuenta-menu button { display: flex; gap: 10px; align-items: center; width: 100%; background: none; border: 0; padding: 9px 10px; border-radius: 8px; font: 600 14px 'Inter', sans-serif; color: var(--t-navy); cursor: pointer; text-align: left; }
.t-cuenta-menu button:hover { background: #f1f5f9; }
@media (max-width: 760px) { .t-icon-txt { display: none; } .t-icon-btn { padding: 8px; } }
#btnPedido { position: relative; }
#btnPedido[hidden] { display: none; }

.t-modo-may { background: #0c4a6e; color: #e0f2fe; font-size: 13px; text-align: center; padding: 8px 16px; }
.t-modo-may[hidden] { display: none; }
.t-modo-may i { margin-right: 6px; }

/* Modales */
.t-modal { position: fixed; inset: 0; z-index: 80; background: rgba(2,6,23,.6); display: flex; align-items: center; justify-content: center; padding: 16px; }
.t-modal[hidden] { display: none; }
.t-modal-box { background: #fff; border-radius: 16px; width: 100%; max-height: calc(100vh - 32px); overflow-y: auto; position: relative; padding: 28px; box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.t-modal-close { position: absolute; top: 12px; right: 12px; background: none; border: 0; font-size: 20px; color: var(--t-gris); cursor: pointer; padding: 4px 8px; }
.t-modal-close:hover { color: var(--t-navy); }
.t-login { max-width: 420px; }
.t-login h2 { font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.t-login > p { font-size: 14px; color: var(--t-gris); margin-bottom: 18px; }
.t-login form { display: flex; flex-direction: column; gap: 14px; }
.t-login label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: #334155; }
.t-login input { padding: 12px 14px; border: 1px solid var(--t-borde); border-radius: 10px; font: 500 15px 'Inter', sans-serif; outline: none; }
.t-login input:focus { border-color: var(--t-azul); box-shadow: 0 0 0 3px rgba(14,165,233,.2); }
.t-form-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.t-form-error[hidden] { display: none; }
.t-login-alt { margin-top: 16px; font-size: 13px; color: var(--t-gris); text-align: center; }
.t-login-alt a { color: var(--t-azul-osc); font-weight: 600; }
.t-btn.pri { background: var(--t-azul); color: #fff; }
.t-btn.pri:hover { background: var(--t-azul-osc); }
.t-btn[disabled] { opacity: .6; cursor: wait; }
.t-vista { max-width: 860px; }
.t-vista-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 700px) { .t-vista-grid { grid-template-columns: 1fr; } }
.t-vista .t-principal .ph { font-size: 80px; }
.t-vista h2 { font-size: 20px; font-weight: 800; line-height: 1.3; margin-bottom: 8px; padding-right: 30px; }

/* Pedido (panel lateral) */
.t-drawer-fondo { position: fixed; inset: 0; background: rgba(2,6,23,.5); z-index: 75; }
.t-drawer-fondo[hidden] { display: none; }
.t-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); background: #fff; z-index: 76; display: flex; flex-direction: column; box-shadow: -20px 0 60px rgba(0,0,0,.25); }
.t-drawer[hidden] { display: none; }
.t-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--t-borde); }
.t-drawer-head h2 { font-size: 18px; font-weight: 800; display: flex; gap: 10px; align-items: center; }
.t-drawer-head .t-modal-close { position: static; }
.t-drawer-body { padding: 16px 20px 20px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 14px; }
.t-ped-item { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding-bottom: 14px; border-bottom: 1px solid var(--t-borde); }
.t-ped-img { width: 56px; height: 56px; border-radius: 10px; background: #f8fafc; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.t-ped-img img { width: 100%; height: 100%; object-fit: contain; }
.t-ped-img .ph { font-size: 22px; color: #cbd5e1; }
.t-ped-item b { font-size: 13px; line-height: 1.3; display: block; }
.t-ped-item small { font-size: 12px; color: var(--t-gris); }
.t-ped-der { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.t-ped-der strong { font-size: 13px; white-space: nowrap; }
.t-ped-quitar { background: none; border: 0; color: #94a3b8; cursor: pointer; font-size: 12px; }
.t-ped-quitar:hover { color: #dc2626; }
.t-totales { background: #f8fafc; border: 1px solid var(--t-borde); border-radius: 12px; padding: 14px; font-size: 14px; display: flex; flex-direction: column; gap: 6px; }
.t-totales div { display: flex; justify-content: space-between; }
.t-totales .total { font-weight: 800; font-size: 16px; border-top: 1px solid var(--t-borde); padding-top: 8px; margin-top: 2px; }
.t-drawer-body textarea { width: 100%; min-height: 70px; padding: 10px 12px; border: 1px solid var(--t-borde); border-radius: 10px; font: 500 14px 'Inter', sans-serif; resize: vertical; }
/* Modo catálogo: consulta en lugar de precio */
.t-bar [hidden] { display: none !important; }
.t-consulta-cat { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; margin-bottom: 4px; }
.t-consulta-cat b { font-size: 18px; color: var(--t-navy); }
.t-consulta-cat span { font-size: 13.5px; color: #334155; line-height: 1.55; }
.t-consultar .fa-whatsapp { color: #22c55e; margin-right: 2px; }

/* Accesos rápidos, aviso de stock, lista, entrega y referencia */
.t-ped-acc { display: flex; justify-content: space-between; }
.t-ped-acc button { background: none; border: 0; cursor: pointer; font: 600 13px 'Inter', sans-serif; color: var(--t-azul-osc); display: inline-flex; gap: 6px; align-items: center; padding: 0; }
.t-ped-acc button.vaciar { color: #94a3b8; font-weight: 500; }
.t-ped-acc button.vaciar:hover { color: #dc2626; }
.t-ped-stock { grid-column: 2 / -1; font-size: 12px; line-height: 1.4; display: flex; gap: 8px; align-items: flex-start; }
.t-ped-stock.falta { background: #fff7ed; color: #9a3412; padding: 7px 10px; border-radius: 8px; }
.t-ped-stock.ok { color: var(--t-verde); margin-top: -4px; }
.t-ped-stock i { margin-top: 2px; }
.t-ped-item .t-ped-stock b { display: inline; font-size: inherit; }
.t-totales .lista { font-size: 12px; color: var(--t-gris); }
.t-totales .lista b { color: var(--t-navy); }
.t-bloque-tit { font-size: 13px; font-weight: 700; color: #334155; margin-bottom: 8px; display: block; }
.t-bloque-tit .opc { font-weight: 500; color: #94a3b8; }
.t-entrega { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.t-entrega button { border: 1.5px solid var(--t-borde); background: #fff; border-radius: 12px; padding: 10px 6px; font: 600 12px 'Inter', sans-serif; color: #334155; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px; line-height: 1.25; }
.t-entrega button i { font-size: 18px; color: #94a3b8; }
.t-entrega button.sel { border-color: var(--t-azul); background: #f0f9ff; color: var(--t-navy); }
.t-entrega button.sel i { color: var(--t-azul); }
.t-entrega-det { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.t-ent-nota { font-size: 12px; color: var(--t-gris); line-height: 1.5; }
.t-campo { width: 100%; padding: 10px 12px; border: 1px solid var(--t-borde); border-radius: 10px; font: 500 14px 'Inter', sans-serif; color: var(--t-navy); background: #fff; }
.t-campo:focus { outline: 2px solid #bae6fd; border-color: var(--t-azul); }
.t-drawer-body textarea.t-campo { min-height: 64px; }

/* Pedido enviado */
.t-ok { text-align: center; padding: 26px 6px 6px; }
.t-ok > i { font-size: 48px; color: var(--t-verde); margin-bottom: 12px; }
.t-ok h3 { font-size: 21px; margin-bottom: 4px; }
.t-ok > p { color: var(--t-gris); font-size: 14px; line-height: 1.6; }
.t-ok-nums { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: #f1f5f9; border-radius: 12px; margin: 18px 0 14px; text-align: left; }
.t-ok-nums div { padding: 12px 14px; min-width: 0; }
.t-ok-nums div + div { border-left: 1px solid var(--t-borde); }
.t-ok-nums span { font-size: 11px; color: var(--t-gris); text-transform: uppercase; letter-spacing: 1px; display: block; }
.t-ok-nums b { font-size: 16px; display: block; margin-top: 3px; overflow-wrap: anywhere; }
.t-ok-res { text-align: left; font-size: 13px; color: #334155; border: 1px solid var(--t-borde); border-radius: 12px; padding: 12px 14px; line-height: 1.8; }
.t-ok-res i { width: 18px; color: var(--t-azul); }
.t-sigue { text-align: left; margin-top: 14px; font-size: 13px; color: #334155; }
.t-sigue b { display: block; margin-bottom: 6px; }
.t-sigue ol { padding-left: 20px; line-height: 1.8; }
.t-ok-btns { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.tc-pres { display: block; font-weight: 600; color: var(--t-azul-osc); font-size: 12px; margin-top: 2px; }

/* Cantidad */
.t-cant { display: inline-flex; align-items: center; border: 1px solid var(--t-borde); border-radius: 10px; overflow: hidden; background: #fff; }
.t-cant button { width: 34px; height: 36px; border: 0; background: #f8fafc; font-size: 16px; cursor: pointer; color: var(--t-navy); }
.t-cant button:hover { background: #e2e8f0; }
.t-cant input { width: 52px; height: 36px; border: 0; text-align: center; font: 700 14px 'Inter', sans-serif; -moz-appearance: textfield; }
.t-cant input::-webkit-outer-spin-button, .t-cant input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.t-cant.chica button { width: 28px; height: 30px; font-size: 14px; }
.t-cant.chica input { width: 40px; height: 30px; font-size: 13px; }
.t-agregar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.t-agregar .t-btn { flex: 1; min-width: 180px; }

/* Árbol de categorías */
.t-arbol { margin-top: 10px; display: flex; flex-direction: column; }
.t-arbol details { border-bottom: 1px solid #f1f5f9; }
.t-arbol summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 2px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; color: #334155; }
.t-arbol summary::-webkit-details-marker { display: none; }
.t-arbol summary::after { content: '+'; font-weight: 700; color: var(--t-azul); font-size: 15px; }
.t-arbol details[open] summary::after { content: '−'; }
.t-arbol details.activa > summary { color: var(--t-azul-osc); }
.t-arbol .subs { display: flex; flex-direction: column; padding: 0 0 8px 10px; }
.t-arbol .subs a { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; text-transform: uppercase; color: #475569; text-decoration: none; padding: 5px 2px; }
.t-arbol .subs a:hover, .t-arbol .subs a.activa { color: var(--t-azul-osc); font-weight: 700; }
.t-arbol .subs a small { background: #f1f5f9; color: var(--t-gris); border-radius: 4px; padding: 0 6px; font-size: 11px; font-weight: 600; }
.t-arbol .subs a.todo { text-transform: none; font-style: italic; color: var(--t-gris); }

/* Tarjetas compactas */
.t-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.t-card { border-radius: 10px; }
.t-card:hover { transform: none; box-shadow: 0 10px 26px rgba(15,23,42,.1); border-color: #cbd5e1; }
.t-card .t-badge { left: auto; right: 10px; background: #ef4444; text-transform: uppercase; font-size: 10px; }
.t-card .t-sinstock { display: none; }
.t-img { position: relative; }
.t-acc { position: absolute; left: 0; right: 0; bottom: 8px; display: flex; justify-content: center; gap: 6px; }
.t-acc button, .t-acc a { width: 30px; height: 30px; border-radius: 6px; border: 1px solid var(--t-borde); background: #fff; color: #475569; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-size: 13px; text-decoration: none; transition: all .15s; }
.t-acc button:hover, .t-acc a:hover { border-color: var(--t-azul); color: var(--t-azul); }
.t-acc button.agregado { background: var(--t-verde); border-color: var(--t-verde); color: #fff; }
.t-card-link { text-decoration: none; color: inherit; display: flex; flex-direction: column; flex: 1; }
.t-subcat { font-size: 11px; text-transform: uppercase; color: var(--t-gris); letter-spacing: .3px; }
.t-card .t-nombre { font-size: 13px; text-transform: uppercase; font-weight: 600; color: #1e293b; }
.t-stockb { display: inline-block; align-self: flex-start; font-size: 10px; font-weight: 800; text-transform: uppercase; padding: 2px 7px; border-radius: 4px; color: #fff; margin: 4px 0 2px; }
.t-stockb.si { background: #16a34a; }
.t-stockb.poco { background: #f59e0b; }
.t-stockb.no { background: #94a3b8; }
.t-card .t-precio { font-size: 19px; }
.t-precio-may { font-size: 17px; font-weight: 800; color: var(--t-navy); }
.t-precio-may small { font-size: 12px; font-weight: 600; color: var(--t-gris); }
.t-consultar { font-size: 13px; font-weight: 700; color: var(--t-azul-osc); }
.t-info .t-precio-may { font-size: 30px; }
.t-info .t-precio-may small { font-size: 15px; }
.t-precio-final { font-size: 13px; color: var(--t-gris); margin-top: 4px; }

/* Barra de herramientas del listado */
.t-res-tools select { min-width: 150px; }

/* Ajustes de celular (van al final para ganarle a las reglas anteriores) */
.t-res-tools { flex-wrap: wrap; }
@media (max-width: 560px) {
    .t-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .t-res-tools { width: 100%; }
    .t-res-tools select { min-width: 0; flex: 1; }
    .t-card .t-nombre { font-size: 12px; }
    .t-precio-may { font-size: 15px; }
    .t-card-body { padding: 10px; }
}

/* =========================================================
   v3: portada estilo distribuidor
   ========================================================= */
.tp-hola { margin-bottom: 14px; font-size: 14px; color: #334155; }
.tp-top { display: grid; grid-template-columns: 260px 1fr; gap: 18px; }
@media (max-width: 900px) { .tp-top { grid-template-columns: 1fr; } .tp-lat { display: none; } }
.tp-lat { background: #fff; border: 1px solid var(--t-borde); border-radius: 14px; padding: 8px; align-self: start; max-height: 560px; overflow-y: auto; scrollbar-width: thin; }   /* con muchas categorías, la lista se desplaza en vez de alargar la portada */
.tp-lat a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; font-size: 14px; font-weight: 600; color: #334155; text-decoration: none; }
.tp-lat a:hover { background: #eff6ff; color: var(--t-azul-osc); }
.tp-lat a i { width: 18px; text-align: center; color: var(--t-azul); }
.tp-lat a span { flex: 1; }
.tp-lat a small { color: #94a3b8; font-weight: 700; font-size: 12px; }
.tp-lat a.todo { border-top: 1px solid var(--t-borde); margin-top: 4px; border-radius: 0 0 10px 10px; color: var(--t-azul-osc); }
.tp-ban { display: grid; grid-template-rows: auto auto; gap: 18px; min-width: 0; align-self: start; }   /* no se estira aunque la lista lateral sea larga */
.tp-princ { border-radius: 16px; background: linear-gradient(110deg, #0c4a6e 0%, #0369a1 48%, #e0f2fe 48.2%, #f8fafc 100%); display: grid; grid-template-columns: 1fr 1fr; align-items: center; overflow: hidden; min-height: 300px; text-decoration: none; }
.tp-princ .tx { padding: 34px; color: #fff; }
.tp-princ small { font-weight: 800; letter-spacing: 1px; color: #7dd3fc; font-size: 12px; }
.tp-princ h2 { font-size: clamp(24px, 3vw, 36px); font-weight: 800; line-height: 1.1; margin: 10px 0; }
.tp-princ p { opacity: .85; margin-bottom: 20px; font-size: 15px; }
.tp-btn { display: inline-flex; gap: 10px; align-items: center; background: #fff; color: var(--t-navy); padding: 12px 20px; border-radius: 50px; font-weight: 700; font-size: 14px; }
.tp-princ:hover .tp-btn { background: var(--t-azul); color: #fff; }
.tp-princ .im { display: flex; align-items: center; justify-content: center; padding: 20px; height: 100%; }
.tp-princ .im img { max-height: 250px; max-width: 100%; object-fit: contain; filter: drop-shadow(0 20px 30px rgba(0,0,0,.18)); }
.tp-minis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.tp-minis a { background: #fff; border: 1px solid var(--t-borde); border-radius: 14px; padding: 14px 16px; display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--t-navy); transition: border-color .2s; }
.tp-minis a:hover { border-color: var(--t-azul); }
.tp-minis img { width: 64px; height: 64px; object-fit: contain; flex-shrink: 0; }
.tp-minis b { display: block; font-size: 14px; }
.tp-minis small { color: var(--t-gris); font-size: 12px; }
@media (max-width: 760px) {
    .tp-princ { grid-template-columns: 1fr; background: linear-gradient(160deg, #0c4a6e, #0369a1); min-height: 0; }
    .tp-princ .im { display: none; }
    .tp-princ .tx { padding: 26px; }
    .tp-minis { grid-template-columns: 1fr; gap: 10px; }
}
.tp-vent { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 22px 0 6px; }
@media (max-width: 900px) { .tp-vent { grid-template-columns: repeat(2, 1fr); } }
.tp-vent div { background: #fff; border: 1px solid var(--t-borde); border-radius: 14px; padding: 16px; display: flex; gap: 14px; align-items: center; font-size: 13px; color: var(--t-gris); }
.tp-vent i { font-size: 22px; color: var(--t-azul); width: 26px; text-align: center; }
.tp-vent b { display: block; color: var(--t-navy); font-size: 14px; }
.tp-cab { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 14px; }
.tp-cab p { color: var(--t-gris); font-size: 14px; }
.tp-cab a { color: var(--t-azul-osc); font-weight: 700; font-size: 14px; text-decoration: none; white-space: nowrap; }
.tp .t-rel .tp-grid { grid-auto-flow: row; grid-template-columns: repeat(6, 1fr); overflow: visible; }
@media (max-width: 1150px) { .tp .t-rel .tp-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 700px) { .tp .t-rel .tp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tp-marcas { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 36px 0 10px; }
.tp-marcas a { background: #fff; border: 1px solid var(--t-borde); border-radius: 10px; padding: 12px 20px; font-weight: 800; color: #334155; letter-spacing: .5px; text-decoration: none; }
.tp-marcas a:hover { border-color: var(--t-azul); color: var(--t-azul-osc); }

/* La foto de la tarjeta siempre dentro de un cuadrado (las fotos altas no estiran la fila) */
.t-card .t-img { overflow: hidden; }
.t-card .t-img > .t-card-link { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.t-card .t-img img { width: 100%; height: 100%; object-fit: contain; padding: 14px; }
.t-card .t-img .t-acc { z-index: 2; }

/* =========================================
   v4 · Ficha ampliada (tienda/fichas/{id}.json)
   ========================================= */
.tf-modelo { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; font-size: 13px; color: var(--t-gris); margin: -6px 0 12px; }
.tf-modelo b { font-family: 'IBM Plex Mono', ui-monospace, monospace; color: var(--t-navy); font-size: 14px; }
.tf-modelo small { background: #eff6ff; color: var(--t-azul-osc); border-radius: 50px; padding: 2px 10px; font-weight: 600; }
.tf-dest { list-style: none; display: grid; gap: 7px; margin: 0 0 16px; padding: 14px 16px; background: #f8fafc; border: 1px solid var(--t-borde); border-radius: 12px; }
.tf-dest li { display: flex; gap: 10px; font-size: 14px; color: #334155; line-height: 1.45; }
.tf-dest i { color: var(--t-azul); margin-top: 3px; font-size: 12px; }

.tf-nav { position: sticky; top: 70px; z-index: 20; margin-top: 20px; display: flex; gap: 6px; overflow-x: auto; background: rgba(238,242,247,.92); backdrop-filter: blur(8px); padding: 10px 0; scrollbar-width: none; }
.tf-nav::-webkit-scrollbar { display: none; }
.tf-nav a { white-space: nowrap; padding: 9px 16px; border-radius: 50px; background: #fff; border: 1px solid var(--t-borde); font-size: 13px; font-weight: 700; color: var(--t-navy); text-decoration: none; }
.tf-nav a:hover { border-color: var(--t-azul); color: var(--t-azul-osc); }

.tf { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; margin-top: 6px; }
.tf > *, .tf-bloque > div { min-width: 0; }   /* que la tabla comparativa no estire la página en celular */
.tf-sec { background: #fff; border: 1px solid var(--t-borde); border-radius: 16px; padding: 28px; scroll-margin-top: 130px; }
.tf-sec > h2 { font-size: 20px; font-weight: 800; margin-bottom: 16px; }
.tf-eti { display: block; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--t-azul); margin-bottom: 8px; }
.tf-intro { background: #fff; }
.tf-intro h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 900; color: var(--t-navy); margin-bottom: 12px; letter-spacing: -.5px; }
.tf-intro .tf-eti { color: var(--t-azul); }
.tf-lead { font-size: 16px; line-height: 1.7; color: #475569; max-width: 820px; }
.tf-cifras { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 24px 0 6px; }
.tf-cifras div { background: #f8fafc; border: 1px solid var(--t-borde); border-radius: 12px; padding: 14px 10px; text-align: center; }
.tf-cifras b { display: block; font-size: 24px; font-weight: 900; color: var(--t-azul-osc); }
.tf-cifras span { font-size: 11px; color: var(--t-gris); text-transform: uppercase; letter-spacing: .08em; }
.tf-bloques { display: grid; gap: 14px; margin-top: 22px; }
.tf-bloque { display: flex; gap: 16px; background: #fff; color: var(--t-navy); border: 1px solid var(--t-borde); border-radius: 14px; padding: 20px; }
.tf-ic { width: 46px; height: 46px; border-radius: 12px; background: #e0f2fe; color: var(--t-azul-osc); display: grid; place-items: center; font-size: 19px; flex-shrink: 0; }
.tf-bloque h3 { font-size: 17px; font-weight: 800; margin-bottom: 6px; }
.tf-bloque p { font-size: 14px; line-height: 1.7; color: #475569; }
.tf-bloque p + p { margin-top: 8px; }

.tf-tabla { overflow-x: auto; border: 1px solid var(--t-borde); border-radius: 12px; }
.tf-tabla table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
.tf-tabla th { background: #0f172a; color: #fff; text-align: left; padding: 11px 14px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.tf-tabla td { padding: 11px 14px; border-top: 1px solid var(--t-borde); color: #334155; }
.tf-tabla td:first-child { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 13px; }
.tf-tabla tr.actual td { background: #e0f2fe; }
.tf-tabla em { display: inline-block; margin-left: 8px; font-style: normal; font-family: 'Inter', sans-serif; font-size: 10px; font-weight: 800; text-transform: uppercase; background: var(--t-azul); color: #fff; border-radius: 50px; padding: 2px 8px; vertical-align: middle; }
.tf-nota { margin-top: 12px; font-size: 12.5px; color: var(--t-gris); }

.tf-specs { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 22px; }
.tf-specs h3 { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--t-azul-osc); margin-bottom: 8px; }

.tf-consejo { display: flex; gap: 16px; background: #fffbeb; border: 1px solid #fde68a; border-radius: 16px; padding: 20px 22px; }
.tf-consejo > i { font-size: 22px; color: #d97706; margin-top: 2px; }
.tf-consejo h3 { font-size: 16px; font-weight: 800; margin-bottom: 4px; }
.tf-consejo p { font-size: 14px; line-height: 1.65; color: #57534e; }
.tf-consejo a { display: inline-flex; gap: 8px; align-items: center; margin-top: 10px; font-size: 14px; font-weight: 700; color: #b45309; text-decoration: none; }

.tf-descargas { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.tf-descargas a { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--t-borde); border-radius: 12px; text-decoration: none; color: var(--t-navy); font-weight: 700; font-size: 14px; transition: border-color .2s; }
.tf-descargas a:hover { border-color: var(--t-azul); }
.tf-descargas a > i:first-child { color: #dc2626; font-size: 20px; }
.tf-descargas a > i:last-child { margin-left: auto; color: var(--t-gris); }
.tf-descargas small { display: block; font-weight: 500; font-size: 12px; color: var(--t-gris); }
#tf-comple, #tf-alt { scroll-margin-top: 130px; }

@media (max-width: 760px) {
    .tf-sec { padding: 20px 16px; }
    .tf-cifras { grid-template-columns: repeat(3, 1fr); }
    .tf-specs { grid-template-columns: 1fr; }
    .tf-bloque { flex-direction: column; gap: 10px; padding: 16px; }
}

/* =========================================================
   Portada 2026: franja de beneficios, barra de categorías, carrusel,
   accesos por categoría, vidrieras, canal mayorista y marcas
   ========================================================= */
.tq-tira { background: #0f172a; color: #cbd5e1; font: 500 12.5px Inter, sans-serif; }
.tq-tira-in { max-width: 1280px; margin: 0 auto; padding: 8px 16px; display: flex; justify-content: center; gap: 34px; flex-wrap: wrap; }
.tq-tira i { color: #38bdf8; margin-right: 7px; }
.tq-nav { background: #fff; border-bottom: 1px solid var(--t-borde); }
.tq-nav-in { max-width: 1280px; margin: 0 auto; padding: 0 16px; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tq-nav-in::-webkit-scrollbar { display: none; }
.tq-nav-in a:first-child { margin-left: auto; } .tq-nav-in a:last-child { margin-right: auto; }   /* centrada si entra; si no, se desplaza desde el principio */
@media (max-width: 560px) { .tf-nav { top: 107px; } }
.tq-nav a { white-space: nowrap; padding: 12px 14px; font: 600 13.5px Inter, sans-serif; color: #334155; text-decoration: none; border-bottom: 2px solid transparent; }
.tq-nav a:hover, .tq-nav a.activa { color: var(--t-azul-osc); border-bottom-color: var(--t-azul); }
.tq-nav a.dest { color: #ea580c; }
.tq-nav a.dest.activa { border-bottom-color: #ea580c; }

.tq-hero { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 16px; }
.tq-slider { position: relative; border-radius: 18px; overflow: hidden; min-height: 400px; background: #111524; container-type: inline-size; }
.tq-slide { position: absolute; inset: 0; display: flex; align-items: center; opacity: 0; visibility: hidden; transition: opacity .6s, visibility .6s; background-size: cover; background-position: center; }
.tq-slide.on { opacity: 1; visibility: visible; }
.tq-slide::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(15,23,42,.96) 0%, rgba(15,23,42,.82) 42%, rgba(15,23,42,.25) 78%); }
.tq-slide .tx { position: relative; z-index: 2; padding: 0 46px 40px; max-width: 540px; color: #fff; }
.tq-slide:has(.prod) .tx { max-width: min(540px, calc(100% - 300px)); }   /* el texto nunca pasa por debajo del producto */
.tq-slide small { font: 800 12px Inter, sans-serif; letter-spacing: .12em; color: #38bdf8; text-transform: uppercase; }
.tq-slide h2 { font: 900 40px/1.05 Inter, sans-serif; margin: 12px 0; letter-spacing: -1px; }
.tq-slide p { color: #cbd5e1; font-size: 16px; line-height: 1.45; margin: 0 0 22px; }
.tq-slide .bts { display: flex; gap: 10px; flex-wrap: wrap; }
.tq-slide .btn { display: inline-flex; gap: 9px; align-items: center; background: var(--t-azul); color: #fff; padding: 13px 20px; border-radius: 50px; font: 700 14px Inter, sans-serif; text-decoration: none; transition: filter .2s, background .2s; }
.tq-slide .btn:hover { filter: brightness(1.1); }
.tq-slide .btn.wa { background: rgba(37,211,102,.12); border: 1.5px solid #25d366; }
.tq-slide .btn.wa i { color: #25d366; font-size: 17px; }
.tq-slide .btn.wa:hover { background: rgba(37,211,102,.25); filter: none; }
/* producto del slide: tarjeta centrada en el alto, con nombre, modelo, stock y link a la ficha */
.tq-slide .prod { position: absolute; right: 44px; top: 50%; transform: translateY(-50%); z-index: 2; width: 236px; background: #fff; border-radius: 18px; padding: 14px 14px 12px; box-shadow: 0 24px 48px rgba(0,0,0,.45); text-decoration: none; color: #0f172a; transition: transform .25s; }
.tq-slide .prod:hover { transform: translateY(calc(-50% - 4px)); }
.tq-slide .prod .im { height: 170px; display: grid; place-items: center; }
.tq-slide .prod img { max-width: 100%; max-height: 170px; object-fit: contain; }
.tq-slide .prod .chip { position: absolute; top: 12px; left: 12px; background: #dcfce7; color: #15803d; font: normal 700 11px Inter, sans-serif; padding: 4px 9px; border-radius: 20px; }
.tq-slide .prod .chip.no { background: #f1f5f9; color: #475569; }
.tq-slide .prod b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font: 800 14px/1.25 Inter, sans-serif; margin-top: 10px; }
.tq-slide .prod span { display: block; font-size: 12px; color: #64748b; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tq-slide .prod em { display: flex; justify-content: space-between; align-items: center; font: normal 700 13px Inter, sans-serif; color: #0284c7; margin-top: 10px; padding-top: 10px; border-top: 1px solid #e2e8f0; }
@container (max-width: 780px) {
    .tq-slide .prod { display: none; }
    .tq-slide:has(.prod) .tx { max-width: 540px; }
}
/* controles: puntos con barrita de tiempo + flechas */
.tq-ctl { position: absolute; left: 46px; right: 46px; bottom: 22px; z-index: 3; display: flex; align-items: center; gap: 14px; }
.tq-dots { display: flex; gap: 8px; }
.tq-dots button { position: relative; width: 28px; height: 5px; border-radius: 5px; border: 0; padding: 0; background: rgba(255,255,255,.3); cursor: pointer; overflow: hidden; transition: width .3s; }
.tq-dots button.on { width: 48px; }
.tq-dots button.on::after { content: ""; position: absolute; inset: 0; background: #38bdf8; transform-origin: left; animation: tqBarra 7s linear forwards; }
.tq-slider.pausa .tq-dots button.on::after { animation-play-state: paused; }
@keyframes tqBarra { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.tq-flechas { margin-left: auto; display: flex; gap: 8px; }
.tq-flechas button { width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); background: rgba(15,23,42,.55); color: #fff; cursor: pointer; display: grid; place-items: center; transition: background .2s, border-color .2s; }
.tq-flechas button:hover { background: var(--t-azul); border-color: var(--t-azul); }
.tq-flechas button:focus-visible, .tq-dots button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .tq-slide { transition: none; } .tq-dots button.on::after { animation: none; transform: scaleX(1); } }
.tq-lat { display: grid; grid-template-rows: 1fr 1fr; gap: 16px; }
.tq-mini { border-radius: 18px; overflow: hidden; position: relative; display: flex; flex-direction: column; justify-content: flex-end; padding: 22px; color: #fff; text-decoration: none; background-size: cover; background-position: center; min-height: 190px; border: 0; text-align: left; font: inherit; cursor: pointer; width: 100%; }
.tq-mini::before { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(15,23,42,.94) 30%, rgba(15,23,42,.3)); transition: background .2s; }
.tq-mini:hover::before { background: linear-gradient(0deg, rgba(15,23,42,.96) 40%, rgba(15,23,42,.45)); }
.tq-mini > * { position: relative; }
.tq-mini .ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 18px; margin-bottom: auto; background: rgba(56,189,248,.18); color: #38bdf8; }
.tq-mini small { font: 800 11px Inter, sans-serif; letter-spacing: .1em; color: #38bdf8; text-transform: uppercase; }
.tq-mini b { display: block; font: 800 19px Inter, sans-serif; margin: 4px 0; }
.tq-mini div > span { display: block; font-size: 13px; color: #cbd5e1; line-height: 1.4; }
.tq-mini div > span strong { color: #fff; }
.tq-mini .ir { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font: 700 13px Inter, sans-serif; color: #38bdf8; }
.tq-mini.inst { background: linear-gradient(135deg, #0c4a6e, #0f172a 70%); }
.tq-mini.inst::before { background: radial-gradient(circle at 85% 15%, rgba(56,189,248,.35), transparent 55%); }
.tq-mini.inst .ico { background: rgba(255,255,255,.12); color: #fff; }
.tq-mini.inst .ir { display: inline-flex; width: auto; color: #fff; background: var(--t-azul); padding: 8px 14px; border-radius: 30px; }
.tq-mini:focus-visible { outline: 3px solid var(--t-azul); outline-offset: 3px; }

.tq-sec { margin-top: 36px; }
.tq-cab { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.tq-cab h2 { font: 800 22px Inter, sans-serif; color: var(--t-navy); margin: 0; }
.tq-cab p { color: var(--t-gris); font-size: 14px; margin: 2px 0 0; }
.tq-cab a { font: 700 14px Inter, sans-serif; color: var(--t-azul-osc); text-decoration: none; white-space: nowrap; }
.tq-cats { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 12px; }
.tq-catc { background: #fff; border: 1px solid var(--t-borde); border-radius: 16px; padding: 16px 6px; text-align: center; text-decoration: none; color: var(--t-navy); transition: border-color .2s, transform .2s, box-shadow .2s; }
.tq-catc:hover { border-color: var(--t-azul); transform: translateY(-3px); box-shadow: 0 12px 25px rgba(15,23,42,.08); }
.tq-catc .ic { width: 56px; height: 56px; margin: 0 auto 10px; border-radius: 50%; background: #e0f2fe; display: grid; place-items: center; font-size: 22px; color: var(--t-azul-osc); }
.tq-catc .tx { display: block; min-width: 0; }
.tq-catc b { display: block; font: 700 12.5px/1.25 Inter, sans-serif; overflow-wrap: break-word; }
.tq-catc small { font-size: 11.5px; color: var(--t-gris); }

.tq-fila { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.tq-card { background: #fff; border: 1px solid var(--t-borde); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: var(--t-navy); transition: box-shadow .2s, border-color .2s; }
.tq-card:hover { border-color: #bae6fd; box-shadow: 0 14px 30px rgba(15,23,42,.1); }
.tq-card .im { aspect-ratio: 1; background: #fff; display: grid; place-items: center; padding: 14px; border-bottom: 1px solid #f1f5f9; position: relative; }
.tq-card .im img { max-width: 100%; max-height: 100%; object-fit: contain; }
.tq-card .im .ph { font-size: 40px; color: #cbd5e1; }
.tq-card .im .st { position: absolute; left: 10px; top: 10px; font: 700 10.5px Inter, sans-serif; color: #15803d; background: #dcfce7; border-radius: 50px; padding: 3px 9px; }
.tq-card .tx { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.tq-card .mc { font: 700 10.5px Inter, sans-serif; letter-spacing: .06em; text-transform: uppercase; color: var(--t-gris); }
.tq-card .md { font: 800 14px Inter, sans-serif; color: var(--t-navy); word-break: break-word; }
.tq-card .ds { font-size: 12.5px; color: #475569; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 34px; }
.tq-card .pr { margin-top: auto; padding-top: 8px; display: flex; flex-direction: column; }
.tq-card .pr .t-precio-ant:empty { display: none; }

.tq-may { margin-top: 40px; border-radius: 20px; background: linear-gradient(120deg, #0f172a, #122E5F 55%, #0369a1); color: #fff; display: grid; grid-template-columns: 1.3fr 1fr; align-items: center; gap: 30px; padding: 34px 40px; position: relative; overflow: hidden; }
.tq-may::after { content: ""; position: absolute; right: -40px; top: -30px; width: 260px; height: 300px; background: url(/img/isotipo-blanco.svg) no-repeat center / contain; opacity: .08; pointer-events: none; }
.tq-may small { font: 800 12px Inter, sans-serif; letter-spacing: .12em; color: #7dd3fc; }
.tq-may h2 { font: 900 28px/1.15 Inter, sans-serif; margin: 10px 0; }
.tq-may p { color: #cbd5e1; margin: 0; }
.tq-may ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; position: relative; z-index: 1; }
.tq-may li { display: flex; gap: 10px; align-items: center; font-weight: 600; }
.tq-may li i { color: #38bdf8; }
.tq-may .bts { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.tq-may .bts a, .tq-may .bts button { padding: 12px 20px; border-radius: 50px; font: 700 14px Inter, sans-serif; text-decoration: none; cursor: pointer; }
.tq-may .b1 { background: #fff; color: #0f172a; border: 0; }
.tq-may .b2 { background: transparent; border: 1px solid rgba(255,255,255,.4); color: #fff; }
.tq-may .b2:hover { border-color: #fff; }

.tq-marcas { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px; }
.tq-marcas a { background: #fff; border: 1px solid var(--t-borde); border-radius: 14px; height: 78px; display: grid; place-items: center; transition: border-color .2s; }
.tq-marcas a:hover { border-color: var(--t-azul); }
.tq-marcas img { width: auto; height: auto; max-width: 75%; max-height: 34px; object-fit: contain; filter: brightness(0); opacity: .55; transition: opacity .2s; }   /* logos en gris oscuro: algunos archivos son blancos */
.tq-marcas a:hover img { opacity: .9; }

@media (max-width: 1100px) { .tq-fila { grid-template-columns: repeat(4, minmax(0, 1fr)); } .tq-cats { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 860px) {
    .tq-hero { grid-template-columns: 1fr; } .tq-lat { grid-template-rows: none; grid-template-columns: 1fr 1fr; } .tq-mini { min-height: 170px; }
    .tq-slide .prod { display: none; } .tq-slide h2 { font-size: 30px; } .tq-slide .tx { padding: 0 24px 50px; } .tq-ctl { left: 24px; right: 24px; }
    .tq-may { grid-template-columns: 1fr; padding: 28px 22px; } .tq-marcas { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    .tq-fila { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .tq-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tq-catc { padding: 14px 8px; } .tq-catc .ic { width: 44px; height: 44px; font-size: 18px; margin-bottom: 8px; }
    .tq-lat { grid-template-columns: 1fr; } .tq-slider { min-height: 430px; } .tq-mini { min-height: 160px; } .tq-slide .btn { padding: 12px 16px; font-size: 13px; } .tq-marcas { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .tq-tira-in { gap: 14px; font-size: 11.5px; } .tq-tira span:nth-child(n+3) { display: none; }
    .tq-cab { flex-wrap: wrap; } .tq-cab h2 { font-size: 20px; }
}
/* =========================================================
   Mis pedidos y facturas (mayoristas)
   ========================================================= */
.tc-cab { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.tc-cab h1 { font-size: 26px; font-weight: 900; color: var(--t-navy); margin: 0; }
.tc-cab p { color: var(--t-gris); font-size: 14px; margin: 4px 0 0; }
.tc-cab .t-btn { padding: 10px 16px; font-size: 14px; }
.tc-aviso { background: #fef3c7; border: 1px solid #fde68a; color: #92400e; border-radius: 12px; padding: 12px 14px; font-size: 14px; margin-bottom: 16px; display: flex; gap: 10px; align-items: flex-start; }
.tc-aviso i { margin-top: 3px; }
.tc-saldos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
.tc-saldos div { background: #fff; border: 1px solid var(--t-borde); border-radius: 14px; padding: 16px 18px; }
.tc-saldos span { display: block; font-size: 12.5px; color: var(--t-gris); font-weight: 600; }
.tc-saldos b { display: block; font-size: 21px; font-weight: 900; color: var(--t-navy); margin-top: 4px; }
.tc-saldos .alerta { border-color: #fecaca; background: #fef2f2; }
.tc-saldos .alerta b { color: #dc2626; }
.tc-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--t-borde); margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.tc-tabs button { background: none; border: 0; border-bottom: 3px solid transparent; padding: 12px 14px; font: 700 14px 'Inter', sans-serif; color: #475569; cursor: pointer; white-space: nowrap; display: flex; gap: 8px; align-items: center; }
.tc-tabs button small { background: #e2e8f0; color: #334155; border-radius: 50px; padding: 1px 8px; font-size: 11.5px; }
.tc-tabs button:hover { color: var(--t-azul-osc); }
.tc-tabs button.on { color: var(--t-azul-osc); border-bottom-color: var(--t-azul); }
.tc-tabs button.on small { background: var(--t-azul); color: #fff; }
.tc-nota { color: var(--t-gris); font-size: 13.5px; margin: 0 0 12px; }
.tc-doc { background: #fff; border: 1px solid var(--t-borde); border-radius: 12px; margin-bottom: 10px; overflow: hidden; }
.tc-doc[open] { border-color: #bae6fd; box-shadow: 0 8px 22px rgba(15,23,42,.06); }
.tc-doc summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 100px 1fr auto 20px; gap: 14px; align-items: center; padding: 14px 16px; font-size: 14px; }
.tc-doc summary::-webkit-details-marker { display: none; }
.tc-doc summary:hover { background: #f8fafc; }
.tc-doc summary .f { color: var(--t-gris); font-variant-numeric: tabular-nums; }
.tc-doc summary .d { font-weight: 700; color: var(--t-navy); }
.tc-doc summary .t { font-weight: 800; color: var(--t-navy); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tc-doc summary .t.neg { color: #15803d; }
.tc-doc summary .t small { font-weight: 600; color: var(--t-gris); font-size: 11px; }
.tc-doc summary i { color: #94a3b8; transition: transform .2s; }
.tc-doc[open] summary i { transform: rotate(180deg); }
.tc-doc > .tc-tabla, .tc-doc > .tc-sin, .tc-doc > .tc-acc { margin: 0 16px 14px; }
.tc-tabla { overflow-x: auto; border: 1px solid var(--t-borde); border-radius: 10px; background: #fff; }
.tc-tabla table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tc-tabla th { background: #f8fafc; text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--t-gris); padding: 9px 12px; white-space: nowrap; }
.tc-tabla td { padding: 10px 12px; border-top: 1px solid #f1f5f9; vertical-align: top; color: #334155; }
.tc-tabla td small { display: block; color: var(--t-gris); font-size: 12px; margin-top: 2px; }
.tc-tabla td a { color: var(--t-azul-osc); font-weight: 600; text-decoration: none; }
.tc-tabla td a:hover { text-decoration: underline; }
.tc-tabla .n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tc-sin { color: var(--t-gris); font-size: 13px; }
.tc-acc { display: flex; justify-content: flex-end; }
.tc-acc .t-btn { padding: 10px 16px; font-size: 14px; }
.tc-estado { display: inline-block; background: #e0f2fe; color: #0369a1; border-radius: 50px; padding: 3px 10px; font-size: 12px; font-weight: 700; }
.t-cuenta-menu button i { width: 16px; text-align: center; color: var(--t-azul-osc); }
@media (max-width: 760px) {
    .tc-saldos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tc-saldos b { font-size: 17px; }
    .tc-doc summary { grid-template-columns: 1fr auto 16px; gap: 4px 10px; padding: 12px 14px; }
    .tc-doc summary .f { grid-column: 1; grid-row: 2; font-size: 12.5px; }
    .tc-doc summary .d { grid-column: 1; grid-row: 1; }
    .tc-doc summary .t { grid-column: 2; grid-row: 1 / span 2; }
    .tc-doc summary i { grid-column: 3; grid-row: 1 / span 2; }
    .tc-doc > .tc-tabla, .tc-doc > .tc-sin, .tc-doc > .tc-acc { margin: 0 12px 12px; }
    .tc-acc .t-btn { width: 100%; }
}