/* certificate-style.css — VB-202 rewrite: одно окно, крупные шрифты, vb193-поля */
.certificate-form {
	max-width: 800px;
	margin: 10px auto;
	padding: 14px 16px 20px;
	background: white;
	border-radius: 10px;
	box-shadow: 0 0 12px rgba(0, 0, 0, 0.5);
	overflow: visible;
	position: relative;
	font-family: var(--font-body);
	box-sizing: border-box;
}

@media (max-width: 768px) {
	.certificate-form {
		margin-left: -20px;
		margin-right: -20px;
		padding: 12px 14px 18px;
		border-radius: 0;
	}
}

.certificate-form,
.certificate-form input,
.certificate-form textarea,
.certificate-form select,
.certificate-form button,
.certificate-form label,
.certificate-form p,
.certificate-form li,
.certificate-form h1,
.certificate-form h2,
.certificate-form h3,
.certificate-form h4,
.certificate-form .step-item,
.certificate-form .option-text,
.certificate-form .explain_text,
.certificate-form .start-screen,
.certificate-form .order-details,
.certificate-form .services-list,
.certificate-form .total-price,
.certificate-form .final-price {
	font-family: var(--font-body);
}

.explain_text {
	font-size: 13px;
	line-height: 1.35;
	color: #9a9a9a;
	margin-top: -4px;
	margin-bottom: 8px;
}

.module-studio label {
	font-size: 15px;
}

.start-screen {
	margin: auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	background-color: rgba(255, 255, 255, 0.8);
	z-index: 10;
	padding: 30px;
	text-align: center;
	min-height: 300px;
}

.certificate-form:not(.is-started) .steps-list {
	display: none;
}

.step[data-step="1"].background {
	display: block;
	filter: blur(3px);
	opacity: 0.5;
	pointer-events: none;
}

.design-slider {
	display: flex;
	flex-wrap: wrap;
	gap: 15px;
	padding: 10px 0;
	width: 100%;
	justify-content: flex-start;
}

/* Всегда 3 в ряд (desktop + mobile) */
.design-item {
	width: calc((100% - 30px) / 3);
	max-width: 100%;
	height: auto;
	box-sizing: border-box;
	border-radius: 12px;
	box-shadow: 0 0 0 7px #e9e9e9;
	cursor: pointer;
	overflow: hidden;
}

.design-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 12px;
	display: block;
}

.design-item.active {
	box-shadow: 0 0 0 7px #FF0000;
}

.next-step-btn,
.prev-step-btn,
.submit-btn {
	font-family: var(--font-body);
}

.submit-btn {
	padding: 12px 30px;
	background-color: #28a745;
	color: white;
	border: none;
	border-radius: 5px;
	cursor: pointer;
	min-width: 120px;
}

.total-price {
	font-weight: bold;
	font-size: 1.25em;
	margin-top: 16px;
	text-align: center;
}

