/**
 * Section 6: Bulk Enquiry (RFQ) — Deepak Sales.
 *
 * Mobile-first. Depends on tokens.css + base.css. Reuses existing design
 * tokens only (oxblood, gold, ivory) — no new global variables. Two-column
 * luxury RFQ layout with a floating form card. Entrance animation is CSS-only
 * and respects prefers-reduced-motion.
 */

/* ==========================================================================
   1. Section shell + luxury backdrop
   ========================================================================== */
.ds-bulk {
	position: relative;
	overflow: clip;
	padding-block: var(--ds-section-y);
	isolation: isolate;
	background:
		linear-gradient(180deg, var(--ds-paper), var(--ds-paper-2));
}

.ds-bulk__backdrop {
	position: absolute;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	overflow: clip;
}

.ds-bulk__glow {
	position: absolute;
	border-radius: 50%;
	filter: blur(70px);
	opacity: 0.45;
}

.ds-bulk__glow--one {
	top: -14%;
	right: -8%;
	width: 34rem;
	height: 34rem;
	background: radial-gradient(circle, color-mix(in srgb, var(--ds-gold) 34%, transparent), transparent 66%);
}

.ds-bulk__glow--two {
	bottom: -18%;
	left: -10%;
	width: 28rem;
	height: 28rem;
	background: radial-gradient(circle, color-mix(in srgb, var(--ds-oxblood) 18%, transparent), transparent 68%);
}

/* ==========================================================================
   2. Layout grid
   ========================================================================== */
.ds-bulk__inner {
	display: grid;
	grid-template-columns: 1fr; /* mobile / tablet: stacked */
	gap: clamp(2rem, 1.25rem + 4vw, 3.5rem);
	align-items: start;
}

/* ==========================================================================
   3. Left column — intro
   ========================================================================== */
.ds-bulk__eyebrow {
	margin-bottom: var(--ds-space-sm);
	font-family: var(--ds-font-mono);
	font-size: var(--ds-fs-eyebrow);
	font-weight: var(--ds-fw-label);
	letter-spacing: var(--ds-ls-wide);
	text-transform: uppercase;
	color: var(--ds-oxblood);
}

.ds-bulk__title {
	margin-bottom: var(--ds-space-md);
	font-family: var(--ds-font-display);
	font-size: var(--ds-fs-h2);
	font-weight: var(--ds-fw-section);
	line-height: var(--ds-lh-snug);
	letter-spacing: -0.02em;
	color: var(--ds-heading);
}

.ds-bulk__lead {
	max-width: 44ch;
	margin-bottom: clamp(1.75rem, 1rem + 2vw, 2.5rem);
	font-size: var(--ds-fs-lead);
	line-height: var(--ds-lh-body);
	color: var(--ds-muted);
}

/* ---- Feature cards -------------------------------------------------------- */
.ds-bulk__features {
	display: flex;
	flex-direction: column;
	gap: var(--ds-space-sm);
	margin-bottom: clamp(1.75rem, 1rem + 2vw, 2.5rem);
}

.ds-bulk__feature {
	display: flex;
	align-items: center;
	gap: var(--ds-space-md);
	padding: clamp(0.85rem, 0.6rem + 1vw, 1.15rem) clamp(1rem, 0.7rem + 1vw, 1.4rem);
	border: 1px solid var(--ds-line);
	border-radius: var(--ds-radius-lg);
	background-color: var(--ds-surface);
	box-shadow: var(--ds-shadow-sm);
	transition:
		transform var(--ds-dur) var(--ds-ease),
		border-color var(--ds-dur) var(--ds-ease),
		box-shadow var(--ds-dur) var(--ds-ease);
}

.ds-bulk__feature:hover {
	transform: translateY(-3px);
	border-color: color-mix(in srgb, var(--ds-gold) 55%, var(--ds-line));
	box-shadow: var(--ds-shadow-md);
}

.ds-bulk__feature-ic {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.4rem;
	height: 2.4rem;
	flex: 0 0 auto;
	border-radius: 50%;
	background: var(--ds-gold-tint);
	color: var(--ds-oxblood);
}

.ds-bulk__feature-title {
	font-family: var(--ds-font-body);
	font-size: var(--ds-fs-body);
	font-weight: 600;
	color: var(--ds-ink);
}

/* ---- Trust signals -------------------------------------------------------- */
.ds-bulk__trust {
	display: flex;
	flex-wrap: wrap;
	gap: clamp(1.5rem, 1rem + 2vw, 2.5rem);
}

