/* REWAA PDP-01 — isolated product-page layout/visual corrections.
   All calculations, payments, delivery and user data remain in their existing services. */
html:has(.pdp1-page), body:has(.pdp1-page) { max-width:100%; overflow-x:clip; }
.p384-page.pdp1-page { width:100%; max-width:100%; min-width:0; overflow-x:clip; }
.pdp1-page *, .pdp1-page *::before, .pdp1-page *::after { box-sizing:border-box; }
.pdp1-page .container { min-width:0; }
.pdp1-page .product-hero-grid.container {
  display:grid !important;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr) !important;
  align-items:start; width:100%; min-width:0; max-width:var(--container,1320px);
  gap:clamp(16px,2.3vw,30px); margin-inline:auto;
  padding-inline:clamp(12px,2.2vw,32px);
}
.pdp1-page .product-hero-grid > .product-gallery,
.pdp1-page .product-hero-grid > .product-buy-panel,
.pdp1-page .product-hero-grid .product-title-block,
.pdp1-page .product-hero-grid .rw-p2a-heading {
  min-width:0 !important; max-width:100% !important; width:100%;
  box-sizing:border-box;
}
.pdp1-page .product-gallery { display:grid; grid-template-columns:minmax(0,1fr) 72px; align-items:start; gap:10px; }
.pdp1-page .p384-main { position:relative; width:100%; min-width:0; aspect-ratio:1 / 1; max-height: min(74vh,690px); overflow:hidden; border-radius:20px;
  background:#f4f8fd; border:1px solid #e5edf5; box-shadow:0 12px 30px -24px rgba(11,35,66,.55); }
.pdp1-page .p384-gallery .p384-main > img,
.pdp1-page .p384-gallery[data-fit="cover"] .p384-main > img {
  display:block; width:100%; height:100%; object-fit:contain !important; object-position:center;
  max-width:100%; max-height:100%; transform:none !important;
}
.pdp1-page .p384-main:hover > img.p384-loaded { transform:none !important; }
.pdp1-page .p384-thumbs { display:flex; flex-direction:column; gap:9px; max-height:min(74vh,690px); overflow-x:hidden; overflow-y:auto; min-width:0; }
.pdp1-page .p384-thumbs > .gallery-thumb { width:100%; flex:0 0 auto; aspect-ratio:1; border:1px solid #e0eaf5; border-radius:12px; overflow:hidden; }
.pdp1-page .p384-thumbs > .gallery-thumb img { width:100%; height:100%; object-fit:contain; background:#fff; }
.pdp1-page .p385a-gallery-badges { position:absolute; top:12px; right:12px; left:auto; max-width:calc(100% - 76px); z-index:5; align-items:flex-start; gap:6px; }
.pdp1-page .p385a-gallery-badges .badge { display:inline-flex; align-items:center; padding:6px 10px; min-height:27px; border:1px solid rgba(255,255,255,.75); border-radius:9px; font-size:11px; line-height:1.35; box-shadow:0 4px 12px rgba(11,32,62,.14); white-space:normal; }
.pdp1-page .p385a-gallery-badges .badge.danger { color:#fff; background:#c92433; font-weight:800; }
.pdp1-page .p385a-gallery-actions { position:absolute; top:12px; left:12px; right:auto; z-index:6; display:flex; flex-direction:column; align-items:center; gap:7px; }
.pdp1-page .p385a-gallery-actions > .round-action { width:40px; height:40px; display:grid; place-items:center; color:#153357; background:rgba(255,255,255,.97); border:1px solid #d8e5f2; border-radius:11px; box-shadow:0 5px 15px rgba(7,27,56,.12); }
.pdp1-page .p385a-gallery-actions > .wishlist-toggle[aria-pressed="true"],
.pdp1-page .p385a-gallery-actions > .wishlist-toggle.active { background:#fff0f3; color:#be2a52; border-color:#edabc0; }
.pdp1-page .p385a-gallery-actions > .compare-toggle[aria-pressed="true"],
.pdp1-page .p385a-gallery-actions > .compare-toggle.active { background:#eaf1ff; color:#16428c; border-color:#a7c1f2; }
.pdp1-page .pdp1-cart-chip { position:absolute; z-index:5; bottom:14px; right:12px; display:inline-flex; align-items:center; gap:5px; padding:8px 11px; border-radius:10px; background:#057655; color:#fff; font-size:11px; font-weight:800; box-shadow:0 5px 15px #06503740; }
.pdp1-page .pdp1-cart-chip[hidden] { display:none !important; }
.pdp1-page .p384-open { bottom:12px; left:12px; }
.pdp1-page .rw-p2a-heading { border-radius:17px; background:linear-gradient(125deg,#f3faf8 0%,#fff 64%,#f5f9ff 100%); padding:clamp(15px,2vw,23px); }
.pdp1-page .rw-p2a-heading .product-title-block h1 { font-size:clamp(22px,2.25vw,32px); line-height:1.48; }
.pdp1-page .p385a-availability { display:flex; flex-wrap:wrap; align-items:center; gap:8px; padding:10px 12px; min-height:0; }
.pdp1-page .p385a-availability > div { flex:1 1 170px; min-width:0; }
.pdp1-page .p385a-availability small { line-height:1.6; }
.pdp1-page .p385a-availability em { margin-inline-start:auto; border:1px solid #bbdfce; border-radius:999px; padding:4px 9px; background:#fff; white-space:nowrap; }
.pdp1-page .p385a-checkout-box { min-width:0; max-width:100%; }
.pdp1-page .p385a-order-grid { grid-template-columns:minmax(114px,.75fr) minmax(0,1.25fr); }
.pdp1-page .p385b-blocks > section { min-width:0; }
.pdp1-page .p385b-panel { border-radius:14px; padding:clamp(12px,1.5vw,17px); }
.pdp1-page .p385b-panel-head { margin-bottom:9px; }
.pdp1-page .p385b-panel-head strong { font-size:13px; }
.pdp1-page .p385b-panel-head small { font-size:10px; }
.pdp1-page .p385c-tab-panel { max-width:100%; min-width:0; overflow-wrap:anywhere; }
.pdp1-page .p385c-specs { gap:9px; }
.pdp1-page .p385c-specs > div { min-width:0; border-radius:10px; }
.pdp1-page .p385c-feature-grid > div { min-width:0; }
/* Customer reviews and questions should not overwhelm the page before writing. */
.pdp1-page .p385-feedback { min-width:0; }
.pdp1-page .p385-feedback-heading h2 { font-size:clamp(19px,2.1vw,27px); }
.pdp1-page .p385d-heading h2, .pdp1-page .p385e-section-heading h3 { font-size:clamp(18px,1.8vw,25px); }
.pdp1-page .p385d-overview { grid-template-columns:minmax(0,1fr) minmax(180px,245px); gap:12px; }
.pdp1-page .p385d-score { min-height:165px; padding:15px; border-radius:15px; gap:6px; }
.pdp1-page .p385d-score strong { font-size:clamp(33px,4vw,52px); }
.pdp1-page .p385d-summary-pills { padding-top:8px; margin-top:0; }
.pdp1-page .p385d-distribution { padding:15px 18px; border-radius:15px; gap:9px; }
.pdp1-page .p385d-hist-track { height:7px; }
.pdp1-page .p385d-review-card { padding:15px; }
.pdp1-page .p385e-questions { margin-block:18px 28px; }
.pdp1-page .p385e-question-card, .pdp1-page .p385e-no-questions { padding:15px; border-radius:15px; }
.pdp1-page .p385e-no-questions { gap:3px; }
.pdp1-page .pdp1-compose { border-radius:15px; margin-top:14px; padding:0; min-width:0; overflow:hidden; scroll-margin-top:105px; }
.pdp1-page .pdp1-compose-trigger { list-style:none; cursor:pointer; display:flex; align-items:center; gap:9px; color:#183c6c; font-weight:800; font-size:13px; padding:13px 16px; background:#f5f9ff; }
.pdp1-page .pdp1-compose-trigger::-webkit-details-marker { display:none; }
.pdp1-page .pdp1-compose-trigger > span { margin-inline-start:auto; color:#65829f; font-weight:500; font-size:11px; }
.pdp1-page .pdp1-compose-trigger::after { content:'+'; font-size:19px; line-height:1; margin-inline-start:4px; color:#2a5b9f; }
.pdp1-page .pdp1-compose[open] > .pdp1-compose-trigger::after { content:'−'; }
.pdp1-page .pdp1-compose[open] > .pdp1-compose-trigger { background:#eaf3ff; }
.pdp1-page .pdp1-compose > :not(summary) { margin-inline:16px; }
.pdp1-page .pdp1-compose > form { padding-bottom:16px; }
.pdp1-page .p385d-rating-stars span[aria-hidden="true"] { display:inline-block; }
.pdp1-page .p385d-rating-stars .sr-only { position:absolute !important; width:1px !important; height:1px !important; padding:0 !important; margin:-1px !important; border:0 !important; overflow:hidden !important; clip:rect(0,0,0,0) !important; white-space:nowrap !important; clip-path:inset(50%) !important; }
.pdp1-page .p385d-rating-stars label { display:inline-flex; align-items:center; justify-content:center; min-width:36px; min-height:42px; }
@media (max-width:850px) {
  .pdp1-page .product-hero-grid.container { grid-template-columns:minmax(0,1fr) !important; gap:16px; }
  .pdp1-page .product-hero-grid > .product-gallery, .pdp1-page .product-hero-grid > .product-buy-panel { grid-column:1; width:100%; max-width:100%; margin-inline:0; }
  .pdp1-page .product-gallery { position:static; grid-template-columns:minmax(0,1fr); }
  .pdp1-page .p384-main { grid-column:1; grid-row:1; aspect-ratio:1 / 1; max-height:none; }
  .pdp1-page .p384-thumbs { grid-column:1; grid-row:2; flex-direction:row; max-height:none; width:100%; overflow-x:auto; overflow-y:hidden; padding:4px 2px 7px; }
  .pdp1-page .p384-thumbs > .gallery-thumb { width:66px; flex:0 0 66px; }
}
@media (max-width:540px) {
  .pdp1-page .product-hero-grid.container { width:100%; padding-inline:12px; gap:13px; }
  .pdp1-page .p384-main { border-radius:15px; }
  .pdp1-page .p385a-gallery-badges { top:9px; right:9px; max-width:calc(100% - 65px); }
  .pdp1-page .p385a-gallery-badges .badge { padding:5px 7px; min-height:23px; font-size:9.5px; }
  .pdp1-page .p385a-gallery-actions { top:9px; left:9px; gap:5px; }
  .pdp1-page .p385a-gallery-actions > .round-action { width:34px; height:34px; border-radius:9px; }
  .pdp1-page .pdp1-cart-chip { bottom:9px; right:9px; padding:6px 8px; font-size:10px; }
  .pdp1-page .rw-p2a-heading { padding:14px; border-radius:14px; }
  .pdp1-page .p385a-order-grid { grid-template-columns:minmax(110px,.78fr) minmax(0,1.22fr); gap:8px; }
  .pdp1-page .p385d-overview { grid-template-columns:minmax(0,1fr); }
  .pdp1-page .p385d-score, .pdp1-page .p385d-distribution { grid-column:1; grid-row:auto; }
  .pdp1-page .p385d-score { min-height:135px; }
  .pdp1-page .p385d-distribution { padding:12px; }
  .pdp1-page .pdp1-compose-trigger { padding:11px 12px; font-size:12px; }
  .pdp1-page .pdp1-compose-trigger > span { display:none; }
  .pdp1-page .pdp1-compose > :not(summary) { margin-inline:12px; }
  .pdp1-page .p385c-tab-panel { padding:14px; }
  .pdp1-page .p385e-question-line h4 { font-size:14px; }
}
@media(prefers-reduced-motion:reduce) {
  .pdp1-page .p384-main > img { transition:none !important; }
}
