/* product_style.css – исправленная версия */

/* ------------------------------- */
/* Блок товара и сетка             */
/* ------------------------------- */
.product {
	padding: 30px 0;
	display: block; /* гарантия, что не будет flex */
}

.product__title {
	margin-bottom: 30px;
	font-size: 28px;
	color: #005737;
}

.product__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 40px;
	margin-bottom: 40px;
}

/* ------------------------------- */
/* Галерея                          */
/* ------------------------------- */
.product__gallery {
	display: flex;
	flex-direction: column;
}

.gallery__main {
	border: 1px solid #dee2e6;
	border-radius: 4px;
	overflow: hidden;
	margin-bottom: 15px;
	cursor: pointer;
}

.gallery__main img {
	width: 100%;
	height: auto;
	display: block;
}

.gallery__thumbs {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 10px;
}

.gallery__thumb {
	border: 2px solid transparent;
	border-radius: 4px;
	cursor: pointer;
	opacity: 0.7;
	transition: all 0.2s;
	width: 100%;
	height: auto;
}

.gallery__thumb:hover {
	opacity: 1;
}

.gallery__thumb.active {
	border-color: #28a745;
	opacity: 1;
}

/* ------------------------------- */
/* Цена и кнопка заказа             */
/* ------------------------------- */
.product__price-block {
	background: #f8f9fa;
	padding: 20px;
	border-radius: 4px;
	margin-bottom: 20px;
}

.product__price-label {
	font-size: 18px;
	color: #6c757d;
}

.product__price {
	font-size: 36px;
	font-weight: bold;
	color: #28a745;
	margin-left: 10px;
}

.product__order-btn {
	width: 50%;
	padding: 15px;
	background-color: #28a745;
	color: white;
	border: none;
	border-radius: 4px;
	font-size: 18px;
	font-weight: bold;
	cursor: pointer;
	transition: background-color 0.3s;
	margin-bottom: 30px;
}

.product__order-btn:hover {
	background-color: #218838;
}

.bottom-order-btn {
	margin-top: 20px;
}

/* ------------------------------- */
/* Краткие характеристики           */
/* ------------------------------- */
.product__short-specs {
	background: #e9ecef;
	padding: 20px;
	border-radius: 4px;
	margin-top: 20px;
}

.product__short-specs h3 {
	margin-bottom: 15px;
	font-size: 18px;
	color: #005737;
}

/* ------------------------------- */
/* Описание, характеристики, комплектация, услуги */
/* ------------------------------- */
.product__description,
.product__specs,
.product__complect,
.product__services,
.product__info-block,
.product__gallery-works,
.product__reviews,
.product__similar {
	margin-top: 40px;
}

.product__description h2,
.product__specs h2,
.product__complect h2,
.product__services h2,
.product__info-block h2,
.product__gallery-works h2,
.product__reviews h2,
.product__similar h2,
.product__info-blocks h2 {
	font-size: 24px;
	margin-bottom: 20px;
	padding-bottom: 10px;
	border-bottom: 2px solid #28a745;
	color: #005737;
}

/* ------------------------------- */
/* Характеристики и схема           */
/* ------------------------------- */
.schema-column-top {
	margin-bottom: 20px;
}

.schema-gallery {
	display: flex;
	flex-direction: column;
	height: 100%;
}

.schema__main {
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid #dee2e6;
	border-radius: 4px;
	overflow: hidden;
	min-height: 200px;
	background: #f9f9f9;
}

.schema__main img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

.schema__thumbs {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 10px;
	margin-top: 10px;
}

.schema__thumb {
	border: 2px solid transparent;
	border-radius: 4px;
	cursor: pointer;
	opacity: 0.7;
	transition: all 0.2s;
	width: 100%;
	height: auto;
}

.schema__thumb:hover {
	opacity: 1;
}

.schema__thumb.active {
	border-color: #28a745;
	opacity: 1;
}

/* Таблица характеристик (если есть) */
.specs-column {
	margin-top: 20px;
}

.specs-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.specs-table tr:nth-child(even) {
	background-color: #f8f9fa;
}

.specs-table td {
	padding: 8px 12px;
	border: 1px solid #dee2e6;
}

.specs-table td:first-child {
	font-weight: bold;
	width: 40%;
}

/* ------------------------------- */
/* Таблица комплектации             */
/* ------------------------------- */
.table-wrapper {
	overflow-x: auto;
	margin: 20px 0;
	-webkit-overflow-scrolling: touch;
}

