/* =========================================================================
   LAM3D product page: two columns (DR Product Importer, class-drpi-layout.php).
   Loaded only on product pages built from design data. The body carries
   .lam3d-layout there.

   Left, WoodMart's picture column (4/12): gallery, then the buying box.
   Right, WoodMart's summary column (8/12): the tabs with the full description.
   Dark mode follows the site's own switch only, never the device's.
   ========================================================================= */

/* ---------- Columns ---------- */

/* landscape tablets: 5/7 instead of the theme's 6/6 (phones and upright tablets stack) */
@media (min-width: 769px) and (max-width: 1024px) {
	.lam3d-layout .product-image-summary-inner > .product-images { --wd-col-md: 5 !important; }
	.lam3d-layout .product-image-summary-inner > .summary { --wd-col-md: 7 !important; }
}

/* the band under the columns only held the tabs, which moved to the right column */
.lam3d-layout-no-bottom .product-tabs-wrapper {
	display: none;
}

/* ---------- Breadcrumbs: small, above both columns ---------- */

.lam3d-layout .single-breadcrumbs-wrapper {
	margin-bottom: 14px;
}

.lam3d-layout .single-breadcrumbs-wrapper .wd-breadcrumbs {
	font-size: 13px;
}

/* ---------- Gallery ---------- */

.lam3d-layout .wd-gallery-thumb img {
	aspect-ratio: 1 / 1;
	object-fit: contain;
	border-radius: 10px;
	background: #fff;
}

.lam3d-layout .wd-gallery-images img {
	border-radius: 16px;
}

/* ---------- Left: the buying box under the gallery ---------- */

.lam3d-buybox {
	--lam-purple: #32145f;
	--lam-text: #352044;
	--lam-pink: #ed43a9;
	--lam-soft-purple: #a66ae8;
	--lam-lavender: #f4ecff;
	--lam-pink-bg: #fff0f8;
	--lam-cream: #fff4df;
	--lam-border: #f0ddec;

	--wd-mb: 14px;
	margin-top: 24px;
	overflow-wrap: break-word;
}

/* badge on the left, wishlist and compare as round icons on the right */
.lam3d-buybox > .lam3d-sum-top {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 10px;
}

.lam3d-sum-top > .lam3d-sum-badge {
	margin-right: auto;
}

.lam3d-sum-top .wd-action-btn {
	margin: 0;
}

.lam3d-sum-top .wd-action-btn > a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 1px solid var(--lam-border);
	border-radius: 50%;
	background: #fff;
	color: var(--lam-purple);
	transition: background .2s ease, border-color .2s ease, color .2s ease;
}

.lam3d-sum-top .wd-action-btn > a:hover,
.lam3d-sum-top .wd-action-btn > a:focus,
.lam3d-sum-top .wd-action-btn > a.added {
	border-color: #f7b5dc;
	background: var(--lam-pink-bg);
	color: var(--lam-pink);
}

.lam3d-sum-top .wd-action-btn .wd-action-icon {
	margin: 0;
}

/* the words stay for screen readers only */
.lam3d-sum-top .wd-action-btn .wd-action-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.lam3d-buybox > .product_title {
	margin-bottom: 6px;
	font-size: clamp(23px, 2.1vw, 30px);
	line-height: 1.2;
}

.lam3d-sum-badge {
	display: inline-block;
	padding: 5px 13px;
	border-radius: 30px;
	background: #f8dff2;
	color: #a52d91;
	font-size: 12px;
	font-weight: 800;
	line-height: 1.4;
	letter-spacing: .6px;
	text-transform: uppercase;
}

.lam3d-sum > * {
	margin: 0;
}

.lam3d-sum-tagline {
	color: var(--lam-soft-purple);
	font-size: 16px;
	font-weight: 800;
	line-height: 1.35;
}

.lam3d-sum > .lam3d-sum-text {
	margin-top: 8px;
	color: var(--lam-text);
	font-size: 15px;
	line-height: 1.7;
}

/* three short labels as chips */
.lam3d-sum > .lam3d-sum-facts {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 14px;
	padding: 0;
	list-style: none;
}

.lam3d-sum-fact {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	max-width: 100%;
	margin: 0;
	padding: 7px 13px 7px 10px;
	border-radius: 30px;
	color: var(--lam-purple);
	font-size: 13.5px;
	font-weight: 800;
	line-height: 1.3;
}

.lam3d-sum-fact-1 { background: var(--lam-pink-bg); }
.lam3d-sum-fact-2 { background: var(--lam-lavender); }
.lam3d-sum-fact-3 { background: var(--lam-cream); }

.lam3d-sum-icon {
	flex: 0 0 auto;
	display: inline-flex;
}

