/**
 * Ручні правки поверх білду Tailwind (style.css — мініфікований білд макета,
 * руками його не правимо). Підключається останнім у page_view.php.
 */

/* --- Банерна карусель ------------------------------------------------------ */

/* Картка не росте при наведенні — збільшується лише картинка всередині.
   clip-path тримає заокруглення навіть під час transform у батьків
   (overflow:hidden + border-radius Chrome губить на анімованих шарах). */
.campaign-card,
.campaign-card:hover {
	transform: none;
}
.campaign-card {
	clip-path: inset(0 round 12px);
}
.campaign-card img {
	border-radius: 0;
}
.campaign-card:hover img {
	transform: scale(1.06);
}

/* ≤900px білд ставить сітці `1fr` (мінімум = auto), і Swiper роздуває
   ширину до мільйонів пікселів — банери зникають. Обмежуємо колонку. */
@media (max-width: 900px) {
	.campaign-layout {
		grid-template-columns: minmax(0, 1fr);
	}
	.campaign-carousel {
		min-width: 0;
	}
}

/* Центральний банер у макеті трохи збільшений (scale 1.025), а Swiper обрізає
   все, що виходить за його межі, — даємо запас зверху й знизу, інакше банер
   виглядає обрізаним. */
.campaign-viewport.swiper {
	padding-block: 16px;
}

/* --- Акція тижня ------------------------------------------------------------ */

/* Слайд лише групує фото й деталі одного товару: display:contents лишає їх
   прямими дітьми .weekly-promo, на яких побудовані сітки макета. */
