/*
 * Подарочный сертификат свободного номинала (QW 2610-98), шаблон ShopCertificate.
 * Макет — Figma «бс» 5094-45807 (десктоп 1920); мобильная — по текущей карточке товара БС.
 * Шрифты, цвета и кнопка — из стилей карточки товара (_css_styles.css).
 */

/* галерея: миниатюра выбранного дизайна + большое фото (квадратный мокап карты на фоне) */
.gift-cert__gallery {
	align-items: flex-start;
}

.gift-cert__thumb,
.gift-cert__preview {
	display: flex;
	align-items: center;
	justify-content: center;
	background: #e6e0d9;
}

.gift-cert__thumb {
	flex: 0 0 125px;
	width: 125px;
	height: 125px;
	margin-right: 35px;
}

.gift-cert__preview {
	flex: 1 1 auto;
	aspect-ratio: 1 / 1;
}

.gift-cert__thumb img,
.gift-cert__preview img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.gift-cert__thumb img[hidden],
.gift-cert__preview img[hidden] {
	display: none;
}

/* правая колонка */
.gift-cert__intro {
	margin: 0 0 50px;
	font-size: 18px;
	font-weight: 300;
	line-height: 24px;
	letter-spacing: -0.36px;
	color: rgba(34, 29, 30, 0.8);
}

.gift-cert__label {
	margin: 0 0 30px;
	font-size: 18px;
	font-weight: 500;
	color: #221d1e;
}

.gift-cert__nominals {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.gift-cert__nominal {
	height: 36px;
	padding: 0 11px;
	border: 1px solid #d9d6d6;
	border-radius: 20px;
	background: transparent;
	font-family: inherit;
	font-size: 18px;
	font-weight: 400;
	line-height: 34px;
	color: #221d1e;
	cursor: pointer;
	transition: border-color 0.2s;
}

.gift-cert__nominal:hover,
.gift-cert__nominal.is-active {
	border-color: #221d1e;
}

.gift-cert__custom {
	max-width: 400px;
	margin-top: 30px;
}

.gift-cert__input {
	display: block;
	width: 100%;
	height: 50px;
	padding: 0 10px;
	border: 0;
	border-bottom: 1px solid #ebe8e8;
	border-radius: 0;
	background: transparent;
	font-family: inherit;
	font-size: 16px;
	color: #221d1e;
	outline: none;
	transition: border-color 0.2s;
}

.gift-cert__input::placeholder {
	color: rgba(34, 29, 30, 0.6);
}

.gift-cert__input:focus {
	border-bottom-color: #221d1e;
}

.gift-cert__hint {
	margin-top: 22px;
	padding: 0 10px;
	font-size: 10px;
	line-height: 14px;
	color: rgba(34, 29, 30, 0.6);
}

.gift-cert__input.is-error {
	border-bottom-color: #d0021b;
}

.gift-cert__hint.is-error {
	color: #d0021b;
}

/* дизайны — кружки */
.gift-cert__designs {
	display: flex;
	gap: 8px;
	margin-top: 40px;
}

.gift-cert__design {
	position: relative;
	display: block;
	cursor: pointer;
}

.gift-cert__design input,
.gift-cert__design-name {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	opacity: 0;
}

.gift-cert__design-dot {
	display: block;
	width: 28px;
	height: 28px;
	border: 1px solid rgba(34, 29, 30, 0.15);
	border-radius: 50%;
	transition: box-shadow 0.2s;
}

.gift-cert__design--blue .gift-cert__design-dot {
	background: #282669;
}

.gift-cert__design--beige .gift-cert__design-dot {
	background: #f0dec6;
}

.gift-cert__design--lavender .gift-cert__design-dot {
	background: #abadd6;
}

.gift-cert__design:hover .gift-cert__design-dot,
.gift-cert__design input:checked + .gift-cert__design-dot {
	box-shadow: 0 0 0 2px #fff, 0 0 0 3px #221d1e;
}

.gift-cert__design input:focus-visible + .gift-cert__design-dot {
	outline: 2px solid #aabbe7;
	outline-offset: 4px;
}

.gift-cert__delivery {
	align-self: flex-start;
	margin-top: 40px;
	padding: 1px 6px;
	border: 0;
	border-bottom: 1px solid #221d1e;
	background: transparent;
	font-family: inherit;
	font-size: 10px;
	font-weight: 500;
	line-height: 17px;
	text-transform: uppercase;
	color: #221d1e;
	cursor: pointer;
}

.gift-cert__footer.single-product-section__footer {
	margin-top: 40px;
	padding: 0;
	border: 0;
}

/* «В корзину» — как кнопка в .product-bottom-panel: высота и отступ иконки от текста.
   Общее правило .single-product-section__footer … svg рассчитано на иконку после текста
   (margin-left), у нас иконка перед текстом. */
.gift-cert__footer .single-product-buy .single-product__to-card.button {
	height: 50px;
}

.gift-cert__footer .single-product-buy .single-product__to-card.button svg {
	margin: 0 8px 0 0;
	width: 16px;
}

@media screen and (max-width: 1800px) {
	.gift-cert__footer .single-product-buy .single-product__to-card.button {
		height: 45px;
	}

	.gift-cert__footer .single-product-buy .single-product__to-card.button svg {
		margin: 0 10px 0 0;
		width: 15px;
	}
}

@media screen and (max-width: 1429px) {
	.gift-cert__footer .single-product-buy .single-product__to-card.button svg {
		width: 10px;
	}
}

.gift-cert__footer .single-product__to-card[disabled] {
	opacity: 0.5;
	cursor: not-allowed;
}

/* без кнопок оплаты долями — только «В корзину» */
.gift-cert-page .digi-dolyame-button--wrapper,
.gift-cert-page .digi-dolyame-button,
body:has(.gift-cert-page) .product-bottom-panel .digi-dolyame-button--wrapper {
	display: none !important;
}

@media screen and (max-width: 1429px) {
	.gift-cert__thumb {
		flex-basis: 100px;
		width: 100px;
		height: 100px;
		margin-right: 25px;
	}
}

@media screen and (max-width: 1279px) {
	.gift-cert__thumb {
		display: none;
	}

	.gift-cert__intro {
		margin-bottom: 35px;
		font-size: 16px;
		line-height: 22px;
	}

	.gift-cert__nominal {
		font-size: 16px;
	}
}

/* мобильная: фото на всю ширину, «В корзину» — в нижней панели, как у карточек товара */
@media screen and (max-width: 1023px) {
	.gift-cert__preview {
		width: 100%;
		aspect-ratio: 393 / 330;
	}

	/* квадратный мокап обрезается сверху и снизу по фону, карта остаётся целиком */
	.gift-cert__preview img {
		object-position: center;
	}

	.gift-cert__intro {
		margin: 20px 0 30px;
		font-size: 14px;
		line-height: 20px;
		letter-spacing: normal;
	}

	.gift-cert__label {
		margin-bottom: 15px;
		font-size: 16px;
	}

	.gift-cert__custom {
		max-width: none;
		margin-top: 20px;
	}

	.gift-cert__hint {
		margin-top: 12px;
	}

	.gift-cert__designs,
	.gift-cert__delivery {
		margin-top: 30px;
	}
}

@media screen and (max-width: 767px) {
	.gift-cert__nominals {
		gap: 6px;
	}

	.gift-cert__nominal {
		padding: 0 9px;
		font-size: 15px;
	}
}

@media screen and (max-width: 374px) {
	.gift-cert__nominal {
		padding: 0 7px;
		font-size: 13px;
	}
}