.lam3d-sum-icon svg {
	display: block;
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.lam3d-sum-fact-1 .lam3d-sum-icon { color: var(--lam-pink); }
.lam3d-sum-fact-2 .lam3d-sum-icon { color: var(--lam-soft-purple); }
.lam3d-sum-fact-3 .lam3d-sum-icon { color: #f5a42e; }

/* tags and share: last and quieter */
.lam3d-buybox .product_meta,
.lam3d-buybox .product-share {
	font-size: 13px;
	line-height: 1.6;
	opacity: .85;
}

.lam3d-buybox .product_meta {
	padding-top: 14px;
	border-top: 1px solid var(--lam-border);
}

/* ---------- Right: tabs ---------- */

.lam3d-layout .summary .woocommerce-tabs {
	margin-top: 0;
}

.lam3d-layout .summary .wd-nav-tabs-wrapper {
	justify-content: flex-start;
	margin-bottom: 18px;
	text-align: start;
}

.lam3d-layout .summary .wd-nav-tabs {
	--nav-gap: 8px;
	flex-wrap: wrap;
}

.lam3d-layout .summary .wd-nav-tabs > li > a {
	padding: 8px 18px;
	border-radius: 30px;
	background: #f6eefc;
	color: var(--lam-purple, #32145f);
	transition: background .2s ease, color .2s ease;
}

.lam3d-layout .summary .wd-nav-tabs > li > a:hover {
	background: #fde6f4;
	color: #c92f8c;
}

.lam3d-layout .summary .wd-nav-tabs > li.active > a {
	background: #e8d4fb;
	color: #32145f;
}

/* the theme's underline would sit under a pill */
.lam3d-layout .summary .wd-nav-tabs .nav-link-text::after {
	display: none;
}

.lam3d-layout .summary .wd-nav-tabs .nav-link-text {
	font-size: 13px;
	font-weight: 800;
	letter-spacing: .4px;
}

/* ---------- Right: the full description ---------- */

/* the tagline on the left already says what the hero's subtitle says */
.lam3d-layout .summary .lam3d-hero-subtitle {
	display: none;
}

/* the description sizes itself by the column it sits in, not by the screen */
.lam3d-layout .summary .lam3d-description {
	container-type: inline-size;
}

.lam3d-layout .lam3d-hero {
	min-height: 0;
	padding: 26px 30px;
}

.lam3d-layout .lam3d-hero h2 {
	font-size: clamp(24px, 4.4cqi, 36px);
	letter-spacing: -.5px;
}

.lam3d-layout .lam3d-hero p {
	font-size: 15.5px;
}

.lam3d-layout .lam3d-hero-image {
	flex-basis: 32%;
}

.lam3d-layout .lam3d-hero-image img {
	max-width: 230px;
	max-height: 200px;
	border-radius: 18px;
	object-fit: cover;
	aspect-ratio: 1 / 1;
}

.lam3d-layout .lam3d-description .lam3d-about h3,
.lam3d-layout .lam3d-description .lam3d-features-section > h3 {
	font-size: 25px;
}

.lam3d-layout .lam3d-details h3,
.lam3d-layout .lam3d-notes h3 {
	font-size: 21px;
}

/* feature cards: same height in a row, icon above the title, even padding */
.lam3d-layout .lam3d-features {
	align-items: stretch;
}

.lam3d-layout .lam3d-feature-card {
	flex-direction: column;
	align-items: flex-start;
	justify-content: flex-start;
	gap: 8px;
	height: 100%;
	min-height: 0;
	padding: 18px;
}

.lam3d-layout .lam3d-feature-icon {
	flex: 0 0 auto;
}

.lam3d-layout .lam3d-feature-icon svg {
	width: 34px;
	height: 34px;
}

.lam3d-layout .lam3d-feature-content h4 {
	font-size: 17px;
	line-height: 1.3;
}

/* details above notes: the table gets the full width, so labels need not break */
@container (max-width: 1000px) {
	.lam3d-layout .lam3d-info-grid { grid-template-columns: 1fr; }
}

@container (max-width: 600px) {
	.lam3d-layout .lam3d-features { grid-template-columns: 1fr; }
	.lam3d-layout .lam3d-feature-card { flex-direction: row; align-items: center; gap: 14px; }
	.lam3d-layout .lam3d-hero-content { max-width: 66%; }
	.lam3d-layout .lam3d-hero-no-image .lam3d-hero-content { max-width: 100%; }
}

@container (max-width: 440px) {
	.lam3d-layout .lam3d-hero { display: block; padding: 22px; }
	.lam3d-layout .lam3d-hero-content { max-width: 100%; }
	.lam3d-layout .lam3d-hero-image { margin-top: 14px; }
	.lam3d-layout .lam3d-collection { display: block; }
	.lam3d-layout .lam3d-collection-image { max-width: none; margin-bottom: 14px; }
	.lam3d-layout .lam3d-detail-row { grid-template-columns: minmax(104px, 42%) minmax(0, 1fr); }
}

/* ---------- The site's own dark mode (not the device's) ---------- */

.dark .lam3d-buybox,
.woodmart-dark .lam3d-buybox,
[data-theme="dark"] .lam3d-buybox {
	--lam-purple: #f5d8ff;
	--lam-text: #f4edf7;
	--lam-lavender: #30243e;
	--lam-pink-bg: #352337;
	--lam-cream: #3a2e2a;
	--lam-border: #49334f;
}

.dark .lam3d-sum-badge,
.woodmart-dark .lam3d-sum-badge,
[data-theme="dark"] .lam3d-sum-badge {
	background: #52304f;
	color: #ff9bd7;
}

.dark .lam3d-sum-top .wd-action-btn > a,
.woodmart-dark .lam3d-sum-top .wd-action-btn > a,
[data-theme="dark"] .lam3d-sum-top .wd-action-btn > a {
	background: #2a2036;
}

.dark.lam3d-layout .summary .wd-nav-tabs > li > a,
.woodmart-dark.lam3d-layout .summary .wd-nav-tabs > li > a,
[data-theme="dark"] .lam3d-layout .summary .wd-nav-tabs > li > a {
	background: #30243e;
	color: #f5d8ff;
}
