/* Homepage — layout inspired by home-test, theme synced with order/profile.php */

/* چیدمان جدا برای موبایل و دسکتاپ — فقط یکی در هر زمان نمایش داده می‌شود */
.hp-layout--desktop {
  display: none;
}

@media (min-width: 992px) {
  .hp-layout--mobile {
    display: none;
  }

  .hp-layout--desktop {
    display: block;
  }
}

:root {
  --hp-container: 1300px;
  --hp-gap: 16px;
  --hp-accent: #6e00ff;
  --hp-accent-soft: rgba(110, 0, 255, 0.1);
  --hp-accent-border: rgba(110, 0, 255, 0.3);
  --hp-danger: #ff4d6d;
  --hp-bg: #f8f9fc;
  --hp-surface: #ffffff;
  --hp-surface-2: #f1f5f9;
  --hp-text: #1e293b;
  --hp-text-muted: #64748b;
  --hp-border: #edf2f7;
  --hp-shadow: 0 5px 12px rgba(0, 0, 0, 0.03);
  --hp-shadow-hover: 0 20px 30px -12px rgba(0, 0, 0, 0.1);
  --hp-header-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  --hp-footer-bg: #0f172a;
  --hp-footer-text: #cbd5e1;
  --hp-footer-muted: #94a3b8;
  --hp-footer-desktop-bg: #001030;
  --hp-footer-desktop-panel: rgba(8, 14, 40, 0.78);
  --hp-footer-desktop-border: rgba(148, 163, 184, 0.28);
  --hp-footer-desktop-heading: #ffffff;
  --hp-footer-desktop-accent: #a78bfa;
  --hp-footer-desktop-gold: #f0b429;
  --hp-radius: 20px;
  --hp-radius-sm: 12px;
  --hp-transition: 0.25s ease;
}

[data-theme="dark"] {
  --hp-bg: #0b1220;
  --hp-surface: #1e293b;
  --hp-surface-2: #334155;
  --hp-text: #f1f5f9;
  --hp-text-muted: #94a3b8;
  --hp-border: #334155;
  --hp-shadow: 0 5px 12px rgba(0, 0, 0, 0.35);
  --hp-shadow-hover: 0 20px 30px -12px rgba(0, 0, 0, 0.5);
  --hp-header-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
  --hp-accent-soft: rgba(139, 92, 246, 0.15);
  --hp-accent-border: rgba(139, 92, 246, 0.35);
}

[hidden] {
  display: none !important;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body.hp-page {
  margin: 0;
  font-family: 'Vazirmatn', 'Tahoma', 'Segoe UI', sans-serif;
  background-color: var(--hp-bg);
  color: var(--hp-text);
  line-height: 1.5;
  overflow-x: hidden;
  transition: background-color var(--hp-transition), color var(--hp-transition);
}

/* ── Page enter animation (home load) ── */
.hp-page-loader {
  position: fixed;
  inset: 0;
  z-index: 100001;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--hp-bg) 92%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  pointer-events: none;
}

body.hp-page--ready .hp-page-loader {
  opacity: 0;
  visibility: hidden;
}

.hp-page-loader__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.hp-page-loader__ring {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid var(--hp-accent-soft);
  border-top-color: var(--hp-accent);
  animation: hpLoaderSpin 0.85s linear infinite;
}

.hp-page-loader__label {
  margin: 0;
  font-size: 0.82rem;
  color: var(--hp-text-muted);
  letter-spacing: 0.02em;
}

