/* Product overview: the photo has its own height; long specifications sit below. */
.dialog[data-kind="detail"] { width: 1080px; max-width: min(1080px, calc(100% - 32px)); }
.dialog[data-kind="detail"] .dialog-body { padding: 32px; }
.product-overview { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: start; gap: 30px; }
.product-media { min-width: 0; margin: 0; align-self: start; }
.product-photo-button { position: relative; display: grid; place-items: center; width: 100%; height: clamp(320px, 42vw, 440px); min-height: 0; padding: 12px; border: 1px solid #e7e7e7; border-radius: 14px; background: #f9f9f9; overflow: hidden; cursor: zoom-in; }
.product-photo-button .product-image { display: block; position: static; inset: auto; width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: contain; object-position: center; mix-blend-mode: multiply; transform: none; }
.product-photo-button[data-photo-fit="padded-sindoh"] .product-image,
.product-photo-button .product-image[data-photo-fit="padded-sindoh"] { transform: scale(1.5); }
.product-photo-hint { position: absolute; right: 12px; bottom: 12px; z-index: 1; display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border: 1px solid #e2e2e2; border-radius: 7px; background: #ffffffed; color: #4f4f4f; font-size: 13px; font-weight: 650; line-height: 1.4; box-shadow: 0 2px 7px #2d2d2d08; }
.product-photo-button:hover .product-photo-hint { color: var(--blue); border-color: #c7c7c7; }
.product-photo-caption, .product-media-note, .product-media figcaption { margin-top: 8px; color: #757575; font-size: 12px; line-height: 1.6; }
.product-photo-empty { display: grid; align-content: center; justify-items: center; min-height: 280px; padding: 28px; border: 1px solid var(--line); border-radius: 14px; background: #f8f8f8; color: #747474; text-align: center; gap: 10px; }
.product-photo-missing { align-content: center; gap: 10px; cursor: default; color: #747474; }
.product-photo-missing p { font-size: 14px; line-height: 1.7; }
.product-overview-content { min-width: 0; padding-top: 3px; }
.product-overview-content .card-brand { margin-bottom: 7px; }
.product-overview-content h1, .product-overview-content h2 { margin: 0; padding-right: 24px; font-size: clamp(26px, 3vw, 34px); line-height: 1.25; overflow-wrap: anywhere; color: var(--ink); }
.product-overview-content h2[tabindex="-1"]:focus, .product-overview-content h1[tabindex="-1"]:focus { outline: none; }
.product-overview-content .detail-description { margin: 13px 0 0; color: #6c6c6c; font-size: 15px; line-height: 1.75; }
.product-key-specs { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; margin: 20px 0 0; padding: 0; list-style: none; }
.product-key-specs > div, .product-key-specs > span, .product-key-specs > li { min-width: 0; padding: 12px 10px; border: 1px solid #e7e7e7; border-radius: 9px; background: #f8f8f8; color: #4b4b4b; font-size: 14px; line-height: 1.5; }
.product-key-specs strong { display: block; font-size: 17px; line-height: 1.5; color: #3b3b3b; }
.product-key-specs small, .product-key-specs dt { display: block; margin: 0 0 4px; color: #757575; font-size: 12px; font-weight: 400; }
.product-key-specs dd { margin: 0; font-size: 17px; font-weight: 700; }
.product-price-summary { margin-top: 18px; padding: 18px; border: 1px solid #e4e4e4; border-radius: 11px; background: #f3f3f3; }
.product-price-summary > small, .product-price-summary > span { display: block; color: #6b6b6b; font-size: 13px; }
.product-price-summary > strong { display: block; margin-top: 4px; color: #3b3b3b; font-size: 22px; line-height: 1.45; }
.product-price-summary p { margin: 6px 0 0; font-size: 13px; line-height: 1.7; color: #6c6c6c; }
.product-price-extras { display: grid; gap: 6px; margin: 12px 0 0; padding-top: 10px; border-top: 1px solid #e2e2e2; font-size: 13px; line-height: 1.6; }
.product-price-extras > div { display: grid; grid-template-columns: 78px minmax(0,1fr); gap: 10px; }
.product-price-extras dt { color: #777777; }
.product-price-extras dd { margin: 0; color: #505050; }
.product-overview-content .detail-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.product-overview-content .detail-actions .button { flex: 1 1 auto; min-height: 46px; font-size: 14px; }
.product-overview-content .price-evidence { margin-top: 12px; color: #787878; font-size: 12px; line-height: 1.7; }
.product-overview-content .text-button { margin-top: 10px; }
.product-detail-tabs { display: flex; align-items: stretch; gap: 22px; margin-top: 28px; padding: 0; border-bottom: 1px solid #e4e4e4; overflow-x: auto; scrollbar-width: none; }
.product-detail-tabs::-webkit-scrollbar { display: none; }
.product-detail-tabs [data-product-tab] { position: relative; flex: 0 0 auto; min-height: 48px; padding: 12px 3px; color: #767676; font-size: 15px; font-weight: 650; border-bottom: 3px solid transparent; }
.product-detail-tabs [aria-selected="true"] { color: var(--blue); border-bottom-color: var(--blue); }
.product-tab-panel { padding-top: 22px; }
.product-tab-panel:focus-visible { outline: 2px solid #a6a6a6; outline-offset: 5px; }
.product-tab-panel > h2, .product-tab-panel > h3 { font-size: 19px; margin: 0 0 14px; padding: 0; }
.product-tab-panel .detail-note { margin-top: 16px; }
.product-facts-grid.spec-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: 28px; margin: 0; }
.product-facts-grid.spec-list > div { display: grid; grid-template-columns: minmax(108px,.8fr) minmax(0,1.2fr); align-content: start; gap: 12px; padding: 12px 0; min-width: 0; font-size: 14px; line-height: 1.7; border-bottom: 1px solid #eaeaea; }
.product-facts-grid.spec-list dt { color: #757575; }
.product-facts-grid.spec-list dd { margin: 0; color: #3b3b3b; font-weight: 600; overflow-wrap: anywhere; }
.product-facts-grid.spec-list small { font-size: 12px; line-height: 1.6; }
.product-tab-panel .product-fit { margin-top: 0; }
.product-notes { margin: 0; padding-left: 20px; font-size: 15px; line-height: 1.85; color: #606060; }
.product-notes li + li { margin-top: 7px; }
.product-footnote { margin-top: 14px; color: #7c7c7c; font-size: 12px; line-height: 1.7; }
.product-footnote summary, .product-price-details summary { cursor: pointer; }
.product-reference { display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px 22px; margin-top: 24px; padding-top: 14px; border-top: 1px solid #eaeaea; color: #7c7c7c; font-size: 12px; line-height: 1.8; }
.product-reference > a { text-decoration: underline; text-underline-offset: 3px; }
.product-price-details { flex: 1 1 200px; }
.product-price-details .price-evidence { margin: 8px 0 0; }
.product-tab-panel .source-links { gap: 10px 18px; }
.product-document [data-product-tabs] { border: 1px solid var(--line); border-radius: 14px; background: #fff; margin-top: 20px; padding: 26px; }
.product-document .product-detail-tabs { margin-top: 28px; }
.product-document .product-tab-panel .detail-note { font-size: 14px; }

/* One framing rule per image, instead of stacking the legacy fit overrides. */
.card-image { height: 240px; }
.card-image img.product-image, .quick-image img.product-image,
.selection-image img.product-image, .compare-image img.product-image { position: static; inset: auto; width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: contain; object-position: center; flex: none; transform: none; }
.card-image img.product-image[data-photo-fit="padded-sindoh"],
.quick-image img.product-image[data-photo-fit="padded-sindoh"],
.selection-image img.product-image[data-photo-fit="padded-sindoh"],
.compare-image img.product-image[data-photo-fit="padded-sindoh"] { transform: scale(1.45); }

/* A native top-layer dialog keeps photo zoom separate from the product dialog. */
.photo-lightbox { width: min(1280px, calc(100vw - 36px)); max-width: calc(100vw - 36px); height: min(880px, 90dvh); max-height: 90dvh; padding: 0; border: 1px solid #d5d5d5; border-radius: 16px; background: #fff; color: var(--ink); overflow: hidden; box-shadow: 0 30px 100px #24242466; }
.photo-lightbox[open] { display: grid; grid-template-rows: auto auto minmax(0,1fr) auto; }
.photo-lightbox::backdrop { background: #181818bd; backdrop-filter: blur(4px); }
.photo-lightbox-header { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 18px 22px 14px; border-bottom: 1px solid #eaeaea; }
.photo-lightbox-header p { margin: 0 0 2px; color: #7c7c7c; font-size: 12px; }
.photo-lightbox-header h2 { margin: 0; color: #2d2d2d; font-size: 20px; line-height: 1.4; overflow-wrap: anywhere; }
.photo-lightbox-close { display: grid; place-items: center; flex: none; width: 40px; height: 40px; padding: 0; border: 1px solid #e6e6e6; border-radius: 9px; background: #f6f6f6; color: #444444; font-size: 28px; line-height: 1; }
.photo-lightbox-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding: 10px 22px; }
.photo-lightbox-controls { display: flex; align-items: center; gap: 7px; }
.photo-lightbox-controls button { display: grid; place-items: center; min-width: 38px; min-height: 38px; padding: 5px 10px; border: 1px solid #e3e3e3; border-radius: 7px; background: #fff; font-size: 20px; font-weight: 600; }
.photo-lightbox-controls [data-photo-reset] { margin-left: 4px; font-size: 13px; font-weight: 500; }
.photo-lightbox-scale { display: block; min-width: 48px; font-size: 13px; font-variant-numeric: tabular-nums; text-align: center; color: #686868; }
.photo-lightbox-original { color: #525252; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.photo-lightbox-viewport { position: relative; min-width: 0; min-height: 0; overflow: auto; scrollbar-gutter: stable both-edges; background: #f6f6f6; overscroll-behavior: contain; touch-action: pan-x pan-y; }
.photo-lightbox-viewport[data-zoomed="true"] { cursor: grab; }
.photo-lightbox-viewport[data-dragging="true"] { cursor: grabbing; user-select: none; }
.photo-lightbox-stage { display: grid; place-items: center; width: max-content; height: max-content; min-width: 100%; min-height: 100%; padding: 16px; box-sizing: border-box; }
.photo-lightbox-image { display: block; max-width: none; max-height: none; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.photo-lightbox-message { position: absolute; inset: 0; display: grid; align-content: center; padding: 30px; margin: 0; color: #717171; font-size: 15px; text-align: center; }
.photo-lightbox-help { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin: 0; padding: 10px 22px; color: #797979; font-size: 12px; line-height: 1.6; border-top: 1px solid #e9e9e9; }
.photo-lightbox-help span { color: #979797; }

@media (max-width: 760px) {
  .dialog[data-kind="detail"] { width: calc(100% - 20px); max-width: calc(100% - 20px); max-height: 94dvh; }
  .dialog[data-kind="detail"] .dialog-body { padding: 24px 18px; }
  .product-overview { grid-template-columns: minmax(0,1fr); gap: 20px; }
  .product-photo-button { height: clamp(260px, 65vw, 340px); }
  .card-image { height: 210px; }
  .product-overview-content { padding-top: 0; }
  .product-overview-content h1, .product-overview-content h2 { font-size: 28px; }
  .product-overview-content .detail-description { font-size: 15px; }
  .product-key-specs { margin-top: 16px; gap: 6px; }
  .product-key-specs > div, .product-key-specs > span, .product-key-specs > li { padding: 10px 8px; }
  .product-key-specs strong, .product-key-specs dd { font-size: 16px; }
  .product-price-summary { margin-top: 14px; padding: 16px; }
  .product-price-summary > strong { font-size: 21px; }
  .product-detail-tabs { margin-top: 24px; gap: 18px; }
  .product-detail-tabs [data-product-tab] { font-size: 14px; }
  .product-tab-panel { padding-top: 18px; }
  .product-facts-grid.spec-list { grid-template-columns: minmax(0,1fr); }
  .product-facts-grid.spec-list > div { grid-template-columns: minmax(108px,.8fr) minmax(0,1.2fr); font-size: 14px; padding: 11px 0; }
  .product-document [data-product-tabs] { padding: 18px; }
  .product-document .product-detail-tabs { margin-top: 24px; }
  .photo-lightbox { width: calc(100vw - 16px); max-width: calc(100vw - 16px); height: 94dvh; max-height: 94dvh; border-radius: 12px; }
  .photo-lightbox-header { padding: 13px 14px 11px; }
  .photo-lightbox-header h2 { font-size: 18px; }
  .photo-lightbox-toolbar { padding: 8px 14px; gap: 8px; }
  .photo-lightbox-controls { gap: 5px; }
  .photo-lightbox-controls button { min-width: 36px; min-height: 38px; }
  .photo-lightbox-help { padding: 9px 14px; font-size: 11px; }
  .photo-lightbox-help span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .product-photo-button, .product-photo-hint { transition: none; }
}
