/* ==========================================================================
   DeshiWear — product page
   ========================================================================== */

.dw-product-page { padding-bottom: 20px; }
.dw-product__top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 36px; align-items: start; }

/* Gallery */
.dw-gallery { position: relative; display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 12px; align-items: start; }
.dw-gallery:not(.has-thumbs) { grid-template-columns: minmax(0, 1fr); }
.dw-gallery__stage { grid-column: -2 / -1; grid-row: 1; position: relative; min-width: 0; }
.dw-gallery__main { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 4px; background: var(--dw-soft); }
.dw-gallery__main::-webkit-scrollbar { display: none; }
.dw-gallery__slide { flex: 0 0 100%; margin: 0; scroll-snap-align: start; aspect-ratio: 4 / 5; position: relative; }
.dw-gallery__slide a, .dw-gallery__play { display: block; width: 100%; height: 100%; cursor: zoom-in; }
.dw-gallery__img, .dw-gallery__slide img { width: 100%; height: 100%; object-fit: cover; }
.dw-gallery__play { position: relative; border: 0; padding: 0; background: none; cursor: pointer; }
.dw-gallery__playicon { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 74px; height: 52px; border-radius: 12px; border: 3px solid #fff; display: grid; place-items: center; color: #fff; background: rgb(0 0 0 / 22%); }
.dw-gallery__playicon .dw-icon { width: 28px; height: 28px; fill: #fff; }
.dw-gallery__playicon--sm { width: 30px; height: 22px; border-width: 2px; border-radius: 5px; }
.dw-gallery__playicon--sm .dw-icon { width: 13px; height: 13px; }
.dw-gallery__video { width: 100%; height: 100%; border: 0; background: #000; }
.dw-gallery__thumbs { grid-column: 1; grid-row: 1; display: flex; flex-direction: column; gap: 10px; max-height: 620px; overflow-y: auto; scrollbar-width: thin; }
.dw-gallery__thumb { position: relative; flex: none; width: 76px; padding: 0; border: 1px solid var(--dw-line); border-radius: 3px; background: #fff; overflow: hidden; opacity: .75; transition: opacity .15s, border-color .15s; }
.dw-gallery__thumb img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.dw-gallery__thumb.is-active, .dw-gallery__thumb:hover { opacity: 1; border-color: var(--dw-ink); }
.dw-gallery .mfc-badges { z-index: 3; }

/* Summary */
.dw-product__summary { min-width: 0; }
.dw-product__summary .product_title { font-size: var(--dw-pp-title-fs, 1.125rem); font-weight: var(--dw-pp-title-fw); color: var(--dw-pp-title); line-height: 1.5; margin: 0 0 6px; }
.dw-product__summary > .price { font-size: var(--dw-pp-price-fs, 1.75rem); color: var(--dw-pp-price); margin: 0 0 10px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; line-height: 1.3; }
.dw-product__summary > .price del { order: 2; font-size: .55em; color: var(--dw-muted); }
.dw-product__summary > .price ins { color: var(--dw-pp-price); }
.dw-rating-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; margin-bottom: 14px; border: 1px solid #ddd; border-radius: 4px; font-size: .8125rem; color: #333; box-shadow: 0 1px 4px rgb(0 0 0 / 6%); }
.dw-rating-chip .dw-star { color: var(--dw-star); }
.dw-rating-chip i { width: 1px; height: 12px; background: #ccc; }
.dw-product__summary .mfc-vform, .dw-product__summary form.cart { border-top: 1px solid var(--dw-line); margin-top: 0; }
.dw-product__summary form.cart:not(.variations_form) { margin-top: 0; }
.dw-offer { display: flex; flex-direction: column; margin: 10px 0 4px; padding: 10px 14px; border: 1px dashed var(--dw-accent); border-radius: 4px; background: var(--dw-tint); font-size: .8125rem; color: #444; }
.dw-offer strong { color: var(--dw-accent); font-size: .9375rem; }

.dw-callbtn { display: inline-flex; align-items: center; gap: 0; margin: 16px 0 6px; border-radius: 8px; overflow: hidden; background: var(--dw-call-bg); color: var(--dw-call-text); box-shadow: 0 3px 10px rgb(0 0 0 / 18%); }
.dw-callbtn:hover { color: var(--dw-call-text); filter: brightness(1.15); }
.dw-callbtn__icon { display: grid; place-items: center; width: 44px; align-self: stretch; background: rgb(0 0 0 / 25%); }
.dw-callbtn__icon .dw-icon { width: 19px; height: 19px; }
.dw-callbtn__text { display: flex; flex-direction: column; padding: 5px 16px 5px 12px; line-height: 1.25; }
.dw-callbtn__text strong { font-size: .9375rem; letter-spacing: .03em; }
.dw-callbtn__text small { font-size: .625rem; opacity: .8; letter-spacing: .08em; }

.dw-pactions { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 4px 0; }
.dw-share { display: flex; align-items: center; gap: 8px; font-size: .8125rem; color: #808080; margin: 4px 0 0; }
.dw-share a { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1px solid #ddd; color: #333; }
.dw-share a:hover { background: var(--dw-ink); color: #fff; border-color: var(--dw-ink); }
.dw-share .dw-icon { width: 14px; height: 14px; }

/* Tabs */
.woocommerce-tabs { margin: 44px 0 10px; }
.woocommerce-tabs ul.tabs { list-style: none; margin: 0 0 18px; padding: 0; display: flex; gap: 30px; border-bottom: 1px solid var(--dw-line); overflow-x: auto; }
.woocommerce-tabs ul.tabs li { margin: 0; flex: none; }
.woocommerce-tabs ul.tabs a { display: block; padding: 0 0 10px; font-size: 1.0625rem; color: #adadad; text-transform: uppercase; letter-spacing: .02em; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.woocommerce-tabs ul.tabs li.active a { color: var(--dw-ink); border-bottom-color: var(--dw-accent); }
.woocommerce-Tabs-panel { font-size: .875rem; line-height: 1.75; color: #333; max-width: 980px; }
.woocommerce-Tabs-panel > h2:first-child { display: none; }
.woocommerce-Tabs-panel h3, .woocommerce-Tabs-panel h4 { font-size: .9375rem; margin: 1.2em 0 .4em; }
.woocommerce-Tabs-panel ul { padding-left: 20px; }
.woocommerce-Tabs-panel table { border-collapse: collapse; margin: 10px 0; }
.woocommerce-Tabs-panel th, .woocommerce-Tabs-panel td { border: 1px solid var(--dw-line); padding: 8px 14px; text-align: center; }
.woocommerce-Tabs-panel th { background: var(--dw-soft); font-weight: 600; }

/* Reviews */
.dw-reviews { margin: 30px 0 10px; }
.dw-rv__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 8px 8px 14px; border: 1px solid var(--dw-line); background: #fafafa; }
.dw-rv__title { margin: 0; font-size: 1rem; font-weight: 400; color: #777; }
.dw-rv__title span { color: var(--dw-ink); }
.dw-rv__write { flex: none; border: 0; border-radius: 3px; background: var(--dw-ok); color: #fff; padding: 8px 16px; font-size: .875rem; }
.dw-rv__write:hover { filter: brightness(.92); }
.dw-rv__summary { display: grid; grid-template-columns: 180px minmax(0, 340px); gap: 24px; align-items: center; padding: 18px 4px; }
.dw-rv__avg { margin: 0; font-size: 1.25rem; color: #777; }
.dw-rv__avg strong { font-size: 2.25rem; font-weight: 500; color: var(--dw-ink); }
.dw-rv__count { margin: 2px 0 0; font-size: .8125rem; color: #777; }
.dw-rv__verified { margin: 0; font-size: .8125rem; color: var(--dw-ok); }
.dw-rv__bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.dw-rv__bars li { display: grid; grid-template-columns: 82px 1fr 24px; gap: 10px; align-items: center; font-size: .75rem; }
.dw-rv__stars { color: var(--dw-star); letter-spacing: .05em; }
.dw-rv__track { height: 10px; background: #f1f1f1; border-radius: 2px; overflow: hidden; }
.dw-rv__track span { display: block; height: 100%; background: var(--dw-star); }
.dw-rv__n { text-align: right; color: #777; }
.dw-rv__form { padding: 18px; margin-bottom: 18px; border: 1px solid var(--dw-line); border-radius: 4px; }
.dw-rv__form .comment-reply-title { display: block; font-weight: 600; margin-bottom: 10px; }
.dw-rv__form .comment-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.dw-rv__form .comment-form > * { grid-column: 1 / -1; }
.dw-rv__form .comment-form-author { grid-column: 1; }
.dw-rv__form .comment-form-email { grid-column: 2; }
.dw-rv__form p { margin: 0 0 12px; }
.dw-rv__form label { display: block; margin-bottom: 4px; }
.dw-rv__form .form-submit input { min-height: 42px; padding: 8px 24px; border: 0; border-radius: 4px; background: var(--dw-grad); color: #fff; }
.dw-rv__subtitle { font-size: .9375rem; font-weight: 500; padding-bottom: 8px; border-bottom: 1px solid var(--dw-line); }
.dw-rv__list .commentlist { list-style: none; margin: 0; padding: 0; }
.dw-rv__list .commentlist li { padding: 14px 0; border-bottom: 1px solid #f0f0f0; }
.dw-rv__list .comment_container { display: grid; grid-template-columns: 44px 1fr; gap: 12px; }
.dw-rv__list .avatar { width: 44px; height: 44px; border-radius: 50%; }
.dw-rv__list .meta { margin: 2px 0; font-size: .8125rem; color: #777; }
.dw-rv__list .woocommerce-review__author { color: var(--dw-ink); font-weight: 500; }
.dw-rv__list .description p { margin: 0; font-size: .875rem; }
.dw-rv__list .woocommerce-review__verified { color: var(--dw-ok); font-style: normal; }
.woocommerce-noreviews { color: #888; font-size: .875rem; padding: 10px 0; }

/* Related / also like */
.dw-pcarousel { margin: 40px 0 0; }

/* Sticky add to cart */
.dw-sticky-atc { position: fixed; left: 0; right: 0; bottom: 0; z-index: 150; background: #fff; border-top: 1px solid var(--dw-line); box-shadow: 0 -6px 20px rgb(0 0 0 / 8%); transform: translateY(110%); transition: transform .3s var(--dw-ease); }
.dw-sticky-atc.is-visible { transform: none; }
.dw-sticky-atc__inner { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-block: 8px; }
.dw-sticky-atc__product { display: flex; align-items: center; gap: 12px; min-width: 0; }
.dw-sticky-atc__product img { width: 42px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 3px; }
.dw-sticky-atc__name { margin: 0; font-size: .8125rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40vw; }
.dw-sticky-atc__price { margin: 0; font-size: .875rem; color: var(--dw-price); }
.dw-sticky-atc__price del { font-size: .8em; margin-left: 4px; }
.dw-sticky-atc .dw-btn { min-height: 40px; border-radius: 8px; }

/* Lightbox */
.dw-lightbox { border: 0; padding: 0; width: 100vw; height: 100vh; max-width: none; max-height: none; background: rgb(0 0 0 / 92%); }
.dw-lightbox::backdrop { background: rgb(0 0 0 / 80%); }
.dw-lightbox__stage { width: 100%; height: 100%; display: grid; place-items: center; overflow: auto; }
.dw-lightbox__stage img { max-width: 94vw; max-height: 94vh; object-fit: contain; cursor: zoom-in; }
.dw-lightbox__stage.is-zoomed img { max-width: none; max-height: none; width: 180vw; cursor: zoom-out; }
.dw-lightbox__btn { position: fixed; z-index: 2; width: 46px; height: 46px; border: 0; border-radius: 50%; background: rgb(255 255 255 / 14%); color: #fff; font-size: 1.8rem; line-height: 1; }
.dw-lightbox__close { top: 16px; right: 16px; }
.dw-lightbox__prev { left: 16px; top: 50%; }
.dw-lightbox__next { right: 16px; top: 50%; }

@media (max-width: 899px) {
	.dw-product__top { grid-template-columns: 1fr; gap: 14px; }
	.dw-gallery { grid-template-columns: 1fr; }
	.dw-gallery__stage { grid-column: 1; }
	.dw-gallery__thumbs { grid-column: 1; grid-row: 2; flex-direction: row; max-height: none; overflow-x: auto; gap: 8px; }
	.dw-gallery__thumb { width: 64px; }
	.dw-product__summary .product_title { font-size: var(--dw-pp-title-fs-m, 1rem); }
	.dw-product__summary > .price { font-size: var(--dw-pp-price-fs-m, 1.5rem); }
	.woocommerce-tabs ul.tabs { gap: 20px; }
	.woocommerce-tabs ul.tabs a { font-size: .9375rem; }
	.dw-rv__summary { grid-template-columns: 1fr; gap: 14px; }
	.dw-rv__bar { flex-wrap: wrap; }
	.dw-rv__form .comment-form-author, .dw-rv__form .comment-form-email { grid-column: 1 / -1; }
	.dw-sticky-atc { bottom: calc(66px + env(safe-area-inset-bottom)); left: 8px; right: 8px; border-radius: 12px; border: 1px solid var(--dw-line); }
	.dw-sticky-atc__name { max-width: 45vw; }
}

/* Labels in the reference style: COLOR: / SIZE: */
.dw-product__summary .mfc-swatch-group__label { text-transform: uppercase; font-size: .9375rem; color: #000; }
.dw-pactions .mfc-action { text-transform: uppercase; font-size: .8125rem; }

/* ---------- Phone layout (matches the reference store's mobile product page) ---------- */
@media (max-width: 640px) {
	.single-product .dw-container { --dw-gutter: 8px; padding-inline: 8px; }
	.single-product .dw-crumbs { font-size: .75rem; font-weight: 500; color: #7b7b7b; padding: 12px 0 10px; white-space: nowrap; overflow-x: auto; scrollbar-width: none; }
	.single-product .dw-crumbs::-webkit-scrollbar { display: none; }
	.single-product .dw-crumbs a { color: #7b7b7b; }
	.single-product .dw-crumbs p > span:last-child, .single-product .dw-crumbs > span:last-child { color: #191919; }

	.dw-product__top { gap: 10px; }
	.dw-gallery { gap: 8px; }
	.dw-gallery__main { border-radius: 0; }
	.dw-gallery__slide { aspect-ratio: 1 / 1; }
	.dw-gallery__img, .dw-gallery__slide img { object-position: center 30%; }
	.dw-gallery__thumbs { gap: 4px; }
	.dw-gallery__thumb { width: calc((100% - 12px) / 4.6); max-width: 78px; border-radius: 0; opacity: 1; }
	.dw-gallery__thumb img { aspect-ratio: 1 / 1; object-position: center 30%; }
	.dw-gallery__thumb.is-active { border-color: var(--dw-accent); }

	.dw-product__summary { padding-inline: 7px; }
	.dw-product__summary .product_title { font-size: var(--dw-pp-title-fs-m, 1.125rem); color: var(--dw-pp-title-m, #818181); line-height: 1.55; margin-bottom: 4px; }
	.dw-product__summary > .price { font-size: var(--dw-pp-price-fs-m, 1.5rem); margin-bottom: 8px; }
	.dw-product__summary > .price del { font-size: 1rem; }
	.dw-rating-chip { margin-bottom: 10px; font-size: .8125rem; }

	.dw-product__summary .mfc-swatch-group { grid-template-columns: 58px minmax(0, 1fr); padding: 10px 0; }
	.dw-product__summary .mfc-swatches--image .mfc-swatch { width: 56px; height: 56px; border-radius: 0; }
	.dw-product__summary .mfc-swatches--image .mfc-swatch img { border-radius: 0; }
	.dw-product__summary .mfc-swatches:not(.mfc-swatches--image):not(.mfc-swatches--color) .mfc-swatch { min-width: 32px; height: 32px; font-size: .8125rem; }

	.dw-callbtn { margin-top: 14px; }
	.dw-pactions { margin-top: 8px; }
	.dw-share { font-size: .875rem; }

	.woocommerce-tabs { margin-top: 30px; }
	.woocommerce-tabs ul.tabs { gap: 22px; }
	.woocommerce-tabs ul.tabs a { font-size: 1rem; padding-bottom: 8px; }
	.woocommerce-Tabs-panel { font-size: .9375rem; }
	.woocommerce-Tabs-panel table { width: 100%; font-size: .8125rem; }
	.woocommerce-Tabs-panel th, .woocommerce-Tabs-panel td { padding: 8px 6px; }

	.dw-rv__bar { padding: 10px 12px; }
	.dw-rv__title { font-size: .875rem; }
	.dw-rv__avg strong { font-size: 2.25rem; }

	.dw-pcarousel { margin-top: 32px; }
	.dw-pcarousel .mfc-products--carousel ul.products.mfc-products__list { grid-auto-columns: 53%; gap: 14px; }
	.dw-pcarousel .mfc-head__title { font-size: 1.125rem; }
}

/* ---------- Quantity, Add to cart, Buy now (reference layout) ----------
   Desktop: qty 20% + two 30% buttons. Mobile: compact buttons sized to their
   label, sitting left on one row. Colours come from the Design tokens. */
.dw-product__summary :is(.mfc-atc, form.cart:not(.variations_form)) { display: flex; flex-wrap: nowrap; align-items: stretch; justify-content: flex-start; gap: 16px; padding-top: 24px; }
.dw-product__summary :is(.mfc-atc, form.cart) .dw-qty { flex: 0 0 20%; max-width: 20%; height: 40px; justify-content: center; gap: 4px; border: 1px solid #e5e7eb; border-radius: 4px; color: #989898; }
.dw-product__summary :is(.mfc-atc, form.cart) .dw-qty__btn { width: auto; padding: 0 6px; font-size: 1rem; color: #989898; background: none; }
.dw-product__summary :is(.mfc-atc, form.cart) .dw-qty input.qty { width: 50% !important; max-width: 48px; font-weight: 400; font-size: 1rem; color: #989898; }
.dw-product__summary :is(.mfc-atc, form.cart) :is(.single_add_to_cart_button, .mfc-buy-now) { flex: 0 0 30%; max-width: 30%; min-width: 0; min-height: 40px !important; height: auto; margin: 0; padding: 8px 0 !important; border: 0; border-radius: 8px !important; font-family: inherit; font-size: calc(1rem * var(--dw-btn-scale)) !important; font-weight: 400; line-height: 1.5; text-transform: var(--dw-btn-transform); letter-spacing: var(--dw-btn-ls); white-space: nowrap; box-shadow: 0 10px 15px -3px rgb(0 0 0 / 10%), 0 4px 6px -4px rgb(0 0 0 / 10%); text-transform: capitalize; }
.dw-product__summary :is(.mfc-atc, form.cart) .single_add_to_cart_button { background: var(--dw-atc-bg); color: var(--dw-atc-text); }
.dw-product__summary :is(.mfc-atc, form.cart) .single_add_to_cart_button:hover { background: var(--dw-buy-bg) !important; color: var(--dw-buy-text) !important; }
.dw-product__summary :is(.mfc-atc, form.cart) .single_add_to_cart_button :is(.dw-icon, .mfc-icon) { display: none; }
.dw-product__summary :is(.mfc-atc, form.cart) .mfc-buy-now:hover { background: var(--dw-buy-bg-hover) !important; color: var(--dw-buy-text-hover) !important; }

@media (max-width: 1023px) {
	.dw-product__summary :is(.mfc-atc, form.cart:not(.variations_form)) { gap: 8px; padding-top: 24px; }
	.dw-product__summary :is(.mfc-atc, form.cart) .dw-qty { flex: 0 0 26%; max-width: 26%; height: auto; min-height: 30px; }
	.dw-product__summary :is(.mfc-atc, form.cart) :is(.single_add_to_cart_button, .mfc-buy-now) { flex: 0 1 auto; max-width: none; min-height: 30px !important; padding: 4px 24px !important; border-radius: 8px !important; font-size: calc(.875rem * var(--dw-btn-scale)) !important; line-height: 1.43; }
}