@keyframes hpLoaderSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes hpEnterFadeUp {
  from {
    opacity: 0;
    transform: translate3d(0, 14px, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes hpEnterNavUp {
  from {
    opacity: 0;
    transform: translate3d(0, 100%, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes hpEnterSectionUp {
  from {
    opacity: 0;
    transform: translate3d(0, 18px, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes hpEnterFadeOnly {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes hpEnterScaleSoft {
  from {
    opacity: 0;
    transform: scale3d(0.97, 0.97, 1);
  }

  to {
    opacity: 1;
    transform: scale3d(1, 1, 1);
  }
}

/* ── fade_up (پیش‌فرض) ── */
html.hp-enter-style--fade_up body.hp-page:not(.hp-page--ready) .hp-enter-fade {
  transform: translate3d(0, 14px, 0);
}

html.hp-enter-style--fade_up body.hp-page:not(.hp-page--ready) .hp-enter-nav {
  transform: translate3d(0, 100%, 0);
}

html.hp-enter-style--fade_up body.hp-page:not(.hp-page--ready) .hp-layout > section {
  transform: translate3d(0, 18px, 0);
}

html.hp-enter-style--fade_up body.hp-page--ready .hp-enter-fade {
  animation: hpEnterFadeUp 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

html.hp-enter-style--fade_up body.hp-page--ready .hp-header.hp-enter-fade {
  animation-delay: 0.04s;
}

html.hp-enter-style--fade_up body.hp-page--ready .hp-footer.hp-enter-fade {
  animation-delay: 0.22s;
}

html.hp-enter-style--fade_up body.hp-page--ready .hp-call-box.hp-enter-fade {
  animation-delay: 0.28s;
}

html.hp-enter-style--fade_up body.hp-page--ready .hp-enter-nav {
  animation: hpEnterNavUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.06s forwards;
}

html.hp-enter-style--fade_up body.hp-page--ready .hp-layout > section {
  animation: hpEnterSectionUp 0.58s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

html.hp-enter-style--fade_up body.hp-page--ready .hp-layout > section:nth-child(1) { animation-delay: 0.1s; }
html.hp-enter-style--fade_up body.hp-page--ready .hp-layout > section:nth-child(2) { animation-delay: 0.16s; }
html.hp-enter-style--fade_up body.hp-page--ready .hp-layout > section:nth-child(3) { animation-delay: 0.22s; }
html.hp-enter-style--fade_up body.hp-page--ready .hp-layout > section:nth-child(4) { animation-delay: 0.28s; }
html.hp-enter-style--fade_up body.hp-page--ready .hp-layout > section:nth-child(5) { animation-delay: 0.34s; }
html.hp-enter-style--fade_up body.hp-page--ready .hp-layout > section:nth-child(n + 6) { animation-delay: 0.4s; }

/* ── fade (سبک‌ترین) ── */
html.hp-enter-style--fade body.hp-page--ready .hp-enter-fade,
html.hp-enter-style--fade body.hp-page--ready .hp-enter-nav,
html.hp-enter-style--fade body.hp-page--ready .hp-layout > section {
  animation: hpEnterFadeOnly 0.35s ease-out forwards;
}

html.hp-enter-style--fade body.hp-page--ready .hp-layout > section:nth-child(2) { animation-delay: 0.04s; }
html.hp-enter-style--fade body.hp-page--ready .hp-layout > section:nth-child(3) { animation-delay: 0.08s; }
html.hp-enter-style--fade body.hp-page--ready .hp-layout > section:nth-child(n + 4) { animation-delay: 0.1s; }

/* ── slide_soft ── */
html.hp-enter-style--slide_soft body.hp-page:not(.hp-page--ready) .hp-enter-fade,
html.hp-enter-style--slide_soft body.hp-page:not(.hp-page--ready) .hp-layout > section {
  transform: translate3d(0, 8px, 0);
}

html.hp-enter-style--slide_soft body.hp-page:not(.hp-page--ready) .hp-enter-nav {
  transform: translate3d(0, 40px, 0);
}

html.hp-enter-style--slide_soft body.hp-page--ready .hp-enter-fade,
html.hp-enter-style--slide_soft body.hp-page--ready .hp-enter-nav,
html.hp-enter-style--slide_soft body.hp-page--ready .hp-layout > section {
  animation: hpEnterFadeUp 0.38s cubic-bezier(0.25, 1, 0.35, 1) forwards;
}

html.hp-enter-style--slide_soft body.hp-page--ready .hp-layout > section:nth-child(n + 2) {
  animation-delay: 0.05s;
}

/* ── scale_soft ── */
html.hp-enter-style--scale_soft body.hp-page:not(.hp-page--ready) .hp-enter-fade,
html.hp-enter-style--scale_soft body.hp-page:not(.hp-page--ready) .hp-enter-nav,
html.hp-enter-style--scale_soft body.hp-page:not(.hp-page--ready) .hp-layout > section {
  transform: scale3d(0.97, 0.97, 1);
}

html.hp-enter-style--scale_soft body.hp-page--ready .hp-enter-fade,
html.hp-enter-style--scale_soft body.hp-page--ready .hp-enter-nav,
html.hp-enter-style--scale_soft body.hp-page--ready .hp-layout > section {
  animation: hpEnterScaleSoft 0.42s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

html.hp-enter-style--scale_soft body.hp-page--ready .hp-layout > section:nth-child(2) { animation-delay: 0.05s; }
html.hp-enter-style--scale_soft body.hp-page--ready .hp-layout > section:nth-child(3) { animation-delay: 0.09s; }
html.hp-enter-style--scale_soft body.hp-page--ready .hp-layout > section:nth-child(n + 4) { animation-delay: 0.12s; }

/* ── stagger (تاکید روی بخش‌ها) ── */
html.hp-enter-style--stagger body.hp-page:not(.hp-page--ready) .hp-enter-fade {
  transform: translate3d(0, 10px, 0);
}

html.hp-enter-style--stagger body.hp-page:not(.hp-page--ready) .hp-enter-nav {
  transform: translate3d(0, 100%, 0);
}

html.hp-enter-style--stagger body.hp-page:not(.hp-page--ready) .hp-layout > section {
  transform: translate3d(0, 22px, 0);
}

html.hp-enter-style--stagger body.hp-page--ready .hp-header.hp-enter-fade,
html.hp-enter-style--stagger body.hp-page--ready .hp-footer.hp-enter-fade,
html.hp-enter-style--stagger body.hp-page--ready .hp-call-box.hp-enter-fade {
  animation: hpEnterFadeOnly 0.32s ease-out forwards;
}

html.hp-enter-style--stagger body.hp-page--ready .hp-enter-nav {
  animation: hpEnterNavUp 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.04s forwards;
}

html.hp-enter-style--stagger body.hp-page--ready .hp-layout > section {
  animation: hpEnterSectionUp 0.52s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

html.hp-enter-style--stagger body.hp-page--ready .hp-layout > section:nth-child(1) { animation-delay: 0.08s; }
html.hp-enter-style--stagger body.hp-page--ready .hp-layout > section:nth-child(2) { animation-delay: 0.14s; }
html.hp-enter-style--stagger body.hp-page--ready .hp-layout > section:nth-child(3) { animation-delay: 0.2s; }
html.hp-enter-style--stagger body.hp-page--ready .hp-layout > section:nth-child(4) { animation-delay: 0.26s; }
html.hp-enter-style--stagger body.hp-page--ready .hp-layout > section:nth-child(5) { animation-delay: 0.32s; }
html.hp-enter-style--stagger body.hp-page--ready .hp-layout > section:nth-child(6) { animation-delay: 0.38s; }
html.hp-enter-style--stagger body.hp-page--ready .hp-layout > section:nth-child(7) { animation-delay: 0.44s; }
html.hp-enter-style--stagger body.hp-page--ready .hp-layout > section:nth-child(8) { animation-delay: 0.5s; }
html.hp-enter-style--stagger body.hp-page--ready .hp-layout > section:nth-child(n + 9) { animation-delay: 0.55s; }

@media (min-width: 992px) {
  html.hp-enter-style--fade_up body.hp-page--ready .hp-enter-fade {
    animation-duration: 0.62s;
  }

  html.hp-enter-style--fade_up body.hp-page--ready .hp-layout > section {
    animation-duration: 0.65s;
  }

  html.hp-enter-style--fade_up body.hp-page:not(.hp-page--ready) .hp-enter-fade {
    transform: translate3d(0, 20px, 0);
  }

  html.hp-enter-style--fade_up body.hp-page:not(.hp-page--ready) .hp-layout > section {
    transform: translate3d(0, 24px, 0);
  }
}

html.hp-enter-skip body.hp-page .hp-enter-fade,
html.hp-enter-skip body.hp-page .hp-enter-nav,
html.hp-enter-skip body.hp-page .hp-layout > section {
  animation: none !important;
  opacity: 1 !important;
  transform: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .hp-page-loader,
  .hp-page-loader__ring {
    animation: none !important;
    transition: none !important;
  }

  body.hp-page:not(.hp-page--ready) .hp-enter-fade,
  body.hp-page:not(.hp-page--ready) .hp-enter-nav,
  body.hp-page:not(.hp-page--ready) .hp-layout > section {
    opacity: 1 !important;
    transform: none !important;
  }

  body.hp-page--ready .hp-enter-fade,
  body.hp-page--ready .hp-enter-nav,
  body.hp-page--ready .hp-layout > section {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  body.hp-page--ready .hp-page-loader {
    display: none;
  }
}

/* نوار پایین — هم‌سبک index.html */
.hp-bottom-nav.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  max-height: 40px;
  border-radius: 30px 30px 0 0;
  background: var(--hp-surface);
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.06);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  z-index: 10000;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-sizing: content-box;
}

@media (min-width: 992px) {
  body.hp-page {
    padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px));
  }

  .hp-bottom-nav.bottom-nav {
    height: 60px;
    max-height: 60px;
  }
}

[data-theme="dark"] .hp-bottom-nav.bottom-nav {
  background: #1a1b1f;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.35);
}

.hp-bottom-nav .nav-item {
  position: relative;
  background: transparent;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--hp-text);
  text-decoration: none;
  cursor: pointer;
  min-height: 0;
  overflow: hidden;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.hp-bottom-nav .nav-item i {
  font-size: 18px;
  line-height: 1;
}

@media (min-width: 992px) {
  .hp-bottom-nav .nav-item i {
    font-size: 20px;
  }
}

.hp-bottom-nav .nav-item.active,
.hp-bottom-nav .nav-item:hover {
  color: var(--hp-accent);
}

/* فیدبک لحظه‌ای هنگام ناوبری فوتر — بدون تغییر ظاهر عادی */
.hp-bottom-nav.is-navigating {
  pointer-events: none;
}
.hp-bottom-nav.is-navigating .nav-item.is-navigating {
  opacity: 0.72;
}

.hp-bottom-nav .nav-item--cart {
  position: relative;
}

.hp-bottom-nav .nav-item--cart .badge {
  position: absolute;
  top: 2px;
  inset-inline-end: calc(50% - 22px);
  inset-inline-start: auto;
  transform: none;
  background: var(--hp-accent);
  color: #fff;
  border-radius: 999px;
  font-size: 0.7rem;
  line-height: 1;
  padding: 2px 5px;
  min-width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  pointer-events: none;
}

.hp-app-footer.app-footer {
  color: var(--hp-text-muted);
  background: transparent;
}

.hp-container {
  /* max-width: var(--hp-container); */
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
}

/* ========== HEADER ========== */
.hp-header {
  background: var(--hp-surface);
  box-shadow: var(--hp-header-shadow);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background var(--hp-transition), box-shadow var(--hp-transition);
}

.hp-categories__item {
  position: static;
}

.hp-cat-trigger.is-mega-open {
  color: var(--hp-accent);
  border-bottom-color: var(--hp-accent);
}

/* مگامنو دسته‌ها — child_subcategory / child2_subcategory */
#hpCatMega {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 90;
  background: var(--hp-surface);
  border-top: 1px solid var(--hp-border);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

#hpCatMega.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.hp-cat-mega__inner {
  padding: 14px 20px 18px;
}

.hp-cat-mega__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.hp-cat-mega__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--hp-text);
}

.hp-cat-mega__all,
.hp-cat-mega__view-all {
  border: none;
  background: none;
  color: var(--hp-accent);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
}

.hp-cat-mega__toolbar {
  grid-column: 1 / -1;
  margin-bottom: 4px;
}

.hp-cat-mega__cols {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px 18px;
  max-height: min(52vh, 420px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.hp-cat-mega__col {
  min-width: 0;
}

.hp-cat-mega__group {
  display: block;
  width: 100%;
  border: none;
  background: none;
  padding: 0 0 6px;
  margin: 0 0 4px;
  text-align: right;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--hp-text);
  cursor: pointer;
  border-bottom: 2px solid var(--hp-accent-soft);
}

.hp-cat-mega__group:hover,
.hp-cat-mega__group:focus-visible {
  color: var(--hp-accent);
  outline: none;
}

.hp-cat-mega__subs {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hp-cat-mega__sub {
  display: block;
  width: 100%;
  border: none;
  background: none;
  text-align: right;
  font-family: inherit;
  font-size: 0.82rem;
  color: var(--hp-text-muted);
  padding: 5px 0;
  cursor: pointer;
}

.hp-cat-mega__sub:hover,
.hp-cat-mega__sub:focus-visible {
  color: var(--hp-accent);
  outline: none;
}

.hp-cat-mega__empty {
  margin: 0;
  padding: 16px 8px;
  text-align: center;
  color: var(--hp-text-muted);
  font-size: 0.88rem;
}

.hp-cat-mega-panel--modal {
  padding: 4px 2px 8px;
}

.hp-cat-mega-panel--modal .hp-cat-mega__cols {
  max-height: none;
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
}

@media (max-width: 768px) {
  #hpCatMega {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  #hpCatMega {
    transition: none;
  }
}

/* هدر دو ردیفه: ردیف۱ لوگو+جستجو | ردیف۲ دسته‌ها */
.hp-header-layout {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 0 14px;
  transition: gap 0.2s ease, padding 0.2s ease;
}

.hp-header.is-scrolled .hp-header-layout {
  gap: 0;
  padding: 10px 0 10px;
}

.hp-header-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.hp-header-row--top {
  flex-wrap: nowrap;
}

/* فقط ردیف دسته‌ها جمع می‌شود — بدون grid/0fr تا اسکرول آرام پرپر نزند */
.hp-header-row--bottom {
  justify-content: stretch;
  gap: 10px;
  overflow: hidden;
  opacity: 1;
  transition: max-height 0.2s ease, opacity 0.15s ease;
}

.hp-header.is-scrolled .hp-header-row--bottom {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .hp-header-row--bottom,
  .hp-header.is-scrolled .hp-header-row--bottom,
  .hp-header-layout {
    transition: none;
  }
}

.hp-brand {
  flex-shrink: 0;
  display: block;
  line-height: 0;
}

.hp-brand img {
  max-height: 55px;
  width: auto;
  object-fit: contain;
  display: block;
}

.hp-search-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
  width: 100%;
}

.hp-categories {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  touch-action: pan-x;
  padding-bottom: 2px;
}

.hp-categories::-webkit-scrollbar {
  display: none;
}

.hp-categories ul {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0.35rem 1.25rem;
  white-space: nowrap;
}

.hp-categories ul li a {
  text-decoration: none;
  color: var(--hp-text);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 6px 2px;
  display: inline-block;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.hp-categories ul li a:hover,
.hp-categories ul li a:focus-visible {
  color: var(--hp-accent);
  border-bottom-color: var(--hp-accent);
}

.hp-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.hp-theme-toggle {
  position: relative;
  flex-shrink: 0;
}

/* specificity بالاتر از .fa-solid تا بعد از لود FA هر دو آیکن دیده نشوند */
.hp-theme-toggle > .hp-theme-toggle__icon--dark {
  display: none;
}

[data-theme="dark"] .hp-theme-toggle > .hp-theme-toggle__icon--light {
  display: none;
}

[data-theme="dark"] .hp-theme-toggle > .hp-theme-toggle__icon--dark {
  display: inline-block;
}

.hp-theme-toggle[aria-pressed="true"] {
  color: var(--hp-accent);
}

.hp-cat-menu-btn {
  display: none;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--hp-border, #e2e8f0);
  background: var(--hp-surface-2, #f8fafc);
  color: var(--hp-text);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  line-height: 1;
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.hp-cat-menu-btn:hover,
.hp-cat-menu-btn:focus-visible {
  border-color: var(--hp-accent-border);
  color: var(--hp-accent);
}

.hp-cat-menu-btn i {
  font-size: 1rem;
}

.hp-menu-icon {
  display: none;
  font-size: 1.35rem;
  cursor: pointer;
  color: var(--hp-text-muted);
  background: none;
  border: none;
  padding: 6px;
  line-height: 1;
}

.hp-nav-menu ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 1.5rem;
}

.hp-nav-menu ul li a {
  text-decoration: none;
  color: var(--hp-text);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.hp-nav-menu ul li a:hover {
  color: var(--hp-accent);
}

.hp-search {
  background: var(--hp-surface-2);
  border-radius: 40px;
  padding: 6px 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  transition: border-color var(--hp-transition), background var(--hp-transition);
}

.hp-search:focus-within {
  border-color: var(--hp-accent-border);
}

.hp-search input {
  border: none;
  background: transparent;
  padding: 8px 0;
  width: 100%;
  min-width: 0;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--hp-text);
  outline: none;
}

.hp-search input::placeholder {
  color: var(--hp-text-muted);
}

.hp-search button {
  background: none;
  border: none;
  color: var(--hp-accent);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 4px;
}

.hp-suggest {
  position: absolute;
  right: 0;
  left: 0;
  top: calc(100% + 8px);
  background: var(--hp-surface);
  border: 1px solid var(--hp-border);
  border-radius: var(--hp-radius-sm);
  box-shadow: var(--hp-shadow-hover);
  max-height: 60vh;
  overflow: auto;
  padding: 10px;
  z-index: 200;
}

.hp-suggest .row {
  display: flex;
  gap: 12px;
  padding: 10px;
  border-radius: var(--hp-radius-sm);
  align-items: center;
  cursor: pointer;
  transition: background 0.2s;
}

.hp-suggest .row:hover {
  background: var(--hp-surface-2);
}

.hp-suggest img {
  width: 75px;
  height: 75px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.hp-suggest .meta {
  flex: 1;
  min-width: 0;
}

.hp-suggest .title {
  font-size: 14px;
  font-weight: 600;
}

.hp-suggest .code {
  font-size: 12px;
  color: var(--hp-text-muted);
}

.hp-suggest .price {
  font-weight: 700;
  color: var(--hp-accent);
  white-space: nowrap;
  flex-shrink: 0;
}

body.hp-search-suggest-open .hp-header {
  z-index: 10002;
}

@media (max-width: 768px) {
  .hp-suggest {
    position: fixed;
    left: max(14px, env(safe-area-inset-left, 0px));
    right: max(14px, env(safe-area-inset-right, 0px));
    top: var(--hp-suggest-top, 72px);
    max-height: min(52vh, calc(100dvh - var(--hp-suggest-top, 72px) - 76px));
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    z-index: 10003;
  }

  .hp-suggest .row {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 4px 30px;
    align-items: center;
  }

  .hp-suggest img {
    grid-row: 1 / span 2;
    grid-column: 1;
  }

  .hp-suggest .meta {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
  }

  .hp-suggest .title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .hp-suggest .code {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .hp-suggest .price {
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
    font-size: 13px;
  }
}

.hp-icon-btn {
  position: relative;
  font-size: 1.35rem;
  cursor: pointer;
  color: var(--hp-text);
  background: none;
  border: none;
  padding: 6px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.hp-icon-btn:hover {
  color: var(--hp-accent);
}


#cartBadge {
  position: absolute;
  top: -6px;
  right: -10px;
  background: var(--hp-accent);
  color: #fff;
  font-size: 0.7rem;
  border-radius: 50%;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  font-weight: 700;
}

.hp-close-menu {
  display: none;
}

/* ========== HERO SLIDER (ریسپانسیو خودکار مثل home-test) ========== */
.hp-banner-block-head {
  margin: 24px 0 12px;
}

.hp-banner-block-head.hp-section-title {
  margin-top: 28px;
  margin-bottom: 14px;
}

.hp-hero--inline {
  margin: 20px 0 24px;
  aspect-ratio: unset;
  max-height: none;
  min-height: 0;
  height: auto;
}

.hp-hero--inline.hp-hero {
  aspect-ratio: unset;
}

.hp-hero {
  margin: 25px 0 40px;
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  box-shadow: var(--hp-shadow);
  isolation: isolate;
  width: 100%;
  aspect-ratio: unset;
  max-height: none;
  min-height: 0;
  height: auto;
  background: var(--hp-surface-2);
}

.hp-hero-viewport {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.hp-hero-track {
  display: flex;
  direction: ltr;
  height: 100%;
  transition: transform 0.5s ease;
  will-change: transform;
}

.hp-hero-slide {
  min-width: 100%;
  flex-shrink: 0;
  height: 100%;
}

.hp-hero-slide img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

@supports not (aspect-ratio: 1) {
  .hp-hero {
    aspect-ratio: auto;
    height: auto;
    max-height: none;
  }
  .hp-hero-viewport {
    height: auto;
  }
  .hp-hero-track {
    height: auto;
  }
  .hp-hero-slide img {
    height: auto;
    max-height: 460px;
    object-fit: cover;
  }
}

.hp-hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hp-hero-prev { right: 12px; }
.hp-hero-next { left: 12px; }

/* Swiper hero (local bundle) */
.hp-home-swiper {
  width: 100%;
  height: auto;
  border-radius: inherit;
}

.hp-home-swiper .swiper-wrapper {
  height: auto;
}

.hp-home-swiper .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  height: auto;
  background: var(--hp-surface-2);
}

.hp-home-swiper .swiper-slide a {
  display: block;
  width: 100%;
  line-height: 0;
}

.hp-home-swiper .swiper-slide img {
  width: 100%;
  height: auto;
  max-height: var(--hp-banner-max-height, min(560px, 72vh));
  object-fit: contain;
  object-position: center center;
  display: block;
}

.hp-home-swiper.swiper-fade .swiper-slide {
  pointer-events: none;
}

.hp-home-swiper.swiper-fade .swiper-slide-active {
  pointer-events: auto;
}

.hp-home-swiper .swiper-button-next,
.hp-home-swiper .swiper-button-prev {
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.hp-home-swiper .swiper-button-next::after,
.hp-home-swiper .swiper-button-prev::after {
  font-size: 1rem;
}

.hp-home-swiper .swiper-pagination-bullet-active {
  background: var(--hp-accent);
}

/* بنر بدون پس‌زمینه باکس */
.hp-hero.hp-banner--square,
.hp-banner.hp-banner--square {
  border-radius: 0;
}

.hp-hero.hp-banner--square .hp-banner-grid__item,
.hp-banner--square .hp-banner-grid__item,
.hp-banner--square .hp-banner-children-panel__item,
.hp-banner--square .hp-banner-children-swiper,
.hp-banner--square .hp-banner img {
  border-radius: 0;
}

.hp-hero.hp-banner--no-bg {
  background: transparent;
  box-shadow: none;
}

.hp-banner-grid.hp-banner--no-bg .hp-banner-grid__item {
  background: transparent;
}

.hp-banner-slide-cell {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
}

.hp-banner-slide-media {
  line-height: 0;
  width: 100%;
}

.hp-banner-img {
  width: 100%;
  height: auto;
  display: block;
  background: var(--hp-surface-2);
}

.hp-banner-img--no-bg {
  background: transparent;
}

/* خاموش کردن پس‌زمینه placeholder تصویر بنر و باکس دور آن */
.hp-banner-img-surface--off.hp-banner-grid__item,
.hp-banner-img-surface--off.hp-banner-children-panel__item,
.hp-banner-grid__track.hp-banner-img-surface--off > .hp-banner-grid__item,
.hp-banner-children-panel.hp-banner-img-surface--off .hp-banner-children-panel__item {
  background: transparent;
}

.hp-banner-img-surface--off .hp-banner-img,
.hp-banner-grid__track.hp-banner-img-surface--off .hp-banner-img,
.hp-banner-children-panel.hp-banner-img-surface--off .hp-banner-img,
.hp-banner-children-swiper.hp-banner-img-surface--off .hp-banner-img {
  background: transparent;
}

.hp-banner-children-swiper.hp-banner-img-surface--off .swiper-slide {
  background: transparent;
}

/* فقط وقتی هنوز src ندارد مخفی بماند — وگرنه بنر ناقص/نامرئی می‌ماند */
.hp-banner-img.swiper-lazy:not([src]):not(.swiper-lazy-loaded):not([data-hp-banner-loaded]) {
  opacity: 0;
  transition: opacity 0.2s ease;
}

.hp-banner-img.swiper-lazy-loaded,
.hp-banner-img[data-hp-banner-loaded] {
  opacity: 1;
}

.hp-home-swiper .swiper-slide .hp-banner-slide-cell,
.hp-home-swiper .swiper-slide .hp-banner-slide-media {
  height: auto;
}

.hp-banner-caption {
  margin: 0;
  padding: 8px 6px 2px;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.4;
}

.hp-banner-caption--theme {
  color: #0f172a;
}

[data-theme="dark"] .hp-banner-caption--theme {
  color: #f8fafc;
}

/* بنر کنار هم (حالت grid — مثل example.php، ریسپانسیو) */
.hp-hero.hp-banner-grid {
  overflow: visible;
}

.hp-banner-grid {
  overflow: visible;
}

.hp-banner-grid__body {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 0;
}

.hp-banner-grid__track {
  --hp-grid-gap: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: var(--hp-grid-gap);
  width: 100%;
  align-items: stretch;
  justify-content: var(--hp-grid-justify-mobile, flex-start);
}

.hp-banner-grid__item {
  min-width: 0;
  box-sizing: border-box;
  flex: 0 0 calc((100% - (var(--hp-grid-cols-mobile, 2) - 1) * var(--hp-grid-gap, 10px)) / var(--hp-grid-cols-mobile, 2));
  max-width: calc((100% - (var(--hp-grid-cols-mobile, 2) - 1) * var(--hp-grid-gap, 10px)) / var(--hp-grid-cols-mobile, 2));
  border-radius: 12px;
  overflow: hidden;
  background: var(--hp-surface-2);
}

@media (min-width: 992px) {
  .hp-banner-grid__track {
    justify-content: var(--hp-grid-justify-desktop, flex-start);
  }

  .hp-banner-grid__item {
    flex-basis: calc((100% - (var(--hp-grid-cols-desktop, 4) - 1) * var(--hp-grid-gap, 10px)) / var(--hp-grid-cols-desktop, 4));
    max-width: calc((100% - (var(--hp-grid-cols-desktop, 4) - 1) * var(--hp-grid-gap, 10px)) / var(--hp-grid-cols-desktop, 4));
  }
}

.hp-banner-grid__item .hp-banner-slide-link {
  display: block;
  width: 100%;
  line-height: 0;
}

.hp-banner-grid__item img {
  width: 100%;
  height: auto;
  max-height: var(--hp-banner-max-height, min(280px, 42vh));
  object-fit: contain;
  object-position: center center;
  display: block;
}

.hp-banner-slide-expand {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  line-height: 0;
}

.hp-banner-slide-expand img {
  width: 100%;
  height: auto;
  max-height: var(--hp-banner-max-height, min(280px, 42vh));
  object-fit: contain;
  object-position: center center;
  display: block;
}

.hp-banner-slide-cell--expandable.is-active .hp-banner-slide-expand img {
  outline: 2px solid var(--hp-accent, #6e00ff);
  outline-offset: 2px;
  border-radius: 8px;
}

/* Banner hover — CSS-only, transform/filter; no JS */
[class*="hp-banner-hover--"] .hp-banner-slide-media {
  overflow: hidden;
}

[class*="hp-banner-hover--"] .hp-banner-slide-media img,
[class*="hp-banner-hover--"] .hp-banner-slide-link,
[class*="hp-banner-hover--"] .hp-banner-slide-expand {
  transition: transform 0.22s ease, filter 0.22s ease, box-shadow 0.22s ease;
}

[class*="hp-banner-hover--"] .hp-banner-slide-cell {
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

@media (hover: hover) and (pointer: fine) {
  .hp-banner-hover--scale_soft .hp-banner-slide-cell:hover .hp-banner-slide-media img {
    transform: scale(1.04);
  }

  .hp-banner-hover--lift .hp-banner-slide-cell:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.1);
  }

  .hp-banner-hover--glow .hp-banner-slide-cell:hover .hp-banner-slide-media {
    box-shadow: 0 0 0 2px rgba(110, 0, 255, 0.22), 0 8px 18px rgba(110, 0, 255, 0.12);
    border-radius: 10px;
  }

  .hp-banner-hover--brightness .hp-banner-slide-cell:hover .hp-banner-slide-media img {
    filter: brightness(1.08);
  }

  .hp-banner-hover--slide_up .hp-banner-slide-cell:hover .hp-banner-slide-media img {
    transform: translateY(-4px);
  }
}

@media (prefers-reduced-motion: reduce) {
  [class*="hp-banner-hover--"] .hp-banner-slide-media img,
  [class*="hp-banner-hover--"] .hp-banner-slide-cell {
    transition: none !important;
    transform: none !important;
    filter: none !important;
    box-shadow: none !important;
  }
}

.hp-banner-children-wrap[hidden],
.hp-banner-children-panel[hidden],
.hp-banner-section-panel[hidden] {
  display: none !important;
}

.hp-banner-children-wrap:not([hidden]) {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--hp-border, rgba(15, 23, 42, 0.08));
}

.hp-banner-children-panel:not([hidden]),
.hp-banner-section-panel:not([hidden]) {
  display: block;
  width: 100%;
}

.hp-banner-section-panel {
  margin-top: 4px;
}

.hp-banner-section-panel__inner > .hp-products {
  margin: 0;
  padding: 0;
}

.hp-banner-children-panel__track {
  --hp-grid-gap: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: var(--hp-grid-gap);
  width: 100%;
  justify-content: var(--hp-grid-justify-mobile, flex-start);
}

.hp-banner-children-panel__item {
  min-width: 0;
  box-sizing: border-box;
  flex: 0 0 calc((100% - (var(--hp-grid-cols-mobile, 2) - 1) * var(--hp-grid-gap, 10px)) / var(--hp-grid-cols-mobile, 2));
  max-width: calc((100% - (var(--hp-grid-cols-mobile, 2) - 1) * var(--hp-grid-gap, 10px)) / var(--hp-grid-cols-mobile, 2));
  border-radius: 12px;
  overflow: hidden;
  background: var(--hp-surface-2);
}

@media (min-width: 992px) {
  .hp-banner-children-panel__track {
    justify-content: var(--hp-grid-justify-desktop, flex-start);
  }

  .hp-banner-children-panel__item {
    flex-basis: calc((100% - (var(--hp-grid-cols-desktop, 4) - 1) * var(--hp-grid-gap, 10px)) / var(--hp-grid-cols-desktop, 4));
    max-width: calc((100% - (var(--hp-grid-cols-desktop, 4) - 1) * var(--hp-grid-gap, 10px)) / var(--hp-grid-cols-desktop, 4));
  }
}

.hp-banner-children-panel__item .hp-banner-slide-link {
  display: block;
  width: 100%;
  line-height: 0;
}

.hp-banner-children-panel__item img {
  width: 100%;
  height: auto;
  max-height: var(--hp-sub-banner-max-height, min(220px, 36vh));
  object-fit: contain;
  object-position: center center;
  display: block;
}

.hp-banner-children-swiper {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
}

.hp-banner-children-swiper .swiper-slide img {
  width: 100%;
  height: auto;
  max-height: var(--hp-sub-banner-max-height, min(220px, 36vh));
  object-fit: contain;
  object-position: center center;
  display: block;
}

.hp-banner-children-swiper .swiper-button-next,
.hp-banner-children-swiper .swiper-button-prev {
  color: #fff;
  background: rgba(0, 0, 0, 0.4);
  width: 34px;
  height: 34px;
  border-radius: 50%;
}

.hp-banner-children-swiper .swiper-button-next::after,
.hp-banner-children-swiper .swiper-button-prev::after {
  font-size: 0.85rem;
}

@media (max-width: 768px) {
  .hp-banner-grid__track {
    --hp-grid-gap: 8px;
  }

  .hp-banner-grid__item img {
    max-height: var(--hp-banner-max-height, min(280px, 42vh));
  }
}

.hp-categories button.hp-cat-trigger {
  border: none;
  background: none;
  font-family: inherit;
  cursor: pointer;
  color: var(--hp-text);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}

.hp-categories button.hp-cat-trigger:hover,
.hp-categories button.hp-cat-trigger.is-active {
  color: var(--hp-accent);
  border-bottom-color: var(--hp-accent);
}

.hp-hero-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 2;
}

.hp-hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  padding: 0;
}

.hp-hero-dot.active {
  background: var(--hp-accent);
  width: 22px;
  border-radius: 4px;
}

/* ========== SECTIONS ========== */
.hp-section-surface--theme,
.hp-section-surface[style*="background-color"] {
  border-radius: 16px;
  padding: 10px 12px 18px;
}

.hp-section-surface--theme {
  background: var(--hp-surface-2);
  transition: background-color var(--hp-transition);
}

.hp-section-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  margin: 35px 0 20px;
  border-right: 5px solid var(--hp-accent);
  padding-right: 15px;
  gap: 8px;
}

.hp-section-title h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

.hp-section-title a {
  color: var(--hp-accent);
  text-decoration: none;
  font-size: 0.9rem;
}

.hp-row-wrap {
  position: relative;
  padding: 4px 0 12px;
}

.hp-row,
.hp-brands__strip,
.hp-carousel {
  white-space: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: auto;
  cursor: grab;
  padding: 8px 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--hp-accent) transparent;
}

.hp-row:active,
.hp-brands__strip:active,
.hp-carousel:active {
  cursor: grabbing;
}

.hp-row.dragging,
.hp-brands__strip.dragging,
.hp-carousel.dragging {
  cursor: grabbing;
  scroll-behavior: auto;
  user-select: none;
}

.hp-row.dragging .hp-card,
.hp-brands__strip.dragging .brand,
.hp-carousel.dragging .hp-card {
  pointer-events: none;
}

.hp-carousel.hp-loading {
  opacity: 0.55;
  pointer-events: none;
  min-height: 240px;
}

.hp-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: var(--hp-accent);
  color: #fff;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  cursor: pointer;
  box-shadow: var(--hp-shadow);
  transition: transform 0.2s, opacity 0.2s;
}

.hp-nav:hover {
  transform: translateY(-50%) scale(1.06);
}

.hp-prev { right: -8px; }
.hp-next { left: -8px; }

/* Brands */
.hp-brands__strip .brand {
  background: var(--hp-surface);
  border: 1px solid var(--hp-border);
  border-radius: var(--hp-radius);
  display: inline-block;
  min-width: 200px;
  height: 200px;
  margin: 0 10px;
  vertical-align: top;
  cursor: pointer;
  overflow: hidden;
  position: relative;
  box-shadow: var(--hp-shadow);
  transition: transform var(--hp-transition), box-shadow var(--hp-transition);
}

.hp-brands__strip .brand:hover {
  transform: translateY(-4px);
  box-shadow: var(--hp-shadow-hover);
}

.hp-brands__strip img {
  width: 100%;
  height: 150px;
  object-fit: contain;
  padding: 12px;
}

.hp-brands__strip .brand-name {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(15, 23, 42, 0.85));
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  padding: 18px 8px 8px;
}

/* Product cards */
.hp-card {
  background: var(--hp-surface);
  border-radius: var(--hp-radius);
  overflow: hidden;
  transition: transform var(--hp-transition), box-shadow var(--hp-transition), border-color var(--hp-transition);
  box-shadow: var(--hp-shadow);
  border: 1px solid var(--hp-border);
  padding: 16px 12px 5px;
  text-align: center;
  display: inline-block;
  width: 220px;
  margin: 0 10px;
  vertical-align: top;
  cursor: pointer;
  position: relative;
}

@media (hover: hover) and (pointer: fine) {
  .hp-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--hp-shadow-hover);
    border-color: var(--hp-accent-border);
  }
}

.hp-card:active,
.hp-row.dragging .hp-card,
.hp-carousel.dragging .hp-card {
  transform: none;
}

.hp-card__media img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
}

.hp-card__title {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 8px 0;
  height: 20px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: var(--hp-text);
}

.hp-card__meta {
  font-size: 0.75rem;
  color: var(--hp-text-muted);
  margin-bottom: 6px;
}

.hp-card__price {
  color: var(--hp-accent);
  font-weight: 700;
  font-size: 0.95rem;
}

.hp-card__prices {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hp-card__price--unit,
.hp-card__price--carton {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  font-size: 0.85rem;
  line-height: 1.35;
}

.hp-card__price-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--hp-text-muted);
  flex-shrink: 0;
}

.hp-card__price-value {
  font-weight: 700;
  color: var(--hp-accent);
  text-align: end;
}

/* Tabs */
.hp-tabs {
  display: flex;
  gap: 10px;
  margin: 0 0 20px;
  flex-wrap: wrap;
}

.hp-tabs button {
  border: 1px solid var(--hp-border);
  background: var(--hp-surface);
  border-radius: 40px;
  padding: 8px 18px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--hp-text);
  font-family: inherit;
  transition: all 0.2s;
}

.hp-tabs button:hover {
  border-color: var(--hp-accent-border);
  color: var(--hp-accent);
}

.hp-tabs button.active {
  background: var(--hp-accent);
  border-color: var(--hp-accent);
  color: #fff;
}

/* Banner */
.hp-banner {
  margin: 40px 0;
  border-radius: 28px;
  overflow: hidden;
}

.hp-banner img {
  width: 100%;
  border-radius: 24px;
  display: block;
}

/* Footer — matched to footer.psd / mobile-footer.psd */
.hp-footer {
  background: var(--hp-footer-bg);
  color: var(--hp-footer-text);
  margin-bottom: 0;
  padding: 0;
  margin-top: 48px;
  content-visibility: auto;
  contain-intrinsic-size: 1px 720px;
}

.hp-footer__body {
  position: relative;
}

.hp-footer__body--has-bg {
  min-height: 220px;
}

.hp-footer-mobile {
  display: block;
  width: 100vw;
  max-width: 100vw;
  margin-inline: calc(50% - 50vw);
  --hp-footer-mobile-accent: #5b00d6;
  --hp-footer-mobile-heading: #1a1640;
  --hp-footer-mobile-text: #4b5568;
  --hp-footer-mobile-muted: #64748b;
  --hp-footer-mobile-panel: #f3f4f8;
  --hp-footer-mobile-card: #ffffff;
  --hp-footer-mobile-divider: rgba(91, 0, 214, 0.28);
  --hp-footer-mobile-bar: #2f007a;
  background: var(--hp-footer-mobile-panel);
}

.hp-footer-mobile__hero {
  position: relative;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  aspect-ratio: 1024 / 700;
  background: #020617;
}

.hp-footer-mobile__hero > img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 18%;
}

