/* ===== SECTION: Custom Design Hero - Start ===== */
.cd-hero {
	padding-top: 16px;
}

@media (max-width: 1279px) {
	.cd-hero {
		padding-top: 12px;
	}
}

.cd-hero__box {
	display: flex;
	flex-direction: column;
	gap: 150px;
	min-height: 511px;
	padding: 40px;
	background-color: var(--light-gray);
	background-image: url("/wp-content/themes/shop/img/custom-design/hero.webp");
	background-size: cover;
	background-position: center;
	border: 1px solid var(--border);
	border-radius: var(--radius-large);
}

.cd-hero__text {
	display: flex;
	flex-direction: column;
	gap: 24px;
	max-width: 700px;
}

.cd-hero__lead {
	max-width: 452px;
}

.cd-hero__badge {
	display: flex;
	align-items: center;
	gap: 16px;
	align-self: flex-start;
	padding: 12px 24px 12px 12px;
	border: 1px solid var(--border-light);
	border-radius: var(--radius-pill);
	color: var(--white);
}

.cd-hero__badge img {
	width: 30px;
	height: 30px;
	filter: brightness(0) invert(1);
}
/* ===== SECTION: Custom Design Hero - End ===== */

/* ===== SECTION: Custom Design Builder - Start ===== */
.cd-builder {
	padding-top: 72px;
}

.cd-cols {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 701px;
	gap: 32px;
	align-items: start;
	width: 100%;
}

.cd-steps {
	display: flex;
	flex-direction: column;
	gap: 40px;
	min-width: 0;
}

.cd-form {
	display: flex;
	flex-direction: column;
	gap: 40px;
}

/* Крок */
.cd-step {
	display: flex;
	flex-direction: column;
	gap: 64px;
	padding: 32px;
	border: 1px solid var(--input-border);
	border-radius: var(--radius-medium);
}

.cd-step__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 24px;
}

.cd-step__title {
	display: flex;
	flex-direction: column;
	gap: 24px;
	max-width: 666px;
}

.cd-step__num {
	font-family: var(--font-family-2);
	font-weight: 600;
	font-size: 36px;
	line-height: 47px;
}

.cd-step__body {
	display: flex;
	flex-direction: column;
	gap: 40px;
}

/* Тип виробу */
.cd-types {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
}

.cd-type {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 16px;
	border: 1px solid var(--border);
	border-radius: var(--radius-medium);
	cursor: pointer;
	transition: all 0.3s ease-in-out;
}

.cd-type input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.cd-type.is-active {
	background: var(--card-gray);
	border-color: var(--input-border);
}

.cd-type__image {
	display: flex;
	height: 281px;
	overflow: hidden;
	background: var(--card-gray);
	border-radius: var(--radius-medium);
}

.cd-type__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.cd-type__box {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 24px;
	background: var(--white);
	border: 1px solid var(--border);
	border-radius: var(--radius-medium);
}

.cd-type__row {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 24px;
}

.cd-type__name {
	color: var(--black);
}

.cd-type__radio {
	display: flex;
	flex: 0 0 26px;
	width: 26px;
	height: 26px;
	padding: 3px;
	border: 1px solid var(--black);
	border-radius: var(--radius-max);
}

.cd-type__radio::after {
	content: "";
	width: 100%;
	height: 100%;
	background: var(--black);
	border-radius: var(--radius-max);
	opacity: 0;
	transition: all 0.3s ease-in-out;
}

.cd-type.is-active .cd-type__radio::after {
	opacity: 1;
}

.cd-type__note {
	padding: 16px 0;
	border-top: 1px solid var(--input-border);
	border-bottom: 1px solid var(--input-border);
	font-family: var(--font-family-1);
	font-weight: 500;
	font-size: 16px;
	line-height: 19px;
	color: var(--black);
}

/* Розміри */
.cd-sizes {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.cd-sizes__label {
	font-family: var(--font-family-1);
	font-weight: 500;
	font-size: 16px;
	line-height: 19px;
	color: var(--black);
}

.cd-sizes__list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 7px;
}

