/**
 * wholesale.css — Wholesale / B2B page route-scoped styles.
 *
 * Loaded only on pages using the "Greek Product — Wholesale" template
 * (see includes/enqueue.php). Depends on core.css for design tokens,
 * .gp-container, .gp-btn, .gp-eyebrow, and .gp-section-head.
 *
 * @package woodmart-child
 */

/* ============================================================ *
 * 1. WoodMart content-wrapper reset for full-bleed layout
 * ============================================================ */
.gp-wholesale-template .wd-page-content,
.gp-wholesale-template .wd-content-layout {
	max-width: 100% !important;
	width: 100% !important;
	padding: 0 !important;
	margin: 0 !important;
	overflow: visible !important;
	display: block !important;
	float: none !important;
}

.gp-wholesale {
	background: var(--gp-paper);
}

/* ============================================================ *
 * 2. Hero — split layout (content left, image right)
 * ============================================================ */
.gp-wholesale-hero {
	display: grid;
	grid-template-columns: 1.1fr 1fr;
	min-height: min(75vh, 640px);
	overflow: hidden;
}

.gp-wholesale-hero__content {
	background: var(--gp-ink);
	padding: clamp(56px, 7vw, 100px) 0;
	display: flex;
	align-items: center;
}

.gp-wholesale-hero__content .gp-container {
	display: flex;
	flex-direction: column;
	gap: 28px;
}

.gp-wholesale-hero .gp-eyebrow--light {
	color: var(--gp-sun);
}

.gp-wholesale-hero__title {
	font-family: var(--gp-serif);
	font-size: clamp(36px, 4.5vw, 64px);
	font-weight: 400;
	line-height: 1.08;
	letter-spacing: -.022em;
	color: var(--gp-cream);
	margin: 0;
}

.gp-wholesale-hero__title em {
	font-style: italic;
	color: var(--gp-sun);
}

.gp-wholesale-hero__body {
	font-family: var(--gp-sans);
	font-size: clamp(15px, 1.3vw, 18px);
	line-height: 1.68;
	color: var(--gp-cream);
	opacity: .82;
	margin: 0;
	max-width: 480px;
}

.gp-wholesale-hero__media {
	overflow: hidden;
}

.gp-wholesale-hero__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
}

.gp-wholesale-hero__placeholder {
	width: 100%;
	height: 100%;
	min-height: 400px;
	background: linear-gradient(160deg, var(--gp-sea) 0%, var(--gp-sea-deep) 100%);
}

/* ============================================================ *
 * 3. Benefits grid
 * ============================================================ */
.gp-wholesale-benefits {
	background: var(--gp-paper);
	padding: clamp(64px, 8vw, 120px) 0;
}

.gp-wholesale-benefits .gp-section-head {
	margin-bottom: 56px;
}

.gp-wholesale-benefits__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

.gp-wholesale-benefits__card {
	background: #fff;
	border: 1px solid var(--gp-line);
	border-radius: 6px;
	padding: 32px 28px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	transition: box-shadow .2s var(--gp-ease), border-color .2s var(--gp-ease);
}

.gp-wholesale-benefits__card:hover {
	border-color: var(--gp-sea);
	box-shadow: 0 4px 20px rgba(0, 82, 160, .1);
}

.gp-wholesale-benefits__icon {
	width: 48px;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--gp-cream);
	border-radius: 50%;
	color: var(--gp-sea);
	flex: none;
}

.gp-wholesale-benefits__heading {
	font-family: var(--gp-serif);
	font-size: 20px;
	font-weight: 500;
	line-height: 1.2;
	color: var(--gp-ink);
	margin: 0;
}

.gp-wholesale-benefits__body {
	font-family: var(--gp-sans);
	font-size: var(--gp-body);
	line-height: 1.65;
	color: var(--gp-ink-soft);
	margin: 0;
}

/* ============================================================ *
 * 4. Form section
 * ============================================================ */
