/* dim24: UX-правки карточек, слайдера и футера (подключается после css_upstore) */

/* Единый формат фото товара: квадрат, белый фон, без обрезки */
.product-thumb .image {
	background: #fff;
}
.product-thumb .image a > img.img-responsive {
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: contain;
	background: #fff;
}

/* Название: не больше 3 строк, без пустоты под ним */
.product-thumb .product-name {
	min-height: 0;
	margin-bottom: 8px;
}
.product-thumb .product-name a {
	-webkit-line-clamp: 3;
}

/* «В наявності» не повторяем у каждой карточки, показываем только отсутствие */
.product-thumb .stock-status.instock {
	display: none;
}
.product-thumb .product_model_sstatus {
	margin-bottom: 6px;
}

/* Контраст артикула (было #C5C5C5) */
.product-thumb .product-model,
.container-module-viewed .product-model {
	color: #767676;
}

/* Индикаторы слайдера: читаемая подложка вместо наложения на картинку */
.container-banner .swiper-banner-pagination,
.container-slideshow .swiper-slideshow-pagination,
.megasliderpro .swiper .swiper-ms-pagination,
.promo-slider__pagination {
	padding: 4px 8px;
	border-radius: 12px;
	background: rgba(0, 0, 0, .35);
}

/* Подзаголовки секций: контраст */
.container-module .module-subtitle,
.container-module .heading-subtitle {
	color: #6b6b6b;
}

/* Футер: ссылки в палитре сайта */
footer a.read-more,
footer .more-link,
footer a[href*="#more"] {
	color: inherit;
	text-decoration: underline;
}

/* Единая шкала радиусов: крупные карточки 20px, кнопки-«пилюли» */
.product-thumb,
.dim24-popular-categories__item,
.dim24-popular-categories a,
.subcategory {
	border-radius: 20px;
}

/* Заголовки секций: чуть плотнее, чем 300 */
.title-module > span,
.dim24-popular-categories__title {
	font-weight: 500;
}

/* Карточка товара: главная кнопка «Купити» — залитая и заметная */
#product .cart #button-cart.btn-general {
	background: #FD6000;
	color: #fff;
	font-size: 16px;
	font-weight: 600;
	min-height: 48px;
	padding: 0 28px;
	border-radius: 44px;
}
#product .cart #button-cart.btn-general:hover {
	background: #E55600;
}
#product .cart #button-cart.btn-general * {
	color: #fff;
	fill: currentColor;
}

/* Карточка товара: контраст вкладок и кода */
.my-tabs > li:not(.active) > a {
	color: #6b6b6b;
}
.info-model span {
	color: #6b6b6b;
}

/* Футер: ссылка «Далі…» в палитре сайта */
a.seo-more {
	color: #FD6000;
	font-weight: 500;
}

/* «Показати ще» по центру, чтобы не пересекаться с виджетом чата справа */
.box-showmore {
	text-align: center;
}

@media (max-width: 767px) {
	/* Плитки подкатегорий: три в ряд, подпись мельче */
	.swiper-sub-category .subcategory {
		font-size: 12px;
		line-height: 15px;
	}

	/* Карточка плотнее */
	.product-thumb .caption {
		padding-top: 8px;
	}
	.product-thumb .product-name a {
		font-size: 13px;
		line-height: 18px;
	}
}

