/* =============================================================================
   PARTY WEAR PRODUCT DETAIL
   The product page is deliberately gallery-led: the purchase controls stay
   calm and fixed beside the imagery instead of competing with it.
   ============================================================================= */

body.ec-partywear-product-page {
	background: #f7f1eb;
	color: #211915;
}

.ec-pdp {
	--pdp-ink: #211915;
	--pdp-paper: #f7f1eb;
	--pdp-soft: #eee5de;
	--pdp-rule: rgba(43, 29, 23, .19);
	--pdp-accent: #8f5d55;
	background: var(--pdp-paper);
	overflow: clip;
}

.ec-pdp__crumbs {
	display: flex;
	align-items: center;
	gap: 9px;
	min-height: 57px;
	border-bottom: 1px solid var(--pdp-rule);
	color: rgba(33, 25, 21, .58);
	font: 500 9px / 1.2 var(--ec-font-text);
	letter-spacing: .16em;
	text-transform: uppercase;
	white-space: nowrap;
	overflow: hidden;
}
.ec-pdp__crumbs a { color: inherit; text-decoration: none; }
.ec-pdp__crumbs a:hover,
.ec-pdp__crumbs a:focus-visible { color: var(--pdp-ink); text-decoration: underline; text-underline-offset: 4px; }
.ec-pdp__crumbs span:last-child { overflow: hidden; text-overflow: ellipsis; }

.ec-pdp__layout { display: grid; grid-template-columns: minmax(0, 560px) minmax(360px, 1fr); align-items: start; }
.ec-pdp__gallery { display: grid; grid-template-columns: 1fr; gap: 1px; background: var(--pdp-rule); }
.ec-pdp__image { width: 100%; aspect-ratio: 2 / 3; margin: 0; overflow: hidden; background: #ded4ce; }
.ec-pdp__image-button { position: relative; display: block; width: 100%; height: 100%; padding: 0; border: 0; color: inherit; background: transparent; cursor: zoom-in; }
.ec-pdp__image-button img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 32%; transition: transform .85s cubic-bezier(.22, 1, .36, 1), filter .35s ease; }
.ec-pdp__image:nth-child(2) img { object-position: center 30%; }
.ec-pdp__image:nth-child(3) img { object-position: center; }
.ec-pdp__image:nth-child(4) img { object-position: center 42%; }
.ec-pdp__image-hint { position: absolute; right: 16px; bottom: 16px; display: inline-flex; align-items: center; gap: 8px; padding: 10px 12px; color: var(--pdp-paper); background: rgba(33, 25, 21, .78); font: 500 9px / 1 var(--ec-font-text); letter-spacing: .13em; opacity: 0; text-transform: uppercase; transform: translateY(8px); transition: opacity .25s ease, transform .35s cubic-bezier(.22, 1, .36, 1); }
.ec-pdp__image-hint i { font-size: 14px; font-style: normal; }
.ec-pdp__image-button:hover img { filter: brightness(.94); transform: scale(1.025); }
.ec-pdp__image-button:hover .ec-pdp__image-hint,
.ec-pdp__image-button:focus-visible .ec-pdp__image-hint { opacity: 1; transform: translateY(0); }
.ec-pdp__image-button:focus-visible { outline: 3px solid var(--pdp-ink); outline-offset: -6px; }

/* Full-screen product viewer. The source gallery remains compact; this layer
   always uses `object-fit: contain`, so no part of the selected product photo
   is cropped while the shopper inspects it. */