.gp-wholesale-form-section {
	background: var(--gp-cream);
	padding: clamp(64px, 8vw, 120px) 0;
	scroll-margin-top: 80px;
}

.gp-wholesale-form-card {
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 4px 32px rgba(19, 41, 61, .08);
	overflow: hidden;
	max-width: 860px;
	margin-inline: auto;
}

.gp-wholesale-form-card__intro {
	background: var(--gp-ink);
	color: var(--gp-cream);
	padding: clamp(32px, 4vw, 56px) clamp(28px, 4vw, 56px);
}

.gp-wholesale-form-card__intro .gp-eyebrow {
	color: var(--gp-sun);
	margin-bottom: 16px;
}

.gp-wholesale-form-card__intro h2 {
	font-family: var(--gp-serif);
	font-size: clamp(28px, 3vw, 40px);
	font-weight: 400;
	line-height: 1.12;
	letter-spacing: -.018em;
	color: #fff;
	margin: 0 0 12px;
}

.gp-wholesale-form-card__intro p {
	font-family: var(--gp-sans);
	font-size: var(--gp-body);
	line-height: 1.65;
	color: var(--gp-cream);
	opacity: .8;
	margin: 0;
}

/* ── Form body ─────────────────────────────────────────────── */
.gp-b2b-form {
	padding: clamp(28px, 4vw, 48px) clamp(28px, 4vw, 56px);
}

/* Honeypot — visually removed from layout; screen readers see aria-hidden */
.gp-b2b-form__trap {
	position: absolute;
	left: -9999px;
	visibility: hidden;
}

.gp-b2b-form__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
}

.gp-b2b-form__field--wide {
	grid-column: 1 / -1;
}

.gp-b2b-form__label {
	display: block;
	font-family: var(--gp-sans);
	font-size: var(--gp-small);
	font-weight: 600;
	letter-spacing: .02em;
	color: var(--gp-ink);
	margin-bottom: 6px;
}

.gp-b2b-form__label span {
	color: var(--gp-sea);
	margin-left: 2px;
}

.gp-b2b-form__input {
	width: 100%;
	height: 48px;
	padding: 0 14px;
	font-family: var(--gp-sans);
	font-size: var(--gp-body);
	color: var(--gp-ink);
	background: var(--gp-paper);
	border: 1px solid var(--gp-line);
	border-radius: 6px;
	outline: none;
	transition: border-color .18s var(--gp-ease), box-shadow .18s var(--gp-ease);
	box-sizing: border-box;
	-webkit-appearance: none;
}

.gp-b2b-form__input:focus {
	border-color: var(--gp-sea);
	box-shadow: 0 0 0 3px rgba(0, 82, 160, .12);
}

.gp-b2b-form__input.is-invalid {
	border-color: #d32f2f;
	box-shadow: 0 0 0 3px rgba(211, 47, 47, .1);
}

.gp-b2b-form__textarea {
	height: auto;
	padding: 12px 14px;
	resize: vertical;
}

/* Select wrapper (custom caret via SVG data URI) */
.gp-b2b-form__select-wrap {
	position: relative;
}

.gp-b2b-form__select-wrap::after {
	content: '';
	position: absolute;
	right: 14px;
	top: 50%;
	transform: translateY(-50%);
	width: 16px;
	height: 16px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%2313293d' stroke-width='1.6'%3E%3Cpath d='M4 6l4 4 4-4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-size: contain;
	pointer-events: none;
}

.gp-b2b-form__select {
	width: 100%;
	height: 48px;
	padding: 0 40px 0 14px;
	font-family: var(--gp-sans);
	font-size: var(--gp-body);
	color: var(--gp-ink);
	background: var(--gp-paper);
	border: 1px solid var(--gp-line);
	border-radius: 6px;
	outline: none;
	cursor: pointer;
	transition: border-color .18s var(--gp-ease), box-shadow .18s var(--gp-ease);
	-webkit-appearance: none;
	appearance: none;
	box-sizing: border-box;
}