/* Мегаменю на главной (десктоп): компактные иконки в кружках, подсветка, аккуратный выпадающий список */
@media (min-width: 992px) {
	#menu-vertical-list {
		padding: 6px 0 !important;
	}
	#menu-vertical-list > li {
		height: 40px !important;
		margin: 0 8px;
	}
	#menu-vertical-list > li > a.parent-link {
		display: flex !important;
		align-items: center;
		height: 40px;
		padding: 4px 30px 4px 10px !important;
		border-radius: 12px;
		font-size: 14px;
		font-weight: 500;
		color: #102535;
		transition: background .2s, color .2s;
	}
	#menu-vertical-list > li > a.parent-link img.nsmenu-thumb {
		width: 30px !important;
		height: 30px !important;
		margin-right: 10px !important;
		padding: 5px;
		border-radius: 50%;
		background: #FFF3EA;
		box-sizing: border-box;
		flex: 0 0 30px;
		transition: background .2s;
	}
	#menu-vertical-list > li:hover > a.parent-link,
	#menu-vertical-list > li.open > a.parent-link {
		background: #FFF3EA;
		color: #FD6000;
	}
	#menu-vertical-list > li:hover > a.parent-link img.nsmenu-thumb {
		background: #fff;
	}
	#menu-vertical-list .ns-dd.dropdown-menu-simple {
		padding: 8px !important;
		border-radius: 0 16px 16px 0 !important;
		box-shadow: 0 16px 40px rgba(16, 37, 53, .14) !important;
		animation: dim24MenuIn .22s ease both;
	}
	#menu-vertical-list .ns-dd.dropdown-menu-simple li > a {
		display: block;
		padding: 10px 14px !important;
		border-radius: 10px;
		color: #102535;
		font-weight: 500;
		transition: background .15s, color .15s;
	}
	#menu-vertical-list .ns-dd.dropdown-menu-simple li:hover > a {
		background: #FFF3EA;
		color: #FD6000;
	}
}
@keyframes dim24MenuIn {
	from { opacity: 0; transform: translateX(-8px); }
	to { opacity: 1; transform: none; }
}

/* Шапка (десктоп): фирменный оранжевый на ключевых действиях, телефон без дубля, отклик при наведении */
@media (min-width: 992px) {
	.box-cart button.btn {
		background: #FD6000 !important;
		transition: background .2s;
	}
	.box-cart button.btn:hover {
		background: #E55600 !important;
	}
	.box-cart .cart-total {
		background: #102535 !important;
		color: #fff !important;
	}
	.btn-account,
	.btn-compare-top {
		transition: background .2s, color .2s;
	}
	.btn-account:hover,
	.btn-compare-top:hover {
		background: #FFF3EA !important;
	}
	.btn-account:hover i,
	.btn-compare-top:hover i {
		color: #FD6000 !important;
	}
	.box-search {
		border-radius: 56px;
		transition: box-shadow .2s;
	}
	.box-search:focus-within {
		box-shadow: 0 0 0 2px rgba(253, 96, 0, .45);
	}
	.box-search .btn-search {
		background: #FD6000 !important;
		transition: background .2s;
	}
	.box-search .btn-search i,
	.box-search .btn-search svg {
		color: #fff !important;
		fill: #fff;
	}
	.box-search .btn-search:hover {
		background: #E55600 !important;
	}
	/* Телефон один раз, мессенджеры значками рядом (в настройках темы номер задан дважды) */
	.up-header-phones__items {
		display: flex !important;
		flex-direction: row;
		align-items: center;
		flex-wrap: wrap;
		gap: 6px 12px;
	}
	.up-header-phones__item + .up-header-phones__item a {
		font-size: 0;
	}
}

/* Шапка (десктоп): кнопка «Каталог», верхняя строка ссылок, мягкая тень */
@media (min-width: 992px) {
	.header-nav-links .btn-link {
		font-size: 13px;
		font-weight: 500;
		color: #102535;
		transition: color .2s;
	}
	.header-nav-links .btn-link:hover {
		color: #FD6000;
	}
	.btn-menu-top {
		background: #FD6000 !important;
		border-color: #FD6000 !important;
		color: #fff !important;
		transition: background .2s;
	}
	.btn-menu-top * {
		color: #fff !important;
	}
	.btn-menu-top:hover {
		background: #E55600 !important;
		border-color: #E55600 !important;
	}
	.up-header {
		box-shadow: 0 4px 16px rgba(16, 37, 53, .06);
	}
}

/* Бейджи на карточках товаров: Хіт, Новинка, Акція */
.stickers-ns {
	top: 10px !important;
	left: 10px !important;
}
.sticker-ns {
	font-size: 12px !important;
	font-weight: 700 !important;
	line-height: 1 !important;
	padding: 6px 12px !important;
	border-radius: 999px !important;
	letter-spacing: .2px;
	box-shadow: 0 4px 10px rgba(16, 37, 53, .18);
}
.sticker-ns.popular {
	background: #FD6000 !important;
	color: #fff !important;
}
.sticker-ns.newproduct {
	background: #102535 !important;
	color: #fff !important;
}
.sticker-ns.special {
	background: #E5383B !important;
	color: #fff !important;
}
.sticker-ns.bestseller {
	background: #FFB020 !important;
	color: #102535 !important;
}

