/* ============================================
   RACESHOP.KZ — Стили корзины
   ============================================ */

/* --- Visually hidden (для SEO H1) --- */
.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* --- Toast уведомление --- */
.cart-toast {
	position: fixed;
	bottom: 30px;
	left: 50%;
	transform: translateX(-50%) translateY(100px);
	background: #DF222A;
	color: #fff;
	padding: 12px 28px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	font-family: 'Montserrat', sans-serif;
	z-index: 10000;
	opacity: 0;
	transition: all 0.4s ease;
	pointer-events: none;
	white-space: nowrap;
}

.cart-toast.show {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}

/* --- Кнопка "Добавлено" --- */
.btn-transparent.added span {
	color: #4CAF50 !important;
}

/* --- Модальное окно корзины --- */
.cart-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 9999;
	visibility: hidden;
	opacity: 0;
	transition: all 0.3s ease;
}

.cart-modal.open {
	visibility: visible;
	opacity: 1;
}

.cart-modal__overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.7);
	backdrop-filter: blur(4px);
}

.cart-modal__body {
	position: absolute;
	top: 0;
	right: -480px;
	width: 460px;
	max-width: 100%;
	height: 100%;
	background: #1a1a1a;
	color: #f1f1f1;
	overflow-y: auto;
	padding: 30px;
	transition: right 0.4s ease;
	font-family: 'Montserrat', sans-serif;
	box-shadow: -5px 0 30px rgba(0,0,0,0.5);
}

.cart-modal.open .cart-modal__body {
	right: 0;
}

.cart-modal__close {
	position: absolute;
	top: 16px;
	right: 20px;
	background: none;
	border: none;
	color: #f1f1f1;
	font-size: 32px;
	cursor: pointer;
	line-height: 1;
	transition: color 0.2s;
	z-index: 1;
}

.cart-modal__close:hover {
	color: #DF222A;
}

/* --- Header --- */
.cart-modal__header h2 {
	font-size: 22px;
	font-weight: 700;
	margin: 0 0 20px 0;
	text-transform: uppercase;
	letter-spacing: 1px;
}

/* --- Items --- */
.cart-modal__items {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin-bottom: 20px;
}

.cart-modal__item {
	display: flex;
	align-items: center;
	gap: 12px;
	background: #252525;
	border-radius: 10px;
	padding: 12px;
	position: relative;
}

.cart-modal__item-img {
	flex-shrink: 0;
	width: 80px;
	height: 60px;
	border-radius: 6px;
	overflow: hidden;
	background: #333;
}

.cart-modal__item-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.cart-modal__item-info {
	flex: 1;
	min-width: 0;
}

