/**
 * Elegance Custom Forms — Single Product Page Stylesheet
 * Gallery, lightbox, spec/tabs column, and the sticky order-summary affordance.
 * Depends on frontend-shop.css for design tokens and the product-card component
 * used in the "related products" section.
 */

.elegance-product-page-outer {
	background: var(--elegance-light);
	padding: 40px 0;
}
.elegance-product-page-outer,
.elegance-product-page-outer * {
	box-sizing: border-box;
}
.elegance-product-page-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
}

.elegance-product-top-row {
	display: flex;
	flex-wrap: wrap;
	margin-left: -15px;
	margin-right: -15px;
}
.elegance-product-gallery-col,
.elegance-product-tabs-col {
	padding: 0 15px;
	width: 100%;
}
.elegance-product-bottom-row {
	width: 100%;
	padding: 0 15px;
	margin-top: 10px;
}

@media (min-width: 992px) {
	.elegance-product-gallery-col {
		flex: 0 0 45%;
		max-width: 45%;
		/* Sticky gallery: stays in view alongside the (potentially long) tabs/form column */
		position: sticky;
		top: 20px;
		align-self: flex-start;
	}
	.elegance-product-tabs-col {
		flex: 0 0 55%;
		max-width: 55%;
	}
}
@media (max-width: 991px) {
	.elegance-product-gallery-col,
	.elegance-product-tabs-col {
		flex: 0 0 100%;
		max-width: 100%;
	}
	.elegance-product-tabs-col {
		margin-top: 30px;
	}
}

/* ==========================================================================
   Gallery
   ========================================================================== */
.elegance-product-media-gallery {
	background: #ffffff;
	border: 1px solid var(--elegance-border);
	border-radius: var(--elegance-radius);
	box-shadow: var(--elegance-shadow-md);
	margin-bottom: 15px;
	display: flex;
	justify-content: center;
	align-items: center;
	position: relative;
	overflow: hidden;
	aspect-ratio: 4/3;
}

.elegance-gallery-featured-img {
	width: 100%;
	height: 100%;
	display: flex;
	justify-content: center;
	align-items: center;
}
.elegance-featured-img-tag {
	width: 100%;
	height: 100%;
	object-fit: cover;
	cursor: pointer;
	transition: transform 0.3s ease;
}
.elegance-featured-img-tag:hover {
	transform: scale(1.02);
}

/* !important throughout this file's buttons/headings is deliberate — the
   active theme/Elementor global styles otherwise override sizing, spacing,
   and reset properties, confirmed on the live site. */
.gallery-nav-btn {
	position: absolute !important;
	top: 50% !important;
	transform: translateY(-50%) !important;
	background: rgba(255, 255, 255, 0.7) !important;
	border: 1px solid rgba(0, 0, 0, 0.1) !important;
	color: var(--elegance-dark) !important;
	width: 40px !important;
	height: 40px !important;
	border-radius: 50% !important;
	font-size: 24px !important;
	line-height: 38px !important;
	text-align: center !important;
	cursor: pointer !important;
	z-index: 10 !important;
	opacity: 0 !important;
	transition: opacity 0.25s ease, background 0.2s ease, transform 0.2s ease !important;
	box-shadow: 0 4px 6px rgba(0,0,0,0.05) !important;
	margin: 0 !important;
	padding: 0 !important;
}
.elegance-product-media-gallery:hover .gallery-nav-btn,
.gallery-nav-btn:focus-visible {
	opacity: 1 !important;
}
.gallery-nav-btn:hover {
	background: #ffffff !important;
	transform: translateY(-50%) scale(1.05) !important;
}
.gallery-nav-btn.prev-btn {
	left: 15px !important;
}
.gallery-nav-btn.next-btn {
	right: 15px !important;
}

.elegance-gallery-counter {
	position: absolute;
	bottom: 12px;
	right: 12px;
	background: rgba(30, 30, 36, 0.75);
	color: #ffffff;
	font-size: 12px;
	font-weight: 600;
	padding: 4px 10px;
	border-radius: 20px;
	z-index: 10;
}

