/* Product master preview: the vehicle template supplies all visual styling. */
.pd-is-master #productMain .pd-master-story > p { max-width: 100ch; }
.pd-is-master #productMain .pd-master-story > p + p { margin-top: 12px; }
.pd-is-master .category-summary-part-link { color: #167142; font-weight: 650; }
.pd-is-master .product-main-image-ec { cursor: zoom-in; }
.pd-master-image-dialog { width: min(90vw, 800px); max-height: 94vh; padding: 14px; border: 1px solid #dfe3e4; border-radius: 14px; }
.pd-master-image-dialog::backdrop { background: rgba(12, 20, 33, .78); }
.pd-master-image-dialog header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.pd-master-image-dialog button { border: 1px solid #dfe3e4; border-radius: 7px; background: #fff; padding: 6px 12px; cursor: pointer; }
.pd-master-image-dialog img { display: block; width: 100%; height: min(75vh, 720px); object-fit: contain; }
.pd-is-master .pd-gallery-toolbar:has(.pd-shot-status) { flex-wrap: wrap; }
.pd-is-master #productMain .pd-shot-status { flex: 0 0 100%; margin: 4px 0 0; font-size: 12px; line-height: 1.5; text-align: right; color: #167142; }
.pd-is-master #productMain .pd-shot-status[data-error="true"] { color: #9c3320; }

.pd-is-master #productTitle { font-size: clamp(19px,1.75vw,26px); line-height: 1.25; text-wrap: wrap; }
.pd-is-master .pd-back-icon { width: 15px; height: 15px; flex: 0 0 15px; }
.pd-is-master .pd-master-performance-layout { display: grid; grid-template-columns: minmax(180px,.7fr) minmax(0,2fr); gap: 28px; align-items: start; margin-top: 18px; }
.pd-is-master .pd-master-performance-layout figure { margin: 0; padding: 12px; border: 1px solid var(--detail-line); border-radius: 12px; background: #f5f5f1; }
.pd-is-master .pd-master-performance-layout figure img { width: 100%; height: 260px; display: block; object-fit: contain; }
.pd-is-master .pd-master-performance-layout figcaption { margin-top: 9px; color: var(--detail-muted); text-align: center; font-size: 12px; line-height: 1.5; }
.pd-is-master #productMain .pd-master-performance-layout p { margin: 0; }
.pd-is-master #productMain .pd-master-performance-layout p + p { margin-top: 16px; }
.pd-is-master .pd-master-performance-features { grid-template-columns: minmax(0,1fr); gap: 12px; margin: 17px 0; }
.pd-is-master .pd-master-product-row { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 14px; list-style: none; margin: 20px 0 0; padding: 0; }
.pd-is-master .pd-master-product-row > li { min-width: 0; }
.pd-is-master .pd-master-product-card { display: flex; flex-direction: column; gap: 5px; min-width: 0; height: 100%; padding: 10px; border: 1px solid var(--detail-line); border-radius: 10px; background: #fff; color: var(--detail-ink); text-decoration: none; }
.pd-is-master .pd-master-product-card:hover { border-color: var(--detail-accent); }
.pd-is-master .pd-master-product-card img { width: 100%; aspect-ratio: 1/1; height: auto; object-fit: contain; display: block; border-radius: 5px; margin-bottom: 5px; }
.pd-is-master .pd-master-card-brand { font-size: 11px; line-height: 1.4; letter-spacing: .03em; color: var(--detail-muted); }
.pd-is-master .pd-master-product-card strong { font-size: 14px; line-height: 1.45; font-weight: 680; overflow-wrap: anywhere; }
.pd-is-master .pd-master-card-oem { font-size: 12px; line-height: 1.5; color: #9c3320; overflow-wrap: anywhere; }
.pd-is-master .pd-master-card-models { font-size: 12px; line-height: 1.5; color: var(--detail-muted); overflow-wrap: anywhere; }
@media(max-width:1100px) and (min-width:769px) {
  .pd-is-master .pd-master-product-row { gap: 9px; }
  .pd-is-master .pd-master-product-card { padding: 8px; }
  .pd-is-master .pd-master-product-card strong { font-size: 13px; }
  .pd-is-master .pd-master-card-oem { font-size: 11px; }
}
@media(max-width:768px) {
  .pd-is-master #productMain .pd-reference-search[aria-controls="metaOtherCodes"] { display: none !important; }
  .pd-is-master #productTitle { font-size: clamp(14.5px,4.2vw,17px); line-height: 1.3; }
  /* Keep a real back link in the document flow, below the mobile search. */
  .pd-is-master .pd-mobile-backbar { display: none !important; }
  .pd-is-master #productMain .container-breadcrumb { display: flex; justify-content: flex-start; padding-block: 6px 0; gap: 0; }
  .pd-is-master #productMain .breadcrumb-ec-wrap { display: none; }
  .pd-is-master #productMain .pd-page-back { min-height: 28px; gap: 3px; padding: 3px 7px; border-radius: 7px; font-size: 11px; }
  .pd-is-master #productMain .pd-showcase { margin-top: 7px; }

  /* The capture control floats over the photo; thumbnails own the full row. */
  .pd-is-master #productMain .pd-showcase-gallery { display: block; min-height: 0; }
  .pd-is-master #productMain .pd-showcase-gallery .pd-media-row { display: grid; grid-template-columns: minmax(0,1fr) !important; gap: 7px; }
  .pd-is-master #productMain .product-main-image-ec { grid-column: 1; grid-row: 1; height: auto; max-height: 400px; aspect-ratio: 1 / 1; padding: 4px; }
  .pd-is-master #productMain .product-thumbs-ec--vertical { display: flex; grid-column: 1; grid-row: 2; flex-direction: row; width: 100%; min-width: 0; max-width: 100%; gap: 6px; padding: 3px 2px; margin: 0; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x proximity; }
  .pd-is-master #productMain .thumb-item-ec { width: 52px; height: 52px; flex-basis: 52px; padding: 2px; scroll-snap-align: start; }
  .pd-is-master #productMain .pd-gallery-toolbar { position: absolute; top: 7px; right: 7px; z-index: 3; display: flex; grid-column: auto; grid-row: auto; gap: 0; margin: 0; }
  .pd-is-master #productMain .pd-shot-control { min-height: 32px; padding: 4px 7px; gap: 4px; border-radius: 8px; background: rgba(255,255,255,.96); box-shadow: 0 2px 8px rgba(25,34,46,.12); }
  .pd-is-master #productMain .pd-shot-control [data-i18n] { display: none; }
  .pd-is-master #productMain .pd-shot-control::after { content: 'Chụp'; font-size: 10.5px; line-height: 1; }
  .pd-is-master #productMain .pd-shot-control.is-busy::after { content: '…'; }
  .pd-is-master #productMain .pd-shot-icon { width: 12px; height: 9px; }
  .pd-is-master #productMain .pd-gallery-toolbar .pd-shot-status { position: absolute; top: calc(100% + 5px); right: 0; width: min(230px,70vw); padding: 6px 8px; margin: 0; border: 1px solid var(--detail-line); border-radius: 7px; background: #fff; box-shadow: 0 2px 8px rgba(25,34,46,.1); font-size: 11px; text-align: left; pointer-events: none; }

  /* Share a single header row instead of repeating labels in every card. */
  .pd-is-master #productMain #fit .pd-fitment-table__wrap { overflow-x: auto; overflow-y: hidden; max-width: 100%; overscroll-behavior-inline: contain; scrollbar-width: thin; }
  .pd-is-master #productMain #fit table { display: table; width: max-content; min-width: 100%; border-collapse: collapse; table-layout: auto; }
  .pd-is-master #productMain #fit thead { display: table-header-group; position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
  .pd-is-master #productMain #fit tbody { display: table-row-group; }
  .pd-is-master #productMain #fit thead tr,
  .pd-is-master #productMain #fit tbody tr { display: table-row; padding: 0; }
  .pd-is-master #productMain #fit tr > th,
  .pd-is-master #productMain #fit tr > td { display: table-cell; padding: 9px 6px; border: 0; border-bottom: 1px solid var(--detail-line); vertical-align: middle; white-space: nowrap; overflow-wrap: normal; word-break: normal; font-size: 12px; line-height: 1.4; }
  .pd-is-master #productMain #fit thead th { padding-block: 7px; color: var(--detail-muted); font-size: 10px; font-weight: 550; text-align: left; }
  .pd-is-master #productMain #fit tbody th { font-weight: 650; }
  .pd-is-master #productMain #fit tbody td::before { display: none; content: none; }
  .pd-is-master #productMain #fit .pd-spec-link { display: inline; white-space: nowrap; }

  .pd-is-master #productMain #productCategoryDropdown .pd-hero-compat-badges { overflow-x: auto !important; touch-action: pan-x pan-y; }
  .pd-is-master #productMain #productCategoryDropdown .pd-hero-compat-badges > div { width: max-content; min-width: 100%; flex-shrink: 0; }
  .pd-is-master #productMain #productCategoryDropdown .category-summary-badge { max-width: none !important; white-space: nowrap; overflow-wrap: normal; word-break: normal; }
  .pd-is-master #productMain #productCategoryDropdown .category-badge-link { white-space: nowrap; }
  .pd-is-master .pd-master-performance-layout { grid-template-columns: minmax(0,1fr); gap: 17px; }
  .pd-is-master .pd-master-performance-layout figure { max-width: 240px; margin-inline: auto; padding: 10px; }
  .pd-is-master .pd-master-performance-layout figure img { height: 180px; }
  .pd-is-master .pd-master-performance-features { margin-block: 15px; }
  .pd-is-master .pd-master-performance-features dt { font-size: 14px; }
  .pd-is-master .pd-master-performance-features dd { font-size: 13px; line-height: 1.6; }
  .pd-is-master .pd-master-product-row { display: flex; gap: 10px; overflow-x: auto; padding: 1px 1px 12px; scroll-snap-type: x proximity; overscroll-behavior-inline: contain; scrollbar-width: thin; }
  .pd-is-master .pd-master-product-row > li { flex: 0 0 156px; scroll-snap-align: start; }
  .pd-is-master .pd-master-product-card { padding: 9px; }
  .pd-is-master .pd-master-product-card strong { font-size: 13px; }
  .pd-is-master .pd-master-card-oem, .pd-is-master .pd-master-card-models { font-size: 11px; }
}

.pd-is-master .pd-master-performance-layout--text { grid-template-columns: minmax(0,1fr); }
