/* 12 Nov: carousels (altaj-carousel.js) and product card hover. */

/* product rows on the landing pages and the home page: one sideways-scrolling row, 4 cards on PC, 2 on phones */
.altaj-rl-best .fusion-post-cards:not(.awb-carousel) ul.fusion-grid, .altaj-pp-more--brand .fusion-post-cards:not(.awb-carousel) ul.fusion-grid {
	display: grid !important; grid-template-columns: none !important; grid-auto-flow: column !important;
	grid-auto-columns: calc((100% - 72px) / 4); gap: 24px !important; overflow-x: auto; overflow-y: hidden;
	overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 !important; padding: 0 !important; width: 100% !important;
}
.altaj-rl-best ul.fusion-grid::-webkit-scrollbar { display: none; }
.altaj-rl-best ul.fusion-grid > .post-card { scroll-snap-align: start; margin: 0 !important; width: auto !important; }
.altaj-rl-best .fusion-post-cards, .altaj-rl-best .altaj-car-vp { min-width: 0; width: 100%; }
@media (max-width: 1024px) { .altaj-rl-best .fusion-post-cards:not(.awb-carousel) ul.fusion-grid, .altaj-pp-more--brand .fusion-post-cards:not(.awb-carousel) ul.fusion-grid { grid-auto-columns: calc((100% - 12px) / 2); gap: 12px !important; } }
@media (max-width: 767px) { .altaj-rl-best .fusion-post-cards:not(.awb-carousel) ul.fusion-grid, .altaj-pp-more--brand .fusion-post-cards:not(.awb-carousel) ul.fusion-grid { grid-auto-columns: calc((100% - 12px) / 2.15); } }

/* arrows: shown when the mouse is over the carousel (PC); small and always there on phones */
.altaj-car-vp, .altaj-car-hero { position: relative; }
body #main .altaj-car .altaj-car-arrow, body.altaj-skin-reemstore #main .altaj-car .altaj-pp-arrow {
	position: absolute; top: 40%; z-index: 30; width: 42px; height: 42px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
	display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.95); color: #1A1A1A;
	box-shadow: 0 2px 10px rgba(0,0,0,.18); opacity: 0; pointer-events: none; transition: opacity .2s, background .2s, color .2s;
}
body #main .altaj-car-hero .altaj-car-arrow { top: 50%; transform: translateY(-50%); }
body #main .altaj-car .altaj-car-prev { inset-inline-start: 8px; }
body #main .altaj-car .altaj-car-next { inset-inline-end: 8px; }
body #main .altaj-car .altaj-car-prev svg { transform: scaleX(-1); }
html[dir="rtl"] body #main .altaj-car .altaj-car-prev svg { transform: none; }
html[dir="rtl"] body #main .altaj-car .altaj-car-next svg { transform: scaleX(-1); }
@media (hover: hover) and (pointer: fine) {
	body #main .altaj-car:hover .altaj-car-arrow:not(:disabled), body #main .altaj-car:focus-within .altaj-car-arrow:not(:disabled) { opacity: 1; pointer-events: auto; }
	body #main .altaj-car .altaj-car-arrow:hover { background: var(--rl-burg, #1A1A1A); color: #fff; }
}
@media (hover: none), (max-width: 767px) {
	body #main .altaj-car .altaj-car-arrow:not(:disabled) { display: flex !important; opacity: .85; pointer-events: auto; width: 30px; height: 30px; }
	body #main .altaj-car .altaj-car-arrow svg { width: 15px; height: 15px; }
	body #main .altaj-car .altaj-car-prev { inset-inline-start: 2px; }
	body #main .altaj-car .altaj-car-next { inset-inline-end: 2px; }
}
body #main .altaj-car-fits .altaj-car-arrow, body #main .altaj-car-fits + .altaj-car-dots, body #main .altaj-car-fits .altaj-car-dots { display: none !important; }
body #main .altaj-car .altaj-car-arrow:disabled { opacity: 0 !important; pointer-events: none !important; }

/* dots under a row */
.altaj-car-dots { display: flex; justify-content: center; gap: 7px; margin-top: 16px; }
.altaj-car-dot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: rgba(0,0,0,.2); cursor: pointer; transition: width .2s, background .2s; }
.altaj-car-dot.is-on { width: 22px; border-radius: 4px; background: var(--rl-burg, #1A1A1A); }

/* product cards: on mouse-over only a slight zoom of the photo (no dark overlay, no icons) */
.post-card .fusion-post-card-image, .post-card .fusion-image-wrapper { overflow: hidden; }
.post-card .fusion-post-card-image img, .post-card .fusion-image-wrapper img { transition: transform .35s ease; }
@media (hover: hover) { .post-card:hover .fusion-post-card-image img, .post-card:hover .fusion-image-wrapper img { transform: scale(1.04); } }
.post-card .fusion-rollover, .post-card .fusion-rollover-content, .post-card .fusion-rollover-link, .post-card .fusion-rollover-gallery,
.post-card .fusion-image-wrapper .fusion-rollover { display: none !important; }
.post-card .fusion-image-wrapper:hover::before, .post-card .fusion-image-wrapper::after { display: none !important; }

/* 12 Nov: "More from <brand>" carousel on Liby / FORU / OnlyU / Foresan / Fresh & Fresh product pages */
.altaj-pp-more--brand { max-width: 1200px; margin: 0 auto; padding: 40px 20px 48px; box-sizing: border-box; width: 100%; }
.altaj-pp-more--brand .altaj-more-from__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.altaj-pp-more--brand ul.fusion-grid::-webkit-scrollbar { display: none; }
.altaj-pp-more--brand ul.fusion-grid > .post-card { scroll-snap-align: start; margin: 0 !important; width: auto !important; }
.altaj-pp-more--brand .post-card .fusion-post-card-image img { aspect-ratio: 1 / 1; width: 100%; height: auto; object-fit: contain; }
.altaj-pp-more--brand .altaj-rl-sold { width: 100%; margin: 4px 0 0; font-size: 12px; line-height: 1.4; color: #7a6f6b; text-align: center; }
@media (max-width: 767px) { .altaj-pp-more--brand { padding: 28px 12px 32px; } }

/* 12 Nov: the home hero text changes with the slide - cross-fade, never empty (rev 2: no fade-out to blank, no fade-in on page load) */
.altaj-hero-rot { position: relative; }
.altaj-hero-rot > * { transition: opacity .5s ease; }
.altaj-hero-rot > .altaj-hero-in { opacity: 0; transition: none; }
.altaj-hero-rot > .altaj-hero-old { position: absolute; inset: 0; z-index: 1; padding: inherit; text-align: inherit; pointer-events: none; opacity: 1; }
.altaj-hero-rot > .altaj-hero-old.is-out { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .altaj-hero-rot > * { transition: none; } }

/* 12 Nov: category circles under the hero on PC, above it on phones (landing pages and the AL TAJ home) */
@media (max-width: 767px) {
	.altaj-rl { display: flex; flex-direction: column; }
	.altaj-rl > .altaj-rl-cats { order: -1; padding-top: 14px; padding-bottom: 6px; }
}

/* 12 Nov (#11): product pages never show an empty product block ("No Products Found") or the gap it leaves */
body.single-product #main .fusion-nothing-found { display: none !important; }
body.single-product #main .fusion-fullwidth:has(.fusion-nothing-found):not(:has(.post-card)) { display: none !important; }
