.product-detail {
  --product-pad-x: 20px;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 24px var(--product-pad-x) 80px;
  width: 100%;
  box-sizing: border-box;
  overflow-x: clip;
}

/* store-light sets main { padding:0; margin:0 } — restore product inset + centering */
.store-light main.product-detail:not(.catalog) {
  margin-left: auto !important;
  margin-right: auto !important;
  margin-top: 0 !important;
  padding: 24px var(--product-pad-x) 80px !important;
}
.breadcrumb {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 13px; color: var(--dim); margin-bottom: 28px;
  /* neutralize style.css .breadcrumb { padding: 100px 20px 0 } — main already pads */
  padding: 0;
  max-width: none;
}
.breadcrumb a { color: var(--dim); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb-current { color: var(--white); }

.product-layout {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px;
  align-items: start;
  width: 100%;
  min-width: 0;
}

.product-gallery {
  display: flex; flex-direction: column; gap: 16px;
  position: sticky; top: 88px;
  min-width: 0;
}
.gallery-main {
  background: #fff; border-radius: var(--r-md);
  border: 1px solid var(--surface-border);
  overflow: hidden; aspect-ratio: 1/1;
  display: flex; align-items: center; justify-content: center;
}
.gallery-main img {
  max-width: 88%; max-height: 88%; object-fit: contain;
  transition: transform .3s var(--ease);
}
.gallery-thumbs {
  display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none;
}
.gallery-thumbs::-webkit-scrollbar { display: none; }
.gallery-thumb {
  width: 72px; height: 72px; border-radius: 10px; flex-shrink: 0;
  background: #fff; border: 1px solid var(--surface-border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; overflow: hidden;
  transition: border-color .2s, transform .2s;
}
.gallery-thumb:hover, .gallery-thumb.active { border-color: var(--accent); }
.gallery-thumb img { max-width: 80%; max-height: 80%; object-fit: contain; }

.product-info {
  display: flex; flex-direction: column; gap: 16px;
  min-width: 0;
  width: 100%;
}
.product-brand {
  font-size: 12px; font-weight: 600; color: var(--accent);
  text-transform: uppercase; letter-spacing: .06em;
}
.product-name {
  font-size: 32px; font-weight: 600; line-height: 1.15; color: var(--white);
  overflow-wrap: anywhere;
}
.product-price {
  font-size: 28px; font-weight: 600; color: var(--accent);
}
.product-stock {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; width: fit-content;
  padding: 6px 12px; border-radius: 100px;
}
.product-stock.in_stock { background: rgba(34,197,94,0.12); color: #16a34a; }
.product-stock.out_of_stock { background: rgba(234,179,8,0.12); color: #ca8a04; }
.product-shortdesc {
  font-size: 15px; color: var(--muted); line-height: 1.6;
}
.product-actions {
  display: flex; gap: 12px; margin-top: 8px; flex-wrap: wrap;
}
.btn-lg { padding: 14px 28px; font-size: 15px; border-radius: 100px; font-weight: 600; }
.btn-outline {
  padding: 12px 28px; border-radius: var(--r-btn); font-weight: 600; font-size: 14px;
  border: 1px solid var(--surface-border); color: var(--white); background: var(--surface);
  transition: all .25s var(--ease); display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-whatsapp {
  background: #25D366; color: #fff; text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
  transition: all .25s var(--ease);
}
.btn-whatsapp:hover { background: #1ebe5d; transform: translateY(-1px); }

.product-meta {
  margin-top: 12px; padding-top: 20px; border-top: 1px solid var(--surface-border);
  display: flex; flex-direction: column; gap: 10px;
  min-width: 0;
}
.product-meta div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 12px;
  align-items: start;
  font-size: 14px;
  min-width: 0;
}
.product-meta span { color: var(--dim); }
.product-meta strong {
  color: var(--white);
  font-weight: 500;
  text-align: right;
  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 0;
}

/* Light theme text contrast on product page */
.store-light .product-name,
.store-light .product-meta strong,
.store-light .product-description > h2,
.store-light .related-products h2,
.store-light .description-body h1,
.store-light .description-body h2,
.store-light .description-body h3,
.store-light .description-body h4,
.store-light .description-body h5,
.store-light .description-body h6,
.store-light .description-body strong,
.store-light .related-card .rc-name {
  color: #14120f;
}
.store-light .product-shortdesc,
.store-light .description-body,
.store-light .breadcrumb,
.store-light .breadcrumb a,
.store-light .product-meta span {
  color: #5c574e;
}
.store-light .breadcrumb-current { color: #14120f; }
.store-light .qty-stepper {
  background: #f5f5f7;
  border-color: rgba(0,0,0,0.08);
}
.store-light .qty-stepper button,
.store-light .qty-stepper span {
  color: #14120f;
}
.store-light .btn-outline {
  background: #fff;
  border-color: rgba(0,0,0,0.1);
  color: #14120f;
}

.product-description {
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid var(--surface-border);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: clip;
}
.product-description h2 {
  font-size: 22px; font-weight: 600; color: var(--white); margin-bottom: 18px;
  font-family: var(--font-heading);
}
.description-body {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.7;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-wrap: anywhere;
  word-break: break-word;
  -webkit-overflow-scrolling: touch;
  text-align: left;
  direction: ltr;
}
.description-body p { margin-bottom: 14px; max-width: 100%; }
.description-body ul,
.description-body ol { margin: 14px 0; padding-left: 1.25em; max-width: 100%; }
.description-body li { margin-bottom: 8px; }
.description-body strong { color: var(--white); font-weight: 600; }
.description-body a { color: var(--accent); word-break: break-all; }

/* Rich HTML description styles (from scraped 3dware content) */
.description-body h1,
.description-body h2,
.description-body h3,
.description-body h4,
.description-body h5,
.description-body h6 {
  color: var(--white);
  font-weight: 600;
  margin: 20px 0 10px;
  font-family: var(--font-heading);
  line-height: 1.25;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.description-body h1 { font-size: 1.35rem; }
.description-body h2 { font-size: 1.2rem; }
.description-body h3 { font-size: 1.1rem; }
.description-body h4,
.description-body h5,
.description-body h6 { font-size: 1rem; }

.description-body img,
.description-body video,
.description-body iframe,
.description-body embed,
.description-body object,
.description-body svg {
  max-width: 100% !important;
  width: auto !important;
  height: auto !important;
  border-radius: var(--r-sm);
  display: block;
  margin: 14px auto;
  background: #fff;
  box-sizing: border-box;
}
.description-body img {
  padding: 6px;
  object-fit: contain;
}

/* Force scraped vendor markup to stay inside the viewport */
.description-body *,
.description-body *::before,
.description-body *::after {
  box-sizing: border-box;
  max-width: 100% !important;
}
.description-body table {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto;
  border-collapse: collapse;
  -webkit-overflow-scrolling: touch;
}
.description-body td,
.description-body th {
  word-break: break-word;
  padding: 6px 8px;
  font-size: inherit;
}
.description-body pre,
.description-body code {
  white-space: pre-wrap;
  word-break: break-word;
  max-width: 100%;
}
.description-body [style*="width"],
.description-body [width] {
  width: auto !important;
  max-width: 100% !important;
}
.description-body [style*="min-width"] {
  min-width: 0 !important;
}
.description-body [style*="height"] img,
.description-body img[height] {
  height: auto !important;
}
.description-body .row,
.description-body .col,
.description-body .col-md-6,
.description-body .col-md-12,
.description-body .col-sm-6,
.description-body .col-lg-6,
.description-body .container,
.description-body .container-fluid,
.description-body .wp-block-columns,
.description-body .wp-block-column,
.description-body .elementor-section,
.description-body .elementor-container,
.description-body .elementor-row,
.description-body .elementor-column,
.description-body .elementor-widget-wrap,
.description-body .detailmodule_html,
.description-body .detail-desc-decorate-richtext,
.description-body #detail_decorate_root,
.description-body .aplus-module,
.description-body .a-section,
.description-body .premium-aplus,
.description-body .tt-layout-box01,
.description-body .layout-box01-wrapper {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  flex: none !important;
  grid-template-columns: 1fr !important;
}
.description-body .wp-block-columns,
.description-body .elementor-container,
.description-body .elementor-row {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px;
}
.description-body iframe {
  aspect-ratio: 16 / 9;
  width: 100% !important;
  height: auto !important;
  min-height: 180px;
  border: 0;
}

.description-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  gap: 12px;
  margin-top: 20px;
  width: 100%;
}
.desc-gallery-item {
  background: #fff;
  border: 1px solid var(--surface-border);
  border-radius: var(--r-sm);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4/3;
  padding: 10px;
  min-width: 0;
}
.desc-gallery-item img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

@media (max-width: 768px) {
  .product-description {
    margin-top: 24px;
    padding-top: 16px;
  }
  .product-description > h2 {
    font-size: 17px;
    margin-bottom: 10px;
  }
  .description-body {
    font-size: 13.5px;
    line-height: 1.55;
  }
  .description-body h1 { font-size: 1.15rem; }
  .description-body h2 { font-size: 1.05rem; margin: 14px 0 8px; }
  .description-body h3 { font-size: 1rem; margin: 12px 0 6px; }
  .description-body h4,
  .description-body h5,
  .description-body h6 { font-size: 0.95rem; }
  .description-body p { margin-bottom: 10px; }
  .description-body ul,
  .description-body ol { margin: 10px 0; padding-left: 1.1em; }
  .description-body img,
  .description-body video {
    margin: 10px auto;
    padding: 4px;
    border-radius: 10px;
  }
  .description-body table {
    font-size: 12px;
  }
  .description-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 14px;
  }
  .desc-gallery-item {
    padding: 6px;
    border-radius: 10px;
  }
}

@media (max-width: 480px) {
  .description-body {
    font-size: 13px;
  }
  .description-gallery {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  .description-body img {
    border-radius: 8px;
  }
}

/* Print-for-you band on product page (reuses .home-service styles) */
.product-detail .product-service.home-service {
  max-width: none;
  width: 100%;
  margin: 40px 0 0;
  padding: 0;
}
.product-detail .product-service .home-service-card {
  border-radius: 20px;
}
.store-light .product-detail .product-service .home-service-text h2 {
  color: #fff;
}
.store-light .product-detail .product-service .home-service-text p {
  color: rgba(255, 255, 255, 0.68);
}
.store-light .product-detail .product-service .clean-btn-ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.22);
}

.related-products {
  margin-top: 60px;
}
.related-products h2 {
  font-size: 22px; font-weight: 600; color: var(--white); margin-bottom: 18px;
}
.related-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.related-card {
  background: var(--surface); border: 1px solid var(--surface-border);
  border-radius: var(--r-md); overflow: hidden; text-decoration: none;
  transition: all .25s var(--ease);
}
.related-card:hover { border-color: rgba(232,106,18,0.4); transform: translateY(-4px); }
.related-card .rc-img {
  height: 180px; background: #fff; display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.related-card .rc-img img { max-width: 86%; max-height: 86%; object-fit: contain; }
.related-card .rc-body { padding: 14px; }
.related-card .rc-brand { font-size: 11px; color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.related-card .rc-name { font-size: 14px; font-weight: 500; color: var(--white); margin-top: 4px; line-height: 1.3; }
.related-card .rc-price { font-size: 16px; font-weight: 600; color: var(--accent); margin-top: 8px; }

@media (max-width: 1024px) {
  .product-layout { grid-template-columns: 1fr; gap: 16px; }
  .product-gallery { position: static; }
  .related-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
}
@media (max-width: 768px) {
  .product-detail .product-service.home-service {
    margin-top: 28px;
  }
  .product-detail,
  .store-light main.product-detail:not(.catalog) {
    --product-pad-x: 12px;
    padding: 12px var(--product-pad-x) 40px !important;
    overflow-x: clip;
  }
  .breadcrumb { font-size: 11px; margin-bottom: 10px; gap: 4px; flex-wrap: wrap; }
  .product-info { gap: 10px; }
  .product-name { font-size: 22px; line-height: 1.15; }
  .product-price { font-size: 20px; }
  .product-brand { font-size: 11px; }
  .product-shortdesc { font-size: 13px; line-height: 1.45; }
  .product-stock { font-size: 12px; padding: 4px 10px; }
  .product-actions {
    position: static;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 8px;
    margin-top: 8px;
    width: 100%;
  }
  .btn-lg {
    width: 100%;
    justify-content: center;
    height: 44px !important;
    font-size: 14px;
    padding: 10px 16px;
  }
  .product-meta { margin-top: 8px; padding-top: 12px; gap: 8px; }
  .product-meta div {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 8px;
    font-size: 12px;
  }
  .product-meta strong { text-align: left; }
  .gallery-main {
    border-radius: 14px;
    max-height: min(58vw, 320px);
    aspect-ratio: 1/1;
    width: 100%;
  }
  .gallery-thumbs { gap: 6px; }
  .gallery-thumb { width: 48px; height: 48px; border-radius: 8px; }
  .related-products { margin-top: 24px; }
  .related-products h2 { font-size: 18px; margin-bottom: 10px; }
  .related-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .related-card .rc-img { height: 110px; padding: 10px; }
  .related-card .rc-body { padding: 8px 10px 10px; }
  .related-card .rc-name { font-size: 12px; }
  .related-card .rc-price { font-size: 13px; margin-top: 4px; }
  .qty-stepper {
    width: 100%;
    height: 42px;
    justify-content: space-between;
  }
}
@media (max-width: 480px) {
  .product-detail { padding: 10px 10px 36px; }
  .product-name { font-size: 20px; }
  .product-price { font-size: 18px; }
  .gallery-main { max-height: min(70vw, 280px); }
  .related-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .related-card .rc-img { height: 96px; }
}

/* Quantity stepper on product detail page */
.qty-stepper {
  display: flex;
  align-items: center;
  border: 1px solid var(--surface-border);
  border-radius: 100px;
  background: var(--surface);
  overflow: hidden;
  height: 48px;
  box-sizing: border-box;
  flex-shrink: 0;
}
.qty-stepper button {
  width: 38px;
  height: 100%;
  background: none;
  border: none;
  color: var(--white);
  font-size: 18px;
  cursor: pointer;
  transition: background .2s;
  outline: none;
  display: flex; align-items: center; justify-content: center;
}
.qty-stepper button:hover {
  background: var(--surface-border);
}
.qty-stepper span {
  min-width: 36px;
  text-align: center;
  font-weight: 600;
  font-size: 15px;
  color: var(--white);
}

@media (max-width: 768px) {
  .qty-stepper button {
    width: 44px;
  }
  .qty-stepper span {
    min-width: 28px;
    font-size: 14px;
  }
}