/* Отзывы на мобильной: ссылка «Всі відгуки» под заголовком, без наложения */
@media (max-width: 575px) {
	.title-module .see-all-reviews {
		position: static !important;
		display: flex !important;
		align-items: center;
		gap: 8px;
		margin: 6px 0 0 14px;
		padding: 0;
		background: transparent !important;
		font-size: 14px;
	}
}

/* Мегаменю: выпадающий список по высоте содержимого; верхние ссылки */
@media (min-width: 992px) {
	#menu-vertical-list .ns-dd.dropdown-menu-simple {
		bottom: auto !important;
		height: auto !important;
		min-height: 0 !important;
		max-height: 75vh;
		overflow-y: auto;
		border-radius: 16px !important;
	}
	#menu-vertical-list .ns-dd.dropdown-menu-simple > ul {
		height: auto !important;
	}
	#top .header-nav-links .btn-link {
		color: #102535;
	}
	#top .header-nav-links .btn-link:hover {
		color: #FD6000;
	}
}

/* Отзывы о магазине: фирменные цвета вместо «светофора» */
.rating-summary__icon[class*="bg-icon-start"] {
	background: #FD6000 !important;
}
.store-reviews__letter {
	background: #FFF3EA !important;
	color: #FD6000 !important;
	font-weight: 700;
}
.store-reviews__content [class*="date"] {
	color: #6b6b6b !important;
}
.reviews-block.s-box {
	display: flex;
	align-items: center;
}
.reviews-block.s-box .reviews_theme {
	width: 100%;
}

/* Статьи на главной: ровные превью, без дублирующего обрезанного текста */
.module-articles__image {
	aspect-ratio: 16 / 10;
	overflow: hidden;
	border-radius: 14px;
}
.module-articles__image a,
.module-articles__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.module-articles__title a {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-weight: 700;
	transition: color .2s;
}
.module-articles__content:hover .module-articles__title a {
	color: #FD6000;
}
.module-articles__description {
	display: none !important;
}
.module-articles__caption::after {
	content: "Читати статтю →";
	order: 2;
	margin: 8px 0 12px;
	color: #FD6000;
	font-size: 14px;
	font-weight: 600;
}
.module-atricles__footer {
	order: 3;
	margin-top: auto;
	color: #6b6b6b;
}
.module-articles__date-text {
	color: #6b6b6b;
}
.module-articles__content {
	transition: transform .22s ease, box-shadow .22s ease;
}
.module-articles__content:hover {
	transform: translateY(-4px);
	box-shadow: 0 14px 30px rgba(16, 37, 53, .10);
}

/* SEO-текст категории: без плавающей иконки слева, аккуратная типографика */
.category_description .psfl-l {
	display: none !important;
}
.category_description h2 {
	margin: 28px 0 12px;
	font-size: 26px;
	line-height: 1.2;
	font-weight: 600;
	color: #102535;
}
.category_description h3 {
	margin: 22px 0 10px;
	font-size: 20px;
	line-height: 1.25;
	font-weight: 600;
	color: #102535;
}
.category_description p {
	margin: 0 0 12px;
	line-height: 1.6;
}
.category_description ul,
.category_description ol {
	margin: 0 0 14px;
	padding-left: 22px;
}
.category_description li {
	margin-bottom: 6px;
	line-height: 1.5;
}
@media (max-width: 575px) {
	.category_description h2 { font-size: 22px; }
	.category_description h3 { font-size: 18px; }
}

