/*
 * home-hero.css - the "modern" top section of the shop home page (em-public/includes/hero-modern.php, js/pages/home-hero.js).
 *   Computer (1200px+): banner slider, progress bars exactly as wide as the banner, welcome card + app card beside it.
 *   Smaller screens: the banner slider alone, as wide as the page content, with its progress bars, then "Shop by category".
 * Banners (picture + optional layers) are drawn by css/layout/banner-layers.css and always keep their 2.5 : 1 shape.
 */
.emh { padding: 16px 0 2px; }
.emh-in { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: stretch; }
.emh-main { min-width: 0; display: flex; flex-direction: column; gap: 10px; }

/* ---- slider ---- */
.emh-slider { position: relative; width: 100%; border-radius: 16px; overflow: hidden; background: #F6F7F9;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 14px 32px -24px rgba(15, 23, 42, .45); }
.emh-slider .swiper-wrapper { align-items: stretch; }
.emh-slider .swiper-slide { height: auto; }
.emh-slider:not(.swiper-initialized) .swiper-slide:not(:first-child) { display: none; }
.emh-slider .hs { height: 100%; }
.emh-slider .bn-stage { height: 100%; aspect-ratio: 2.5 / 1; background: transparent; }
.emh-arrow { position: absolute; top: 50%; z-index: 5; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; margin-top: -21px;
  padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92); color: #141B34; font-size: 14px; cursor: pointer;
  box-shadow: 0 4px 14px -6px rgba(15, 23, 42, .45); opacity: 0; transition: opacity .2s ease, transform .2s ease, background-color .2s ease; }
.emh-prev { left: 14px; transform: translateX(-6px); } .emh-next { right: 14px; transform: translateX(6px); }
.emh-slider:hover .emh-arrow, .emh-arrow:focus-visible { opacity: 1; transform: none; }
.emh-arrow:hover { background: #fff; }
.emh-arrow:focus-visible { outline: 2px solid var(--k-brand, #E97C43); outline-offset: 2px; }

/* progress bars: one per banner, together exactly as wide as the banner; the current one fills while it is shown */
.emh-bars { display: flex; gap: 6px; width: 100%; }
.emh-bar { position: relative; flex: 1 1 0; min-width: 0; height: 14px; padding: 0; border: 0; background: none; cursor: pointer; }
.emh-bar::before, .emh-bar i { content: ''; position: absolute; left: 0; top: 5px; height: 4px; border-radius: 4px; }
.emh-bar::before { right: 0; background: #E9EDF2; }
.emh-bar i { width: 0; background: var(--k-brand, #E97C43); }
.emh-bar.is-done i { width: 100%; background: #F3B48D; }
.emh-bar.is-on i { width: var(--p, 0%); }
.emh-bar:hover::before { background: #DCE2E9; }
.emh-bar:focus-visible { outline: 2px solid var(--k-brand, #E97C43); outline-offset: 2px; border-radius: 4px; }

/* ---- side cards (computer) ---- */
.emh-side { display: none; }
.emh-card { display: block; border-radius: 16px; background: #fff; border: 1px solid #EDF0F3; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
.emh-hello { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 18px; overflow: hidden;
  background: radial-gradient(220px 160px at 100% 0, rgba(255, 196, 140, .32), transparent 72%), #fff; }
.emh-who { display: flex; align-items: center; gap: 12px; }
.emh-who h2 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -.01em; color: #0F172A; overflow-wrap: anywhere; }
.emh-who p { margin: 2px 0 0; font-size: 13px; color: #64748B; }
.emh-avatar { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, #F59E5B, #E0602A); color: #fff; font-size: 18px; font-weight: 700; box-shadow: 0 6px 14px -8px rgba(224, 96, 42, .9); }
.emh-avatar.is-guest { background: #FFF1E7; color: var(--k-brand-strong, #C45A2A); box-shadow: none; font-size: 17px; }
.emh-links { display: flex; flex-direction: column; gap: 6px; margin-top: 16px; }
.emh-links a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid #EEF1F4; background: #FAFBFC;
  color: #0F172A; font-size: 14px; font-weight: 600; text-decoration: none; transition: border-color .15s ease, background-color .15s ease, transform .15s ease; }
.emh-links a > i:first-child { width: 18px; text-align: center; color: var(--k-brand-strong, #C45A2A); }
.emh-links a span { flex: 1; min-width: 0; }
.emh-links a b { min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--k-brand, #E97C43); color: #fff; font-size: 11.5px; line-height: 20px; text-align: center; }
.emh-links a:hover { border-color: #F1C7A6; background: #FFF8F2; transform: translateX(2px); }
.emh-chev { font-size: 11px; color: #A0AEC0; }
.emh-perks { margin: 16px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.emh-perks li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: #334155; }
.emh-perks li i { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 8px; background: #FFF4EC; color: var(--k-brand-strong, #C45A2A); font-size: 12px; }
.emh-login { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; margin-top: auto; border-radius: 12px; background: var(--k-brand, #E97C43);
  color: #fff; font-size: 14px; font-weight: 700; text-decoration: none; box-shadow: 0 10px 20px -14px rgba(233, 124, 67, .95); transition: background-color .15s ease, transform .15s ease; }
.emh-login:hover { background: var(--k-brand-strong, #C45A2A); color: #fff; transform: translateY(-1px); }
.emh-app { display: flex; align-items: center; gap: 12px; padding: 14px 16px; color: #0F172A; text-decoration: none; transition: border-color .15s ease, transform .15s ease; }
.emh-app:hover { border-color: #F1C7A6; transform: translateY(-1px); color: #0F172A; }
.emh-app-ic { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; background: #141B34; color: #fff; font-size: 17px; }
.emh-app-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.emh-app-tx b { font-size: 14px; }
.emh-app-tx small { font-size: 12px; color: #64748B; }

/* ---- banner animation: the picture settles, layers come in one after another (from the second banner shown) ---- */
.emh.is-anim .swiper-slide-active .bn-bg { animation: emhKen 6s ease-out both; }
.emh.is-anim .swiper-slide-active .bn-l { animation: emhIn .65s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i, 1) * 80ms + 120ms); }
.emh.is-anim .swiper-slide-active .bn-prod { animation-name: emhPop; }
@keyframes emhKen { from { scale: 1.06; } to { scale: 1; } }
@keyframes emhIn { from { opacity: 0; translate: 0 1.3cqw; } to { opacity: 1; translate: 0 0; } }
@keyframes emhPop { from { opacity: 0; scale: .75; } to { opacity: 1; scale: 1; } }

/* ---- computer: slider + side cards (as tall as the slider with its bars) ---- */
@media (min-width: 1200px) {
  .emh { padding-top: 20px; }
  .emh-in { grid-template-columns: minmax(0, 1fr) 300px; }
  .emh-side { display: flex; flex-direction: column; gap: 12px; height: 0; min-height: 100%; }
}
/* ---- phones ---- */
@media (max-width: 767.98px) {
  .emh { padding-top: 10px; }
  .emh-slider { border-radius: 12px; box-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 10px 22px -18px rgba(15, 23, 42, .45); }
  .emh-main { gap: 8px; }
  .emh-bars { gap: 5px; }
  .emh-bar { height: 12px; }
  .emh-bar::before, .emh-bar i { top: 4px; height: 3px; }
}
@media (prefers-reduced-motion: reduce) {
  .emh.is-anim .swiper-slide-active .bn-bg, .emh.is-anim .swiper-slide-active .bn-l { animation: none; }
}