.hp-footer-mobile__body {
  position: relative;
  background: var(--hp-footer-mobile-panel);
  margin-top: -36px;
  border-radius: 26px 26px 0 0;
  z-index: 2;
  box-shadow: 0 -12px 30px rgba(15, 23, 42, 0.16);
}

.hp-footer-mobile__panel {
  position: relative;
  padding: 18px 14px 12px;
}

.hp-footer-mobile__info {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0 0 24px;
  text-align: center;
  background: var(--hp-footer-mobile-card);
  border: 1px solid rgba(91, 0, 214, 0.14);
  border-radius: 20px;
  box-shadow: 0 10px 28px rgba(47, 0, 122, 0.08);
  overflow: hidden;
}

.hp-footer-mobile__info-col {
  position: relative;
  padding: 14px 8px 12px;
}

.hp-footer-mobile__info-col + .hp-footer-mobile__info-col::before {
  content: '';
  position: absolute;
  inset-block: 14px;
  inset-inline-start: 0;
  width: 1px;
  background: var(--hp-footer-mobile-divider);
}

.hp-footer-mobile__info-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}

.hp-footer-mobile__info-icon img,
.hp-footer-mobile__info-icon .hp-footer-fa {
  width: 46px;
  height: 46px;
  object-fit: contain;
  display: block;
}

