/* Single product: the product in the window of a haunted house */

.dw-product { position: relative; z-index: 1; padding: clamp(1.2rem, 3vw, 2.4rem) 0 2rem; }   /* gap under the header (this is also where add-to-cart notices appear) */
.dw-product > .dw-container:first-child:empty { display: none; }
.dw-product .woocommerce-notices-wrapper { margin: 0 0 clamp(1rem, 2.5vw, 1.8rem); }
.dw-product .woocommerce-message, .dw-product .woocommerce-info, .dw-product .woocommerce-error { margin: 0 0 .8rem !important; }
.dw-product__layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(420px, 42%); gap: 0; align-items: stretch;
  width: min(1560px, 100%); margin: 0 auto; }   /* the sign needs room: 42% of the row, min 420px */

/* ---------- the window ---------- */
.dw-window { position: relative; isolation: isolate; min-width: 0; height: clamp(540px, 52vw, 760px); overflow: hidden; background: #050810; }   /* fixed height; the scene covers and product.js maps the pane */
.dw-window__scene, .dw-window__scene img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
/* pane geometry, as % of the desktop scene: x 26–72%, y 22–71% (above the pumpkins on the sill) */
.dw-window__pane { position: absolute; left: 27%; top: 23%; width: 45%; height: 48%; }   /* refined in px by product.js from the scene's rendered box */
.dw-window__glow { position: absolute; inset: -6% -10% -14%; pointer-events: none; z-index: 0;
  background: radial-gradient(60% 60% at 50% 100%, rgba(255, 150, 40, .32), transparent 70%); }
.dw-window__product { position: absolute; inset: 0; width: 100% !important; height: 100% !important; max-width: none !important; object-fit: contain; object-position: center bottom; z-index: 1;
  opacity: 0; transform: translateY(10px) scale(.98); transition: opacity .6s ease, transform .6s ease;
  filter: drop-shadow(0 10px 24px rgba(0,0,0,.8)) brightness(.96); }
.dw-window__product.is-active { opacity: 1; transform: none; }
.dw-window__glass { position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background:
    linear-gradient(115deg, rgba(180, 200, 255, .14) 0%, rgba(180, 200, 255, .03) 35%, transparent 50%, rgba(255,255,255,.05) 70%, transparent 80%),
    radial-gradient(120% 90% at 50% 120%, transparent 55%, rgba(0, 0, 0, .35) 100%); }
.dw-window__thumbs { position: absolute; left: 50%; bottom: 3%; transform: translateX(-50%); z-index: 3; display: flex; gap: .6rem; list-style: none; margin: 0; padding: .4rem;
  background: rgba(5, 4, 10, .55); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; backdrop-filter: blur(6px); }
.dw-window__thumb { width: 56px; height: 56px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: #000; cursor: pointer; opacity: .65; transition: opacity .2s, border-color .2s, transform .2s; }
.dw-window__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dw-window__thumb:hover, .dw-window__thumb.is-active { opacity: 1; border-color: var(--dw-orange); transform: translateY(-2px); }

/* ---------- the sign ---------- */
.dw-sign { display: flex; align-items: center; padding: clamp(1.5rem, 3vw, 3rem) clamp(1.2rem, 3vw, 2.6rem);
  background: linear-gradient(180deg, #17120f 0%, #0d0a08 100%); border-left: 1px solid rgba(255, 255, 255, .06); position: relative; }
.dw-sign::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .35;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.02) 0 2px, transparent 2px 9px); }   /* faint wood grain */
.dw-sign__inner { position: relative; width: 100%; }
/* the panel also carries WooCommerce's .summary class, and Woo core sets div.summary { float: right; width: 48% } */
.woocommerce div.product .dw-sign__inner, .dw-sign .dw-sign__inner.summary, .dw-sign__inner.summary.entry-summary {
  width: 100% !important; max-width: none !important; float: none !important; clear: none !important; margin: 0 !important; }
.dw-sign .dw-crumbs { margin-bottom: 1rem; }
.dw-sign .product_title { font-size: clamp(2rem, 3.4vw, 3rem); margin: 0 0 .4rem; }
.dw-sign .price { font-size: 1.5rem !important; margin: 0 0 1rem !important; }
.dw-sign .woocommerce-product-details__short-description { color: var(--dw-muted); line-height: 1.6; }
.dw-sign form.cart { margin: 1.2rem 0 !important; }
.dw-sign form.cart .variations td.value select { max-width: none; }
.dw-sign form.cart .single_variation_wrap .woocommerce-variation-price { margin-bottom: .6rem; }
.dw-sign form.cart .single_add_to_cart_button { justify-content: center; min-height: 54px; font-size: 1rem !important; }
.dw-sign form.cart div.quantity { margin: 0 !important; }

/* desktop: quantity and Add to cauldron on one line (variable products put them in .woocommerce-variation-add-to-cart) */
/* the width chain: form → single_variation_wrap → woocommerce-variation → the add-to-cart row */
  .dw-sign form.cart, .dw-sign form.cart > .single_variation_wrap, .dw-sign .woocommerce-variation,
  .dw-sign .woocommerce-variation-add-to-cart { width: 100% !important; max-width: none !important; box-sizing: border-box; }
  .dw-sign form.cart { display: flex !important; flex-wrap: wrap; align-items: stretch; gap: .8rem; }
  .dw-sign form.cart > .variations, .dw-sign form.cart > .single_variation_wrap, .dw-sign form.cart > .dw-trust { flex: 1 1 100%; }
  .dw-sign .woocommerce-variation-add-to-cart { display: flex !important; flex-wrap: wrap !important; align-items: stretch; gap: .8rem; }   /* wraps only when the button's text would not fit */
  .dw-sign form.cart div.quantity { flex: 0 0 auto !important; display: block !important; margin: 0 !important; }
  .dw-sign form.cart div.quantity .qty { height: 56px !important; min-height: 56px !important; width: 96px !important; text-align: center; font-size: 1.05rem; }
  .dw-sign form.cart .single_add_to_cart_button { flex: 1 1 auto !important; width: auto !important; margin: 0 !important; height: 56px !important; min-height: 56px !important;
    white-space: nowrap !important; min-width: max-content !important; }   /* keeps the label on one line; if it can't fit beside the qty it drops to the next line and fills it */
  .dw-sign form.cart .woocommerce-variation-price { flex: 1 1 100%; margin: 0 0 .2rem !important; }
  .dw-sign form.cart .apple-pay-button, .dw-sign form.cart .wc-square-wallet-buttons { flex: 1 1 100%; }
@media (max-width: 860px) {
  /* phones: same single row, just tighter so the label still fits beside the qty */
  .dw-sign .woocommerce-variation-add-to-cart { gap: .5rem; }
  .dw-sign form.cart div.quantity .qty { width: 68px !important; height: 52px !important; min-height: 52px !important; font-size: 1rem; }
  .dw-sign form.cart .single_add_to_cart_button { height: 52px !important; min-height: 52px !important; padding-left: .9em !important; padding-right: .9em !important;
    font-size: .92rem !important; letter-spacing: .02em !important; }
}
@media (max-width: 380px) {
  .dw-sign form.cart div.quantity .qty { width: 58px !important; }
  .dw-sign form.cart .single_add_to_cart_button { font-size: .84rem !important; padding-left: .6em !important; padding-right: .6em !important; }
}
.dw-sign .product_meta { border-top: 1px solid rgba(255,255,255,.08); padding-top: .8rem; }
.dw-trust--sign { margin: 1.2rem 0 0; padding: .6rem .8rem; justify-content: flex-start; font-size: .8rem; }

/* below: tabs + related keep the dark skin, just centred */
.dw-product__below { padding-top: clamp(2rem, 4vw, 3.5rem); }
.dw-product .woocommerce-tabs { max-width: none; margin: 0 0 2rem; }
.dw-product .woocommerce-tabs .panel { max-width: 70ch; }                     /* comfortable reading measure, left aligned */
.dw-product .woocommerce-tabs ul.tabs { text-align: left !important; }
.dw-product__below { text-align: left; }
.dw-product__below .related > h2, .dw-product__below .upsells > h2 { text-align: left; }

/* parent theme bits we don't want on this page */
.dw-product .donut-back-btn { display: none; }
.dw-product .woocommerce-product-gallery, .dw-product .onsale { display: none !important; }


@media (max-width: 1100px) {
  .dw-product__layout { grid-template-columns: minmax(0, 1fr) minmax(300px, .8fr); }
}
@media (max-width: 820px) {
  .dw-product__layout { grid-template-columns: 1fr; }
  .dw-window { height: min(150vw, 88svh); }
  /* pane geometry for the portrait scene (sash window): both panes, above the pumpkins on the sill */
  .dw-window__pane { left: 25%; top: 17%; width: 51%; height: 50%; }
  .dw-window__thumbs { bottom: 2%; }
  .dw-window__thumb { width: 46px; height: 46px; }
  .dw-sign { border-left: 0; border-top: 1px solid rgba(255,255,255,.08); }
}

/* tabs as a clean row (parent theme leaves them as a bulleted list on small screens) */
.dw-product .woocommerce-tabs ul.tabs { display: flex !important; flex-wrap: wrap; gap: .2rem 1.4rem; list-style: none !important; margin: 0 0 1rem !important; padding: 0 0 .4rem !important; border-bottom: 1px solid rgba(255,255,255,.1); }
.dw-product .woocommerce-tabs ul.tabs li { list-style: none !important; margin: 0 !important; padding: 0 !important; }
.dw-product .woocommerce-tabs ul.tabs li::before, .dw-product .woocommerce-tabs ul.tabs li::after, .dw-product .woocommerce-tabs ul.tabs::before { display: none !important; }
.dw-product .woocommerce-tabs .panel h2:first-child { font-size: 1.5rem; }


/* Image clickable lage */
.dw-window__product { cursor: zoom-in; }

/* Thumbnails clickable lagein */
.dw-window__thumb { cursor: pointer; }
