/* MyPowerDrops Compact Product Pages v1.0.0
 * Product pages only; no changes to Elementor template data or width plugin.
 */
body.single-product { --mpd-compact-gap: 18px; }

/* Keep working page-width plugin in full control; guard flexible content. */
body.single-product :is(.elementor-location-single, .elementor[data-elementor-type="single-product"], .woocommerce div.product) { min-width:0; }
body.single-product :is(.elementor-widget-woocommerce-product-images, .elementor-widget-woocommerce-product-add-to-cart, .elementor-widget-woocommerce-product-price, .elementor-widget-woocommerce-product-title, .elementor-widget-woocommerce-product-short-description, .mpd-ap-player) { min-width:0!important; max-width:100%!important; box-sizing:border-box; }

/* Images keep their full content but take less space. */
body.single-product .elementor-widget-woocommerce-product-images,
body.single-product .woocommerce div.product div.images { max-width:440px!important; }
body.single-product .woocommerce div.product div.images img,
body.single-product .elementor-widget-woocommerce-product-images .woocommerce-product-gallery__image img,
body.single-product .woocommerce-product-gallery__wrapper img {
  display:block; max-width:100%!important; max-height:var(--mpd-compact-image-height,340px)!important;
  width:auto!important; height:auto!important; object-fit:contain;
  margin-inline:auto;
}
body.single-product .woocommerce div.product div.images,
body.single-product .elementor-widget-woocommerce-product-images { margin-block:0 12px!important; }
body.single-product .flex-control-thumbs { display:flex; flex-wrap:wrap; gap:7px; justify-content:center; margin-top:6px!important; }
body.single-product .flex-control-thumbs li { max-width:64px; }

/* Stronger information hierarchy with less whitespace. */
body.single-product .elementor-widget-woocommerce-product-title h1,
body.single-product h1.product_title,
body.single-product .product_title { font-size:clamp(22px,2.3vw,30px)!important; line-height:1.17!important; margin:0 0 8px!important; letter-spacing:-.015em; }
body.single-product :is(.elementor-widget-woocommerce-product-price, .elementor-widget-woocommerce-product-price) .price,
body.single-product .woocommerce div.product p.price { font-size:clamp(20px,2vw,26px)!important; line-height:1.3!important; font-weight:800; margin:3px 0 9px!important; }
body.single-product .elementor-location-single .elementor-widget-woocommerce-product-title,
body.single-product .elementor-location-single .elementor-widget-woocommerce-product-price,
body.single-product .elementor-location-single .elementor-widget-woocommerce-product-short-description,
body.single-product .elementor-location-single .elementor-widget-woocommerce-product-add-to-cart { margin-bottom:10px!important; }
body.single-product .woocommerce div.product .summary { margin-bottom:18px!important; }
body.single-product .woocommerce div.product .summary > * { margin-top:0; }
body.single-product .woocommerce-breadcrumb { font-size:12px!important; margin:0 0 10px!important; opacity:.75; }

/* Demo remains fully functional: only change exterior spacing, not audio controls. */
body.single-product .mpd-ap-player { margin:10px 0 16px!important; padding:13px 15px!important; border-radius:13px!important; }
body.single-product .mpd-ap-player .mpd-ap-title { margin:4px 0 8px!important; font-size:15px!important; }
body.single-product .mpd-ap-player .mpd-ap-status { font-size:11px; margin-top:6px; }