.complect-table {
	width: 100%;
	min-width: 100%;
	border-collapse: collapse;
	font-size: 14px;
	table-layout: fixed;
}

.complect-table th,
.complect-table td {
	padding: 10px;
	border: 1px solid #dee2e6;
	vertical-align: middle;
	word-wrap: break-word;
}

.complect-table th {
	background: #f5f5f5;
	text-align: center;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s;
	word-break: break-word;
	color: #005737;
}

.complect-table th:hover {
	background: #e0e0e0;
}

.complect-table td:first-child {
	font-weight: 500;
	background: #fafafa;
	color: #005737;
}

.complect-checked {
	background-color: #e8f5e9 !important;
	text-align: center;
}

.checkmark {
	font-size: 18px;
	color: #2e7d32;
}

.complect-price {
	display: block;
	font-size: 16px;
	color: #27ae60;
	margin-top: 5px;
}

/* ------------------------------- */
/* Кнопки цен комплектации (сетка)  */
/* ------------------------------- */
.complect-price-buttons {
	margin-top: 10px;
}

.complect-price-buttons > div {
	padding: 0;
	margin: 0;
}

.price-btn {
	background: white;
	border: 2px solid #005737;
	border-radius: 8px;
	padding: 10px 0;
	cursor: pointer;
	transition: all 0.3s;
	font-weight: 600;
	color: #005737;
	width: 100%;
}

.price-btn:hover {
	background: #e6f3e6;
	border-color: #004d2e;
}

.price-btn.active {
	background: #005737;
	border-color: #004d2e;
	color: white;
}

.price-btn .price-value {
	font-size: 16px;
}

/* ------------------------------- */
/* Дополнительные услуги            */
/* ------------------------------- */
.services-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 15px;
}

.service-card {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 15px 20px;
	background: #f8f9fa;
	border: 1px solid #e9ecef;
	border-radius: 8px;
	transition: all 0.3s;
	cursor: pointer;
}

.service-card:hover {
	background: #e9ecef;
	border-color: #28a745;
}

.service-card.selected {
	background: #e3f2fd;
	border-color: #2196f3;
	box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
	transform: translateY(-2px);
}

.service-info {
	flex: 1;
}

.service-name {
	font-weight: 600;
	color: #005737;
	font-size: 16px;
	margin-bottom: 5px;
}

.service-desc {
	font-size: 13px;
	color: #6c757d;
}

.service-price {
	font-size: 18px;
	font-weight: 700;
	color: #28a745;
	white-space: nowrap;
	margin-left: 15px;
}

/* ------------------------------- */
/* Блок выбранных позиций           */
/* ------------------------------- */
.selected-items {
	margin: 15px 0;
	padding: 10px;
	background: #f9f9f9;
	border-radius: 5px;
	display: none;
}

.selected-items h4 {
	margin-bottom: 8px;
	font-size: 16px;
	color: #005737;
}

.selected-items ul {
	margin: 0;
	padding-left: 20px;
}

/* ------------------------------- */
/* Попап оформления заказа          */
/* ------------------------------- */
.popup {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	z-index: 1000;
	align-items: center;
	justify-content: center;
}

.popup-content {
	background: white;
	padding: 30px;
	border-radius: 10px;
	max-width: 500px;
	width: 90%;
	max-height: 80vh;
	overflow-y: auto;
	position: relative;
}

.popup-close {
	position: absolute;
	top: 15px;
	right: 20px;
	font-size: 28px;
	cursor: pointer;
}

.popup-order-summary {
	background: #f5f5f5;
	padding: 15px;
	border-radius: 5px;
	margin-bottom: 20px;
}

.popup-order-summary ul {
	margin: 10px 0;
	padding-left: 20px;
}

/* ------------------------------- */
/* Лайтбокс                          */
/* ------------------------------- */
.lightbox {
	display: none;
	position: fixed;
	z-index: 2000;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.9);
	align-items: center;
	justify-content: center;
}

.lightbox-content {
	max-width: 90%;
	max-height: 90%;
	object-fit: contain;
}

.lightbox-close {
	position: absolute;
	top: 20px;
	right: 35px;
	color: #fff;
	font-size: 40px;
	font-weight: bold;
	cursor: pointer;
}

/* ------------------------------- */
/* Галерея выполненных работ        */
/* ------------------------------- */
.works-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 15px;
	margin-top: 20px;
}

