/* Hero slider widget (front.inc.widgets.widget_hero_slider, assets/js/hero-slider.js). Heights and corner radius come
   from the widget as --hs-h (desktop), --hs-h-tab (tablet), --hs-h-mob (mobile, may be auto) and --hs-radius. */

.hero-slider { position: relative; overflow: hidden; height: var(--hs-h); border-radius: var(--hs-radius); background: #f3f0f6; isolation: isolate; }
.hero-slider .swiper-wrapper, .hero-slider .swiper-slide { height: 100%; }
/* before the script runs (or without it): only the first slide */
.hero-slider:not(.swiper-initialized) .swiper-wrapper { display: flex; }
.hero-slider:not(.swiper-initialized) .swiper-slide { flex: 0 0 100%; }
.hero-slider:not(.swiper-initialized) .swiper-slide:not(:first-child) { display: none; }

/* picture banners */
.hs-banner, .hs-banner picture { display: block; height: 100%; }
.hs-banner img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* content slides: text on one side, picture or products on the other */
.hs-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); align-items: center; gap: 40px; height: 100%; padding: 36px 64px; overflow: hidden; }
.hs-card.hs-media-start .hs-media { order: -1; }
.hs-theme-dark { color: #fff; }
.hs-theme-light { color: #2E292C; }
.hs-content { position: relative; z-index: 1; max-width: 560px; }
.hs-eyebrow { display: inline-block; margin-bottom: 14px; padding: 6px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 700; letter-spacing: -.1px; backdrop-filter: blur(6px); }
.hs-theme-dark .hs-eyebrow { background: rgba(255, 255, 255, .16); color: #fff; }
.hs-theme-light .hs-eyebrow { background: rgba(147, 57, 217, .1); color: #7B2DBA; }
.hs-heading { margin: 0 0 12px; font-size: clamp(24px, 2.7vw, 42px); font-weight: 900; line-height: 1.35; color: inherit; }
.hs-text { display: -webkit-box; overflow: hidden; margin: 0 0 24px; font-size: 15.5px; line-height: 1.9; opacity: .88; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.hs-btn { display: inline-flex; align-items: center; gap: 10px; padding: 13px 26px; border-radius: 999px; font-size: 15px; font-weight: 800; text-decoration: none; box-shadow: 0 10px 24px rgba(20, 10, 30, .22); transition: transform .2s, box-shadow .2s; }
.hs-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(20, 10, 30, .28); }
.hs-btn i { font-size: 16px; transition: transform .2s; }
.hs-btn:hover i { transform: translateX(-3px); }

.hs-media { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; height: 100%; min-width: 0; min-height: 0; }
.hs-picture { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; min-height: 0; object-fit: contain; filter: drop-shadow(0 18px 28px rgba(0, 0, 0, .22)); }
.hs-type-dynamic .hs-media { padding: 4px 0; }

/* shop: logo and name */
.hs-shop { display: inline-flex; align-items: center; gap: 10px; padding: 6px 16px 6px 6px; border-radius: 999px; background: rgba(255, 255, 255, .95); color: #2E292C !important; font-weight: 800; font-size: 14px; text-decoration: none; box-shadow: 0 8px 20px rgba(0, 0, 0, .14); }
.hs-shop img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; background: #fff; }

/* shop and category: product tiles */
/* one row: as many columns as products, at most 4 on desktop and 3 below */
.hs-products { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 150px); justify-content: center; gap: 12px; width: 100%; }
.hs-products .hs-product:nth-child(n+5) { display: none; }
.hs-product { display: flex; flex-direction: column; gap: 6px; padding: 8px 8px 10px; border-radius: 16px; background: #fff; color: #2E292C !important; text-decoration: none; box-shadow: 0 10px 26px rgba(20, 10, 30, .16); transition: transform .2s; }
.hs-product:hover { transform: translateY(-4px); }
.hs-product-img { display: block; overflow: hidden; aspect-ratio: 1; border-radius: 11px; background: #f6f4f8; }
.hs-product-img img { width: 100%; height: 100%; border-radius: 0; object-fit: cover; }
.hs-product-title { overflow: hidden; font-size: 12.5px; line-height: 1.6; white-space: nowrap; text-overflow: ellipsis; }
.hs-product-price { font-size: 13px; }
.hs-product-price .font-16 { font-size: 13.5px !important; }
.hs-product-price .font-13 { font-size: 11px !important; }

/* dots and arrows */
/* on a small dark pill, so they show on light slides too */
.hs-dots { position: absolute; z-index: 5; left: 50% !important; right: auto !important; bottom: 14px !important; width: auto !important; display: flex; justify-content: center; gap: 6px; padding: 6px 9px; border-radius: 999px; background: rgba(20, 10, 30, .24); backdrop-filter: blur(6px); transform: translateX(-50%); }
.hs-dots .swiper-pagination-bullet { width: 8px; height: 8px; margin: 0 !important; border-radius: 999px; background: #fff; opacity: .55; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); pointer-events: auto; transition: width .3s, opacity .3s; }
.hs-dots .swiper-pagination-bullet-active { width: 24px; opacity: 1; }
.hs-arrow { position: absolute; z-index: 5; top: 50%; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-top: -22px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .9); color: #2E292C; font-size: 20px; box-shadow: 0 6px 16px rgba(0, 0, 0, .16); opacity: 0; cursor: pointer; transition: opacity .25s, transform .2s; }
.hs-prev { right: 16px; }
.hs-next { left: 16px; }
.hero-slider:hover .hs-arrow, .hs-arrow:focus-visible { opacity: 1; }
.hs-arrow:hover { transform: scale(1.06); }
.hs-arrow.swiper-button-disabled { opacity: 0 !important; pointer-events: none; }

/* tablet */
@media (max-width: 991.98px) {
    .hero-slider { height: var(--hs-h-tab); }
    .hs-card { gap: 24px; padding: 28px 32px; }
    .hs-heading { font-size: 26px; }
    .hs-text { font-size: 14.5px; -webkit-line-clamp: 2; }
    .hs-products { grid-auto-columns: minmax(0, 1fr); }
    .hs-products .hs-product:nth-child(n+4) { display: none; }
    .hs-arrow { display: none; }
}

/* mobile: picture or products on top, text under it */
@media (max-width: 767.98px) {
    .hero-slider { height: var(--hs-h-mob); }
    .hero-slider .swiper-wrapper, .hero-slider .swiper-slide { height: auto; }
    .hero-slider.hs-auto-mobile .swiper-wrapper { align-items: flex-start; }
    .hs-banner img { height: auto; }
    .hero-slider:not(.hs-auto-mobile) .hs-banner img, .hero-slider:not(.hs-auto-mobile) .swiper-slide { height: 100%; }
    .hs-card { grid-template-columns: 1fr; grid-template-rows: auto; align-content: start; gap: 18px; height: 100%; padding: 22px 18px 40px; text-align: center; }
    .hs-card .hs-media { order: -1; height: auto; }
    .hs-content { max-width: none; }
    .hs-eyebrow { margin-bottom: 10px; font-size: 11.5px; }
    .hs-heading { margin-bottom: 8px; font-size: 21px; }
    .hs-text { margin-bottom: 16px; font-size: 13.5px; line-height: 1.8; }
    .hs-btn { padding: 11px 22px; font-size: 14px; }
    .hs-picture { max-height: 190px; }
    .hs-products { gap: 8px; }
    .hs-product { padding: 6px 6px 8px; border-radius: 13px; }
    .hs-product-title { font-size: 11.5px; }
    .hs-shop { padding: 4px 12px 4px 4px; font-size: 13px; }
    .hs-shop img { width: 38px; height: 38px; }
    .hs-dots { bottom: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    .hs-btn, .hs-product, .hs-arrow { transition: none; }
}