.hp-footer-mobile__info-icon .hp-footer-fa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--hp-footer-mobile-accent);
  font-size: 1.45rem;
}

.hp-footer-mobile__info-col h4 {
  margin: 0 0 6px;
  color: var(--hp-footer-mobile-heading);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.35;
}

.hp-footer-mobile__info-col p,
.hp-footer-mobile__info-col a {
  margin: 0;
  color: var(--hp-footer-mobile-text);
  font-size: 0.72rem;
  line-height: 1.55;
  text-decoration: none;
}

.hp-footer-mobile__tel {
  display: block;
  direction: ltr;
  unicode-bidi: isolate;
}

.hp-footer-mobile__tel:hover,
.hp-footer-mobile__map:hover {
  color: var(--hp-footer-mobile-accent);
}

.hp-footer-mobile__map {
  display: inline-block;
  margin-top: 4px;
  color: var(--hp-footer-mobile-accent);
  font-weight: 700;
}

.hp-footer-mobile__section-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0 0 14px;
  color: var(--hp-footer-mobile-heading);
  font-size: 0.95rem;
  font-weight: 800;
}

.hp-footer-mobile__section-title::before,
.hp-footer-mobile__section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  max-width: 72px;
  background: linear-gradient(90deg, transparent, var(--hp-footer-mobile-accent), transparent);
}