.work-item img {
	width: 100%;
	height: 150px;
	object-fit: cover;
	border-radius: 4px;
}

.work-title {
	text-align: center;
	margin-top: 5px;
	font-size: 14px;
	color: #005737;
}

/* ------------------------------- */
/* Отзывы                            */
/* ------------------------------- */
.reviews-list {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 20px;
	margin-bottom: 30px;
}

.review-item {
	border: 1px solid #eaeaea;
	border-radius: 12px;
	padding: 20px;
	background: #fff;
	transition:
		box-shadow 0.3s,
		transform 0.2s;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.review-item:hover {
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
	transform: translateY(-2px);
}

.review-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 6px;
	flex-wrap: wrap;
}

.review-author {
	font-weight: 700;
	font-size: 16px;
	color: #005737;
}

.review-rating {
	color: #f5b342;
	font-size: 18px;
	letter-spacing: 2px;
}

.review-date {
	font-size: 13px;
	color: #8a9cb0;
	margin-bottom: 12px;
}

.review-text {
	font-size: 14px;
	line-height: 1.6;
	color: #4a5a6e;
	margin-bottom: 15px;
}

.review-images {
	display: flex;
	gap: 10px;
	margin-top: 10px;
	flex-wrap: wrap;
}

.review-thumb {
	width: 80px;
	height: 80px;
	object-fit: cover;
	border-radius: 8px;
	cursor: pointer;
	border: 1px solid #eee;
	transition: opacity 0.2s;
}

.review-thumb:hover {
	opacity: 0.8;
}

.toggle-review-form,
.show-all-reviews {
	background: #3498db;
	color: white;
	border: none;
	padding: 10px 20px;
	border-radius: 6px;
	cursor: pointer;
	font-size: 16px;
	margin-right: 10px;
	margin-top: 15px;
	transition: background 0.3s;
}

.toggle-review-form:hover,
.show-all-reviews:hover {
	background: #2980b9;
}

.show-all-reviews {
	background: #2c3e50;
}

.show-all-reviews:hover {
	background: #1a252f;
}

.review-form {
	background: #fafbfc;
	padding: 30px;
	border-radius: 16px;
	margin-top: 20px;
	border: 1px solid #eef2f5;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.review-form h3 {
	margin-top: 0;
	margin-bottom: 20px;
	font-size: 22px;
	color: #005737;
	font-weight: 600;
}

.review-form .form-group {
	margin-bottom: 20px;
}

.review-form label {
	display: block;
	margin-bottom: 8px;
	font-weight: 600;
	color: #2c3e50;
	font-size: 14px;
}

.review-form input[type="text"],
.review-form select,
.review-form textarea,
.review-form input[type="file"] {
	width: 100%;
	padding: 12px 16px;
	border: 1px solid #dde3e9;
	border-radius: 10px;
	font-family: inherit;
	font-size: 15px;
	background: #ffffff;
	transition:
		border-color 0.2s,
		box-shadow 0.2s;
	box-sizing: border-box;
}

.review-form input[type="text"]:focus,
.review-form select:focus,
.review-form textarea:focus {
	border-color: #28a745;
	box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
	outline: none;
}

.review-form textarea {
	resize: vertical;
	min-height: 100px;
}

.review-form button {
	background: linear-gradient(135deg, #28a745 0%, #34ce57 100%);
	color: white;
	border: none;
	padding: 14px 24px;
	border-radius: 10px;
	cursor: pointer;
	font-size: 16px;
	font-weight: 700;
	transition: all 0.3s;
	width: 100%;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	box-shadow: 0 4px 12px rgba(40, 167, 69, 0.2);
}

.review-form button:hover {
	background: linear-gradient(135deg, #218838 0%, #28a745 100%);
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(40, 167, 69, 0.3);
}

.review-form button:active {
	transform: translateY(0);
	box-shadow: 0 4px 12px rgba(40, 167, 69, 0.2);
}

/* ------------------------------- */
/* Похожие товары (карусель)        */
/* ------------------------------- */
.similar-carousel {
	margin-top: 20px;
	overflow: hidden;
}

.similar-card {
	display: block;
	text-decoration: none;
	color: inherit;
	border: 1px solid #eee;
	border-radius: 8px;
	padding: 10px;
	transition: box-shadow 0.2s;
}

.similar-card:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.similar-card img {
	width: 100%;
	height: 150px;
	object-fit: cover;
	border-radius: 4px;
}

.similar-name {
	font-weight: 600;
	margin: 10px 0 5px;
	color: #005737;
}

.similar-price {
	color: #28a745;
	font-weight: 700;
}

/* ------------------------------- */
/* Баннер обратной связи            */
/* ------------------------------- */
.product__callback-banner {
	position: relative;
	background: url("/img/miniBanner3.jpg") center/cover no-repeat;
	padding: 48px 30px;
	border-radius: 12px;
	text-align: center;
	margin: 40px 0;
	color: white;
	isolation: isolate;
}

.product__callback-banner::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.3);
	border-radius: 12px;
	z-index: -1;
}

