/* Buffyz decoration page — mobile-first */
.bd-wrap {
	--bd-primary: #8b1e3f;   /* maroon – change to your brand colour */
	--bd-primary-dark: #5a1028;
	--bd-accent: #c9a227;    /* gold */
	--bd-bg: #fffaf3;
	--bd-text: #2b2b2b;
	--bd-muted: #6b6b6b;
	--bd-radius: 16px;
	color: var(--bd-text);
	max-width: 1180px;
	margin: 0 auto;
	padding: 0 16px 48px;
	box-sizing: border-box;
	overflow-x: clip;
	-webkit-tap-highlight-color: transparent;
}
.bd-wrap *, .bd-wrap *::before, .bd-wrap *::after { box-sizing: border-box; min-width: 0; }
.bd-hi { font-size: .85em; color: var(--bd-muted); font-weight: normal; }
/* Language toggle: English by default, Hindi when the site adds html.is-hi */
html:not(.is-hi) .bd-wrap .l-hi, html.is-hi .bd-wrap .l-en { display: none !important; }
html.is-hi .bd-wrap { line-height: 1.65; }
html.bd-noscroll, html.bd-noscroll body { overflow: hidden; }

/* ---------- Hero ---------- */
.bd-hero {
	text-align: center;
	padding: 44px 20px 40px;
	margin: 0 -16px 28px;
	background: linear-gradient(135deg, var(--bd-primary), var(--bd-primary-dark));
	color: #fff;
	border-radius: 0 0 24px 24px;
}
.bd-hero.has-image { background-size: cover; background-position: center; padding: 64px 20px 56px; }
.bd-hero h2 { color: #fff; margin: 0 0 12px; font-size: clamp(1.55rem, 6vw, 2.6rem); line-height: 1.2; text-wrap: balance; }
.bd-hero-hi { display: block; font-size: .62em; font-weight: 500; color: #f3e3c3; margin-top: 6px; }
.bd-hero p { max-width: 640px; margin: 0 auto 8px; font-size: clamp(.95rem, 3.6vw, 1.1rem); line-height: 1.55; }
.bd-hero .bd-hi-line { color: #f3e3c3; }
.bd-hero .bd-btn { margin-top: 18px; background: var(--bd-accent); color: #2b1a00; }

.bd-wrap h3 { text-align: center; font-size: clamp(1.35rem, 5vw, 1.7rem); margin: 0 0 16px; line-height: 1.3; }

/* ---------- Buttons ---------- */
.bd-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap;
	min-height: 48px; border: 0; cursor: pointer;
	padding: 12px 24px; border-radius: 999px;
	background: var(--bd-primary); color: #fff;
	font-weight: 600; font-size: 1rem; text-decoration: none; line-height: 1.3;
	box-shadow: 0 6px 18px rgba(139, 30, 63, .22);
	transition: transform .15s, filter .15s;
}
.bd-btn .bd-hi { color: inherit; opacity: .85; }
.bd-btn:hover { filter: brightness(1.08); color: #fff; }
.bd-hero .bd-btn:hover { color: #2b1a00; }
.bd-btn:active { transform: scale(.97); }
.bd-btn:focus-visible, .bd-chip:focus-visible, .bd-preset:focus-visible, .bd-photo:focus-visible { outline: 3px solid var(--bd-accent); outline-offset: 2px; }
.bd-btn:disabled { opacity: .6; cursor: wait; }
.bd-wa { background: #25d366; box-shadow: 0 6px 18px rgba(37, 211, 102, .25); }
.bd-btn-sm { min-height: 42px; padding: 8px 18px; font-size: .95rem; box-shadow: none; }

/* ---------- Gallery ---------- */
.bd-gallery { margin-bottom: 44px; }
.bd-filters {
	display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;
	margin-bottom: 20px;
}
.bd-chip {
	flex: none; border: 1px solid #e3d9cc; background: #fff; color: var(--bd-text);
	min-height: 40px; padding: 8px 16px; border-radius: 999px; cursor: pointer; font-size: .92rem;
	white-space: nowrap; transition: background .15s, color .15s;
}
.bd-chip.is-active { background: var(--bd-primary); border-color: var(--bd-primary); color: #fff; }
.bd-chip.is-active .bd-hi { color: #f3e3c3; }

.bd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.bd-photo {
	position: relative; padding: 0; border: 0; cursor: zoom-in; border-radius: var(--bd-radius); overflow: hidden;
	aspect-ratio: 4 / 3; background: #f1e9df;
	box-shadow: 0 8px 22px rgba(0, 0, 0, .10);
}
.bd-photo[hidden] { display: none; }
.bd-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .45s ease; }
.bd-photo::after {
	content: ""; position: absolute; inset: 0; pointer-events: none;
	background: linear-gradient(to top, rgba(0, 0, 0, .18), transparent 40%);
}
.bd-photo:hover img { transform: scale(1.05); }
.bd-cap {
	position: absolute; left: 0; right: 0; bottom: 0; z-index: 1;
	padding: 28px 14px 12px; text-align: left; color: #fff;
	font-size: .92rem; font-weight: 600; line-height: 1.35;
	background: linear-gradient(to top, rgba(0, 0, 0, .72), rgba(0, 0, 0, 0));
	text-shadow: 0 1px 2px rgba(0, 0, 0, .4);
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.bd-dots, .bd-swipe { display: none; }

/* ---------- Lightbox ---------- */
.bd-lightbox {
	position: fixed; inset: 0; z-index: 99999; background: rgba(10, 6, 8, .985);
	display: flex; align-items: center; justify-content: center;
	padding: max(56px, env(safe-area-inset-top)) 12px max(84px, env(safe-area-inset-bottom));
	touch-action: pan-y;
}
.bd-lightbox[hidden] { display: none; }
.bd-lb-fig { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.bd-lightbox img {
	max-width: 100%; max-height: calc(100vh - 200px); object-fit: contain; border-radius: 10px;
	opacity: 0; transition: opacity .25s;
}
.bd-lb-cap { color: #f3e3c3; text-align: center; font-size: 1rem; line-height: 1.45; padding: 0 16px; max-width: 720px; }
.bd-lb-cap[hidden] { display: none; }
.bd-lightbox img.is-loaded { opacity: 1; }
.bd-lightbox button {
	background: rgba(255, 255, 255, .14); color: #fff; border: 0;
	font-size: 2rem; width: 48px; height: 48px; border-radius: 50%; cursor: pointer; line-height: 1;
	display: inline-flex; align-items: center; justify-content: center;
}
.bd-lb-close { position: absolute; top: max(12px, env(safe-area-inset-top)); right: 12px; }
.bd-lb-count { position: absolute; top: max(24px, env(safe-area-inset-top)); left: 18px; color: #ddd; font-size: .95rem; }
.bd-lb-nav { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); display: flex; justify-content: space-between; padding: 0 12px; pointer-events: none; }
.bd-lb-nav button { pointer-events: auto; }

/* ---------- Builder ---------- */
.bd-builder { background: var(--bd-bg); border-radius: 24px; padding: 28px 22px; }
.bd-note { text-align: center; color: var(--bd-muted); margin: 0 0 20px; }
.bd-presets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 24px; }
.bd-preset {
	background: #fff; border: 2px solid #e6ddd0; border-radius: var(--bd-radius);
	padding: 16px 12px; cursor: pointer; text-align: center; color: var(--bd-text);
	display: flex; flex-direction: column; gap: 4px; align-items: center;
	transition: border-color .15s, box-shadow .15s;
}
.bd-preset strong { font-size: 1.1rem; }
.bd-preset small { color: var(--bd-muted); }
.bd-preset em { font-style: normal; font-size: .8rem; color: var(--bd-primary); font-weight: 600; }
.bd-preset.is-active { border-color: var(--bd-primary); box-shadow: 0 6px 18px rgba(139, 30, 63, .16); }

.bd-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.bd-group { background: #fff; border: 1px solid #eee4d6; border-radius: 14px; padding: 12px 16px 6px; margin: 0; }
.bd-group legend { font-weight: 700; padding: 0 6px; color: var(--bd-primary); }
.bd-item { display: flex; gap: 12px; align-items: flex-start; min-height: 44px; padding: 9px 0; cursor: pointer; font-size: .97rem; line-height: 1.4; border-bottom: 1px solid #f5efe6; }
.bd-item:last-child { border-bottom: 0; }

.bd-item input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--bd-primary); flex: none; }

.bd-summary {
	margin: 20px 0; padding: 14px 16px; border-radius: 12px;
	background: #fff; border-left: 4px solid var(--bd-accent); font-weight: 600;
}
.bd-price-note { font-weight: normal; color: var(--bd-muted); font-size: .9rem; margin-top: 4px; }

.bd-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; scroll-margin-top: 90px; }
.bd-fields label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .95rem; }
.bd-fields .bd-full { grid-column: 1 / -1; }
.bd-fields input, .bd-fields select, .bd-fields textarea {
	width: 100%; min-height: 48px; padding: 11px 13px; border: 1px solid #d6ccbf; border-radius: 10px;
	font: inherit; font-size: 16px; font-weight: normal; background: #fff; color: var(--bd-text);
}
.bd-fields input:focus, .bd-fields select:focus, .bd-fields textarea:focus { outline: 2px solid var(--bd-primary); outline-offset: 0; border-color: var(--bd-primary); }
.bd-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

.bd-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; justify-content: center; }
.bd-msg { text-align: center; margin: 14px 0 0; font-weight: 600; min-height: 1.2em; }
.bd-msg.is-ok { color: #1e7b34; }
.bd-msg.is-error { color: #b32d2e; }

.bd-sticky { display: none; }

/* ---------- Phones ---------- */
@media (max-width: 640px) {
	.bd-hero { border-radius: 0 0 20px 20px; }
	.bd-hero .bd-btn { width: 100%; max-width: 340px; }

	/* chips: one swipeable row */
	.bd-filters {
		flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto;
		margin: 0 -16px 16px; padding: 2px 16px 6px; scrollbar-width: none;
		scroll-snap-type: x proximity;
	}
	.bd-filters::-webkit-scrollbar { display: none; }
	.bd-chip { scroll-snap-align: start; }

	/* gallery: big swipeable cards with a peek of the next one */
	.bd-grid {
		display: flex; gap: 12px; overflow-x: auto;
		margin: 0 -16px; padding: 4px 16px 18px;
		scroll-snap-type: x mandatory; scroll-padding-inline: 16px;
		scrollbar-width: none; overscroll-behavior-x: contain;
	}
	.bd-grid::-webkit-scrollbar { display: none; }
	.bd-photo {
		flex: 0 0 84%; aspect-ratio: 4 / 5; scroll-snap-align: start;
		border-radius: 20px; box-shadow: 0 10px 26px rgba(0, 0, 0, .16);
	}
	.bd-photo:hover img { transform: none; }
	.bd-cap { font-size: 1rem; padding: 40px 16px 16px; }

	.bd-dots { display: flex; justify-content: center; gap: 6px; margin-top: 2px; flex-wrap: wrap; }
	.bd-dots span { width: 7px; height: 7px; border-radius: 99px; background: #d9cbbb; transition: width .2s, background .2s; }
	.bd-dots span.is-active { width: 22px; background: var(--bd-primary); }
	.bd-swipe { display: block; text-align: center; color: var(--bd-muted); font-size: .85rem; margin: 10px 0 0; }

	.bd-lightbox { padding-left: 0; padding-right: 0; }
	.bd-lightbox img { border-radius: 0; }
	.bd-lb-nav { top: auto; bottom: max(18px, env(safe-area-inset-bottom)); transform: none; justify-content: center; gap: 28px; }
	.bd-lb-nav button { width: 54px; height: 54px; }

	.bd-builder { margin: 0 -16px; border-radius: 24px 24px 0 0; padding: 26px 14px 30px; }
	.bd-presets { grid-template-columns: 1fr; gap: 10px; }
	.bd-preset { flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: center; text-align: left; padding: 14px 16px; }
	.bd-preset small { flex: 1 1 100%; order: 3; }
	.bd-groups { grid-template-columns: 1fr; gap: 12px; }
	.bd-fields { grid-template-columns: 1fr; }
	.bd-actions .bd-btn { width: 100%; }

	/* sticky quote bar while ticking items */
	.bd-sticky {
		display: flex; position: fixed; left: 10px; right: 10px; z-index: 9998;
		bottom: max(10px, env(safe-area-inset-bottom));
		align-items: center; justify-content: space-between; gap: 10px;
		padding: 8px 8px 8px 16px; border-radius: 999px;
		background: #fff; color: var(--bd-text); font-size: .95rem;
		box-shadow: 0 8px 28px rgba(0, 0, 0, .22);
		transform: translateY(140%); transition: transform .25s ease;
	}
	.bd-sticky.is-on { transform: none; }
	.bd-sticky b { color: var(--bd-primary); }
}

@media (prefers-reduced-motion: reduce) {
	.bd-wrap *, .bd-lightbox img { transition: none !important; }
}