.cart-modal__item-title {
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
	margin-bottom: 4px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.cart-modal__item-price {
	font-size: 14px;
	font-weight: 700;
	color: #DF222A;
}

/* --- Qty --- */
.cart-modal__item-qty {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
}

.cart-modal__item-qty span {
	font-size: 15px;
	font-weight: 700;
	min-width: 20px;
	text-align: center;
}

.cart-modal__qty-btn {
	width: 28px;
	height: 28px;
	border-radius: 6px;
	border: 1px solid #555;
	background: transparent;
	color: #f1f1f1;
	font-size: 16px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s;
	line-height: 1;
}

.cart-modal__qty-btn:hover {
	border-color: #DF222A;
	color: #DF222A;
}

/* --- Remove --- */
.cart-modal__item-remove {
	position: absolute;
	top: 6px;
	right: 8px;
	background: none;
	border: none;
	color: #666;
	font-size: 18px;
	cursor: pointer;
	line-height: 1;
	transition: color 0.2s;
	padding: 0;
}

.cart-modal__item-remove:hover {
	color: #DF222A;
}

/* --- Footer / Total --- */
.cart-modal__footer {
	border-top: 1px solid #333;
	padding-top: 16px;
	margin-bottom: 24px;
}

.cart-modal__total {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 18px;
	font-weight: 700;
}

.cart-modal__total-val {
	color: #DF222A;
	font-size: 22px;
}

/* --- Form --- */
.cart-modal__form h3 {
	font-size: 16px;
	font-weight: 700;
	margin: 0 0 16px 0;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.cart-modal__input {
	display: block;
	width: 100%;
	padding: 14px 18px;
	margin-bottom: 12px;
	border: 1px solid #444;
	border-radius: 8px;
	background: #252525;
	color: #f1f1f1;
	font-size: 15px;
	font-family: 'Montserrat', sans-serif;
	outline: none;
	transition: border-color 0.2s;
	box-sizing: border-box;
}

.cart-modal__input:focus {
	border-color: #DF222A;
}

.cart-modal__input::placeholder {
	color: #777;
}

.cart-modal__submit {
	display: block;
	width: 100%;
	padding: 16px;
	margin-top: 6px;
	background: #DF222A !important;
	color: #fff !important;
	border: none;
	border-radius: 8px;
	font-size: 15px;
	font-weight: 700;
	font-family: 'Montserrat', sans-serif;
	text-transform: uppercase;
	letter-spacing: 1px;
	cursor: pointer;
	transition: background 0.2s;
}

.cart-modal__submit:hover {
	background: #c41e25 !important;
}

.cart-modal__submit:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* --- Status --- */
.cart-modal__status {
	margin-top: 12px;
	font-size: 14px;
	text-align: center;
	min-height: 20px;
}

.cart-modal__status.success {
	color: #4CAF50;
	font-weight: 600;
}

.cart-modal__status.error {
	color: #DF222A;
	font-weight: 600;
}

/* --- Empty --- */
.cart-modal__empty {
	display: none;
	text-align: center;
	padding: 60px 0;
}

.cart-modal__empty p {
	font-size: 18px;
	color: #666;
}

.cart-modal__thanks {
	color: #4CAF50 !important;
	font-size: 20px !important;
	font-weight: 700;
	line-height: 1.5;
}

/* --- Mobile --- */
@media (max-width: 500px) {
	.cart-modal__body {
		width: 100%;
		padding: 20px;
	}

	.cart-modal__item {
		flex-wrap: wrap;
		gap: 8px;
	}

	.cart-modal__item-img {
		width: 60px;
		height: 45px;
	}

	.cart-modal__item-title {
		font-size: 12px;
	}

	.cart-modal__item-qty {
		margin-left: auto;
	}
}

/* --- Фикс каталога: единообразные карточки товаров --- */
.catalog__item-img {
	overflow: hidden;
	align-items: flex-start;
	justify-content: center;
	padding: 5px 10px 0;
	flex-direction: column;
	background: #fff !important;
}
.catalog__item-img img {
	width: 100%;
	height: auto;
	object-fit: contain;
	max-height: 200px;
	order: -1;
}
.catalog__item-img .catalog__item-title {
	margin-top: 0;
}
/* --- Обрезка длинных названий товаров --- */
.catalog__item-title {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
	padding-top: 10px !important;
}
@media screen and (max-width: 767px) {
	.catalog__item-img img {
		max-height: 150px;
	}
}

/* --- Цена + бейдж в одну строку --- */
.catalog__item-price-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
}
.catalog__item-price-row > .catalog__item-price {
	display: block;
	width: auto;
	margin-left: auto;
	order: 2;
}
.catalog__item-price-row > .catalog__item-badge {
	order: 1;
}
.catalog__item-badge {
	font-size: 10px;
	font-weight: 600;
	text-transform: uppercase;
	padding: 3px 8px;
	border-radius: 3px;
	white-space: nowrap;
	line-height: 1;
}
.badge--instock {
	color: #4CAF50;
	border: 1px solid #4CAF50;
}
.badge--onorder {
	color: #FF9800;
	border: 1px solid #FF9800;
}
/* Скрываем строку с ценой+бейджем при наведении (как оригинальная цена) */
.catalog__item:hover .catalog__item-price-row {
	opacity: 0;
	visibility: hidden;
}

/* --- Кнопки фильтра --- */
.filter__btns {
	display: flex;
	gap: 10px;
	align-items: flex-end;
}
.btn-instock-toggle {
	background: transparent;
	border: 1px solid #555;
	color: #999;
	padding: 10px 18px;
	font-size: 13px;
	font-weight: 600;
	text-transform: uppercase;
	cursor: pointer;
	transition: all 0.2s;
	white-space: nowrap;
	height: 42px;
	display: flex;
	align-items: center;
}
.btn-instock-toggle:hover {
	border-color: #4CAF50;
	color: #4CAF50;
}
.btn-instock-toggle.active {
	background: #4CAF50;
	border-color: #4CAF50;
	color: #fff;
}
.btn-reset {
	background: transparent;
	border: 1px solid #555;
	color: #999;
	padding: 10px 18px;
	font-size: 13px;
	font-weight: 600;
	text-transform: uppercase;
	cursor: pointer;
	transition: all 0.2s;
	white-space: nowrap;
	height: 42px;
	display: flex;
	align-items: center;
}
.btn-reset:hover {
	border-color: #DF222A;
	color: #DF222A;
}

/* --- AJAX loading fade --- */
.catalog__grid {
	transition: opacity 0.2s ease;
}

/* --- Мобильные тогглеры фильтра и категорий --- */
.mobile-togglers {
	display: none;
	gap: 10px;
	margin-bottom: 16px;
}
.mobile-toggler {
	display: flex;
	align-items: center;
	gap: 8px;
	background: #1a1a19;
	border: 1px solid #333;
	color: #f1f1f1;
	padding: 10px 16px;
	font-size: 13px;
	font-weight: 600;
	text-transform: uppercase;
	cursor: pointer;
	transition: all 0.2s;
	flex: 1;
	justify-content: center;
}
.mobile-toggler.active {
	border-color: #DF222A;
	background: #2a1a1a;
}
.mobile-toggler:hover {
	border-color: #DF222A;
}

@media screen and (max-width: 767px) {
	.mobile-togglers {
		display: flex;
	}
	/* Фильтр скрыт по умолчанию на мобилке */
	#catalogFilter {
		display: none;
	}
	#catalogFilter.filter--open {
		display: flex;
	}
	/* Сайдбар скрыт по умолчанию на мобилке */
	.catalog__sidebar {
		display: none !important;
	}
	.catalog__sidebar.sidebar--open {
		display: block !important;
	}
}