.callback-content {
	max-width: 600px;
	margin: 0 auto;
	position: relative;
	z-index: 1;
}

.callback-content h2 {
	margin-bottom: 20px;
	font-size: 28px;
}

.callback-content .form-row {
	display: flex;
	gap: 10px;
	margin-bottom: 10px;
}

.callback-content input,
.callback-content textarea {
	width: 100%;
	padding: 12px 15px;
	border: none;
	border-radius: 8px;
	font-size: 16px;
	background: rgba(255, 255, 255, 0.9);
	transition: background 0.3s;
}

.callback-content input:focus,
.callback-content textarea:focus {
	background: white;
	outline: none;
}

.callback-content textarea {
	resize: vertical;
	margin-bottom: 10px;
}

.callback-content button {
	background: #28a745;
	color: white;
	border: none;
	padding: 12px 30px;
	border-radius: 8px;
	font-size: 18px;
	font-weight: 600;
	cursor: pointer;
	transition:
		background 0.3s,
		transform 0.2s;
}

.callback-content button:hover {
	background: #218838;
	transform: scale(1.02);
}

/* ------------------------------- */
/* Блок информации плитками        */
/* ------------------------------- */
.product__info-blocks {
	margin-top: 40px;
}
.product__info-blocks h2 {
	font-size: 24px;
	margin-bottom: 20px;
	padding-bottom: 10px;
	border-bottom: 2px solid #005737;
	color: #005737;
}
.info-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 20px;
}
.info-card {
	background: #f8f9fa;
	border: 1px solid #e9ecef;
	border-radius: 8px;
	padding: 20px;
	transition:
		transform 0.2s,
		box-shadow 0.2s;
}
.info-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}
.info-title {
	font-size: 18px;
	font-weight: 600;
	margin-bottom: 10px;
	color: #005737;
}
.info-text {
	font-size: 14px;
	line-height: 1.5;
	color: #6c757d;
}

/* ========== МОБИЛЬНЫЕ ИСПРАВЛЕНИЯ ========== */
@media (max-width: 768px) {
	/* Принудительно убираем flex у основного контейнера */
	.product {
		display: block !important;
	}

	.product__grid {
		grid-template-columns: 1fr;
	}
	.gallery__thumbs {
		grid-template-columns: repeat(2, 1fr);
	}
	.product__price {
		font-size: 28px;
	}
	.product__order-btn {
		width: 100%;
	}
	.reviews-list {
		grid-template-columns: 1fr;
	}
	.callback-content .form-row {
		flex-direction: column;
	}
	.info-grid {
		grid-template-columns: 1fr;
	}

	/* Схема */
	.schema__main {
		min-height: 200px;
	}
	.schema__main img {
		width: 100%;
		height: auto;
	}
	.schema__thumbs {
		grid-template-columns: repeat(2, 1fr);
	}

	/* Таблица комплектации */
	.complect-table th {
		font-size: 12px;
	}
	.complect-price {
		font-size: 12px;
	}
	.complect-table td {
		font-size: 12px;
		padding: 8px 5px;
	}
	.checkmark {
		font-size: 14px;
	}
	.complect-table {
		width: 100%;
	}

	/* ===== КНОПКИ КОМПЛЕКТАЦИИ – ВЕРТИКАЛЬНО ===== */
	.complect-price-buttons {
		display: flex !important;
		flex-direction: column !important;
		gap: 10px;
		grid-template-columns: none !important;
	}
	/* Скрываем пустую первую ячейку */
	.complect-price-buttons > div:first-child {
		display: none;
	}
	.complect-price-buttons > div {
		width: 100%;
		padding: 0 !important;
	}
	.price-btn {
		padding: 10px;
		font-size: 14px;
	}
	.price-btn .price-value {
		font-size: 14px;
	}
}