.hp-footer-mobile__section-title::before {
  background: linear-gradient(90deg, transparent, var(--hp-footer-mobile-accent));
}

.hp-footer-mobile__section-title::after {
  background: linear-gradient(90deg, var(--hp-footer-mobile-accent), transparent);
}

.hp-footer-mobile__quick {
  margin: 8px 0 22px;
}

.hp-footer-mobile__quick-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  align-items: start;
}

.hp-footer-mobile__quick-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  padding: 6px 4px;
  position: relative;
}

.hp-footer-mobile__quick-link + .hp-footer-mobile__quick-link::before {
  content: '';
  position: absolute;
  inset-block: 8px 28px;
  inset-inline-start: 0;
  width: 1px;
  background: rgba(148, 163, 184, 0.55);
}

.hp-footer-mobile__quick-icon img,
.hp-footer-mobile__quick-icon .hp-footer-fa {
  width: 36px;
  height: 36px;
  object-fit: contain;
  display: block;
  color: var(--hp-footer-mobile-accent);
  font-size: 1.35rem;
}

.hp-footer-mobile__quick-label {
  color: var(--hp-footer-mobile-text);
  font-size: 0.68rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.35;
}

.hp-footer-mobile__quick-link:active .hp-footer-mobile__quick-label {
  color: var(--hp-footer-mobile-accent);
}

