/* ==========================================================================
   Autoport – UX слой (зарежда се последен)
   ========================================================================== */
:root {
	--apx-blue: #067dcd;
	--apx-blue-600: #0569ad;
	--apx-blue-50: #eaf4fc;
	--apx-ink: #111418;
	--apx-ink-2: #2a3340;
	--apx-muted: #5f6b7a;
	--apx-line: #e5e9ef;
	--apx-bg: #f6f8fb;
	--apx-red: #e50000;
	--apx-green: #16a34a;
	--apx-radius: 14px;
	--apx-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .06);
	--apx-shadow-lg: 0 2px 6px rgba(16, 24, 40, .06), 0 18px 48px rgba(16, 24, 40, .12);
	--apx-ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- 1. Продуктова страница: „Наличност:“ и „Код:“ като „Производител:“ ---------- */
body.single-product .product_meta .product-stock,
body.single-product .product_meta .sku_wrapper {
	font-weight: 400 !important;
	font-size: 14px !important;
	color: var(--apx-muted) !important;
	letter-spacing: 0 !important;
	display: flex !important;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 10px !important;
}
body.single-product .product_meta .product-stock .stock { font-weight: 600 !important; }
body.single-product .product_meta .product-stock .stock,
body.single-product .product_meta .sku { margin: 0 !important; vertical-align: middle; }

/* Балонът с кода: целият е бутон за копиране; иконата е отделена. */
body.single-product .product_meta .sku {
	cursor: pointer !important;
	display: inline-flex !important;
	align-items: center;
	gap: 0 !important;
	font-weight: 600 !important;
	letter-spacing: .2px;
	user-select: none;
	-webkit-user-select: none;
	transition: background-color .2s var(--apx-ease), transform .15s var(--apx-ease), box-shadow .2s var(--apx-ease) !important;
}
body.single-product .product_meta .sku::after {
	margin-left: 10px !important;
	padding-left: 10px !important;
	border-left: 1px solid rgba(255, 255, 255, .45);
	line-height: 1.1;
	opacity: .95 !important;
	pointer-events: none;
}
body.single-product .product_meta .sku:hover { box-shadow: 0 4px 14px rgba(6, 125, 205, .28); }
body.single-product .product_meta .sku:active { transform: scale(.97); }
body.single-product .product_meta .sku:focus-visible { outline: 2px solid var(--apx-blue); outline-offset: 2px; }

/* ---------- 2. Sticky „Добави в количката“: бадж за промоция ---------- */
.sticky-product .sticky-image { position: relative; overflow: visible !important; }
.sticky-product .sticky-image .apx-sticky-labels {
	position: absolute;
	top: -6px;
	left: -6px;
	z-index: 3;
	display: flex;
	flex-direction: column;
	gap: 3px;
	pointer-events: none;
}
.sticky-product .sticky-image .apx-sticky-labels > * {
	position: static !important;
	margin: 0 !important;
	font-size: 10px !important;
	line-height: 1 !important;
	padding: 4px 6px !important;
	min-width: 0 !important;
	min-height: 0 !important;
	border-radius: 999px !important;
	box-shadow: 0 2px 6px rgba(229, 0, 0, .35);
	white-space: nowrap;
}

