/* =========================================================
   PSM – Ficha de Kit de mantenimiento (Fase 3D)
   Extiende product.css; no redefine la ficha estándar.
   ========================================================= */
.kit-top-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, .88fr); gap: 20px; align-items: start; }
.kit-col { display: flex; flex-direction: column; gap: 18px; }

/* Resumen */
.kit-summary { display: flex; flex-direction: column; align-items: flex-start; background: #fff; border: 1px solid var(--psm-border-color); border-radius: 6px; padding: 22px; }
.kit-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.kit-badges .product-brand-chip { margin-bottom: 0; }
.kit-type-chip { font-size: .75rem; font-weight: 700; letter-spacing: .03em; color: var(--psm-deep-navy); background: #FFF3D1; border: 1px solid #FFE08A; padding: 2px 10px; border-radius: 3px; }
.kit-pn { font-size: clamp(1.75rem, 2.6vw, 2.5rem); }
.kit-media { margin: 14px 0 0; width: 100%; border: 1px solid #EEF2F6; border-radius: 4px; background: #FBFCFE; }
.kit-media img { width: 100%; max-height: 320px; object-fit: contain; margin: 0 auto; }

.kit-spec-tile { width: 100%; margin-top: 16px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid #DCE6F1; border-radius: 6px; overflow: hidden; background:
    linear-gradient(#EEF3F9 1px, transparent 1px) 0 0 / 100% 22px, linear-gradient(90deg, #EEF3F9 1px, transparent 1px) 0 0 / 22px 100%, #FBFCFE; }
.kit-spec { display: flex; flex-direction: column; gap: 4px; padding: 16px 16px 14px; border-right: 1px solid #DCE6F1; }
.kit-spec:nth-child(3n) { border-right: 0; }
.kit-spec--wide { grid-column: 1 / -1; border-right: 0; border-top: 1px solid #DCE6F1; flex-direction: row; align-items: baseline; gap: 10px; }
.kit-spec-label { font-size: .6875rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--psm-technical-gray); }
.kit-spec-value { font-family: var(--font-headings); font-weight: 700; font-size: clamp(1.25rem, 2vw, 1.75rem); line-height: 1.15; color: var(--psm-deep-navy); overflow-wrap: break-word; hyphens: manual; }
.kit-spec-value small { display: inline-block; white-space: nowrap; font-family: var(--font-body); font-size: .875rem; font-weight: 600; color: var(--psm-industrial-blue); margin-left: 6px; }
.kit-spec--plan .kit-spec-value { color: var(--psm-industrial-blue); }
.kit-spec-text { font-weight: 600; color: var(--psm-deep-navy); overflow-wrap: anywhere; }
.kit-jump { margin-top: 14px; font-size: .875rem; font-weight: 600; color: #1E88E5; }

.kit-data .techdata-list { margin-top: 10px; }
.kit-quote-note { margin: 10px 4px 0; font-size: .8125rem; color: var(--psm-technical-gray); line-height: 1.45; }

/* Contenido del kit */
.kit-items { padding: 8px 0 40px; }
.kit-items-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 3px solid var(--psm-performance-amber); }
.kit-items-title { font-size: 1.625rem; margin: 0; }
.kit-count { color: var(--psm-industrial-blue); }
.kit-items-units { margin: 0; font-size: .875rem; color: var(--psm-technical-gray); }
.kit-table-wrap { border: 1px solid var(--psm-border-color); border-radius: 6px; overflow: hidden; background: #fff; }
.kit-table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.kit-table thead th { text-align: left; font-size: .75rem; letter-spacing: .05em; text-transform: uppercase; color: var(--psm-technical-gray); font-weight: 600; background: #F4F8FB; padding: 12px 18px; border-bottom: 1px solid var(--psm-border-color); }
.kit-table td, .kit-table tbody th { padding: 14px 18px; border-bottom: 1px solid #EDF1F5; vertical-align: middle; text-align: left; }
.kit-table tbody tr:last-child > * { border-bottom: 0; }
.kit-table tbody tr:hover { background: #FAFCFE; }
.kit-cell-pn { font-family: var(--font-headings); font-weight: 700; font-size: 1.0625rem; white-space: nowrap; }
.kit-cell-pn a { color: var(--psm-deep-navy); }
.kit-cell-pn a:hover { color: var(--psm-industrial-blue); }
.kit-item-desc { display: block; color: var(--psm-deep-navy); text-transform: uppercase; font-size: .875rem; letter-spacing: .01em; }
.kit-item-meta { display: block; margin-top: 2px; font-size: .75rem; color: var(--psm-technical-gray); }
.kit-col-qty, .kit-cell-qty { width: 110px; text-align: center !important; }
.kit-qty { display: inline-flex; align-items: center; justify-content: center; min-width: 46px; height: 32px; padding: 0 10px; border-radius: 16px; background: #EAF3FC; color: var(--psm-industrial-blue); font-family: var(--font-headings); font-weight: 700; }
.kit-qty--none { background: transparent; color: var(--psm-technical-gray); }
.kit-col-link, .kit-cell-link { width: 170px; text-align: right !important; }
.kit-item-btn { gap: 6px; white-space: nowrap; border-color: #1E88E5; color: #1E88E5; border-width: 1.5px; }
.kit-item-na { font-size: .75rem; color: var(--psm-technical-gray); font-style: italic; }
.kit-row.is-unavailable .kit-cell-pn, .kit-row.is-unavailable .kit-item-desc { color: var(--psm-technical-gray); }
.kit-items-empty { border: 1px dashed #C9D6E4; border-radius: 6px; padding: 28px; text-align: center; color: var(--psm-technical-gray); background: #F9FBFD; }
.kit-items-empty p { margin: 0; }

.kit-details { padding-top: 0; }
.product-details-side { display: flex; flex-direction: column; gap: 16px; }
.kit-details .product-crossrefs { background: #fff; border: 1px solid var(--psm-border-color); border-radius: 6px; padding: 20px 22px; }

/* Otros planes */
.kit-plans { padding: 0 0 40px; }
.kit-plans .related-title { margin-bottom: 14px; }
.kit-plans-model { color: var(--psm-technical-gray); font-weight: 500; font-size: 1rem; margin-left: 6px; }
.kit-plans-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 12px; }
.kit-plan > a, .kit-plan.is-current { display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 16px 18px; border: 1px solid var(--psm-border-color); border-radius: 6px; background: #fff; color: var(--psm-deep-navy); transition: border-color var(--transition-fast), box-shadow var(--transition-fast); }
.kit-plan > a:hover { border-color: #1E88E5; box-shadow: 0 6px 18px rgba(14,27,45,.06); color: var(--psm-deep-navy); }
.kit-plan.is-current { border: 2px solid var(--psm-performance-amber); background: #FFFBEF; }
.kit-plan-name { font-family: var(--font-headings); font-weight: 700; font-size: 1.25rem; }
.kit-plan-interval { font-weight: 600; color: var(--psm-industrial-blue); }
.kit-plan-pn { font-size: .8125rem; color: var(--psm-technical-gray); overflow-wrap: anywhere; }
.kit-plan-current { align-self: flex-start; margin-top: 6px; font-size: .6875rem; font-weight: 700; background: var(--psm-performance-amber); color: var(--psm-deep-navy); padding: 2px 8px; border-radius: 3px; }

/* Tablet */
@media (max-width: 1180px) {
    .kit-top-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .kit-col--quote { grid-column: 1 / -1; }
}
/* Mobile: filas → tarjetas, sin scroll horizontal */
@media (max-width: 767px) {
    .kit-top-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .kit-summary { padding: 16px; }
    .kit-spec { padding: 12px; }
    .kit-spec-value { font-size: 1.375rem; }
    .kit-items-title { font-size: 1.375rem; }
    .kit-table-wrap { border: 0; background: transparent; overflow: visible; }
    .kit-table, .kit-table tbody { display: block; }
    .kit-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .kit-table tr.kit-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding: 14px; margin-bottom: 10px; background: #fff; border: 1px solid var(--psm-border-color); border-radius: 6px; }
    .kit-table tr.kit-row > * { padding: 0; border: 0; width: auto; text-align: left !important; }
    .kit-cell-pn { grid-column: 1; white-space: normal; overflow-wrap: anywhere; }
    .kit-cell-qty { grid-column: 2; grid-row: 1; }
    .kit-cell-desc { grid-column: 1 / -1; }
    .kit-cell-link { grid-column: 1 / -1; }
    .kit-item-btn { width: 100%; }
}

/* =========================================================
   Quick View de items del kit (3.11.0)
   Desktop: panel lateral derecho (~50 %). Móvil: hoja a pantalla completa.
   ========================================================= */
html.psm-qv-open { overflow: hidden; }
.psm-qv { position: fixed; inset: 0; z-index: 2500; }
.psm-qv[hidden] { display: none; }
.psm-qv-overlay { position: absolute; inset: 0; background: rgba(14, 27, 45, .55); opacity: 0; transition: opacity .25s ease; cursor: pointer; }
.psm-qv-panel { position: absolute; top: 0; right: 0; bottom: 0; width: 50vw; min-width: 480px; max-width: 760px; display: flex; flex-direction: column; background: #fff; box-shadow: -12px 0 32px rgba(14, 27, 45, .18); transform: translateX(100%); transition: transform .28s ease; outline: none; }
.psm-qv.is-open .psm-qv-overlay { opacity: 1; }
.psm-qv.is-open .psm-qv-panel { transform: translateX(0); }
.psm-qv-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 24px; border-bottom: 1px solid var(--psm-border-color); border-top: 4px solid var(--psm-performance-amber); }
.psm-qv-eyebrow { margin: 0; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--psm-technical-gray); }
.psm-qv-close { width: 40px; height: 40px; border: 0; background: transparent; font-size: 1.9rem; line-height: 1; color: var(--psm-technical-gray); cursor: pointer; border-radius: 4px; }
.psm-qv-close:hover, .psm-qv-close:focus-visible { color: var(--psm-deep-navy); background: #F2F5F9; }
.psm-qv-body { flex: 1; overflow-y: auto; padding: 22px 24px 28px; overscroll-behavior: contain; }
.psm-qv-pn { margin: 0 0 6px; font-size: clamp(1.5rem, 2.2vw, 2rem); color: var(--psm-deep-navy); overflow-wrap: anywhere; }
.psm-qv-desc { margin: 0 0 6px; color: var(--psm-text-main); font-size: 1rem; }
.psm-qv-qty { margin: 0 0 14px; font-size: .875rem; font-weight: 600; color: var(--psm-industrial-blue); }
.psm-qv-data { margin: 14px 0 18px; }
.psm-qv-diagram { margin: 0 0 20px; border: 1px solid var(--psm-border-color); border-radius: 6px; overflow: hidden; background: #FBFCFE; }
.psm-qv-diagram-cap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--psm-border-color); font-size: .875rem; font-weight: 600; color: var(--psm-deep-navy); }
.psm-qv-pos { font-size: .8125rem; font-weight: 700; color: var(--psm-deep-navy); background: #FFF3D1; border: 1px solid #FFE08A; padding: 2px 10px; border-radius: 3px; }
.psm-qv-diagram-img { display: block; }
.psm-qv-diagram-img img { display: block; width: 100%; height: auto; max-height: 420px; object-fit: contain; margin: 0 auto; }
.psm-qv-remark { margin: 0; padding: 10px 14px; font-size: .875rem; color: var(--psm-technical-gray); border-top: 1px solid var(--psm-border-color); }
.psm-qv-nodiagram { margin: 0 0 20px; padding: 12px 14px; font-size: .875rem; color: var(--psm-technical-gray); background: #F7F9FC; border: 1px dashed var(--psm-border-color); border-radius: 6px; }
.psm-qv-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.psm-qv-actions .btn { flex: 1 1 200px; justify-content: center; }
@media (max-width: 767px) {
    .psm-qv-overlay { cursor: default; }
    .psm-qv-panel { width: 100%; min-width: 0; max-width: none; top: 0; transform: translateY(100%); box-shadow: none; }
    .psm-qv.is-open .psm-qv-panel { transform: translateY(0); }
    .psm-qv-head { padding: 12px 16px; position: sticky; top: 0; background: #fff; }
    .psm-qv-body { padding: 18px 16px calc(24px + env(safe-area-inset-bottom)); }
    .psm-qv-actions { position: sticky; bottom: 0; background: #fff; padding-top: 12px; }
}
@media (prefers-reduced-motion: reduce) { .psm-qv-panel, .psm-qv-overlay { transition: none; } }