.placeholder-img {
	height: 350px;
	background: #edf2f7;
	border-radius: 8px;
	display: flex;
	justify-content: center;
	align-items: center;
	font-size: 80px;
	color: #a0aec0;
}

/* Horizontal-scrolling thumbnail strip with an image-count indicator, instead
   of wrapping to multiple rows once a product has many gallery images. */
.elegance-gallery-thumbnails-row {
	display: flex;
	flex-wrap: nowrap;
	gap: 10px;
	margin-bottom: 25px;
	overflow-x: auto;
	padding-bottom: 4px;
	scrollbar-width: thin;
}
.elegance-gallery-thumb-item {
	flex: 0 0 auto;
	width: 70px;
	height: 70px;
	border: 1px solid var(--elegance-border);
	border-radius: 6px;
	overflow: hidden;
	cursor: pointer;
	transition: all 0.2s ease;
	box-shadow: var(--elegance-shadow-sm);
	background: #ffffff;
}
.elegance-gallery-thumb-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.elegance-gallery-thumb-item:hover,
.elegance-gallery-thumb-item:focus-visible {
	border-color: var(--elegance-primary);
	transform: translateY(-2px);
}
.elegance-gallery-thumb-item.active {
	border-color: var(--elegance-primary);
	box-shadow: 0 0 0 2px rgba(var(--elegance-primary-rgb), 0.25);
}

/* ==========================================================================
   Right column: summary meta, badges, tabs
   ========================================================================== */
.elegance-product-summary-meta {
	background: #ffffff;
	border: 1px solid var(--elegance-border);
	border-radius: var(--elegance-radius);
	padding: 25px;
	box-shadow: var(--elegance-shadow-md);
	margin-bottom: 25px;
}

.elegance-product-title-heading {
	font-size: 38px !important;
	font-weight: 700 !important;
	color: var(--elegance-dark) !important;
	margin: 0 0 15px 0 !important;
	line-height: 1.2 !important;
	letter-spacing: 0.5px !important;
	text-transform: none !important;
}

.elegance-product-badges-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}
.spec-badge-box {
	background: var(--elegance-light);
	border: 1px solid var(--elegance-border);
	border-radius: 8px;
	padding: 10px 15px;
	display: flex;
	flex-direction: column;
	flex: 1;
	min-width: 100px;
	/* No position/z-index here on purpose — this is a plain flex item with
	   no overlaid children, so it never needed its own stacking context.
	   The previous z-index:1 !important was creating one anyway, which is
	   what let it render above the site's mega menu. */
}
.spec-badge-box .badge-label {
	font-size: 13px !important;
	text-transform: uppercase !important;
	color: #555555 !important;
	font-weight: 500 !important;
	margin-bottom: 5px !important;
	letter-spacing: 1px !important;
}
.spec-badge-box .badge-value {
	font-size: 16px !important;
	font-weight: 700 !important;
	color: var(--elegance-dark) !important;
}
.price-badge-box {
	background: rgba(var(--elegance-primary-rgb), 0.06);
	border-color: rgba(var(--elegance-primary-rgb), 0.25);
}
.price-badge-box .badge-value {
	font-size: 28px !important;
	font-weight: 800 !important;
	color: var(--elegance-primary) !important;
}
.primary-gold-text {
	color: var(--elegance-primary) !important;
}

/* Tabs */
.elegance-details-tabs-wrapper {
	background: #ffffff;
	border: 1px solid var(--elegance-border);
	border-radius: var(--elegance-radius);
	box-shadow: var(--elegance-shadow-md);
	overflow: hidden;
	margin-bottom: 25px;
}
.elegance-tabs-buttons-nav {
	display: flex;
	background: #fafafa;
	border-bottom: 1px solid var(--elegance-border);
}
.elegance-tabs-buttons-nav button.elegance-tab-button {
	flex: 1;
	padding: 16px 28px !important;
	font-size: 14px !important;
	font-weight: 700 !important;
	color: #475569 !important;
	background: transparent !important;
	border: none !important;
	border-bottom: 3px solid transparent !important;
	border-radius: 0 !important;
	outline-offset: -2px;
	cursor: pointer !important;
	transition: all 0.25s ease !important;
	text-align: center !important;
	text-transform: uppercase !important;
	letter-spacing: 1px !important;
	box-shadow: none !important;
	height: auto !important;
	line-height: 1.5 !important;
	margin: 0 !important;
}
.elegance-tabs-buttons-nav button.elegance-tab-button:hover {
	color: var(--elegance-dark) !important;
	background: rgba(0, 0, 0, 0.02) !important;
}
.elegance-tabs-buttons-nav button.elegance-tab-button.active {
	color: var(--elegance-primary) !important;
	border-bottom: 3px solid var(--elegance-primary) !important;
	background: #ffffff !important;
}

