/* Constructor Page - Start */
.constructor-page {
	padding-bottom: 80px;
}

/* Стилі для лівої колонки з зображенням товару */
.product-image-column {
	position: relative;
}

.product-image-wrapper {
	display: flex;
}

.product-image {
	display: none;
	width: 100%;
	height: auto;
	object-fit: contain;
}

.product-image.active {
	display: block;
}

/* Стилі для правої колонки з опціями */
.product-options-column {
	padding-left: 20px;
}

.constructor-header {
	margin-bottom: 30px;
}

.constructor-header .h2 {
	margin-bottom: 15px;
}

.constructor-header .product-meta {
	display: none;
}

.product-meta {
	display: flex;
	flex-direction: column;
	gap: 0;
	color: #737373;
	font-size: 15px;
}

/* Стилі для кроків конструктора */
.constructor-step {
	margin-bottom: 30px;
}

.step-title {
	margin-bottom: 15px;
	font-weight: 800;
}

.option-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 15px;
}

.option-button {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 150px;
	height: 40px;
	padding: 0 20px;
	border-radius: var(--border-radius);
	background-color: transparent;
	border: 1px solid #dbdbdb;
	color: var(--black);
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
}

.option-button:hover {
	border-color: var(--primary);
}

.option-button.active {
	background-color: var(--primary);
	border-color: var(--primary);
	color: var(--primary-match);
}
div#step-packaging .option-buttons {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
}
/* Стилі для кількості наповнення */
.quantity-options {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.quantity-options .option-button {
	width: calc(25% - 8px);
	min-width: max-content;
	text-align: center;
	justify-content: center;
}

/* Стилі для вибору мультіпака */
.multibox-info {
	display: flex;
	gap: 15px;
}

.multibox-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 0;
}

.multibox-icon {
	width: 50px;
	height: auto;
	object-fit: contain;
}

/* Стилі для вибору смаків */
.flavors-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 40px;
}

.flavor-option {
	position: relative;
}

.flavor-checkbox {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.flavor-label {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 40px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	gap: 10px;
	padding: 0px 24px;
	background: transparent;
	border: 1px solid var(--border);
	border-radius: 50px;
	transition: 0.3s;
}

.flavor-icon {
	width: 30px;
	height: 30px;
	object-fit: contain;
	flex-shrink: 0;
}

.flavor-name {
	font-size: 14px;
	line-height: 1.2;
}

.flavor-checkbox:checked + .flavor-label {
	background: var(--border);
}

.flavor-checkbox:checked + .flavor-label::after {
	content: "";
	position: absolute;
	top: -6px;
	right: -6px;
	width: 20px;
	height: 20px;
	background: url('/wp-content/themes/shop/img/icons/check-circle.svg') no-repeat center center;
	background-size: contain;
	opacity: 0;
	transform: scale(0);
	transition: all 0.3s ease;
}

.flavor-checkbox:checked + .flavor-label::after {
	opacity: 1;
	transform: scale(1);
}

/* Стилі для лічильників у мультібоксі */
.flavor-counter {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 40px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	gap: 5px;
	padding: 0px 10px 0 10px;
	background: transparent;
	border: 1px solid var(--border);
	border-radius: 50px;
	transition: 0.3s;
}

.flavor-content {
	display: flex;
	flex-direction: row;
	align-items: center;
	padding: 10px;
	gap: 10px;
}

.flavor-quantity {
	display: flex;
	align-items: center;
	padding-right: 10px;
	margin-left: -5px;
	display: none;
}
.flavor-counter.selected .flavor-quantity {
	display: flex;
}

.quantity-minus,
.quantity-plus {
	width: 20px;
	height: 40px;
	background: none;
	border: none;
	font-size: 16px;
	cursor: pointer;
	transition: all 0.3s ease;
}

.quantity-minus:hover,
.quantity-plus:hover {
	color: var(--primary);
}

.flavor-quantity-input {
	flex: 1;
	height: 40px;
	width: 10px;
	padding: 0;
	text-align: center;
	border: none;
	background: none;
	font-size: 14px;
	-moz-appearance: textfield;
}
.flavor-quantity-input::-webkit-outer-spin-button,
.flavor-quantity-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.counter-total {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	margin-top: 15px;
	font-weight: 500;
	display: none;
}

/* Стиль для виділення обраних смаків в мультібоксі */
.flavor-counter.selected {
	background-color: var(--border);
}

.flavor-counter.selected::after {
	content: "";
	position: absolute;
	top: -6px;
	right: -6px;
	width: 20px;
	height: 20px;
	background: url('/wp-content/themes/shop/img/icons/check-circle.svg') no-repeat center center;
	background-size: contain;
	opacity: 1;
}

/* Підсумковий блок з кнопкою і ціною */
.constructor-footer {
	margin-top: 40px;
	padding-top: 20px;
	border-top: 1px solid var(--border);
}

.product-price {
	margin-bottom: 20px;
}

.price-value {
	font-size: 32px;
	font-weight: 800;
	color: #383838;
}

.quantity-control {
	display: flex;
	align-items: center;
	gap: 15px;
	flex-wrap: wrap;
}

.quantity-counter {
	display: flex;
	align-items: center;
	border: 1px solid var(--border);
	border-radius: 100px;
}

.quantity-btn {
	width: 45px;
	height: 45px;
	background: none;
	border: none;
	font-size: 18px;
	color: var(--black);
	cursor: pointer;
	transition: all 0.3s ease;
}
button.quantity-btn.minus {
	border-top-left-radius: 100px;
	border-bottom-left-radius: 100px;
}
button.quantity-btn.plus {
	border-top-right-radius: 100px;
	border-bottom-right-radius: 100px;
}
.quantity-btn:hover {
	background-color: var(--primary);
}

.quantity-input {
	width: 25px;
	height: 45px;
	padding: 0;
	height: 100%;
	text-align: center;
	border: none;
	background: none;
	font-size: 16px;
	-moz-appearance: textfield;
}
.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.underline.primary {
	font-size: 16px;
	margin-left: 30px;
}

#add-to-cart-btn {
	height: 45px;
}
/* Допоміжні класи */
.hidden {
	display: none !important;
}
.disabled {
	background: transparent !important;
}
.disabled .flavor-label {
	background: #d1cbcb !important;
}
/* Адаптивність */

@media (max-width: 1480px) {
	.quantity-options .option-button {
		width: calc(33.33% - 8px);
	}
}
@media (max-width: 1279px) {
	.constructor-page {
		padding-bottom: 60px;
	}

	.product-options-column {
		padding-left: 0;
	}

	.product-image-wrapper {
		position: relative;
		top: 0;
		margin-bottom: 30px;
	}

	.quantity-options .option-button {
		width: calc(50% - 5px);
	}
	#step-quantity .quantity-options .option-button {
		width: fit-content;
	}
	.constructor-footer {
		margin-top: 30px;
		padding-top: 30px;
		border-top: 1px solid var(--border);
	}
	.underline.primary {
		margin-left: auto;
		margin-right: auto;
		margin-top: 20px;
	}
}

/* Constructor Page - End */

/* 2026-05-11: soft-disable Вергоси (task #612). Revert: видалити цей блок. */
.option-button[data-snack="vergosi"],
.option-button[data-multibox-type="vergosi"] {
	display: none !important;
}