.ec-pdp-lightbox { position: fixed; z-index: 200; inset: 0; display: grid; grid-template-columns: minmax(48px, .14fr) minmax(0, 1fr) minmax(48px, .14fr); align-items: center; gap: clamp(10px, 2vw, 28px); padding: clamp(18px, 4vw, 58px); background: rgba(20, 15, 13, .96); }
.ec-pdp-lightbox[hidden] { display: none; }
.ec-pdp-lightbox__stage { position: relative; display: grid; width: 100%; height: min(88svh, 1120px); margin: 0; place-items: center; overflow: hidden; }
.ec-pdp-lightbox__image { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.ec-pdp-lightbox__count { position: absolute; right: 0; bottom: 0; padding: 10px 12px; color: rgba(255, 250, 245, .82); background: rgba(20, 15, 13, .68); font: 500 10px / 1 var(--ec-font-text); letter-spacing: .16em; }
.ec-pdp-lightbox__control,
.ec-pdp-lightbox__close { display: grid; width: 48px; height: 48px; padding: 0; border: 1px solid rgba(255, 250, 245, .5); color: #fffaf5; place-items: center; background: rgba(20, 15, 13, .32); cursor: pointer; font: 400 24px / 1 var(--ec-font-text); transition: border-color .2s ease, background-color .2s ease; }
.ec-pdp-lightbox__close { position: absolute; top: clamp(14px, 2vw, 28px); right: clamp(14px, 2vw, 28px); font-size: 29px; }
.ec-pdp-lightbox__control:hover,
.ec-pdp-lightbox__control:focus-visible,
.ec-pdp-lightbox__close:hover,
.ec-pdp-lightbox__close:focus-visible { border-color: #fffaf5; background: rgba(255, 250, 245, .13); outline: 2px solid #fffaf5; outline-offset: 3px; }

.ec-pdp__summary { position: sticky; top: 82px; min-height: 0; padding: clamp(28px, 3vw, 46px) clamp(24px, 4vw, 64px); border-left: 1px solid var(--pdp-rule); }
.ec-pdp__titleblock { position: relative; padding-bottom: 22px; }
.ec-pdp__eyebrow { margin: 0 0 12px; color: var(--pdp-accent); font: 500 9px / 1.25 var(--ec-font-text); letter-spacing: .21em; text-transform: uppercase; }
.ec-pdp__titleblock h1 { margin: 0; font: 400 clamp(30px, 2.5vw, 40px) / 1.04 var(--ec-font-display); letter-spacing: -.025em; }
.ec-pdp__story h2,
.ec-pdp__related h2 { margin: 0; font: 400 clamp(40px, 4.5vw, 76px) / 1.01 var(--ec-font-display); letter-spacing: -.035em; }
.ec-pdp__price { margin: 13px 0 0; font: 400 16px / 1.3 var(--ec-font-text); }
.ec-pdp__wishlist { position: absolute; top: -2px; right: 0; display: grid; width: 36px; height: 36px; padding: 0; border: 1px solid var(--pdp-rule); border-radius: 50%; place-items: center; background: transparent; color: var(--pdp-ink); cursor: pointer; transition: color .2s ease, background-color .2s ease, border-color .2s ease, transform .2s ease; }
.ec-pdp__wishlist:hover,
.ec-pdp__wishlist:focus-visible { color: #b3263b; border-color: #b3263b; outline: 0; }
.ec-pdp__wishlist[aria-pressed='true'] { color: #b3263b; background: rgba(179, 38, 59, .08); border-color: #b3263b; transform: scale(1.04); }
.ec-pdp__wishlist:focus-visible { box-shadow: 0 0 0 2px rgba(179, 38, 59, .28); }
.ec-pdp__form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 0; padding: 20px 0; }
.ec-pdp__quantity,
.ec-pdp__choice,
.ec-pdp__status { grid-column: 1 / -1; }
.ec-pdp__add { grid-column: 1; }
.ec-pdp__buy-now { grid-column: 2; }
.ec-pdp__choice { min-width: 0; margin: 0; padding: 0; border: 0; }
.ec-pdp__choicehead { display: flex; align-items: baseline; justify-content: space-between; gap: 15px; }
.ec-pdp__choice legend,
.ec-pdp__choicehead legend { padding: 0; font: 500 10px / 1.2 var(--ec-font-text); letter-spacing: .16em; text-transform: uppercase; }
.ec-pdp__choicehead a { color: var(--pdp-ink); font: 500 9px / 1.2 var(--ec-font-text); letter-spacing: .13em; text-transform: uppercase; text-underline-offset: 4px; }
.ec-pdp__sizes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.ec-pdp__sizes input { position: absolute; inline-size: 1px; block-size: 1px; opacity: 0; pointer-events: none; }
.ec-pdp__sizes label { display: grid; min-width: 54px; min-height: 48px; padding: 0 14px; place-items: center; border: 1px solid var(--pdp-rule); cursor: pointer; font: 500 10px / 1 var(--ec-font-text); letter-spacing: .13em; transition: color .25s ease, background-color .25s ease, border-color .25s ease; }
.ec-pdp__sizes input:checked + label { color: var(--pdp-paper); background: var(--pdp-ink); border-color: var(--pdp-ink); }
.ec-pdp__sizes input:focus-visible + label,
.ec-pdp__quantity button:focus-visible,
.ec-pdp__add:focus-visible,
.ec-pdp__accordion-toggle:focus-visible,
.ec-pdp__related a:focus-visible { outline: 2px solid var(--pdp-ink); outline-offset: 3px; }
.ec-pdp__sizes label:hover { border-color: var(--pdp-ink); }

.ec-pdp__quantity { display: grid; grid-template-columns: 38px 1fr 38px; width: 148px; min-height: 48px; border: 1px solid var(--pdp-rule); }
.ec-pdp__quantity button { border: 0; background: transparent; color: var(--pdp-ink); cursor: pointer; font: 400 18px / 1 var(--ec-font-text); }
.ec-pdp__quantity button:hover { background: rgba(33, 25, 21, .05); }
.ec-pdp__quantity input { width: 100%; min-width: 0; border: 0; background: transparent; color: var(--pdp-ink); font: 400 14px / 1 var(--ec-font-text); text-align: center; appearance: textfield; }
.ec-pdp__quantity input::-webkit-inner-spin-button,
.ec-pdp__quantity input::-webkit-outer-spin-button { appearance: none; margin: 0; }
.ec-pdp__add { display: inline-flex; width: 100%; align-items: center; justify-content: center; gap: 16px; min-height: 52px; padding: 0 19px; border: 1px solid var(--pdp-ink); background: var(--pdp-ink); color: var(--pdp-paper); cursor: pointer; font: 500 10px / 1 var(--ec-font-text); letter-spacing: .18em; text-transform: uppercase; transition: background .3s ease, color .3s ease, transform .3s cubic-bezier(.22, 1, .36, 1); }
.ec-pdp__add:hover { color: var(--pdp-ink); background: transparent; transform: translateY(-1px); }
.ec-pdp__add.is-added { background: #77534d; border-color: #77534d; color: #fffaf5; }
.ec-pdp__buy-now { display: inline-flex; width: 100%; align-items: center; justify-content: center; min-height: 52px; padding: 0 19px; border: 1px solid var(--pdp-ink); background: transparent; color: var(--pdp-ink); cursor: pointer; font: 500 10px / 1 var(--ec-font-text); letter-spacing: .18em; text-transform: uppercase; transition: background .3s ease, color .3s ease; }
.ec-pdp__buy-now:hover,
.ec-pdp__buy-now:focus-visible { color: var(--pdp-paper); background: var(--pdp-ink); outline: 0; }
.ec-pdp__stock { margin: 10px 0 0; color: #9c2020; font: 500 11px / 1.35 var(--ec-font-text); letter-spacing: .13em; text-transform: uppercase; }
.ec-pdp__form.is-out-of-stock :is(.ec-pdp__quantity, .ec-pdp__choice) { opacity: .48; }
.ec-pdp__form :is(.ec-pdp__add, .ec-pdp__buy-now)[disabled] { cursor: not-allowed; opacity: .48; }
.ec-pdp__form :is(.ec-pdp__add, .ec-pdp__buy-now)[disabled]:hover { color: inherit; background: transparent; }
.ec-pdp__status { min-height: 0; margin: -10px 0 0; color: var(--pdp-accent); font: 400 12px / 1.4 var(--ec-font-text); }
.ec-pdp__status.is-error { color: #9c2020; }
.ec-pdp__status.is-out-of-stock { color: #9c2020; }

.ec-pdp__accordions { border-top: 1px solid var(--pdp-rule); margin-top: 0; }
.ec-pdp__accordion { overflow: hidden; border-bottom: 1px solid var(--pdp-rule); }
.ec-pdp__accordion-toggle { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 0; border: 0; background: transparent; color: var(--pdp-ink); cursor: pointer; font: 500 10px / 1.2 var(--ec-font-text); letter-spacing: .16em; text-align: left; text-transform: uppercase; }
.ec-pdp__accordion-toggle span { font: 400 18px / 1 var(--ec-font-text); transition: transform .42s cubic-bezier(.22, 1, .36, 1); }
.ec-pdp__accordion.is-open .ec-pdp__accordion-toggle span { transform: rotate(45deg); }
/* With scripts disabled every panel stays readable. JavaScript opts into the
   measured animated disclosure while keeping semantic button behaviour. */
.ec-pdp__accordion-body { overflow: hidden; }
.ec-pdp--accordion-ready .ec-pdp__accordion-body { display: grid; grid-template-rows: 0fr; opacity: 0; visibility: hidden; transition: grid-template-rows .46s cubic-bezier(.22, 1, .36, 1), opacity .3s ease, visibility 0s linear .46s; }
.ec-pdp__accordion-inner { min-height: 0; overflow: hidden; }
.ec-pdp--accordion-ready .ec-pdp__accordion.is-open .ec-pdp__accordion-body { grid-template-rows: 1fr; opacity: 1; visibility: visible; transition: grid-template-rows .46s cubic-bezier(.22, 1, .36, 1), opacity .32s ease .06s, visibility 0s; }
.ec-pdp__accordion-body p { max-width: 50ch; margin: 0; padding: 0 0 20px; color: rgba(33, 25, 21, .68); font: 400 14px / 1.6 var(--ec-font-text); }

@media (prefers-reduced-motion: reduce) {
	.ec-pdp__accordion-toggle span,
	.ec-pdp__accordion-body,
	.ec-pdp--accordion-ready .ec-pdp__accordion-body,
	.ec-pdp--accordion-ready .ec-pdp__accordion.is-open .ec-pdp__accordion-body { transition-duration: .01ms; transition-delay: 0ms; }
}

.ec-pdp__story { display: grid; grid-template-columns: minmax(150px, .55fr) minmax(0, 1.25fr); gap: clamp(30px, 8vw, 150px); padding-top: clamp(88px, 12vw, 180px); padding-bottom: clamp(90px, 12vw, 178px); background: var(--pdp-soft); }
.ec-pdp__story h2 { max-width: 720px; }
.ec-pdp__story div > p { max-width: 580px; margin: 28px 0 0; color: rgba(33, 25, 21, .7); font: 400 16px / 1.66 var(--ec-font-text); }

.ec-pdp__related { padding-top: clamp(56px, 8vw, 116px); padding-bottom: clamp(68px, 9vw, 134px); }
.ec-pdp__relatedhead { display: flex; align-items: end; justify-content: space-between; gap: 25px; margin-bottom: clamp(27px, 4vw, 52px); }
.ec-pdp__related h2 { font-size: clamp(35px, 4.2vw, 64px); }
.ec-pdp__relatedhead > a { color: var(--pdp-ink); font: 500 10px / 1.2 var(--ec-font-text); letter-spacing: .16em; text-transform: uppercase; text-decoration: underline; text-underline-offset: 7px; white-space: nowrap; }
.ec-pdp__relatedhead > a span { display: inline-block; margin-left: 7px; transition: transform .3s cubic-bezier(.22, 1, .36, 1); }
.ec-pdp__relatedhead > a:hover span { transform: translateX(4px); }
.ec-pdp__relatedgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(13px, 2vw, 29px); }
.ec-pdp__relatedcard { display: grid; gap: 15px; color: var(--pdp-ink); text-decoration: none; }
.ec-pdp__relatedimage { display: block; aspect-ratio: 2 / 3; overflow: hidden; background: #ddd1ca; }
.ec-pdp__relatedimage img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; transition: transform .65s cubic-bezier(.22, 1, .36, 1); }
.ec-pdp__relatedcard:hover img { transform: scale(1.035); }
.ec-pdp__relatedcopy { display: grid; gap: 6px; }
.ec-pdp__relatedcopy strong { font: 400 clamp(18px, 1.65vw, 25px) / 1.04 var(--ec-font-display); letter-spacing: -.025em; }
.ec-pdp__relatedcopy em { color: rgba(33, 25, 21, .64); font: 400 13px / 1.3 var(--ec-font-text); font-style: normal; }

@media (max-width: 960px) {
	.ec-pdp__layout { grid-template-columns: 1fr; }
	.ec-pdp__summary { position: relative; top: auto; min-height: 0; border-top: 1px solid var(--pdp-rule); border-left: 0; }
}

@media (max-width: 700px) {
	.ec-pdp__crumbs { min-height: 49px; }
	.ec-pdp__gallery { grid-template-columns: 1fr; }
	.ec-pdp__image { aspect-ratio: 2 / 3; }
	.ec-pdp__image-hint { right: 10px; bottom: 10px; opacity: 1; transform: none; }
	.ec-pdp-lightbox { grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 8px; padding: 18px 8px; }
	.ec-pdp-lightbox__stage { height: min(84svh, 820px); }
	.ec-pdp-lightbox__control { width: 40px; height: 40px; font-size: 20px; }
	.ec-pdp-lightbox__close { top: 10px; right: 10px; width: 42px; height: 42px; }
	.ec-pdp__summary { padding: 28px 22px 42px; }
	.ec-pdp__titleblock h1 { font-size: clamp(29px, 8.5vw, 42px); }
	.ec-pdp__story { grid-template-columns: 1fr; gap: 12px; padding-inline: 22px; }
	.ec-pdp__related { padding-inline: 22px; }
	.ec-pdp__relatedhead { align-items: start; flex-direction: column; }
	.ec-pdp__relatedgrid { gap: 26px 12px; grid-template-columns: repeat(2, 1fr); }
	.ec-pdp__relatedcard:last-child { grid-column: 1 / -1; width: calc(50% - 6px); }
	.ec-pdp__relatedcopy strong { font-size: 20px; }
}

/* Mobile Party Wear PDP -----------------------------------------------------
   Keep the Party Wear desktop composition untouched. On a phone, use the
   same one-handed product rhythm as Linen: a horizontal swipe gallery,
   compact purchase panel and calm, full-width detail rows. */
@media (max-width: 700px) {
	body.ec-partywear-product-page {
		background: #faf7f0;
		color: #34342e;
	}
	.ec-pdp {
		--pdp-ink: #34342e;
		--pdp-paper: #faf7f0;
		--pdp-soft: #f1ece1;
		--pdp-rule: rgba(52, 52, 46, .18);
		--pdp-accent: #788373;
	}
	.ec-pdp__crumbs {
		min-height: 60px;
		font-size: 8px;
	}
	/* Show a complete first product view and let the rest of the gallery swipe
	   horizontally, matching the Linen product experience. */
	.ec-pdp__gallery {
		display: grid;
		grid-auto-flow: column;
		grid-template-columns: none;
		grid-auto-columns: min(86vw, 400px);
		gap: 8px;
		overflow-x: auto;
		overscroll-behavior-x: contain;
		scroll-snap-type: x mandatory;
		scroll-padding-inline: clamp(16px, 4.5vw, 28px);
		padding-inline: clamp(16px, 4.5vw, 28px);
		padding-inline-end: max(clamp(16px, 4.5vw, 28px), calc(100% - min(86vw, 400px) - clamp(16px, 4.5vw, 28px)));
		scrollbar-width: thin;
		background: var(--pdp-paper);
	}
	.ec-pdp__image {
		width: auto;
		scroll-snap-align: start;
		scroll-snap-stop: always;
		background: #e4e2dd;
	}
	.ec-pdp__image-button { touch-action: pan-x pinch-zoom; }
	.ec-pdp__image-hint { display: none; }
	.ec-pdp__summary {
		padding: 24px clamp(16px, 4.5vw, 28px) 42px;
		border-top-color: var(--pdp-rule);
	}
	.ec-pdp__titleblock { padding-bottom: 8px; }
	.ec-pdp__titleblock h1 {
		min-width: 0;
		font-size: clamp(24px, 6.2vw, 32px);
		line-height: 1.15;
	}
	.ec-pdp__wishlist { width: 44px; height: 44px; }
	.ec-pdp__form { gap: 16px; padding: 16px 0; }
	.ec-pdp__quantity { grid-template-columns: 44px 1fr 44px; }
	.ec-pdp__quantity input { font-size: 16px; }
	.ec-pdp__sizes label { min-width: 44px; padding-inline: 12px; }
	.ec-pdp__status:empty { display: none; }
	.ec-pdp__accordions { margin-top: 8px; }
	.ec-pdp__accordion-toggle { min-height: 56px; padding-block: 18px; }
	.ec-pdp__accordion-body :is(img, table) { max-width: 100%; }
	.ec-pdp__accordion-body table { display: block; overflow-x: auto; }
	.ec-pdp__story { gap: 12px; padding-block: 48px; }
	.ec-pdp__related { padding-top: clamp(32px, 6vw, 48px); }
	.ec-pdp__relatedhead { gap: 12px; margin-bottom: 24px; }
	.ec-pdp__related h2 { font-size: clamp(28px, 7vw, 40px); }
}

@media (prefers-reduced-motion: reduce) {
	.ec-pdp *,
	.ec-pdp *::before,
	.ec-pdp *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
	.ec-pdp-lightbox *,
	.ec-pdp-lightbox *::before,
	.ec-pdp-lightbox *::after { transition-duration: .01ms !important; }
}