/* ============================================
   INSTAGRAM FEED SECTION
   ============================================ */

.instagram-section {
	padding: 40px 0 60px;
}

.instagram-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 24px;
}

.instagram-title {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 22px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 1px;
	color: #f1f1f1;
}

.instagram-icon {
	flex-shrink: 0;
}

.instagram-follow {
	font-size: 13px;
	padding: 10px 20px;
	white-space: nowrap;
	text-decoration: none;
}

.insta-slider-wrap {
	position: relative;
}

.insta-card {
	border-radius: 12px;
	overflow: hidden;
	position: relative;
	aspect-ratio: 1;
	display: block;
	background: #252525;
}

.insta-card img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .3s ease;
}

.insta-card:hover img {
	transform: scale(1.05);
}

.insta-card__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	display: flex;
	align-items: flex-end;
	padding: 12px;
	opacity: 0;
	transition: opacity .25s ease;
}

.insta-card:hover .insta-card__overlay {
	opacity: 1;
}

.insta-card__overlay p {
	color: #fff;
	font-size: 12px;
	line-height: 1.4;
	margin: 0;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
}

.insta-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 10;
	width: 40px;
	height: 40px;
	background: rgba(0, 0, 0, 0.6);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background .2s;
}

.insta-arrow:hover {
	background: rgba(223, 34, 42, 0.8);
}

.insta-arrow.swiper-button-disabled {
	opacity: 0.3;
	cursor: default;
}

.insta-prev {
	left: -16px;
}

.insta-next {
	right: -16px;
}

.insta-arrow svg {
	width: 10px;
	height: 16px;
}

.footer__requisites {
	margin-top: 14px;
	max-width: 892px;
	font-size: 13px;
	line-height: 1.5;
	color: #888;
}

@media screen and (max-width: 1439px) {
	.footer__requisites {
		max-width: 800px;
	}
}

@media screen and (max-width: 1199px) {
	.footer__requisites {
		max-width: 750px;
	}
}

@media screen and (max-width: 767px) {
	.footer__requisites {
		font-size: 11px;
		margin-top: 10px;
	}
}

.requisites {
	background: rgba(37, 37, 37, 0.85);
	border: 1px solid #333;
	border-radius: 12px;
	padding: 28px 28px 24px;
	margin-bottom: 50px;
}

.requisites__title {
	font-size: 18px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 1px;
	color: #f1f1f1;
	margin-bottom: 20px;
}

.requisites__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 18px 28px;
}

.requisites__label {
	font-size: 12px;
	color: #888;
	text-transform: uppercase;
	letter-spacing: 0.8px;
	font-weight: 600;
	margin-bottom: 6px;
}

.requisites__value {
	font-size: 15px;
	font-weight: 600;
	color: #f1f1f1;
	line-height: 1.4;
}

@media (max-width: 767px) {
	.requisites {
		padding: 22px 18px 18px;
		margin-bottom: 36px;
	}

	.requisites__title {
		font-size: 16px;
	}

	.requisites__value {
		font-size: 14px;
	}
}

@media (max-width: 768px) {
	.instagram-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
	}
	.instagram-title {
		font-size: 18px;
	}
	.insta-card__overlay {
		opacity: 0 !important;
	}
	.insta-prev { left: 4px; }
	.insta-next { right: 4px; }
}