.hp-footer-mobile__social {
  margin: 4px 0 8px;
}

.hp-footer-mobile__social-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  max-width: 360px;
  margin: 0 auto;
}

.hp-footer-mobile__social-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.hp-footer-mobile__social-icon img,
.hp-footer-mobile__social-icon .hp-footer-fa {
  width: 44px;
  height: 44px;
  object-fit: contain;
  display: block;
  border-radius: 50%;
  font-size: 1.6rem;
}

.hp-footer-mobile__social-label {
  color: var(--hp-footer-mobile-text);
  font-size: 0.72rem;
  font-weight: 700;
}

.hp-footer-mobile__bottom-bar,
.hp-footer-mobile__bottom-shape {
  height: 52px;
  width: 100%;
  background: var(--hp-footer-mobile-bar);
  margin: 14px 0 0;
  border: 0;
  line-height: 0;
}

.hp-footer-mobile__bottom-shape img {
  display: none;
}

[data-theme="dark"] .hp-footer-mobile {
  --hp-footer-mobile-heading: #f1f5f9;
  --hp-footer-mobile-text: #cbd5e1;
  --hp-footer-mobile-muted: #94a3b8;
  --hp-footer-mobile-panel: #0b1224;
  --hp-footer-mobile-card: #111827;
  --hp-footer-mobile-divider: rgba(139, 92, 246, 0.28);
}

[data-theme="dark"] .hp-footer-mobile__body {
  background: var(--hp-footer-mobile-panel);
}

[data-theme="dark"] .hp-footer-mobile__info {
  background: var(--hp-footer-mobile-card);
}

@media (max-width: 420px) {
  .hp-footer-mobile__info-col h4 {
    font-size: 0.74rem;
  }

  .hp-footer-mobile__info-col p,
  .hp-footer-mobile__info-col a,
  .hp-footer-mobile__quick-label {
    font-size: 0.64rem;
  }

  .hp-footer-mobile__quick-icon img,
  .hp-footer-mobile__info-icon img {
    width: 34px;
    height: 34px;
  }
}

.hp-footer-grid {
  display: none;
}

.hp-footer-desktop {
  display: none;
}

