.product-detail-page { max-width: 1240px; }
.product-detail-surface { display: grid; gap: 18px; }
.product-detail-surface::before { display: none; }
.product-detail-hero { display: grid; grid-template-columns: 118px minmax(0, 1fr) auto; align-items: stretch; gap: 18px; }
.product-detail-hero__image { min-height: 118px; overflow: hidden; border-radius: 14px; background: #e8edf3; }
.product-detail-hero__image img { width: 100%; height: 100%; object-fit: cover; }
.product-detail-hero__image > span { display: grid; height: 100%; place-items: center; align-content: center; gap: 7px; color: #66768c; font-size: .68rem; }
.product-detail-hero__image svg { width: 38px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.product-detail-hero__content { display: flex; min-width: 0; flex-direction: column; justify-content: space-between; gap: 13px; padding-block: 4px; }
.product-detail-hero__content h1 { margin: 0; color: #17243a; font-size: clamp(1.55rem, 3vw, 2.25rem); letter-spacing: -.03em; line-height: 1.05; }
.product-detail-hero__content > div > p { margin: 6px 0 0; color: #66758b; font-size: .78rem; }
.product-detail-hero__content .product-detail-description { max-width: 60ch; color: #344867; line-height: 1.5; white-space: normal; }
.product-detail-gallery { display: flex; flex-wrap: wrap; gap: 8px; }
.product-detail-gallery a { display: block; width: 88px; height: 88px; overflow: hidden; border: 1px solid #dce4ef; border-radius: 9px; background: #f2f5fa; }
.product-detail-gallery img { width: 100%; height: 100%; object-fit: cover; }
.variant-cell__sku { display: block; max-width: 130px; margin-top: 3px; color: #3d5a88; font: 600 .59rem ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }
.product-detail-facts { display: flex; flex-wrap: wrap; gap: 7px; margin: 0; }
.product-detail-facts div { min-width: 140px; padding-inline-end: 16px; }
.product-detail-facts div + div { padding-inline-start: 16px; border-inline-start: 1px solid #dbe2eb; }
.product-detail-facts dt { color: #718096; font-size: .62rem; }
.product-detail-facts dd { margin: 3px 0 0; overflow: hidden; color: #304662; font-size: .72rem; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.product-detail-hero__actions { display: flex; align-items: flex-start; gap: 8px; }
.product-detail-hero__actions a { min-height: 40px; padding: 9px 13px; font-size: .72rem; }
.variant-inventory { padding: 18px; border-radius: 15px; background: #f2f5f8; }
.variant-inventory__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.variant-inventory__header h2 { margin: 0; color: #1f314c; font-size: 1.08rem; letter-spacing: -.02em; }
.variant-inventory__header p { margin: 4px 0 0; color: #63738a; font-size: .72rem; }
.variant-inventory__totals { display: flex; flex: 0 0 auto; gap: 18px; margin: 0; }
.variant-inventory__totals div { min-width: 108px; text-align: end; }
.variant-inventory__totals dt { color: #718096; font-size: .58rem; }
.variant-inventory__totals dd { margin: 3px 0 0; color: #1f765b; font-size: 1.12rem; font-weight: 850; font-variant-numeric: tabular-nums; }
.variant-inventory__totals .has-warning dd { color: #a45b19; }
.variant-unallocated-note { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; margin: 0 0 13px; padding: 11px 13px; border-radius: 11px; color: #744512; background: #fff0da; }
.variant-unallocated-note svg { width: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.variant-unallocated-note span { display: grid; gap: 2px; font-size: .65rem; line-height: 1.45; }
.variant-unallocated-note strong { font-size: .69rem; }
.variant-matrix-wrap { overflow-x: auto; border-radius: 12px; background: #fff; scrollbar-color: #a7b5c7 transparent; scrollbar-width: thin; }
.variant-matrix { width: 100%; min-width: 720px; border-collapse: collapse; table-layout: fixed; }
.variant-matrix th, .variant-matrix td { padding: 10px 8px; border-bottom: 1px solid #e5eaf0; text-align: center; }
.variant-matrix thead th { color: #65758b; background: #e7edf3; font-size: .59rem; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.variant-matrix thead th:first-child { width: 130px; text-align: start; }
.variant-matrix thead th:last-child { width: 102px; }
.variant-matrix tbody tr:last-child > * { border-bottom: 0; }
.variant-matrix tbody th { color: #253a57; font-size: .72rem; text-align: start; }
.variant-color-swatch { display: inline-block; width: 9px; height: 9px; margin-inline-end: 8px; border: 2px solid #526783; border-radius: 50%; vertical-align: 0; }
.variant-cell { position: relative; color: #738196; background: #fff; font-variant-numeric: tabular-nums; }
.variant-cell strong { display: block; color: #2c425f; font-size: .86rem; }
.variant-cell small { display: block; margin-top: 2px; color: #748298; font-size: .5rem; }
.variant-cell--available::after, .variant-cell--low::after, .variant-cell--out::after { position: absolute; inset-block-start: 8px; inset-inline-end: 8px; width: 5px; height: 5px; border-radius: 50%; content: ""; }
.variant-cell--available::after { background: #44b58a; }
.variant-cell--low::after { background: #eea13a; }
.variant-cell--out::after { background: #df6464; }
.variant-cell--missing { background: #fafbfc; }
.variant-cell--total { background: #edf2f6; }
.variant-cell--total strong { color: #1f765b; }
.variant-empty { display: flex; align-items: center; gap: 14px; min-height: 110px; padding: 20px; border-radius: 12px; color: #63738a; background: #fff; }
.variant-empty svg { width: 42px; fill: none; stroke: #526783; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.variant-empty h3 { margin: 0; color: #2b405d; font-size: .88rem; }
.variant-empty p { margin: 4px 0 0; font-size: .68rem; }
.variant-editor { margin-top: 12px; border-radius: 12px; background: #fff; }
.variant-editor > summary { display: flex; min-height: 56px; align-items: center; justify-content: space-between; gap: 16px; padding: 11px 14px; cursor: pointer; list-style: none; }
.variant-editor > summary::-webkit-details-marker { display: none; }
.variant-editor > summary span { display: grid; gap: 2px; }
.variant-editor > summary strong { color: #2b405d; font-size: .75rem; }
.variant-editor > summary small { color: #6b7a90; font-size: .6rem; }
.variant-editor > summary svg { width: 18px; fill: none; stroke: #526783; stroke-width: 2; transition: transform 180ms ease-out; }
.variant-editor[open] > summary svg { transform: rotate(180deg); }
.variant-editor form { display: grid; grid-template-columns: minmax(170px, .8fr) minmax(0, 3fr) auto; align-items: end; gap: 12px; padding: 0 14px 14px; }
.variant-editor__color label, .variant-editor__sizes label { display: block; margin-bottom: 5px; color: #53647b; font-size: .58rem; font-weight: 800; }
.variant-editor__sizes { display: grid; grid-template-columns: repeat(6, minmax(58px, 1fr)); gap: 7px; }
.variant-editor input { min-height: 39px; }
.variant-editor button { min-height: 39px; padding: 8px 12px; font-size: .68rem; white-space: nowrap; }
.variant-editor .error-message { grid-column: 1 / -1; margin: 0; }
.product-detail-history { display: grid; gap: 9px; }
.product-detail-history > details { border: 1px solid #dbe2eb; border-radius: 12px; background: #fff; }
.product-detail-history > details > summary { display: flex; min-height: 48px; align-items: center; justify-content: space-between; padding: 10px 14px; color: #2a3f5c; cursor: pointer; font-size: .72rem; font-weight: 850; list-style: none; }
.product-detail-history > details > summary::-webkit-details-marker { display: none; }
.product-detail-history > details > summary small { display: grid; min-width: 24px; height: 24px; place-items: center; border-radius: 999px; color: #526783; background: #e9eef4; font-size: .57rem; font-variant-numeric: tabular-nums; }
.product-detail-history .table-wrap, .product-detail-history .empty-state { margin: 0 14px 14px; }
.movement-variant { display: block; margin-top: 3px; color: #6c7b90; font-size: .58rem; font-weight: 650; }
@media (max-width: 820px) {
    .product-detail-surface { gap: 13px; }
    .product-detail-hero { grid-template-columns: 82px minmax(0, 1fr); gap: 12px; }
    .product-detail-hero__image { min-height: 82px; }
    .product-detail-hero__content h1 { font-size: 1.35rem; }
    .product-detail-facts { display: grid; grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .product-detail-facts div, .product-detail-facts div + div { min-width: 0; padding: 0; border: 0; }
    .product-detail-hero__actions { grid-column: 1 / -1; }
    .product-detail-hero__actions a { flex: 1; justify-content: center; }
    .variant-inventory { padding: 14px; }
    .variant-inventory__header { display: grid; }
    .variant-inventory__totals { width: 100%; justify-content: space-between; }
    .variant-inventory__totals div { min-width: 0; text-align: start; }
    .variant-editor form { grid-template-columns: minmax(0, 1fr); }
    .variant-editor__sizes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .variant-editor button { width: 100%; }
}
