:root {
	--primary-color: #0D1B2A;
	--secondary-color: #1B263B;
	--accent-color: #415A77;
	--text-color: #E0E1DD;
	--cta-color: #3498db;
	--cta-hover-color: #2980b9;
	--success-color: #2ecc71;
	--error-color: #e74c3c;
}

*, *::before, *::after {
	box-sizing: border-box;
}

body {
	font-family: 'Montserrat', sans-serif;
	margin: 0;
	background-color: var(--primary-color);
	color: var(--text-color);
	line-height: 1.6;
	overflow-x: hidden; /* Запобігаємо горизонтальному скролу на всій сторінці */
}

.container {
	max-width: 1100px;
	margin: 0 auto;
	padding: 0 20px;
}

/* --- Секція Hero --- */
.hero {
	position: relative;
	height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	overflow: hidden;
	color: #fff;
}

.video-background {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: -1;
}

.video-background video {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hero::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.6);
}

.hero-content {
	z-index: 1;
	max-width: 800px;
	padding: 20px;
}

.main-title {
	font-size: clamp(2.5rem, 5vw, 3.5rem);
	font-weight: 900;
	margin-bottom: 0.5rem;
	letter-spacing: 2px;
	text-transform: uppercase;
	animation: fadeInDown 1s ease-out;
}

.subtitle {
	font-size: clamp(1.2rem, 3vw, 1.8rem);
	font-weight: 400;
	margin-bottom: 1.5rem;
	animation: fadeInDown 1s ease-out 0.3s;
	animation-fill-mode: backwards;
}

.hero-offer {
	font-size: 1.2rem;
	font-weight: 500;
	background: var(--cta-color);
	display: inline-block;
	padding: 10px 20px;
	border-radius: 5px;
	margin-bottom: 2rem;
	animation: fadeInUp 1s ease-out 0.6s;
	animation-fill-mode: backwards;
}

.hero-buttons {
	display: flex;
	justify-content: center;
	gap: 20px;
	flex-wrap: wrap;
}

.cta-button {
	background-color: var(--cta-color);
	color: #fff;
	padding: 15px 35px;
	text-decoration: none;
	font-size: 1.2rem;
	font-weight: 700;
	border-radius: 50px;
	transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
	border: none;
	cursor: pointer;
	display: inline-block;
	animation: fadeInUp 1s ease-out 0.9s;
	animation-fill-mode: backwards;
}

.cta-button:hover {
	background-color: var(--cta-hover-color);
	transform: translateY(-3px);
	box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.review-button {
	background-color: transparent;
	color: #fff;
	border: 2px solid #fff;
	padding: 13px 35px; /* 15px - 2px border */
}

.review-button:hover {
	background-color: #fff;
	color: var(--primary-color);
}

.review-button-secondary {
	display: inline-block;
	margin-top: 20px;
	font-weight: 700;
	color: var(--cta-color);
	text-decoration: none;
	border: 2px solid var(--cta-color);
	padding: 10px 20px;
	border-radius: 50px;
	transition: all 0.3s ease;
}

.review-button-secondary:hover {
	background-color: var(--cta-color);
	color: #fff;
}


/* --- Общие стили секций --- */
section {
	padding: 80px 0;
}

h2 {
	text-align: center;
	font-size: clamp(2rem, 4vw, 2.5rem);
	margin-bottom: 60px;
}

.problem-solution {
	background-color: var(--secondary-color);
}

.features-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 40px;
	text-align: center;
}

.feature-item svg {
	color: var(--cta-color);
	margin-bottom: 20px;
}

.feature-item h3 {
	font-size: 1.5rem;
	margin-bottom: 10px;
}

/* --- Секція Демонстрації Продукту --- */
.product-showcase {
	background-color: var(--primary-color);
}

.showcase-wrapper {
	display: grid;
	grid-template-columns: 1fr 1.2fr;
	gap: 60px;
	align-items: center;
}

.showcase-text ul {
	list-style: none;
	padding-left: 0;
}

.showcase-text li {
	padding-left: 30px;
	position: relative;
	margin-bottom: 10px;
}

.showcase-text li::before {
	content: '✔';
	color: var(--cta-color);
	position: absolute;
	left: 0;
	font-weight: bold;
}

/* ВИПРАВЛЕННЯ: Додаємо min-width: 0, щоб запобігти розтягуванню гріда слайдером */
.showcase-gallery {
	min-width: 0;
}

.main-image-container {
	background-color: var(--secondary-color);
	border-radius: 15px;
	padding: 20px;
	margin-bottom: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 450px;
}

#main-product-image {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	transition: transform 0.3s ease, opacity 0.3s ease;
}

.color-selector {
	display: flex;
	justify-content: center;
	gap: 15px;
	margin-bottom: 25px;
}

.color-swatch {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	cursor: pointer;
	border: 3px solid transparent;
	transition: all 0.3s ease;
}

.color-swatch:hover {
	transform: scale(1.1);
}

.color-swatch.active {
	border-color: var(--cta-color);
	box-shadow: 0 0 10px var(--cta-color);
}

/* Swiper Styles */
.thumbnail-swiper {
	position: relative; /* Додаємо для коректного позиціонування кнопок */
	width: 100%;
	height: 100px;
	padding: 0 10px;
}