.elegance-tabs-content-panels {
	padding: 25px;
}
.elegance-tab-panel-content {
	display: none;
}
.elegance-tab-panel-content.active {
	display: block;
}
.elegance-panel-subheading {
	margin: 0 0 15px 0 !important;
	font-size: 16px !important;
	font-weight: 700 !important;
	color: var(--elegance-dark) !important;
	text-transform: none !important;
}
.elegance-panel-body-inner {
	font-size: 14px;
	line-height: 1.7;
	color: #4a5568;
}
.elegance-panel-body-inner p {
	margin-bottom: 15px;
}
.elegance-panel-body-inner p:last-child {
	margin-bottom: 0;
}

.elegance-product-form-card .elegance-form-container {
	margin-top: 0;
}

/* ==========================================================================
   Lightbox modal
   ========================================================================== */
.elegance-lightbox-overlay {
	display: none;
	position: fixed;
	z-index: 99999;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(10, 10, 10, 0.95);
	backdrop-filter: blur(10px);
	justify-content: center;
	align-items: center;
	opacity: 0;
	transition: opacity 0.3s ease;
}
.elegance-lightbox-overlay.active {
	display: flex;
	opacity: 1;
}
.lightbox-content-wrapper {
	max-width: 85%;
	max-height: 85%;
	display: flex;
	justify-content: center;
	align-items: center;
	box-shadow: 0 10px 30px rgba(0,0,0,0.5);
	border-radius: 8px;
	overflow: hidden;
}
.lightbox-image {
	max-width: 100%;
	max-height: 85vh;
	object-fit: contain;
	animation: elegance-zoom-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes elegance-zoom-in {
	from { transform: scale(0.9); opacity: 0; }
	to { transform: scale(1); opacity: 1; }
}
.lightbox-close {
	position: absolute;
	top: 20px;
	right: 30px;
	color: #a0aec0;
	font-size: 40px;
	font-weight: 300;
	cursor: pointer;
	transition: color 0.2s ease;
	z-index: 100000;
}
.lightbox-close:hover {
	color: #ffffff;
}
.lightbox-nav-btn {
	position: absolute !important;
	top: 50% !important;
	transform: translateY(-50%) !important;
	background: rgba(255, 255, 255, 0.08) !important;
	border: 1px solid rgba(255, 255, 255, 0.1) !important;
	color: #e2e8f0 !important;
	width: 50px !important;
	height: 50px !important;
	border-radius: 50% !important;
	font-size: 32px !important;
	line-height: 48px !important;
	text-align: center !important;
	cursor: pointer !important;
	z-index: 100000 !important;
	transition: all 0.2s ease !important;
	box-shadow: 0 4px 10px rgba(0,0,0,0.3) !important;
	margin: 0 !important;
	padding: 0 !important;
}
.lightbox-nav-btn:hover {
	background: rgba(255, 255, 255, 0.2) !important;
	color: #ffffff !important;
	transform: translateY(-50%) scale(1.05) !important;
}
.lightbox-nav-btn.prev-btn {
	left: 30px !important;
}
.lightbox-nav-btn.next-btn {
	right: 30px !important;
}

@media (max-width: 768px) {
	.lightbox-nav-btn {
		width: 40px !important;
		height: 40px !important;
		font-size: 24px !important;
		line-height: 38px !important;
	}
	.lightbox-nav-btn.prev-btn {
		left: 10px !important;
	}
	.lightbox-nav-btn.next-btn {
		right: 10px !important;
	}
	.lightbox-close {
		right: 20px;
		top: 15px;
	}
}