.ds-bulk__trust-item {
	display: flex;
	flex-direction: column;
}

.ds-bulk__trust-value {
	font-family: var(--ds-font-display);
	font-size: var(--ds-fs-h3);
	font-weight: 600;
	line-height: 1;
	color: var(--ds-oxblood);
}

.ds-bulk__trust-label {
	font-family: var(--ds-font-mono);
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: var(--ds-ls-wide);
	text-transform: uppercase;
	color: var(--ds-muted);
}

/* ==========================================================================
   4. Right column — floating form card
   ========================================================================== */
.ds-bulk__card {
	position: relative;
	padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
	border: 1px solid var(--ds-line);
	border-radius: var(--ds-radius-lg);
	background-color: var(--ds-surface);
	box-shadow: var(--ds-shadow-lg);
	transition:
		transform var(--ds-dur) var(--ds-ease),
		box-shadow var(--ds-dur) var(--ds-ease);
}

.ds-bulk__card:hover {
	transform: translateY(-4px);
	box-shadow: 0 30px 60px -22px rgba(74, 12, 23, 0.26);
}

.ds-bulk__form-title {
	margin-bottom: var(--ds-space-lg);
	font-family: var(--ds-font-display);
	font-size: var(--ds-fs-h3);
	font-weight: 500;
	line-height: var(--ds-lh-snug);
	color: var(--ds-heading);
}

/* ---- Field grid ----------------------------------------------------------- */
.ds-bulk__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--ds-space-md);
}

.ds-bulk__field {
	display: flex;
	flex-direction: column;
}

.ds-bulk__label {
	margin-bottom: 0.4rem;
	font-size: var(--ds-fs-small);
	font-weight: 600;
	color: var(--ds-ink);
}

.ds-bulk__req {
	color: var(--ds-oxblood);
}

/* ---- Inputs --------------------------------------------------------------- */
.ds-bulk__input {
	width: 100%;
	padding: 0.85rem 1rem;
	border: 1px solid var(--ds-line-strong);
	border-radius: var(--ds-radius-md);
	background-color: var(--ds-paper);
	color: var(--ds-ink);
	font-family: var(--ds-font-body);
	font-size: var(--ds-fs-body);
	line-height: 1.4;
	transition:
		border-color var(--ds-dur) var(--ds-ease),
		box-shadow var(--ds-dur) var(--ds-ease),
		background-color var(--ds-dur) var(--ds-ease);
}

.ds-bulk__input::placeholder {
	color: color-mix(in srgb, var(--ds-muted) 80%, transparent);
}

.ds-bulk__input:hover {
	border-color: color-mix(in srgb, var(--ds-oxblood) 40%, var(--ds-line-strong));
}

/* Gold focus ring */
.ds-bulk__input:focus,
.ds-bulk__input:focus-visible {
	outline: none;
	border-color: var(--ds-gold);
	background-color: var(--ds-surface);
	box-shadow: 0 0 0 4px var(--ds-gold-tint);
}

/* min-height/max-height/resize kept identical to .ds-contact__textarea
   (contact.css) — the two forms previously drifted (7rem vs 8rem, no
   max-height here), now consolidated to one shared sizing. */
.ds-bulk__textarea {
	min-height: 7.5rem;
	max-height: 18rem;
	resize: vertical;
}

/* ---- Invalid state (native HTML5 validation — fields already carry
   `required`/`aria-required`, so this activates with no JS/markup changes.
   :user-invalid only matches after the user has interacted with the field,
   so nothing shows red on first load. Reuses --ds-oxblood/--ds-oxblood-tint
   — the theme's existing "negative/required" colors (see .ds-bulk__req,
   .stock.out-of-stock in single-product.css) — instead of a new color. */
.ds-bulk__input:user-invalid,
.ds-bulk__input[aria-invalid="true"] {
	border-color: var(--ds-oxblood);
}

.ds-bulk__input:user-invalid:focus,
.ds-bulk__input:user-invalid:focus-visible,
.ds-bulk__input[aria-invalid="true"]:focus,
.ds-bulk__input[aria-invalid="true"]:focus-visible {
	border-color: var(--ds-oxblood);
	box-shadow: 0 0 0 4px var(--ds-oxblood-tint);
}

/* Optional inline error text — unused unless a caller renders it, no
   layout impact until then. */
.ds-bulk__error {
	margin-top: 0.4rem;
	font-size: var(--ds-fs-small);
	color: var(--ds-oxblood);
}