.gp-b2b-form__select:focus {
	border-color: var(--gp-sea);
	box-shadow: 0 0 0 3px rgba(0, 82, 160, .12);
}

.gp-b2b-form__select.is-invalid {
	border-color: #d32f2f;
}

/* Notice */
.gp-b2b-form__notice {
	margin-top: 16px;
	padding: 12px 16px;
	border-radius: 6px;
	font-family: var(--gp-sans);
	font-size: var(--gp-body);
	line-height: 1.5;
}

.gp-b2b-form__notice--error {
	background: #fef2f2;
	border: 1px solid #f87171;
	color: #b91c1c;
}

.gp-b2b-form__notice--ok {
	background: #f0fdf4;
	border: 1px solid #86efac;
	color: #15803d;
}

/* Footer (button + consent) */
.gp-b2b-form__footer {
	margin-top: 24px;
	display: flex;
	align-items: center;
	gap: 20px;
	flex-wrap: wrap;
}

.gp-b2b-form__submit {
	min-width: 200px;
	height: 52px;
	font-size: 15px;
	position: relative;
}

.gp-b2b-form__submit .gp-b2b-form__spinner {
	display: none;
	width: 18px;
	height: 18px;
	border: 2px solid rgba(255, 255, 255, .35);
	border-top-color: #fff;
	border-radius: 50%;
	animation: gp-b2b-spin .7s linear infinite;
}

.gp-b2b-form__submit.is-loading .gp-b2b-form__submit-label {
	opacity: 0;
}

.gp-b2b-form__submit.is-loading .gp-b2b-form__spinner {
	display: inline-block;
	position: absolute;
}

@keyframes gp-b2b-spin {
	to { transform: rotate(360deg); }
}

.gp-b2b-form__consent {
	font-family: var(--gp-sans);
	font-size: var(--gp-small);
	color: var(--gp-ink-soft);
	margin: 0;
	line-height: 1.5;
}

.gp-b2b-form__consent a {
	color: var(--gp-sea);
	text-decoration: underline;
}

/* ── Success panel ─────────────────────────────────────────── */
.gp-b2b-success {
	padding: clamp(48px, 5vw, 80px) clamp(28px, 4vw, 56px);
	text-align: center;
}

.gp-b2b-success__inner {
	max-width: 480px;
	margin-inline: auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	color: var(--gp-sea);
}

.gp-b2b-success__inner h3 {
	font-family: var(--gp-serif);
	font-size: clamp(24px, 2.5vw, 32px);
	font-weight: 400;
	color: var(--gp-ink);
	margin: 0;
}

.gp-b2b-success__inner p {
	font-family: var(--gp-sans);
	font-size: var(--gp-body);
	line-height: 1.65;
	color: var(--gp-ink-soft);
	margin: 0;
}

/* ============================================================ *
 * 5. Responsive
 * ============================================================ */

/* ── 900 px: 2-col benefits, single-col hero ────────────────── */
@media (max-width: 900px) {
	.gp-wholesale-hero {
		grid-template-columns: 1fr;
		min-height: auto;
	}

	.gp-wholesale-hero__media {
		height: clamp(220px, 40vw, 400px);
	}

	.gp-wholesale-benefits__list {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* ── 640 px: single-col form grid, single-col benefits ──────── */
@media (max-width: 640px) {
	.gp-b2b-form__grid {
		grid-template-columns: 1fr;
	}

	.gp-b2b-form__field--wide {
		grid-column: 1;
	}

	.gp-wholesale-benefits__list {
		grid-template-columns: 1fr;
	}

	.gp-b2b-form__footer {
		flex-direction: column;
		align-items: stretch;
	}

	.gp-b2b-form__submit {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.gp-wholesale-benefits__card {
		transition: none;
	}

	.gp-b2b-form__spinner {
		animation: none;
	}
}