.weekly-promo-slide {
	display: contents;
}
/* Щоб висота картки не стрибала між товарами з різною довжиною назви */
.weekly-promo .promo-details-title {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
/* «Всі акції» у нас посилання, а стилі макета написані під button */
.weekly-promo-header a {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	flex: none;
	color: #fff;
	font-size: 11px;
	font-weight: 800;
	opacity: .94;
	transition: opacity .2s, transform .2s;
}
.weekly-promo-header a:hover {
	opacity: 1;
	transform: translate(2px);
}
.promo-navigation > button {
	border-radius: 7px;
}
@media (min-width: 641px) and (max-width: 900px) {
	.weekly-promo .promo-navigation {
		grid-column: 1 / -1;
	}
}

/* --- Рейки товарів ---------------------------------------------------------- */

.product-rail-slider {
	position: relative;
}
.product-rail.swiper {
	display: block;
	overflow: hidden;
	padding: 2px 2px 14px;
}
/* Ширину слайдів на десктопі рахує Swiper (6 карток від 1280px, див. site.js). */
.product-rail.swiper > .swiper-wrapper > * {
	height: auto;
}
.rail-control {
	position: absolute;
	top: 40%;
	z-index: 3;
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	background: #fff;
	color: #012241;
	box-shadow: var(--shadow-sm, 0 4px 12px #0122411f);
	transform: translateY(-50%);
	transition: background .2s, color .2s, opacity .2s;
}
.rail-control:hover { background: #007588; color: #fff; }
.rail-control--prev { left: -12px; }
.rail-control--next { right: -12px; }
.rail-control.swiper-button-disabled { opacity: 0; pointer-events: none; }
.rail-control.swiper-button-lock { display: none; }

@media (max-width: 640px) {
	.product-rail.swiper > .swiper-wrapper > * {
		width: 205px;
	}
	.rail-control { display: none; }
}

/* --- Відеовітрина ----------------------------------------------------------- */

/* У мобільному білді сусідні слайди приховані display:none — під Swiper це
   ламає ширини, тож лишаємо їх видимими, просто приглушеними. */
@media (max-width: 640px) {
	.video-card.is-near {
		display: block;
		opacity: .6;
		transform: scale(.94);
	}
}

/* Відступ під стрілки робимо margin'ом, а не padding'ом: у padding Swiper
   показує краї сусідніх слайдів. */
.video-viewport {
	width: auto;
	flex: 1;
	min-width: 0;
	margin-inline: 46px;
	padding-inline: 0;
}
@media (max-width: 640px) {
	.video-viewport {
		margin-inline: 0;
	}
}

/* --- SEO-блок --------------------------------------------------------------- */

/* Висоту розгорнутого стану виставляє site.js за scrollHeight — фіксованих
   2400px на довгий текст не вистачало, і він обрізався. */
.seo-block__content.is-expanded {
	max-height: none;
}

/* Текст у CMS місцями вже містить власну обгортку .seo-block__content (з тим
   самим id) — вкладена копія мала свою стелю висоти й обрізала текст зсередини. */
.seo-block__content .seo-block__content {
	max-height: none;
	overflow: visible;
}
.seo-block__content .seo-block__content::after {
	display: none;
}

/* --- Картки блогу ----------------------------------------------------------- */

/* Стилі макету написані під h2, а в картці заголовок h3 (h2 — у заголовку секції). */
.blog-card-body h3 {
	margin-top: 14px;
	color: #012241;
	font-size: 17px;
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: -.02em;
	transition: color .2s;
}
.blog-card:hover .blog-card-body h3 {
	color: #007588;
}
.blog-card-toggle[aria-expanded="true"] svg {
	transform: rotate(180deg);
}
.blog-card-takeaway[hidden] {
	display: none;
}
.blog-card-takeaway p {
	margin: 0;
}
/*
 * Уся картка клікабельна: посилання «Читати статтю» розтягуємо псевдоелементом
 * на всю картку, а кнопка «Головна думка» лежить над ним і працює окремо.
 * Заголовок — рівно 2 рядки, анонс — 3: картки в ряду однакові, а кнопки
 * внизу стоять на одній лінії.
 */
.blog-card {
	position: relative;
	height: 100%;
}
.blog-card-read-more::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}
.blog-card-toggle,
.blog-card-takeaway {
	position: relative;
	z-index: 2;
}
.blog-card-body h3,
.blog-card-excerpt {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.blog-card-body h3 {
	-webkit-line-clamp: 2;
	min-height: 2.4em;
}
.blog-card-excerpt {
	-webkit-line-clamp: 3;
	min-height: 4.65em;
}
.blog-card-body > .blog-card-toggle {
	margin-top: auto;
}
.blog-card-read-more {
	margin-top: auto;
	padding-top: 13px;
}
.blog-card-toggle ~ .blog-card-read-more {
	margin-top: 0;
}

/* --- Слайдери: крапки-кнопки ------------------------------------------------ */

/* Swiper кладе в контейнер пагінації свої класи з position:absolute —
   макет позиціонує крапки сам (.campaign-mobile-dots, .catalog-promo-dots). */
.campaign-mobile-dots.swiper-pagination-bullets,
.catalog-promo-dots.swiper-pagination-bullets {
	top: auto !important;
	bottom: 12px !important;
	left: 50% !important;
	width: auto !important;
	transform: translateX(-50%);
}
.catalog-promo-dots.swiper-pagination-bullets {
	bottom: 14px !important;
}
.swiper-dot {
	flex: none;
	cursor: pointer;
}
.campaign-mobile-viewport.swiper {
	overflow: hidden;
}
.campaign-mobile-banner {
	display: block;
}

/* --- Рекламні смуги --------------------------------------------------------- */

.catalog-promo-banner {
	border-radius: 12px;
	overflow: hidden;
}
.catalog-promo-viewport.swiper {
	border-radius: 12px;
}
.catalog-promo-control.swiper-button-disabled {
	opacity: .4;
}

/* --- Мобільне меню ---------------------------------------------------------- */

.mobile-menu .mobile-menu-icon-close,
.mobile-menu[aria-expanded="true"] .mobile-menu-icon-open {
	display: none;
}
.mobile-menu[aria-expanded="true"] .mobile-menu-icon-close {
	display: block;
}

/* --- Форми заявок і попап --------------------------------------------------- */

.lead-form-status {
	flex-basis: 100%;
	margin-top: 4px;
	color: #0b7a3b;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.4;
}
.lead-form-status.is-error {
	color: #c61d3c;
}
.feedback-modal-form .lead-form-status {
	margin-top: 14px;
}
body.feedback-open {
	overflow: hidden;
}
.feedback-modal-submit:disabled,
form[data-lead-form] [type="submit"]:disabled {
	opacity: .6;
	cursor: wait;
}

/* --- Каталог: фільтри ------------------------------------------------------- */

/* У макеті чипи категорій і «Очистити все» — <button>, і заокруглення їм дає
   глобальне правило для button; у нас це посилання, тож радіус задаємо явно. */
.catalog-filter-chip,
.catalog-clear-filters {
	border-radius: 6px;
}
.catalog-filter-panel {
	border-radius: 10px;
}
.catalog-price-fields input,
.catalog-filter-group--sort select {
	border-radius: 6px;
}

/* --- Каталог: пагінація ----------------------------------------------------- */

/* Стилі макета написані під <button>; у нас сторінки — посилання (їх бачать
   пошуковики), тож повторюємо ті самі правила для a/span. */
.catalog-pagination a,
.catalog-pagination span.catalog-pagination-arrow {
	display: grid;
	place-items: center;
	min-width: 34px;
	height: 34px;
	padding-inline: 6px;
	border-radius: 6px;
	background: #fff;
	color: #012241;
	font-size: 12px;
	font-weight: 800;
	transition: background .2s, color .2s, transform .2s;
}
.catalog-pagination-pages a:hover:not(.is-active),
a.catalog-pagination-arrow:hover {
	color: #007588;
	background: #eaf4f4;
	transform: translateY(-1px);
}
.catalog-pagination-pages a.is-active {
	color: #fff;
	background: #c61d3c;
}
span.catalog-pagination-arrow {
	cursor: not-allowed;
	opacity: .38;
}
.catalog-pagination-gap {
	min-width: 20px;
	text-align: center;
	color: #6c8792;
	font-weight: 800;
}

/* --- Примірочна ------------------------------------------------------------- */

.try-on-dock.is-collapsed .try-on-collapse svg {
	transform: rotate(180deg);
}
.try-on-secondary-action {
	cursor: pointer;
}
/* Шапка сайту фіксована — липка панель не має ховатися під нею. */
@media (min-width: 641px) {
	.try-on-dock {
		top: 196px;
	}
}

/* --- Контакти --------------------------------------------------------------- */

/* У макеті соцмережі — <button> і заокруглення їм дає глобальне правило для
   кнопок; у нас це посилання на акаунти, тож радіус задаємо явно. */
.contact-social-link {
	border-radius: 8px;
}


/* ---- Мова і валюта ---- (рамки через box-shadow: .page-shell * гасить border-width) */
.header-tools { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.cur-switch { display: inline-flex; border-radius: 999px; overflow: hidden; background: #fff; box-shadow: inset 0 0 0 1px #c9d6dc; }
.cur-switch button { padding: 7px 10px; font-size: 10px; font-weight: 800; letter-spacing: .06em; line-height: 1; color: #012241; background: transparent; cursor: pointer; white-space: nowrap; }
html[data-cur="uah"] .cur-switch [data-cur-set="uah"],
html[data-cur="eur"] .cur-switch [data-cur-set="eur"] { background: #012241; color: #fff; }
.lang-switch { position: relative; }
.lang-current { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px #c9d6dc; font-size: 10px; font-weight: 800; letter-spacing: .06em; line-height: 1; color: #012241; cursor: pointer; }
.lang-flag { display: block; border-radius: 2px; }
.lang-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 80; min-width: 160px; margin: 0; padding: 4px; list-style: none; background: #fff; box-shadow: 0 8px 24px rgba(1, 34, 65, .18), inset 0 0 0 1px #dfe7eb; }
.lang-menu[hidden] { display: none; }
.lang-menu a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; font-size: 12px; font-weight: 700; color: #012241; text-decoration: none; }
.lang-menu a:hover, .lang-menu a[aria-current="true"] { background: #eaf0f2; }

/* Ціна в двох валютах: головна залежить від перемикача, друга - дрібніше. */
.price-pair { display: inline-flex; flex-direction: column; line-height: 1.2; }
.price-pair .p-uah, .price-pair .p-eur { display: block; }
html[data-cur="uah"] .price-pair .p-eur,
html[data-cur="eur"] .price-pair .p-uah { font-size: .74em; font-weight: 500; opacity: .72; }
html[data-cur="eur"] .price-pair .p-eur { order: -1; }
.ticker-item .price-pair { flex-direction: row; gap: 6px; align-items: baseline; }
.ticker-item .price-pair .p-uah, .ticker-item .price-pair .p-eur { font-size: inherit; opacity: 1; }
.ticker-item .price-pair .p-eur::before { content: "/ "; }
html[data-cur="eur"] .ticker-item .price-pair .p-eur { order: 0; }
html[data-cur="eur"] .ticker-item .price-pair .p-uah { display: none; }
html[data-cur="uah"] .ticker-item .price-pair .p-eur { display: none; }
.mobile-nav-tools { display: none; }
@media (max-width: 1023px) {
	.header-main .header-tools { display: none; }
	.mobile-nav-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 12px 0 0; }
	.mobile-lang-link { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px #c9d6dc; font-size: 11px; font-weight: 800; letter-spacing: .06em; color: #012241; text-decoration: none; }
	.mobile-lang-link[aria-current="true"] { background: #012241; color: #fff; }
}

/* Логістика міст і областей, калькулятор закупівлі */
.logi-lead { color: #31546b; font-size: 15px; line-height: 1.6; max-width: 860px; }
.logi-note { color: #5b7587; font-size: 12px; line-height: 1.5; max-width: 860px; }
.logi-table-wrap { overflow-x: auto; border-radius: 12px; box-shadow: 0 0 0 1px #e1e7e9, 0 4px 15px #01224108; background: #fff; }
.logi-table { width: 100%; border-collapse: collapse; min-width: 680px; font-size: 14px; }
.logi-table th { text-align: left; padding: 14px 18px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #007588; background: #f5f8f9; white-space: nowrap; }
.logi-table td { padding: 14px 18px; color: #24465f; box-shadow: inset 0 1px 0 #e1e7e9; }
.logi-table td:first-child { font-weight: 800; color: #012241; }
.logi-table td a { color: #007588; text-decoration: underline; text-underline-offset: 3px; }
.logi-table tbody tr:hover td { background: #f9fbfc; }
.order-calc { display: grid; gap: 24px; grid-template-columns: 1fr; align-items: center; background: #fff; border-radius: 16px; padding: 32px 28px; box-shadow: 0 0 0 1px #e1e7e9, 0 8px 28px #01224110; }
.order-calc-form { display: grid; gap: 16px; }
.order-calc-form label { display: flex; flex-direction: column; gap: 6px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #007588; }
.order-calc-form select, .order-calc-form input { font: inherit; font-size: 14px; font-weight: 600; letter-spacing: 0; text-transform: none; color: #012241; background: #f5f8f9; border-radius: 8px; padding: 12px 14px; box-shadow: inset 0 0 0 1px #d5dfe3; width: 100%; }
.order-calc-result { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.order-calc-min { flex-basis: 100%; font-size: 12px; color: #5b7587; }
.order-calc-total { font-size: 24px; font-weight: 800; color: #012241; }
.order-calc-order { padding: 12px 18px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; background: #007588; color: #fff; border-radius: 4px; transition: background .2s; }
.order-calc-order:hover { background: #012241; }
@media (min-width: 900px) { .order-calc { grid-template-columns: 5fr 7fr; padding: 36px 40px; } }
.logi-sub { font-size: 18px; font-weight: 800; color: #012241; }
.coverage-region h3 a { color: inherit; text-decoration: none; }
.coverage-region h3 a:hover { text-decoration: underline; text-underline-offset: 2px; }
.logi-prose { display: grid; gap: 12px; }
.coverage-region h3 a:after { content: "→"; margin-left: 6px; opacity: .6; transition: margin .2s; }
.coverage-region h3 a:hover:after { margin-left: 9px; opacity: 1; }


/* --- Сторінка міста: товари першими, плитки доставки, кроки -------------------- */
.city-shop-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (min-width: 760px) { .city-shop-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; } }
@media (min-width: 1180px) { .city-shop-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.city-shop-grid > div { display: flex; flex-direction: column; min-width: 0; }
.city-shop-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; margin-top: 24px; padding: 18px 22px; background: #f5f8f9; border-radius: 12px; }
.city-shop-bar p { color: #31546b; font-size: 14px; line-height: 1.5; max-width: 560px; }
.city-shop-bar strong { color: #012241; }
.city-chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.city-chip { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px #c9d6dc; font-size: 12px; font-weight: 800; color: #007588; text-decoration: none; transition: background .2s, color .2s; }
.city-chip:hover { background: #007588; color: #fff; }
.city-stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (min-width: 900px) { .city-stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; } }
.city-stat { background: #fff; border-radius: 14px; padding: 22px 20px; box-shadow: 0 0 0 1px #e1e7e9, 0 6px 20px #01224108; }
.city-stat strong { display: block; margin-top: 14px; font-size: 26px; line-height: 1.1; font-weight: 800; color: #012241; }
.city-stat span { display: block; margin-top: 6px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #007588; }
.city-stat p { margin-top: 10px; font-size: 13px; line-height: 1.5; color: #31546b; }
.city-more > summary { cursor: pointer; font-size: 14px; font-weight: 800; color: #007588; list-style: none; }
.city-more > summary::-webkit-details-marker { display: none; }
.city-more > summary::before { content: "+"; display: inline-block; width: 22px; margin-right: 6px; text-align: center; border-radius: 50%; background: #eaf0f2; }
.city-more[open] > summary::before { content: "-"; }
.city-steps { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 800px) { .city-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; } }
.city-step { padding: 24px 22px; background: #fff; border-radius: 14px; box-shadow: 0 0 0 1px #e1e7e9, 0 6px 20px #01224108; }
.city-step-n { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #007588; color: #fff; font-size: 13px; font-weight: 800; }
.city-step h3 { margin-top: 14px; font-size: 18px; font-weight: 800; color: #012241; }
.city-step p { margin-top: 8px; font-size: 14px; line-height: 1.55; color: #31546b; }

/* Товарные ленты на главной: ~55 px/с, как у верхней строки (раньше 34s давали ~180 px/с) */
.marquee-lane .ticker-track { animation-duration: 110s; }

/* Сторінка товару: компактна галерея. Фото 9:16 без обрізання (contain), мініатюри збоку (зліва, колонкою),
   галерея вужча за текст. Мобільні (<=640px): та сама схема, блок під заголовком на всю ширину. */
.product-gallery { display: flex; flex-direction: row-reverse; align-items: flex-start; justify-content: center; gap: 8px; padding: 12px; }
.product-gallery-main { flex: 0 1 auto; width: min(360px, 100%); height: auto; aspect-ratio: 9 / 16; }
.product-gallery-main img { object-fit: contain; object-position: center; background: #dce8e9; }
.product-gallery-thumbs { display: flex; flex-direction: column; flex: 0 0 64px; gap: 8px; margin-top: 0; max-height: 640px; overflow-y: auto; scrollbar-width: thin; }
.product-gallery-thumbs button { flex: 0 0 auto; width: 100%; aspect-ratio: 9 / 16; }
.product-gallery-thumbs img { object-fit: contain; }
@media (min-width: 641px) {
	.product-detail-card { grid-template-columns: 456px minmax(0, 1fr); }
	.product-detail-body { padding: 32px 36px; }
}
@media (max-width: 640px) {
	.product-gallery { padding: 10px; }
	.product-gallery-main { width: min(280px, 100%); }
	.product-gallery-thumbs { flex-basis: 48px; max-height: 498px; }
}

/* Плеєр фото товару (відкривається кліком по головному фото; розмітку створює js/site.js) */
.product-gallery-main { cursor: zoom-in; }
.product-gallery-main:focus-visible { outline: 3px solid #007588; outline-offset: 2px; }
.gallery-lightbox { position: fixed; inset: 0; z-index: 3000; display: flex; align-items: center; justify-content: center; background: rgba(1, 34, 65, .97); }
.gallery-lightbox[hidden] { display: none; }
.gallery-lightbox-stage { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; box-sizing: border-box; padding: 64px 88px; }
.gallery-lightbox-stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; background: #dce8e9; box-shadow: 0 20px 60px rgba(0, 0, 0, .45); user-select: none; -webkit-user-drag: none; }
.gallery-lightbox-btn { position: absolute; display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer; color: #fff; background: rgba(255, 255, 255, .14); transition: background .15s; }
.gallery-lightbox-btn:hover { background: rgba(255, 255, 255, .28); }
.gallery-lightbox-btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.gallery-lightbox-close { top: 16px; right: 16px; }
.gallery-lightbox-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.gallery-lightbox-next { right: 20px; top: 50%; transform: translateY(-50%); }
.gallery-lightbox-count { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); color: #fff; font-family: var(--app-font-mono, monospace); font-size: 13px; font-weight: 700; letter-spacing: .08em; background: rgba(1, 34, 65, .7); padding: 6px 12px; }
@media (max-width: 640px) {
	.gallery-lightbox-stage { padding: 60px 8px 56px; }
	.gallery-lightbox-btn { width: 42px; height: 42px; background: rgba(1, 34, 65, .65); }
	.gallery-lightbox-prev { left: 8px; }
	.gallery-lightbox-next { right: 8px; }
	.gallery-lightbox-close { top: 10px; right: 10px; }
}