/* Select — custom caret via CSS background (no inline styles) */
.ds-bulk__select {
	appearance: none;
	-webkit-appearance: none;
	padding-right: 2.75rem;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b1220' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 1rem center;
	background-size: 16px 16px;
	cursor: pointer;
}

/* ---- Honeypot (visually + a11y hidden) ------------------------------------ */
.ds-bulk__hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ---- Submit --------------------------------------------------------------- */
/* Sizing (padding/font/radius) matches .ds-btn (base.css) — the single
   source of truth for button dimensions — while keeping its own class for
   the gold hover treatment (.ds-btn--primary hovers to a darker oxblood
   instead), which is a deliberate distinct CTA style, not a duplicate to
   remove. */
.ds-bulk__submit {
	width: 100%;
	margin-top: var(--ds-space-lg);
	padding: 0.7em 1.3em;
	border: 1px solid var(--ds-oxblood);
	border-radius: var(--ds-radius-pill);
	background-color: var(--ds-oxblood);
	color: var(--ds-on-accent);
	font-family: var(--ds-font-body);
	font-size: var(--ds-fs-button);
	font-weight: 600;
	letter-spacing: 0.01em;
	line-height: 1;
	transition:
		transform var(--ds-dur-fast) var(--ds-ease),
		background-color var(--ds-dur) var(--ds-ease),
		color var(--ds-dur) var(--ds-ease),
		border-color var(--ds-dur) var(--ds-ease),
		box-shadow var(--ds-dur) var(--ds-ease);
}

.ds-bulk__submit:hover {
	transform: translateY(-2px);
	background-color: var(--ds-gold);
	color: var(--ds-ink);
	border-color: var(--ds-gold);
	box-shadow: var(--ds-shadow-md);
}

.ds-bulk__submit:active {
	transform: translateY(0);
}

.ds-bulk__privacy {
	margin-top: var(--ds-space-md);
	text-align: center;
	font-size: var(--ds-fs-small);
	color: var(--ds-muted);
}

/* ---- Form success state (mirrors contact.css's .ds-contact__success-*) --- */
.ds-bulk__success-message {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	min-height: 420px;
}

.ds-bulk__success-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 5rem;
	height: 5rem;
	margin-bottom: 1.5rem;
	border-radius: 50%;
	background: var(--ds-gold-tint);
	color: var(--ds-oxblood);
}

.ds-bulk__success-icon svg {
	width: 32px;
	height: 32px;
}

.ds-bulk__success-title {
	margin-bottom: 0.75rem;
	font-family: var(--ds-font-display);
	font-size: var(--ds-fs-h2);
	color: var(--ds-heading);
}

.ds-bulk__success-text {
	max-width: 24rem;
	color: var(--ds-muted);
	line-height: var(--ds-lh-body);
}

/* ==========================================================================
   5. Entrance animation (fade up — CSS only).
   Hidden state lives in the keyframe so content stays visible if disabled.
   ========================================================================== */
@keyframes ds-bulk-rise {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

.ds-bulk__intro,
.ds-bulk__card {
	animation: ds-bulk-rise 0.6s var(--ds-ease) both;
}

.ds-bulk__card {
	animation-delay: 0.12s;
}

.ds-bulk__feature {
	animation: ds-bulk-rise 0.5s var(--ds-ease) both;
}

.ds-bulk__feature:nth-child(1) { animation-delay: 0.18s; }
.ds-bulk__feature:nth-child(2) { animation-delay: 0.26s; }
.ds-bulk__feature:nth-child(3) { animation-delay: 0.34s; }

/* ==========================================================================
   6. Responsive — 2 columns (45% / 55%) on desktop
   ========================================================================== */
@media (min-width: 40em) {
	.ds-bulk__grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.ds-bulk__field--full {
		grid-column: 1 / -1;
	}
}

/* 62em (992px) — the theme's formal desktop tier (see header.css/hero.css),
   replacing the previous 64em guess. */
@media (min-width: 62em) {
	.ds-bulk__inner {
		grid-template-columns: minmax(0, 45fr) minmax(0, 55fr);
		gap: clamp(3rem, 1.5rem + 4vw, 5rem);
		align-items: center;
	}
}

/* ==========================================================================
   7. Reduced motion — settle to the final, visible state.
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
	.ds-bulk__intro,
	.ds-bulk__card,
	.ds-bulk__feature {
		animation: none;
		opacity: 1;
		transform: none;
	}

	.ds-bulk__feature:hover,
	.ds-bulk__card:hover,
	.ds-bulk__submit:hover {
		transform: none;
	}
}