.payment-methods {
	margin: 20px 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.payment-methods label {
	display: block;
	cursor: pointer;
}

.payment-methods input[type="radio"] {
	margin-right: 10px;
}

.predefined-options {
	width: 100%;
	margin-top: 12px;
}

.predefined-options .option-item {
	margin-bottom: 0;
	padding: 12px 14px;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	background-color: #fff;
	transition: background-color 0.2s ease, border-color 0.2s ease;
}

.predefined-options .option-item:hover {
	background-color: #f9f9f9;
	border-color: #ccc;
}

.price {
	font-weight: bold;
	color: #333;
}

/* Крупные заголовки секций, плотные поля — как vb193 */
.step h3 {
	margin: 28px 0 10px;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.2;
	color: #111;
}

.step h3:first-child {
	margin-top: 4px;
}

.certificate-form .input-name,
.certificate-form .input-phone,
.certificate-form .input-recipient-name,
.certificate-form .input-recipient-surname,
.certificate-form .input-recipient-phone,
.certificate-form .input-gift-date,
.certificate-form .comment-field {
	display: block;
	width: 100%;
	margin: 0 0 4px;
	padding: 10px 12px;
	font-size: 16px;
	line-height: 1.3;
	color: #555;
	background: #fff;
	border: 1px solid #ccc;
	border-radius: 4px;
	box-sizing: border-box;
}

.certificate-form .comment-field {
	height: 80px;
	margin-bottom: 8px;
	resize: vertical;
}

.step[data-step="4"] {
	padding: 8px 4px 20px;
}

/*
 * Шаг 4: «Назад» / «Заказать» в потоке под списком оплаты.
 * Absolute bottom наезжал на радио — у шага padding-bottom 20px,
 * а блок кнопок выше. На мобильном зазор больше.
 */
.step[data-step="4"] .navigation-buttons {
	position: static;
	margin-top: 32px;
	padding-top: 8px;
}

@media (max-width: 768px) {
	.step[data-step="4"] .navigation-buttons {
		margin-top: 56px;
	}
}

.certificate-mockup {
	width: 300px;
	max-width: 100%;
	height: 400px;
	margin: 20px auto;
	border: 1px solid #ddd;
	border-radius: 8px;
	text-align: center;
	overflow: hidden;
}

.selected-design {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.order-details {
	margin: 30px 0;
}

.order-details p {
	margin: 5px 0;
}

.services-list {
	margin-bottom: 15px;
	line-height: 1.5;
}

.final-price {
	font-size: 1.25em;
	font-weight: bold;
	color: #333;
	text-align: center;
}

.step {
	display: none;
	position: relative;
	padding-bottom: 72px;
}

.step.active {
	display: block;
}

/* Список шагов сверху */
.steps-list {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 20px;
	margin: 12px 0 18px;
	padding: 14px;
	background-color: #f5f5f5;
	border-radius: 8px;
}

@media (max-width: 768px) {
	.steps-list {
		gap: 8px;
		padding: 10px 6px;
	}
}

.step-item {
	font-size: 16px;
	color: #999;
	transition: color 0.2s ease;
	position: relative;
	padding: 5px 14px;
	text-decoration: none;
	cursor: default;
	user-select: none;
	-webkit-tap-highlight-color: transparent;
}

@media (max-width: 768px) {
	.step-item {
		font-size: 12px;
		padding: 5px 8px;
	}
}

.step-item.active {
	color: #000;
	font-weight: bold;
	cursor: default;
}

/* Пройденный: тап = назад, без blue/underline */
.step-item.is-done {
	color: #999;
	cursor: pointer;
	text-decoration: none;
}

.step-item.is-done:hover,
.step-item.is-done:focus,
.step-item.is-done:active {
	color: #666;
	text-decoration: none;
	outline: none;
}

.step-item:not(:last-child)::after {
	content: "-";
	position: absolute;
	right: -14px;
	color: #999;
	pointer-events: none;
}

@media (max-width: 768px) {
	.step-item:not(:last-child)::after {
		right: -6px;
	}
}

.step-item.active:not(:last-child)::after {
	color: #000;
}

.navigation-buttons {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	display: flex;
	justify-content: center;
	gap: 16px;
	padding: 12px 0 4px;
}

.next-step-btn,
.prev-step-btn {
	padding: 10px 20px;
	background-color: #007bff;
	color: white;
	border: none;
	border-radius: 5px;
	cursor: pointer;
	min-width: 120px;
}

.next-step-btn:hover,
.prev-step-btn:hover {
	background-color: #0056b3;
}

.hidden-option {
	display: none !important;
	max-height: 0;
	padding: 0;
	margin: 0;
	opacity: 0;
	pointer-events: none;
	overflow: hidden;
}

.module-studio {
	margin: 20px 0;
}

.module-studio h3 {
	margin-bottom: 10px;
}

.module-studio .studio-item {
	display: block;
	position: relative;
	padding: 6px 0 6px 35px;
	cursor: pointer;
	font-size: 15px;
	user-select: none;
	line-height: 22px;
}

.module-studio .studio-item input[type="checkbox"] {
	position: absolute;
	z-index: -1;
	opacity: 0;
}

.module-studio .studio-item:before {
	content: '';
	position: absolute;
	left: 0;
	top: 6px;
	display: inline-block;
	width: 22px;
	height: 22px;
	border: 1px solid #bfbfbf;
	border-radius: 50%;
	background-repeat: no-repeat;
	background-position: center center;
	background-size: 50% 50%;
	cursor: pointer;
	transition: border-color 0.15s ease-in-out, background-color 0.15s ease-in-out;
}

.module-studio .studio-item:hover:before {
	border-color: #b3d7ff;
}

.module-studio .studio-item:has(input[type="checkbox"]:checked):before,
.module-studio .studio-item.checked:before {
	border-color: #22c064;
	background-color: #22c064;
	background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3e%3c/svg%3e");
}

.category {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 16px;
}

.category-label {
	position: relative;
	display: inline-block;
	padding: 10px 16px;
	border: 1px solid #ddd;
	border-radius: 6px;
	cursor: pointer;
	transition: border-color 0.2s ease;
	z-index: 0;
	overflow: hidden;
}

.category-label:hover {
	border-color: #653283;
}

.category-radio {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.category-text {
	font-weight: 500;
	position: relative;
	z-index: 1;
}

.category-radio:checked + .category-text {
	color: white;
}

.category-label:has(.category-radio:checked) {
	border-color: #653283;
	background-color: #653283;
}

.category-label:has(.category-radio:checked) .category-text {
	color: white;
}

/* Fallback без :has */
.category-radio:checked + .category-text::before {
	content: "";
	position: absolute;
	top: -10px;
	left: -16px;
	right: -16px;
	bottom: -10px;
	background-color: #653283;
	border-radius: 6px;
	z-index: -1;
}