.thumbnail-swiper .swiper-slide {
	width: 100px;
	height: 100px;
	background-color: var(--secondary-color);
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	opacity: 0.6;
	transition: opacity 0.3s ease, border-color 0.3s ease;
	border: 2px solid transparent;
}

.thumbnail-swiper .swiper-slide.swiper-slide-thumb-active {
	opacity: 1;
	border-color: var(--cta-color);
}

.thumbnail-swiper .swiper-slide img {
	max-width: 90%;
	max-height: 90%;
	object-fit: contain;
}

.swiper-button-next, .swiper-button-prev {
	color: var(--cta-color);
}

/* --- Отзывы --- */
.testimonials {
	background-color: var(--secondary-color);
}
.testimonial-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 30px;
}
.testimonial-card {
	background: var(--primary-color);
	padding: 30px;
	border-radius: 10px;
	border-left: 5px solid var(--cta-color);
}
.testimonial-card p {
	font-style: italic;
	margin-top: 0;
	margin-bottom: 15px;
}
.testimonial-card h4 {
	text-align: right;
	font-weight: 700;
	margin: 0;
}

/* --- Секция заказа --- */
#order-form {
	background: linear-gradient(rgba(13, 27, 42, 0.8), rgba(13, 27, 42, 0.8)), url('https://j-phone.ru/images/mainnews/c3797686b29cd13ae0e4175b9f711200.jpg') center/cover no-repeat fixed;
}
.order-section .container {
	display: flex;
	gap: 50px;
	align-items: center;
	background-color: rgba(27, 38, 59, 0.95);
	padding: 40px;
	border-radius: 15px;
}
.price-block { flex: 1; }
.form-block { flex: 1; }
.price .old-price {
	font-size: 1.8rem;
	text-decoration: line-through;
	opacity: 0.6;
	margin-right: 15px;
}
.price .new-price {
	font-size: 3rem;
	font-weight: 900;
	color: var(--cta-color);
}
.promo-box {
	margin-top: 20px;
	background-color: rgba(0,0,0,0.3);
	padding: 20px;
	border-radius: 10px;
}
.promo-box ul {
	list-style: none;
	padding: 0;
	margin: 0;
}
.promo-box li {
	margin-bottom: 5px;
}

.form-block form {
	display: flex;
	flex-direction: column;
	gap: 15px;
}
.form-block input {
	padding: 15px;
	border-radius: 5px;
	border: 1px solid var(--accent-color);
	background-color: var(--secondary-color);
	color: var(--text-color);
	font-size: 1rem;
	font-family: 'Montserrat', sans-serif;
}
.form-block input:focus {
	outline: none;
	border-color: var(--cta-color);
	box-shadow: 0 0 10px var(--cta-color);
}
.form-button { width: 100%; }
#form-message {
	margin-top: 15px;
	font-weight: bold;
	text-align: center;
}
.success { color: var(--success-color); }
.error { color: var(--error-color); }

/* --- Footer --- */
.footer {
	text-align: center;
	padding: 30px 0;
	background-color: #000;
}
.disclaimer {
	font-size: 0.8rem;
	opacity: 0.6;
}

/* --- СТИЛІ ДЛЯ МОДАЛЬНОГО ВІКНА --- */
.hidden {
	display: none;
}

.modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.8);
	z-index: 1000;
	cursor: pointer;
}

.modal {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background-color: var(--secondary-color);
	padding: 30px;
	border-radius: 15px;
	z-index: 1001;
	width: 90%;
	max-width: 800px;
	text-align: center;
	border: 1px solid var(--accent-color);
	box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.modal-close-btn {
	position: absolute;
	top: 10px;
	right: 15px;
	background: none;
	border: none;
	color: var(--text-color);
	font-size: 2.5rem;
	cursor: pointer;
	line-height: 1;
}

.modal h3 {
	font-size: 1.8rem;
	margin-top: 0;
	margin-bottom: 20px;
}

.video-container {
	position: relative;
	padding-bottom: 56.25%; /* 16:9 aspect ratio */
	height: 0;
	overflow: hidden;
	margin-bottom: 20px;
}

.video-container iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border-radius: 10px;
}

.modal-price {
	font-size: 1.5rem;
	margin-bottom: 20px;
}

.modal-price span {
	font-weight: 700;
	color: var(--cta-color);
}

.modal-buy-btn {
	width: 100%;
	max-width: 300px;
}


/* --- Анимации --- */
@keyframes fadeInDown {
	from { opacity: 0; transform: translateY(-20px); }
	to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
	from { opacity: 0; transform: translateY(20px); }
	to { opacity: 1; transform: translateY(0); }
}

/* --- Адаптивность --- */
@media (max-width: 992px) {
	.showcase-wrapper {
		grid-template-columns: 1fr;
	}
	.showcase-text {
		text-align: center;
		margin-bottom: 40px;
	}
}


@media (max-width: 900px) {
	.order-section .container {
		flex-direction: column;
		text-align: center;
	}
	.price-block {
		margin-bottom: 30px;
	}
}

@media (max-width: 768px) {
	.modal {
		padding: 20px;
	}
	.modal h3 {
		font-size: 1.5rem;
	}
}