/* Simple, obvious order form. No hidden required fields. */
body.single-product form.cart { max-width:100%!important; margin:10px 0 18px!important; }
body.single-product form.cart h3 { font-size:18px!important; line-height:1.3!important; margin:0 0 5px!important; }
body.single-product form.cart h3 + p { font-size:13px!important; margin:0 0 12px!important; line-height:1.45; opacity:.85; }
body.single-product form.cart p { margin:0 0 11px!important; }
body.single-product form.cart p label { display:block; font-size:13px!important; font-weight:700; margin:0 0 5px!important; }
body.single-product form.cart input[type="text"],
body.single-product form.cart textarea {
  width:100%!important; box-sizing:border-box; max-width:100%!important;
  min-height:43px!important; font-size:15px!important; line-height:1.4!important;
  padding:10px 12px!important; border:1px solid #b5c4d9!important; border-radius:8px!important;
}
body.single-product form.cart textarea { min-height:80px!important; resize:vertical; }
body.single-product form.cart input:focus-visible,
body.single-product form.cart textarea:focus-visible { outline:2px solid #2376ce!important; outline-offset:1px; }
body.single-product form.cart .quantity { margin-right:10px!important; }
body.single-product form.cart .single_add_to_cart_button { padding:13px 20px!important; min-height:47px!important; border-radius:9px!important; font-size:15px!important; font-weight:800!important; max-width:100%; white-space:normal!important; line-height:1.35!important; }
body.single-product .product_meta { font-size:12px; opacity:.83; margin-top:12px!important; }
body.single-product .product_meta .sku_wrapper { display:none; }

/* Optional fields remain inside the original form, with names unchanged. */
body.single-product .mpd-cp-optional { border:1px solid #bac8db; border-radius:10px; margin:9px 0 14px; overflow:hidden; background:rgba(123,150,188,.045); }
body.single-product .mpd-cp-optional > summary { padding:13px 14px; cursor:pointer; font-size:13px; font-weight:700; line-height:1.4; list-style:none; display:flex; align-items:center; justify-content:space-between; gap:10px; }
body.single-product .mpd-cp-optional > summary::after { content:'+'; font-size:21px; font-weight:400; line-height:.8; opacity:.8; }
body.single-product .mpd-cp-optional[open] > summary::after { content:'−'; }
body.single-product .mpd-cp-optional > summary::-webkit-details-marker { display:none; }
body.single-product .mpd-cp-optional > .mpd-cp-optional-content { padding:0 14px 6px; }
body.single-product .mpd-cp-optional > summary:focus-visible { outline:2px solid #227ac9; outline-offset:-2px; }

/* Shorten long descriptions while retaining full content on demand. */
body.single-product .mpd-cp-description-collapsed { max-height:140px!important; overflow:hidden!important; position:relative; }
body.single-product .mpd-cp-description-collapsed:not(.mpd-cp-expanded)::after { content:""; pointer-events:none; position:absolute; inset:auto 0 0; height:45px; background:linear-gradient(transparent,rgba(255,255,255,.9)); }
body.single-product .mpd-cp-description-collapsed.mpd-cp-expanded { max-height:none!important; overflow:visible!important; }
body.single-product .mpd-cp-desc-toggle { display:inline-flex; background:transparent; border:0; padding:6px 0; font-weight:750; font-size:13px; color:inherit; text-decoration:underline; cursor:pointer; }
body.single-product .mpd-cp-desc-toggle:focus-visible { outline:2px solid #227ac9; outline-offset:3px; }
body.single-product .woocommerce-tabs { margin-top:20px!important; }
body.single-product .woocommerce-tabs .panel { margin-bottom:18px!important; }
body.single-product .related.products { margin:28px 0 15px!important; }
body.single-product .related.products > h2 { font-size:21px!important; margin:0 0 12px!important; }

/* Only when JS can prove separate image and purchase columns share a parent. */
@media(min-width:900px) {
  body.single-product .e-con.mpd-cp-safe-two-column { display:grid!important; grid-template-columns:minmax(0, 0.82fr) minmax(0,1.18fr)!important; gap:22px!important; align-items:start!important; }
  body.single-product .e-con.mpd-cp-safe-two-column > .mpd-cp-left,
  body.single-product .e-con.mpd-cp-safe-two-column > .mpd-cp-right { min-width:0!important; max-width:100%!important; width:100%!important; }
}
@media (max-width:899px) { body.single-product .e-con.mpd-cp-safe-two-column { display:flex!important; flex-direction:column!important; gap:12px!important; } }
@media(max-width:600px) {
  body.single-product .woocommerce div.product div.images img,
  body.single-product .woocommerce-product-gallery__wrapper img { max-height:min(290px, var(--mpd-compact-image-height,340px))!important; }
  body.single-product .mpd-ap-player { padding:11px 12px!important; }
  body.single-product .elementor-widget-woocommerce-product-title h1, body.single-product .product_title { font-size:23px!important; }
  body.single-product form.cart .single_add_to_cart_button { width:100%!important; }
}
@media (prefers-reduced-motion:reduce) { body.single-product .mpd-cp-optional,body.single-product .mpd-cp-desc-toggle { transition:none!important; } }