/* Доступность: ссылки внутри текста различимы не только цветом */
.category_description p a,
.category_description li a,
#tab-description p a,
#tab-description li a,
.dim24-overview a {
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* ===== Маскот dim24 в шапке (PNG) ===== */
.dim-mascot{position:relative;flex:0 0 auto;width:84px;height:66px;margin:0 14px 0 6px;cursor:pointer;-webkit-tap-highlight-color:transparent;outline:none;z-index:5}
.dim-mascot__body{position:absolute;left:2px;bottom:-10px;width:80px;height:80px;will-change:transform;rotate:var(--lean,0deg);transition:rotate .35s ease-out;transform-origin:50% 100%;animation:dimMascotIdle 3.2s ease-in-out infinite}
.dim-mascot__body img{display:block;width:100%;height:100%;object-fit:contain;user-select:none;pointer-events:none}
.dim-mascot__shadow{position:absolute;left:50%;bottom:-11px;width:48px;height:7px;margin-left:-24px;border-radius:50%;background:rgba(0,0,0,.22);filter:blur(2px);animation:dimMascotShadow 3.2s ease-in-out infinite}
.dim-mascot:hover .dim-mascot__body{animation:dimMascotWiggle .7s ease-in-out infinite}
.dim-mascot.jump .dim-mascot__body,.dim-mascot.jump .dim-mascot__shadow{animation:dimMascotShadowJump .8s ease-out 1}
@keyframes dimMascotIdle{0%,100%{transform:translateY(0) scale(1,1)}45%{transform:translateY(-3px) scale(.98,1.03)}70%{transform:translateY(0) scale(1.03,.97)}}
@keyframes dimMascotShadow{0%,100%{transform:scaleX(1);opacity:.9}45%{transform:scaleX(.85);opacity:.6}}
@keyframes dimMascotWiggle{0%,100%{transform:rotate(-5deg) translateY(-2px)}50%{transform:rotate(5deg) translateY(-5px)}}
@keyframes dimMascotJump{0%{transform:scale(1.12,.86)}25%{transform:translateY(-26px) scale(.94,1.08) rotate(-8deg)}50%{transform:translateY(-30px) scale(1) rotate(360deg)}75%{transform:translateY(0) scale(1.12,.88)}100%{transform:scale(1)}}
@keyframes dimMascotShadowJump{0%,100%{transform:scaleX(1);opacity:.9}40%,60%{transform:scaleX(.5);opacity:.3}}
.dim-mascot .act-hop{animation:dmaHop .9s cubic-bezier(.3,.7,.4,1) 1}
.dim-mascot .act-spin{animation:dmaSpin 1s ease-in-out 1}
.dim-mascot .act-shake{animation:dmaShake .8s ease-in-out 1}
.dim-mascot .act-squish{animation:dmaSquish .9s ease-in-out 1}
.dim-mascot .act-nod{animation:dmaNod 1s ease-in-out 1}
.dim-mascot .act-sway{animation:dmaSway 1.6s ease-in-out 1}
.dim-mascot__heart{position:absolute;left:50%;top:10px;font-size:15px;line-height:1;opacity:0;pointer-events:none;animation:dmaHeart 1.2s ease-out forwards;z-index:30}
@keyframes dmaHop{0%,100%{transform:translateY(0) scale(1)}15%{transform:translateY(0) scale(1.1,.88)}35%{transform:translateY(-16px) scale(.95,1.07)}55%{transform:translateY(0) scale(1.08,.92)}70%{transform:translateY(-8px)}85%{transform:translateY(0) scale(1.04,.96)}}
@keyframes dmaSpin{0%{transform:perspective(300px) rotateY(0)}100%{transform:perspective(300px) rotateY(360deg)}}
@keyframes dmaShake{0%,100%{transform:rotate(0)}15%{transform:rotate(-10deg)}35%{transform:rotate(9deg)}55%{transform:rotate(-7deg)}75%{transform:rotate(5deg)}}
@keyframes dmaSquish{0%,100%{transform:scale(1,1)}25%{transform:scale(1.12,.86)}50%{transform:scale(.9,1.12) translateY(-6px)}75%{transform:scale(1.06,.94)}}
@keyframes dmaNod{0%,100%{transform:rotate(0) translateY(0)}25%{transform:rotate(7deg) translateY(2px)}50%{transform:rotate(-3deg)}75%{transform:rotate(5deg) translateY(1px)}}
@keyframes dmaSway{0%,100%{transform:translateX(0) rotate(0)}25%{transform:translateX(-6px) rotate(-6deg)}75%{transform:translateX(6px) rotate(6deg)}}
@keyframes dmaHeart{0%{opacity:0;transform:translate(-50%,0) scale(.4)}20%{opacity:1}100%{opacity:0;transform:translate(calc(-50% + var(--dx)),var(--dy)) scale(1.2)}}
@media (max-width:991px){.dim-mascot{display:none!important}}
@media (prefers-reduced-motion:reduce){.dim-mascot *,.dim-mascot__shadow{animation:none!important}}