@media (min-width: 992px) {
  .hp-footer {
    background:
      linear-gradient(180deg, rgba(2, 6, 23, 0.55), rgba(2, 6, 23, 0.78)),
      url('/order/first-page/pages/assets/footer/bg-night.png') center / cover no-repeat,
      var(--hp-footer-desktop-bg);
    background-color: var(--hp-footer-desktop-bg);
    padding: 32px 0 40px;
    margin-top: 72px;
    overflow: hidden;
  }

  .hp-footer__body {
    max-width: 1220px;
    margin: 0 auto;
    padding-inline: 24px;
  }

  .hp-footer__body--has-bg {
    background: transparent;
  }

  .hp-footer-mobile {
    display: none;
  }

  .hp-footer-desktop {
    display: block;
    color: #e2e8f0;
  }

  .hp-footer-desktop__perks,
  .hp-footer-desktop__main,
  .hp-footer-desktop__trust {
    width: 100%;
  }

  .hp-footer-desktop__perks {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-radius: 22px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    overflow: hidden;
    margin-bottom: 20px;
  }

  .hp-footer-desktop__perk {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: center;
    padding: 24px 14px;
    min-height: 148px;
  }

  .hp-footer-desktop__perk + .hp-footer-desktop__perk {
    border-inline-start: 1px solid rgba(148, 163, 184, 0.28);
  }

  .hp-footer-desktop__perk-icon img,
  .hp-footer-desktop__perk-icon .hp-footer-fa {
    width: 64px;
    height: 64px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 0 12px rgba(139, 92, 246, 0.4));
  }

  .hp-footer-fa {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .hp-footer-desktop__social-link .hp-footer-fa,
  .hp-footer-desktop__trust-icon .hp-footer-fa,
  .hp-footer-desktop__contact-list .hp-footer-fa,
  .hp-footer-desktop__nav-head .hp-footer-fa {
    color: var(--hp-footer-desktop-accent);
    font-size: 1.15rem;
  }

  .hp-footer-desktop__perk-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .hp-footer-desktop__perk-text strong {
    color: var(--hp-footer-desktop-heading);
    font-size: 0.98rem;
    font-weight: 800;
    line-height: 1.4;
  }

  .hp-footer-desktop__perk-text span {
    color: #c7d2e5;
    font-size: 0.82rem;
  }

  .hp-footer-desktop__main {
    display: grid;
    grid-template-columns: 1.35fr 0.9fr 0.9fr 1.15fr;
    gap: 0;
    border-radius: 22px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    overflow: hidden;
    margin-bottom: 18px;
  }

  .hp-footer-desktop__main > * + * {
    border-inline-start: 1px solid rgba(148, 163, 184, 0.28);
  }

  .hp-footer-desktop__brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 30px 22px 26px;
    gap: 12px;
  }

  .hp-footer-desktop__logo img {
    width: min(100%, 220px);
    height: auto;
    display: block;
  }

  .hp-footer-desktop__tagline {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    line-height: 1.5;
  }

  .hp-footer-desktop__tagline-main {
    color: #ffffff;
    font-size: 1.08rem;
    font-weight: 800;
  }

  .hp-footer-desktop__tagline-accent {
    color: #a78bfa;
    font-size: 0.98rem;
    font-weight: 700;
  }

  .hp-footer-desktop__about {
    margin: 0;
    color: #dbe3f0;
    font-size: 0.84rem;
    line-height: 1.9;
    max-width: 36ch;
  }

  .hp-footer-desktop__social {
    display: flex;
    gap: 14px;
    justify-content: center;
    margin-top: 8px;
  }

  .hp-footer-desktop__social-link {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease;
  }

  .hp-footer-desktop__social-link:hover {
    transform: translateY(-2px);
  }

  .hp-footer-desktop__social-link img {
    width: 36px;
    height: 36px;
    object-fit: contain;
  }

  .hp-footer-desktop__nav,
  .hp-footer-desktop__contact {
    padding: 28px 22px 24px;
    text-align: right;
  }

  .hp-footer-desktop__nav-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 18px;
    text-align: center;
  }

  .hp-footer-desktop__nav-head img {
    width: 62px;
    height: 62px;
    object-fit: contain;
  }

  .hp-footer-desktop__nav-head h4,
  .hp-footer-desktop__contact .hp-footer-desktop__nav-head h4 {
    margin: 0;
    color: var(--hp-footer-desktop-heading);
    font-size: 1.05rem;
    font-weight: 800;
  }

  .hp-footer-desktop__links,
  .hp-footer-desktop__contact-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .hp-footer-desktop__links a,
  .hp-footer-desktop__contact-list a {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.15s ease;
  }

  .hp-footer-desktop__links a {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
  }

  .hp-footer-desktop__links a::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #8b5cf6;
    flex: 0 0 auto;
  }

  .hp-footer-desktop__links a:hover,
  .hp-footer-desktop__contact-list a:hover {
    color: var(--hp-footer-desktop-gold);
  }

  .hp-footer-desktop__contact {
    text-align: right;
  }

  .hp-footer-desktop__contact .hp-footer-desktop__nav-head {
    text-align: center;
  }

  .hp-footer-desktop__contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #cbd5e1;
    font-size: 0.88rem;
    line-height: 1.65;
  }

  .hp-footer-desktop__contact-list img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    margin-top: 3px;
    flex: 0 0 auto;
  }

  .hp-footer-desktop__contact-list a {
    direction: ltr;
    unicode-bidi: isolate;
  }

  .hp-footer-desktop__trust {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    padding-top: 10px;
    border-top: 1px solid rgba(148, 163, 184, 0.28);
  }

  .hp-footer-desktop__trust-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 0;
    background: transparent;
    border: 0;
    position: relative;
  }

  .hp-footer-desktop__trust-item + .hp-footer-desktop__trust-item::before {
    content: '';
    position: absolute;
    inset-block: 18px;
    inset-inline-start: 0;
    width: 1px;
    background: rgba(148, 163, 184, 0.28);
  }

  .hp-footer-desktop__trust-icon img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    display: block;
    flex: 0 0 auto;
  }

  .hp-footer-desktop__trust-item p {
    margin: 0;
    color: #e2e8f0;
    font-size: 0.84rem;
    line-height: 1.55;
    font-weight: 600;
  }
}

.hp-footer-social {
  display: none;
}

.hp-footer-copy {
  display: none;
}

.hp-copyright {
  text-align: center;
  border-top: 1px solid #1e293b;
  padding-top: 25px;
  margin-top: 35px;
  font-size: 0.8rem;
  color: var(--hp-footer-muted);
}

/* Floating support */
.hp-call-box {
  position: fixed;
  bottom: 80px;
  left: 25px;
  background: var(--hp-accent);
  width: 55px;
  height: 55px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 6px 14px rgba(110, 0, 255, 0.35);
  cursor: pointer;
  z-index: 99;
  font-size: 1.4rem;
  border: none;
  text-decoration: none;
  transition: transform 0.2s;
}

.hp-call-box:hover {
  transform: scale(1.06);
}

/* Mobile nav overlay */
.hp-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 999;
}

.hp-nav-overlay.active {
  display: block;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 992px) {
  .hp-menu-icon {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .hp-nav-menu {
    position: fixed;
    top: 0;
    right: -280px;
    width: 260px;
    height: 100vh;
    background: var(--hp-surface);
    z-index: 1000;
    transition: right 0.3s;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.15);
    padding: 80px 20px 30px;
  }

  .hp-nav-menu.active {
    right: 0;
  }

  .hp-nav-menu ul {
    flex-direction: column;
    gap: 20px;
  }

  .hp-close-menu {
    display: block;
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 1.5rem;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--hp-text);
  }

  .hp-categories ul {
    gap: 0.25rem 1rem;
  }

  .hp-categories ul li a {
    font-size: 0.85rem;
  }
}

@media (max-width: 768px) {
  .hp-container {
    padding: 0 14px;
  }

  .hp-header-layout {
    gap: 0;
    padding: 10px 0 10px;
  }

  .hp-header-row--bottom {
    display: none;
  }

  .hp-header.is-scrolled .hp-header-layout {
    padding: 8px 0 8px;
  }

  .hp-cat-menu-btn {
    display: inline-flex;
  }

  .hp-cat-menu-btn__label {
    display: none;
  }

  .hp-header-row--top {
    gap: 8px;
  }

  .hp-header-actions {
    gap: 6px;
  }

  .hp-cat-menu-btn {
    padding: 8px 10px;
  }

  .hp-brand img {
    max-height: 44px;
  }

  .hp-search input {
    font-size: 0.9rem;
    padding: 6px 0;
  }

  .hp-icon-btn {
    font-size: 1.2rem;
    padding: 4px;
  }

  .hp-section-title h2 {
    font-size: 1.25rem;
  }

  .hp-card {
    width: 165px;
    margin: 0 8px;
    padding: 5px 5px 9px;
  }

  .hp-card__title {
    font-size: 0.8rem;
  }

  .hp-brands__strip .brand {
    min-width: 150px;
    height: 170px;
  }

  .hp-brands__strip img {
    height: 120px;
  }

  .hp-nav {
    width: 34px;
    height: 34px;
    font-size: 14px;
  }

  .hp-hero {
    margin: 16px 0 28px;
    border-radius: 16px;
  }

  .hp-home-swiper .swiper-slide img {
    max-height: min(320px, 58vh);
  }

  .hp-call-box {
    bottom: calc(48px + env(safe-area-inset-bottom, 0px));
    left: 16px;
    width: 50px;
    height: 50px;
  }

  /* iOS/WebKit: overflow-y:hidden traps vertical page scroll on horizontal product rows */
  .hp-row,
  .hp-brands__strip,
  .hp-carousel {
    overflow-y: scroll;
    overscroll-behavior: auto;
    touch-action: auto;
    cursor: default;
    scrollbar-width: none;
  }

  .hp-row::-webkit-scrollbar,
  .hp-brands__strip::-webkit-scrollbar,
  .hp-carousel::-webkit-scrollbar {
    display: none;
  }
}

@media (hover: none) and (pointer: coarse) {
  .hp-row,
  .hp-brands__strip,
  .hp-carousel {
    overflow-y: scroll;
    overscroll-behavior: auto;
    touch-action: auto;
    cursor: default;
    scrollbar-width: none;
  }

  .hp-row::-webkit-scrollbar,
  .hp-brands__strip::-webkit-scrollbar,
  .hp-carousel::-webkit-scrollbar {
    display: none;
  }

  .hp-row:active,
  .hp-brands__strip:active,
  .hp-carousel:active {
    cursor: default;
  }
}

