/* Product page layout. Structural replacements, not visual reordering. */
.bks-product { min-width: 0; }
.bks-product-main { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 52px; align-items: start; margin-top: 24px; }
.bks-product-gallery, .bks-product-summary { min-width: 0; }
.bks-storefront .woocommerce div.product .bks-product-summary { float: none; width: auto; margin: 0; }
.bks-pdp-gallery { min-width: 0; }
.bks-gallery-track { display: flex; position: relative; width: 100%; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; }
.bks-gallery-track::-webkit-scrollbar { display: none; }
.bks-gallery-slide { display: flex; flex: 0 0 100%; width: 100%; min-width: 0; aspect-ratio: 1; scroll-snap-align: start; background: #f7f6f3; align-items: center; justify-content: center; }
.bks-gallery-slide .bks-gallery-image { display: block; width: 100%; height: 100%; max-height: 650px; object-fit: contain; }
.bks-gallery-placeholder { width: 100%; aspect-ratio: 1; display: grid; place-items: center; background: var(--bks-soft); }
.bks-gallery-placeholder img { max-height: 400px; object-fit: contain; }
.bks-gallery-controls { display: flex; justify-content: center; align-items: center; gap: 12px; min-height: 50px; font-size: 14px; }
.bks-gallery-count { font-variant-numeric: tabular-nums; min-width: 42px; text-align: center; }
.bks-gallery-hint { color: var(--bks-muted); font-size: 12px; }
.bks-gallery-prev .bks-icon { transform: rotate(180deg); }
.bks-gallery-thumbnails { display: flex; gap: 10px; overflow-x: auto; max-width: 100%; padding: 4px 0 8px; scrollbar-width: thin; }
.bks-gallery-thumbnails button { padding: 2px; border: 1px solid var(--bks-line); background: #fff; flex: 0 0 70px; width: 70px; height: 70px; }
.bks-gallery-thumbnails button[aria-current] { border-color: var(--bks-ink); }
.bks-gallery-thumbnails img { width: 100%; height: 100%; object-fit: contain; }
.bks-gallery-controls [hidden], .bks-gallery-thumbnails[hidden] { display: none; }
.bks-product-identity { display: flex; gap: 4px 14px; flex-wrap: wrap; margin: 0 0 10px; }
.bks-product-identity > div { display: flex; gap: 6px; min-width: 0; font-size: 13px; line-height: 1.65; }
.bks-product-identity dt { color: var(--bks-muted); flex-shrink: 0; }
.bks-product-identity dd { margin: 0; overflow-wrap: anywhere; }
.bks-product-summary .product_title { font-size: clamp(23px, 2vw, 30px); line-height: 1.65; font-weight: 500; overflow-wrap: anywhere; margin: 0 0 18px; }
.bks-storefront .woocommerce .price.bks-detail-price { font-size: 28px; gap: 4px 14px; margin: 0 0 12px; }
.bks-storefront .price.bks-detail-price del.bks-regular-price { font-size: 16px; font-weight: 400; text-decoration: line-through; }
.bks-storefront .price.bks-detail-price ins.bks-current-price { font-size: inherit; font-weight: 600; text-decoration: none; background: transparent; }
.bks-product-status { font-size: 14px; margin: 10px 0 14px; }
.bks-product-status::before { content: '●'; font-size: 10px; margin-right: 8px; }
.bks-storefront .woocommerce div.product form.cart { display: flex; gap: 12px; flex-wrap: wrap; margin: 0 0 14px; }
.bks-storefront .woocommerce div.product form.cart .button { width: 100%; min-height: 54px; float: none; font-size: 17px; }
.bks-storefront .woocommerce div.product form.cart .quantity { display: none; }
.bks-storefront .woocommerce div.product form.variations_form { display: block; }
.bks-storefront .woocommerce div.product form.cart table.variations { width: 100%; margin: 0 0 16px; }
.bks-storefront .woocommerce div.product form.cart .variations tr { display: grid; grid-template-columns: 1fr; gap: 8px; margin-bottom: 14px; }
.bks-storefront .woocommerce div.product form.cart .variations td, .bks-storefront .woocommerce div.product form.cart .variations th { display: block; padding: 0; text-align: left; }
.bks-storefront .woocommerce div.product form.cart .variations select { width: 100%; max-width: 100%; min-height: 48px; font-size: 16px; }
.bks-price-enhanced .bks-pdp-purchase .woocommerce-variation-price, .bks-price-enhanced .bks-pdp-purchase .woocommerce-variation-availability { display: none; }
.bks-pdp-purchase .woocommerce-variation-description { font-size: 14px; }
.bks-product-action-status:empty { display: none; }
.bks-pdp-services { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; margin-top: 16px; }
.bks-pdp-services > a, .bks-delivery-chip > summary { display: flex; justify-content: center; align-items: center; min-height: 48px; padding: 10px 8px; border: 1px solid var(--bks-line); font-size: 14px; line-height: 1.5; text-align: center; cursor: pointer; list-style: none; background: white; }
.bks-delivery-chip summary::-webkit-details-marker { display: none; }
.bks-delivery-chip[open] { grid-column: 1/-1; }
.bks-delivery-chip > div { padding: 18px; font-size: 14px; background: var(--bks-soft); }
.bks-delivery-chip p { margin: 0 0 10px; }
.bks-delivery-chip a { text-decoration: underline; }
.bks-product-intro { font-size: 15px; line-height: 1.9; margin-top: 24px; }
.bks-product-details { margin-top: 48px; }
.bks-detail-panel { border-top: 1px solid var(--bks-line); }
.bks-detail-panel:last-child { border-bottom: 1px solid var(--bks-line); }
.bks-detail-panel > summary { display: flex; align-items: center; gap: 12px; cursor: pointer; list-style: none; min-height: 72px; padding: 22px 4px; font-size: 21px; font-weight: 600; }
.bks-detail-panel > summary::-webkit-details-marker { display: none; }
.bks-detail-panel > summary::after { content: '＋'; margin-left: auto; font-size: 22px; font-weight: 400; }
.bks-detail-panel[open] > summary::after { content: '−'; }
.bks-review-count { font-size: 14px; color: var(--bks-muted); font-weight: 400; }
.bks-detail-content { padding: 8px 4px 32px; min-width: 0; }
.bks-detail-content > :last-child { margin-bottom: 0; }
.bks-detail-content img { max-width: 100%; height: auto; }
.bks-spec-list { margin: 16px 0; border-top: 1px solid var(--bks-line); }
.bks-spec-list > div { display: grid; grid-template-columns: minmax(120px, 28%) minmax(0, 1fr); border-bottom: 1px solid var(--bks-line); }
.bks-spec-list dt, .bks-spec-list dd { margin: 0; padding: 16px 18px; font-size: 16px; line-height: 1.8; overflow-wrap: anywhere; min-width: 0; }
.bks-spec-list dt { background: var(--bks-soft); font-weight: 500; }
.bks-spec-list p:last-child { margin: 0; }
.bks-spec-table-scroll { width: 100%; max-width: 100%; overflow-x: auto; }
.bks-spec-table-scroll table { min-width: 520px; }
.bks-review-overview { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; }
.bks-review-overview p { font-size: 20px; }
.bks-review-overview p span { font-size: 14px; }
.bks-review-compose > summary { display: flex; justify-content: center; align-items: center; min-height: 50px; padding: 12px 20px; max-width: 340px; border: 1px solid var(--bks-ink); cursor: pointer; list-style: none; font-size: 16px; }
.bks-review-compose > summary::-webkit-details-marker { display: none; }
.bks-review-compose-body { margin-top: 20px; }
.bks-storefront .woocommerce #reviews .bks-review-compose #respond { margin: 0; }
.bks-review-compose input[type=checkbox] { flex: none; }
.bks-dialog.bks-image-viewer { width: min(1200px, 100vw); max-width: 100vw; max-height: 100dvh; height: min(920px, 100dvh); border-radius: 0; overflow: auto; }
.bks-image-viewer[open] { display: grid; grid-template-rows: auto minmax(0,1fr) auto; }
.bks-viewer-toolbar { display: flex; justify-content: space-between; align-items: center; min-height: 58px; padding: 6px 18px; border-bottom: 1px solid var(--bks-line); font-size: 16px; }
.bks-viewer-image-area { min-width: 0; min-height: 0; padding: 8px; display: flex; align-items: center; justify-content: center; }
.bks-viewer-image-area img { max-width: 100%; max-height: 100%; width: auto; height: 100%; object-fit: contain; touch-action: pan-x pan-y pinch-zoom; }
.bks-viewer-controls { display: flex; gap: 12px; justify-content: center; padding: 12px 16px max(12px, env(safe-area-inset-bottom)); }
.bks-mobile-purchase { display: none; }

/* Wide tablets can keep two comfortable columns; narrow tablets get a deliberate single flow. */
@media (min-width: 900px) and (max-width: 1099px) {
  .bks-product-main { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 28px; }
  .bks-product-summary .product_title { font-size: 23px; }
  .bks-storefront .woocommerce .price.bks-detail-price { font-size: 25px; }
}
@media (min-width: 768px) and (max-width: 899px) {
  .bks-product-main { grid-template-columns: 1fr; gap: 26px; max-width: 760px; margin-inline: auto; }
  .bks-product-gallery { width: 100%; max-width: 500px; margin-inline: auto; }
  .bks-product-summary .product_title { font-size: 26px; }
  .bks-pdp-services { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .bks-delivery-chip[open] { grid-column: 1/-1; }
}
@media (max-width: 767px) {
  .bks-product-main { grid-template-columns: 1fr; gap: 16px; margin-top: 14px; }
  .bks-gallery-slide { aspect-ratio: 1.12; }
  .bks-gallery-thumbnails { display: none; }
  .bks-gallery-controls { min-height: 44px; gap: 10px; }
  .bks-gallery-controls .bks-icon-button { width: 44px; height: 44px; }
  .bks-product-identity { margin-bottom: 8px; gap: 4px 10px; }
  .bks-product-identity > div { font-size: 12px; }
  .bks-product-summary .product_title { font-size: 20px; line-height: 1.6; margin-bottom: 12px; }
  .bks-storefront .woocommerce .price.bks-detail-price { font-size: 25px; margin-bottom: 8px; }
  .bks-storefront .price.bks-detail-price del.bks-regular-price { font-size: 15px; }
  .bks-product-status { margin: 6px 0 12px; }
  .bks-storefront .woocommerce div.product form.cart .button { min-height: 54px; font-size: 16px; padding: 14px 12px; }
  .bks-pdp-services { margin-top: 12px; gap: 8px; }
  .bks-pdp-services > a, .bks-delivery-chip > summary { font-size: 13px; min-height: 48px; }
  .bks-product-intro { margin-top: 20px; font-size: 15px; }
  .bks-product-details { margin-top: 30px; }
  .bks-detail-panel > summary { padding: 18px 0; min-height: 62px; font-size: 18px; }
  .bks-detail-content { padding: 4px 0 24px; }
  .bks-spec-list > div { grid-template-columns: minmax(0, 36%) minmax(0, 1fr); }
  .bks-spec-list dt, .bks-spec-list dd { padding: 12px 10px; font-size: 15px; line-height: 1.85; }
  .bks-spec-list > .bks-spec-long { grid-template-columns: 1fr; }
  .bks-spec-long dt { padding-bottom: 8px; }
  .bks-review-compose > summary { max-width: none; width: 100%; }
  .bks-review-overview { display: block; }
  .bks-review-overview h2 { font-size: 20px; }
  .bks-product-rail { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x proximity; padding: 0 0 14px; scrollbar-width: thin; }
  .bks-product-rail > .bks-product-card { flex: 0 0 68%; min-width: 0; scroll-snap-align: start; }
  .bks-product-rail .price { font-size: 18px; }
  .bks-pdp-related .bks-section-heading h2 { font-size: 21px; }
  .bks-sticky-enabled { padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
  .bks-mobile-purchase:not([hidden]) { position: fixed; inset: auto 0 0; z-index: 1010; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 12px; align-items: center; background: #fff; border-top: 1px solid var(--bks-line); box-shadow: 0 -3px 18px #00000009; padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); }
  .bks-sticky-price { min-width: 0; }
  .bks-sticky-price > span { display: block; font-size: 12px; color: var(--bks-muted); line-height: 1.5; }
  .bks-sticky-price strong { font-size: 18px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
  .bks-sticky-price .woocommerce-Price-amount { white-space: nowrap; }
  .bks-mobile-purchase .bks-button { min-height: 50px; font-size: 15px; padding: 10px 8px; }
  .bks-dialog.bks-image-viewer { width: 100vw; height: 100dvh; }
  .bks-viewer-toolbar { padding-top: max(6px, env(safe-area-inset-top)); }
}
@media print {
  .bks-mobile-purchase, .bks-gallery-controls, .bks-gallery-thumbnails, .bks-image-viewer, .bks-pdp-purchase { display: none !important; }
  .bks-product-main { display: block; }
  .bks-gallery-track { overflow: visible; }
  .bks-gallery-slide { display: none; }
  .bks-gallery-slide:first-child { display: block; }
}