/* ---------- 3. Количка: анимация при добавяне ---------- */
.apx-fly {
	position: fixed;
	z-index: 100000;
	pointer-events: none;
	border-radius: 12px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
	object-fit: cover;
	background: #fff;
	will-change: transform, opacity;
}
@keyframes apx-cart-shake {
	0%, 100% { transform: rotate(0) scale(1); }
	15% { transform: rotate(-14deg) scale(1.15); }
	30% { transform: rotate(12deg) scale(1.15); }
	45% { transform: rotate(-9deg) scale(1.1); }
	60% { transform: rotate(6deg) scale(1.05); }
	75% { transform: rotate(-3deg) scale(1.02); }
}
@keyframes apx-cart-glow {
	0% { box-shadow: 0 0 0 0 rgba(229, 0, 0, .65); background-color: rgba(229, 0, 0, .0); }
	35% { box-shadow: 0 0 0 10px rgba(229, 0, 0, .0); background-color: rgba(229, 0, 0, .9); }
	100% { box-shadow: 0 0 0 0 rgba(229, 0, 0, 0); background-color: rgba(229, 0, 0, 0); }
}
@keyframes apx-badge-pop {
	0% { transform: scale(1); }
	40% { transform: scale(1.6); background: #fff; color: var(--apx-red); }
	100% { transform: scale(1); }
}
.apx-cart-hit .cart-head,
.apx-cart-hit .cart-icon { animation: apx-cart-shake .8s var(--apx-ease); transform-origin: 50% 20%; }
.apx-cart-hit .cart-head { border-radius: 14px; animation: apx-cart-shake .8s var(--apx-ease), apx-cart-glow 1.1s ease-out; }
.apx-cart-hit .cart-items,
.apx-cart-hit .cart-items-text { animation: apx-badge-pop .6s .35s var(--apx-ease); }
.apx-toast {
	position: fixed;
	right: 20px;
	top: 20px;
	z-index: 100001;
	display: flex;
	align-items: center;
	gap: 12px;
	max-width: min(92vw, 380px);
	padding: 12px 14px;
	background: #fff;
	color: var(--apx-ink);
	border-radius: 14px;
	box-shadow: var(--apx-shadow-lg);
	border-left: 4px solid var(--apx-green);
	font-size: 14px;
	line-height: 1.35;
	transform: translateY(-16px);
	opacity: 0;
	transition: transform .35s var(--apx-ease), opacity .35s var(--apx-ease);
}
.apx-toast.is-on { transform: none; opacity: 1; }
.apx-toast.is-error { border-left-color: var(--apx-red); }
.apx-toast img { width: 46px; height: 46px; object-fit: cover; border-radius: 10px; flex: 0 0 auto; }
.apx-toast a { margin-left: auto; white-space: nowrap; font-weight: 600; color: var(--apx-blue); text-decoration: none; }
.single_add_to_cart_button.apx-loading { opacity: .75; pointer-events: none; }
@media (max-width: 767px) { .apx-toast { left: 12px; right: 12px; top: auto; bottom: 90px; max-width: none; } }

/* ---------- 4. Странична лента: търсачка за автомобил ---------- */
.aps-car { position: relative; }
.aps-car select {
	-webkit-appearance: none !important;
	appearance: none !important;
	padding-right: 38px !important;
	background-color: #fff !important;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23111418' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
	background-repeat: no-repeat !important;
	background-position: right 14px center !important;
	background-size: 14px 14px !important;
	cursor: pointer;
	transition: border-color .2s var(--apx-ease), box-shadow .2s var(--apx-ease), color .2s;
	text-overflow: ellipsis;
}
.aps-car select:hover:not(:disabled) { border-color: #9fb4c8 !important; }
.aps-car select:focus { outline: none; border-color: var(--apx-blue) !important; box-shadow: 0 0 0 3px rgba(6, 125, 205, .15) !important; }
.aps-car select:disabled { cursor: not-allowed; opacity: .6; background-color: #f6f8fb !important; }
.aps-car select.apx-filled {
	border-color: var(--apx-blue) !important;
	box-shadow: 0 0 0 3px rgba(6, 125, 205, .12) !important;
	color: var(--apx-ink) !important;
	font-weight: 600;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23067dcd' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
}

/* ---------- 5. Банер „PORT5“ – размерите са настроени в Elementor (страница 18393); тук само заобляне. ---------- */
.elementor-18393 .elementor-element-1693c2f { overflow: hidden; }
@media (max-width: 767px) {
	.elementor-18393 .elementor-element-f392f60 > .elementor-container { justify-content: center; }
}

/* ---------- 6. Плочки с категории – движение и цвят ---------- */
.elementor-18393 li.product-category .thumb-info,
li.ap-tile-car .thumb-info,
li.ap-tile-uni .thumb-info {
	position: relative;
	border-radius: 16px !important;
	overflow: hidden;
	isolation: isolate;
	transition: transform .45s var(--apx-ease), box-shadow .45s var(--apx-ease);
	box-shadow: 0 1px 2px rgba(16, 24, 40, .05);
}
.elementor-18393 li.product-category .thumb-info-wrapper img {
	transition: transform .7s var(--apx-ease), filter .5s var(--apx-ease);
	will-change: transform;
}
.elementor-18393 li.product-category .thumb-info-wrap {
	position: relative;
	background: linear-gradient(110deg, #0569ad 0%, #067dcd 28%, #18a0f0 50%, #067dcd 72%, #0569ad 100%) !important;
	background-size: 220% 100% !important;
	animation: apx-flow 7s linear infinite;
	transition: filter .3s;
}
.elementor-18393 li.product-category .thumb-info-wrap .thumb-info-title,
.elementor-18393 li.product-category .thumb-info-wrap .sub-title { background: transparent !important; position: relative; z-index: 1; }
.elementor-18393 li.product-category .thumb-info::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 2;
	pointer-events: none;
	background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .45) 48%, transparent 66%);
	transform: translateX(-120%);
	transition: transform .9s var(--apx-ease);
}
.elementor-18393 li.product-category .thumb-info::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	border-radius: inherit;
	opacity: 0;
	background: radial-gradient(120% 70% at 50% 0%, rgba(24, 160, 240, .18), transparent 60%);
	transition: opacity .45s var(--apx-ease);
}
@media (hover: hover) {
	.elementor-18393 li.product-category a:hover .thumb-info { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(6, 125, 205, .25), 0 0 0 2px rgba(6, 125, 205, .35); }
	.elementor-18393 li.product-category a:hover .thumb-info-wrapper img { transform: scale(1.08); filter: saturate(1.15) contrast(1.03); }
	.elementor-18393 li.product-category a:hover .thumb-info::after { transform: translateX(120%); }
	.elementor-18393 li.product-category a:hover .thumb-info::before { opacity: 1; }
	.elementor-18393 li.product-category a:hover .thumb-info-wrap { animation-duration: 2.2s; filter: brightness(1.08); }
}
.elementor-18393 li.product-category a:focus-visible .thumb-info { outline: 3px solid var(--apx-blue); outline-offset: 3px; }
@keyframes apx-flow { 0% { background-position: 0% 50%; } 100% { background-position: 220% 50%; } }