@media (min-width: 992px) {
  .hp-call-box {
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 480px) {
  .hp-header-row--top {
    gap: 8px;
  }

  .hp-brand img {
    max-height: 38px;
  }

  .hp-categories ul li a,
  .hp-categories button.hp-cat-trigger {
    font-size: 0.78rem;
  }

  .hp-hero {
    border-radius: 14px;
  }

  .hp-home-swiper .swiper-slide img {
    max-height: min(240px, 50vh);
  }

  .hp-card {
    width: 148px;
  }

  .hp-tabs button {
    padding: 6px 12px;
    font-size: 0.8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hp-hero-track,
  .hp-card,
  .hp-nav-menu {
    transition: none;
  }
}

/* مودال Add to Home Screen — بنر home */
.hp-a2hs-modal {
  position: fixed;
  inset: 0;
  z-index: 1000002;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  background: rgba(15, 23, 42, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.hp-a2hs-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.hp-a2hs-modal__sheet {
  background: var(--hp-surface);
  color: var(--hp-text);
  width: 100%;
  max-width: 480px;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.18);
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
}

.hp-a2hs-modal.is-open .hp-a2hs-modal__sheet {
  transform: translateY(0);
}

.hp-a2hs-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 10px;
  border-bottom: 1px solid var(--hp-border);
}

.hp-a2hs-modal__head h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.hp-a2hs-modal__close {
  border: none;
  background: var(--hp-surface-2);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  color: var(--hp-text);
  font-size: 1.1rem;
}

.hp-a2hs-modal__body {
  padding: 14px 18px calc(22px + env(safe-area-inset-bottom, 0));
}

.hp-a2hs-modal__lead {
  margin: 0 0 12px;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--hp-text-muted);
}

.hp-a2hs-steps ol {
  margin: 0;
  padding: 0 1.1rem 0 0;
  font-size: 0.9rem;
  line-height: 1.65;
}

.hp-a2hs-steps li {
  margin-bottom: 10px;
}

.hp-a2hs-steps li strong {
  color: var(--hp-accent);
}

.hp-a2hs-modal__note {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--hp-accent-soft);
  color: var(--hp-text);
  font-size: 0.88rem;
}

@media (min-width: 768px) {
  .hp-a2hs-modal {
    align-items: center;
    padding: 20px;
  }

  .hp-a2hs-modal__sheet {
    border-radius: 20px;
    transform: translateY(12px) scale(0.97);
    opacity: 0;
  }

  .hp-a2hs-modal.is-open .hp-a2hs-modal__sheet {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

/* ========== GUEST PHONE LEAD MODAL ========== */
.hp-guest-phone-modal {
  position: fixed;
  inset: 0;
  z-index: 1000005;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
  pointer-events: none;
}
.hp-guest-phone-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.hp-guest-phone-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
}
.hp-guest-phone-modal__sheet {
  position: relative;
  background: var(--hp-surface, #fff);
  color: var(--hp-text, #0f172a);
  width: 100%;
  max-width: 480px;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.18);
  transform: translateY(24px);
  transition: transform 0.25s ease;
  max-height: min(92vh, 640px);
  overflow: auto;
}
.hp-guest-phone-modal.is-open .hp-guest-phone-modal__sheet {
  transform: translateY(0);
}
.hp-guest-phone-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 10px;
}
.hp-guest-phone-modal__head h3 {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 700;
}
.hp-guest-phone-modal__close {
  border: none;
  background: var(--hp-surface-2, #f1f5f9);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.hp-guest-phone-modal__body {
  padding: 8px 18px calc(22px + env(safe-area-inset-bottom, 0));
}
.hp-guest-phone-modal__lead {
  margin: 0 0 16px;
  font-size: 0.95rem;
  line-height: 1.85;
  color: var(--hp-text-muted, #475569);
  text-align: justify;
}
.hp-guest-phone-form__label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.hp-guest-phone-form__input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--hp-border, #e2e8f0);
  background: var(--hp-surface-2, #f8fafc);
  color: inherit;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.hp-guest-phone-form__input:focus {
  border-color: var(--hp-accent, #6e00ff);
  box-shadow: 0 0 0 3px rgba(110, 0, 255, 0.15);
}
.hp-guest-phone-form__error,
.hp-guest-phone-form__ok {
  margin: 8px 0 0;
  font-size: 0.86rem;
  line-height: 1.5;
}
.hp-guest-phone-form__error {
  color: #dc2626;
}
.hp-guest-phone-form__ok {
  color: #059669;
}
.hp-guest-phone-form__actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.hp-guest-phone-form__actions .hp-btn {
  flex: 1 1 140px;
  text-align: center;
  text-decoration: none;
  justify-content: center;
  display: inline-flex;
  align-items: center;
  padding: 12px 16px;
  border-radius: 12px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  border: none;
  box-sizing: border-box;
}
.hp-guest-phone-form__actions .hp-btn--ghost {
  background: var(--hp-surface-2, #f1f5f9);
  color: var(--hp-text, #0f172a);
}
.hp-guest-phone-form__actions .hp-btn--primary {
  background: var(--hp-accent, #6e00ff);
  color: #fff;
}
.hp-guest-phone-form__actions .hp-btn[disabled] {
  opacity: 0.65;
  pointer-events: none;
}
html.hp-guest-phone-open,
html.hp-guest-phone-open body {
  overflow: hidden;
}
@media (min-width: 768px) {
  .hp-guest-phone-modal {
    align-items: center;
    padding: 20px;
  }
  .hp-guest-phone-modal__sheet {
    border-radius: 20px;
    transform: translateY(12px) scale(0.97);
    opacity: 0;
  }
  .hp-guest-phone-modal.is-open .hp-guest-phone-modal__sheet {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

/* ========== BRAND PICKER MODAL ========== */
.hp-brand-picker {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
  visibility: hidden;
}

.hp-brand-picker.is-open {
  pointer-events: auto;
  visibility: visible;
}

.hp-brand-picker__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}

.hp-brand-picker__sheet {
  position: relative;
  width: min(100%, 560px);
  max-height: min(88vh, 720px);
  background: var(--hp-surface);
  border-radius: 20px 20px 0 0;
  display: flex;
  flex-direction: column;
  box-shadow: var(--hp-shadow-hover);
  transform: translateY(100%);
  transition: transform 0.28s ease;
}

.hp-brand-picker.is-open .hp-brand-picker__sheet {
  transform: translateY(0);
}

.hp-brand-picker__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--hp-border);
}

.hp-brand-picker__head h3 {
  margin: 0;
  font-size: 1.1rem;
}

.hp-brand-picker__close {
  border: none;
  background: transparent;
  color: var(--hp-text-muted);
  font-size: 1.25rem;
  cursor: pointer;
}

.hp-brand-picker__search-wrap {
  padding: 12px 16px 0;
}

.hp-brand-picker__search {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--hp-border);
  border-radius: 12px;
  background: var(--hp-surface-2);
  color: var(--hp-text);
  font: inherit;
}

.hp-brand-picker__count {
  margin: 8px 16px 0;
  font-size: 0.85rem;
  color: var(--hp-text-muted);
}

.hp-brand-picker__grid {
  flex: 1;
  overflow: auto;
  padding: 12px 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 10px;
  align-content: start;
}

.hp-brand-picker__empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--hp-text-muted);
  padding: 24px 8px;
}

.hp-brand-picker__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 6px;
  border: 2px solid var(--hp-border);
  border-radius: 14px;
  background: var(--hp-surface-2);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  content-visibility: auto;
  contain-intrinsic-size: 110px 100px;
}

.hp-brand-picker__item img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 8px;
  background: #eef1f7;
}

.hp-brand-picker__name {
  font-size: 0.72rem;
  line-height: 1.3;
  text-align: center;
  color: var(--hp-text);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.hp-brand-picker__item.is-selected {
  border-color: var(--hp-accent);
  background: var(--hp-accent-soft);
  box-shadow: 0 0 0 1px var(--hp-accent-border);
}

.hp-brand-picker__actions {
  display: flex;
  gap: 10px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0));
  border-top: 1px solid var(--hp-border);
}

.hp-brand-picker__actions .hp-btn {
  flex: 1;
  padding: 12px 16px;
  border-radius: 12px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  border: none;
}

.hp-brand-picker__actions .hp-btn--ghost {
  background: var(--hp-surface-2);
  color: var(--hp-text);
}

.hp-brand-picker__actions .hp-btn--primary {
  background: var(--hp-accent);
  color: #fff;
}

.hp-brand-picker__actions .hp-btn--primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

body.hp-brand-picker-open {
  overflow: hidden;
}

@media (min-width: 768px) {
  .hp-brand-picker {
    align-items: center;
    padding: 20px;
  }

  .hp-brand-picker__sheet {
    border-radius: 20px;
    max-height: min(80vh, 680px);
  }
}