.cd-chip {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 16px 32px;
	background: transparent;
	border: 1px solid var(--input-border);
	border-radius: var(--radius-pill);
	font-family: var(--font-family-1);
	font-size: 18px;
	line-height: 22px;
	color: var(--black);
	cursor: pointer;
	transition: all 0.3s ease-in-out;
}

.cd-chip__price {
	display: none;
}

@media not all and (pointer: coarse) {
	.cd-chip:hover {
		border-color: var(--black);
	}
}

.cd-chip.is-active {
	background: var(--primary);
	border-color: var(--primary);
}

.cd-chip.is-active .cd-chip__price {
	display: inline;
}

/* Завантаження файлу */
.cd-upload {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 32px;
	padding: 40px;
	background: var(--light-gray);
	border: 1px solid var(--input-border);
	border-radius: var(--radius-medium);
	transition: all 0.3s ease-in-out;
}

.cd-upload.is-over {
	border-color: var(--black);
}

.cd-upload__image {
	width: 152px;
	height: 118px;
	object-fit: contain;
}

.cd-upload__text {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	text-align: center;
}

.cd-upload__file {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 12px 24px;
	background: var(--white);
	border-radius: var(--radius-pill);
}

.cd-upload__name {
	font-family: var(--font-family-1);
	font-weight: 500;
	font-size: 16px;
	line-height: 19px;
	color: var(--black);
}

.cd-upload__remove {
	padding: 0;
	background: none;
	border: none;
	cursor: pointer;
	text-decoration: underline;
	font-size: 16px;
	line-height: 19px;
	color: var(--red);
}

.cd-upload__note {
	color: var(--black);
}

/* Контакти */
.cd-fields {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 24px;
}

.cd-field {
	display: flex;
	flex-direction: column;
	gap: 24px;
	min-width: 0;
}

.cd-field--wide {
	grid-column: 1 / -1;
}

.cd-field > label,
.cd-field-label {
	font-family: var(--font-family-1);
	font-size: 18px;
	line-height: 22px;
	color: var(--black);
}

.cd-form .form-input,
.cd-consult .form-input {
	width: 100%;
	height: 56px;
	padding: 16px;
	background: transparent;
	border: 1px solid var(--input-border);
	border-radius: 10px;
	font-family: var(--font-family-1);
	font-size: 18px;
	line-height: 22px;
	color: var(--black);
}

.cd-form textarea.form-input {
	height: 109px;
	resize: vertical;
}

.cd-form .form-input::placeholder {
	color: var(--black);
	opacity: 1;
}

.cd-form .form-input.error {
	border-color: var(--red);
}