/* Поява при скрол (добавя се от JS) */
.apx-reveal { opacity: 0; transform: translateY(18px) scale(.98); }
.apx-reveal.is-in { opacity: 1; transform: none; transition: opacity .6s var(--apx-ease), transform .6s var(--apx-ease); transition-delay: var(--apx-d, 0ms); }

@media (prefers-reduced-motion: reduce) {
	.elementor-18393 li.product-category .thumb-info-wrap { animation: none; }
	.apx-reveal { opacity: 1; transform: none; }
	.apx-cart-hit .cart-head, .apx-cart-hit .cart-icon, .apx-cart-hit .cart-items { animation: none !important; }
}

/* ---------- 7. Блог ---------- */
.blog .post .entry-title, .archive .post .entry-title, .single-post .entry-title,
.post-item .post-title, .post-grid .entry-title, .blog-posts .entry-title, .posts-container .entry-title,
.single-post .post-title, .page-title.blog-title, .post .entry-title a, .porto-posts-grid .entry-title,
.related-posts .entry-title, .widget_recent_entries a, .porto-recent-posts .post-title,
.elementor-widget-porto_recent_posts .entry-title, .elementor-widget-porto_blog .entry-title, .post-carousel .entry-title {
	text-transform: none !important;
}
.single-post .post-author, .single-post .post-block.post-author, .post-meta .meta-author, .post-meta-author,
.post .meta-author, .post-item .post-meta .meta-author, .entry-author, .author-box, .post-block.post-author { display: none !important; }

.single-post .apx-lead { font-size: 1.12em; color: var(--apx-ink-2); }
.apx-tip {
	margin: 28px 0;
	padding: 18px 20px;
	border-radius: var(--apx-radius);
	background: var(--apx-blue-50);
	border: 1px solid #cfe6f8;
}
.apx-tip p { margin: 0; }
.apx-tip__label { display: inline-block; margin-bottom: 6px; font-size: 12px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--apx-blue); }
.apx-source {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 6px 8px;
	margin: 32px 0 8px;
	padding: 16px 18px;
	border-top: 1px solid var(--apx-line);
	border-bottom: 1px solid var(--apx-line);
	font-size: 14px;
	color: var(--apx-muted);
}
.apx-source__label { font-weight: 700; color: var(--apx-ink); }
.apx-source a { font-weight: 600; color: var(--apx-blue); text-decoration: none; }
.apx-source a:hover { text-decoration: underline; }
.apx-source__note { flex-basis: 100%; font-size: 12.5px; }


/* ---------- 8. Производителност: съдържанието под първия екран се рендерира при приближаване ---------- */
.home .elementor-element.ap-section { content-visibility: auto; contain-intrinsic-size: auto 720px; }
.footer-wrapper { content-visibility: auto; contain-intrinsic-size: auto 560px; }