/* Месенджери */
.cd-messengers {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.cd-messengers__list {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
}

.cd-messenger {
	--cd-messenger-bg: var(--black);
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 72px;
	padding: 16px 24px 16px 40px;
	border: 1px solid var(--input-border);
	border-radius: var(--radius-mid);
	cursor: pointer;
	transition: all 0.3s ease-in-out;
}

.cd-messenger input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.cd-messenger__radio {
	display: flex;
	flex: 0 0 20px;
	width: 20px;
	height: 20px;
	padding: 3px;
	border: 1px solid var(--black);
	border-radius: var(--radius-max);
	transition: all 0.3s ease-in-out;
}

.cd-messenger__radio::after {
	content: "";
	width: 100%;
	height: 100%;
	background: var(--light-gray);
	border-radius: var(--radius-max);
	opacity: 0;
	transition: all 0.3s ease-in-out;
}

.cd-messenger__name {
	flex: 1 1 auto;
	font-family: var(--font-family-1);
	font-weight: 500;
	font-size: 16px;
	line-height: 19px;
	color: var(--black);
}

.cd-messenger img {
	flex: 0 0 auto;
	object-fit: contain;
}

.cd-messenger.is-active {
	background: var(--cd-messenger-bg);
	border-color: var(--cd-messenger-bg);
}

.cd-messenger.is-active .cd-messenger__name {
	color: var(--light-gray);
}

.cd-messenger.is-active .cd-messenger__radio {
	border-color: var(--white);
}

.cd-messenger.is-active .cd-messenger__radio::after {
	opacity: 1;
}

.cd-messenger.is-active img {
	filter: brightness(0) invert(1);
}

/* Згода і кнопка */
.cd-agree {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.cd-agree .checkbox-custom {
	align-items: flex-start;
	gap: 12px;
}

.cd-agree .checkbox-custom > span:last-child {
	font-family: var(--font-family-1);
	font-size: 18px;
	line-height: 22px;
	color: var(--black);
}

.cd-submit {
	display: flex;
	margin-top: 24px;
}

/* Майстер (тільки мобільний) */
.cd-wizard,
.cd-wizard__nav {
	display: none;
}
/* ===== SECTION: Custom Design Builder - End ===== */

/* ===== SECTION: Custom Design Summary - Start ===== */
.cd-summary {
	position: sticky;
	top: calc(var(--header-height) + 20px);
	display: flex;
	flex-direction: column;
	gap: 24px;
	max-height: calc(100dvh - var(--header-height) - 40px);
	padding: 24px;
	overflow-y: auto;
	scrollbar-width: thin;
	border: 1px solid var(--input-border);
	border-radius: var(--radius-medium);
}

.cd-summary__body {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.cd-summary__preview {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.cd-summary__preview > img {
	width: 100%;
	height: clamp(170px, 24dvh, 374px);
	object-fit: cover;
	border-radius: var(--radius-medium);
}

.cd-summary__lines {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.cd-summary__line {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 13px 16px;
	background: var(--card-gray);
	border-radius: var(--radius-tiny);
	font-family: var(--font-family-1);
	font-weight: 500;
	font-size: 16px;
	line-height: 19px;
	color: var(--black);
}

.cd-summary__foot {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.cd-summary__note {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	min-height: 112px;
	padding: 14px 16px 14px 152px;
	background: var(--light-gray);
	border: 1px solid var(--border);
	border-radius: 20px;
}

.cd-summary__note img {
	position: absolute;
	left: -7px;
	bottom: 0;
	width: 128px;
	height: 112px;
	object-fit: contain;
}

.cd-summary__consult {
	padding: 0;
	background: none;
	border: none;
	cursor: pointer;
	text-align: left;
	font-family: var(--font-family-1);
	font-weight: 500;
	font-size: 16px;
	line-height: 19px;
	color: var(--black);
	text-decoration: underline;
	transition: all 0.3s ease-in-out;
}

@media not all and (pointer: coarse) {
	.cd-summary__consult:hover {
		color: var(--primary-ring);
	}
}
/* ===== SECTION: Custom Design Summary - End ===== */

/* ===== SECTION: Custom Design Process - Start ===== */
.cd-process {
	padding-top: 120px;
}

.cd-process__box {
	display: flex;
	flex-direction: column;
	gap: 64px;
	padding: 32px;
	background: var(--light-gray);
	border: 1px solid var(--input-border);
	border-radius: var(--radius-medium);
}

.cd-process__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 40px;
}

.cd-process__title {
	display: flex;
	flex-direction: column;
	gap: 16px;
	max-width: 386px;
}

.cd-brand {
	font-family: var(--font-family-2);
	font-weight: 700;
	font-size: 28px;
	line-height: 35px;
	color: var(--black);
}

.cd-process__list {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 16px;
}

.cd-process__item {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 35px;
	min-height: 199px;
	padding: 32px;
	background: var(--white);
	border: 1px solid var(--input-border);
	border-radius: var(--radius-mid);
}

.cd-process__num {
	color: var(--black);
}

.cd-process__text {
	display: flex;
	flex-direction: column;
	gap: 12px;
}
/* ===== SECTION: Custom Design Process - End ===== */

/* ===== SECTION: Custom Design FAQ - Start ===== */
section.faq.cd-faq {
	padding-top: 120px;
	padding-bottom: 120px;
}

.cd-faq .one-column {
	gap: 80px;
}

section.faq.cd-faq .h2 {
	margin-bottom: 0;
}

.cd-faq__head {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 24px;
	text-align: center;
}

.cd-faq__badge {
	display: flex;
	align-items: center;
	gap: 18px;
	padding: 12px 24px 12px 12px;
	border: 1px solid var(--input-border);
	border-radius: var(--radius-pill);
}

.cd-faq__badge img {
	width: 30px;
	height: 30px;
}
/* ===== SECTION: Custom Design FAQ - End ===== */

/* ===== SECTION: Custom Design Consult Popup - Start ===== */
.cd-consult__head {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	text-align: center;
}

.cd-consult .cd-consult-form {
	display: flex;
	flex-direction: column;
	gap: 40px;
}

.cd-consult__fields {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.cd-consult .cd-field {
	gap: 24px;
}

.cd-consult .form-input {
	height: 60px;
	padding: 16px 24px;
	border-radius: var(--radius-pill);
}
/* ===== SECTION: Custom Design Consult Popup - End ===== */

@media (max-width: 1680px) {
	.cd-form .form-input {
		height: 53px;
		font-size: 16px;
		line-height: 19px;
	}

	.cd-hero__box {
		gap: 144px;
		min-height: 475px;
		padding: 36px;
	}

	.cd-builder {
		padding-top: 64px;
	}

	.cd-cols {
		grid-template-columns: minmax(0, 1fr) 510px;
		gap: 28px;
	}

	.cd-steps,
	.cd-form {
		gap: 32px;
	}

	.cd-step {
		gap: 52px;
		padding: 29px;
	}

	.cd-step__num {
		font-size: 28px;
		line-height: 34px;
	}

	.cd-type__image {
		height: 281px;
	}

	.cd-summary {
		gap: 20px;
		padding: 22px;
	}

	.cd-process {
		padding-top: 96px;
	}

	.cd-process__box {
		gap: 52px;
		padding: 29px;
	}

	.cd-process__item {
		gap: 24px;
		padding: 24px;
	}

	.cd-brand {
		font-size: 24px;
		line-height: 29px;
	}

	section.faq.cd-faq {
		padding-top: 96px;
		padding-bottom: 96px;
	}

	.cd-faq .one-column {
		gap: 56px;
	}

	.cd-messenger {
		padding: 16px 20px;
	}
}

@media (max-width: 1279px) {
	.cd-hero__box {
		gap: 32px;
		justify-content: space-between;
		min-height: 560px;
		padding: 21px;
		background-image: url("/wp-content/themes/shop/img/custom-design/hero-mob.webp");
		border-radius: var(--radius-medium);
	}

	.cd-hero__text {
		gap: 16px;
		max-width: 285px;
	}

	.cd-hero__badge {
		gap: 10px;
		padding: 10px 16px 10px 10px;
	}

	.cd-builder {
		padding-top: 40px;
	}

	.cd-cols {
		grid-template-columns: minmax(0, 1fr);
		gap: 24px;
	}

	.cd-steps,
	.cd-form {
		gap: 24px;
	}

	/* Майстер */
	.cd-wizard {
		display: flex;
		flex-direction: column;
		gap: 24px;
		padding: 20px 16px;
		background: var(--white);
		border: 1px solid var(--border);
		border-radius: var(--radius-mid);
	}

	.cd-wizard__row {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 16px;
		font-family: var(--font-family-2);
		font-weight: 500;
		font-size: 18px;
		line-height: 22px;
		color: var(--black);
	}

	.cd-wizard__bar {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 16px;
		padding: 16px 22px;
		background: var(--light-gray);
		border-radius: 12px;
	}

	.cd-wizard__name {
		font-family: var(--font-family-2);
		font-weight: 600;
		font-size: 14px;
		line-height: 17px;
		color: var(--black);
	}

	.cd-wizard__bar img {
		width: 18px;
		height: 18px;
	}

	.cd-wizard__nav {
		display: flex;
		gap: 8px;
	}

	.cd-wizard__nav .btn {
		width: 100%;
	}

	.cd-wizard__nav .btn[disabled] {
		opacity: 0.4;
		pointer-events: none;
	}

	.cd-step,
	.cd-summary {
		gap: 24px;
		padding: 16px;
		border-radius: var(--radius-mid);
	}

	.cd-step__head {
		gap: 12px;
	}

	.cd-step__title {
		gap: 16px;
	}

	.cd-step__num {
		font-size: 18px;
		line-height: 23px;
	}

	.cd-step__body {
		gap: 24px;
	}

	.cd-types {
		grid-template-columns: minmax(0, 1fr);
		gap: 12px;
	}

	.cd-type {
		flex-direction: row;
		align-items: stretch;
		gap: 12px;
		padding: 9px;
		border-radius: var(--radius-mid);
	}

	.cd-type__image {
		flex: 0 0 107px;
		height: auto;
		border-radius: 12px;
	}

	.cd-type__box {
		flex: 1 1 auto;
		gap: 12px;
		padding: 13px;
		border-radius: 12px;
	}

	.cd-type__row {
		gap: 12px;
	}

	.cd-type__radio {
		flex: 0 0 20px;
		width: 20px;
		height: 20px;
	}

	.cd-type__note {
		padding: 12px 0;
		font-size: 12px;
		line-height: 15px;
	}

	.cd-chip {
		padding: 12px 20px;
		font-size: 14px;
		line-height: 17px;
	}

	.cd-upload {
		gap: 20px;
		padding: 24px 16px;
	}

	.cd-upload__image {
		width: 110px;
		height: 85px;
	}

	.cd-fields {
		grid-template-columns: minmax(0, 1fr);
		gap: 16px;
	}

	.cd-field {
		gap: 12px;
	}

	.cd-field > label,
	.cd-field-label,
	.cd-agree .checkbox-custom > span:last-child {
		font-size: 14px;
		line-height: 17px;
	}

	.cd-form .form-input,
	.cd-consult .form-input {
		height: 45px;
		padding: 12px;
		border-radius: 8px;
		font-size: 16px;
		line-height: 19px;
	}

	.cd-consult .form-input {
		padding: 12px 16px;
		border-radius: var(--radius-pill);
	}

	.cd-form textarea.form-input {
		height: 90px;
	}

	.cd-messengers__list {
		grid-template-columns: minmax(0, 1fr);
		gap: 8px;
	}

	.cd-messenger {
		min-height: 56px;
		padding: 12px 16px;
	}

	.cd-submit {
		margin-top: 0;
	}

	.cd-submit .btn,
	.cd-form__submit {
		width: 100%;
	}

	.cd-summary {
		position: static;
		max-height: none;
		overflow: visible;
	}

	.cd-summary__body {
		gap: 20px;
	}

	.cd-summary__preview > img {
		height: 200px;
	}

	.cd-summary__note {
		min-height: 0;
		padding: 12px 12px 12px 120px;
	}

	.cd-summary__note img {
		width: 100px;
		height: 87px;
	}

	.cd-process {
		padding-top: 80px;
	}

	.cd-process__box {
		gap: 24px;
		padding: 16px;
		border-radius: var(--radius-mid);
	}

	.cd-process__head {
		flex-direction: column;
		gap: 12px;
	}

	.cd-process__title {
		max-width: 100%;
	}

	.cd-brand {
		font-size: 18px;
		line-height: 23px;
	}

	.cd-process__list {
		grid-template-columns: minmax(0, 1fr);
		gap: 12px;
	}

	.cd-process__item {
		gap: 16px;
		min-height: 0;
		padding: 16px;
	}

	section.faq.cd-faq {
		padding-top: 80px;
		padding-bottom: 80px;
	}

	.cd-faq .one-column {
		gap: 24px;
	}

	.cd-faq__head {
		gap: 12px;
	}

	.cd-faq__badge {
		gap: 12px;
		padding: 8px 16px 8px 8px;
	}

	.cd-faq__badge img {
		width: 20px;
		height: 20px;
	}

	.cd-consult__head {
		gap: 12px;
	}

	.cd-consult .cd-consult-form {
		gap: 24px;
	}

	.cd-consult__fields {
		gap: 12px;
	}
}
