/* Shared page width — banner + sections + header */

:root {
  --zs-page: 1180px;
}

html[lang="ar"],
html.rtl,
html[dir="rtl"],
body[dir="rtl"] {
  font-family: "Noto Sans Arabic", sans-serif !important;
}

html[lang="ar"] *:not(script):not(style),
html.rtl *:not(script):not(style),
html[dir="rtl"] *:not(script):not(style),
body[dir="rtl"] *:not(script):not(style) {
  font-family: "Noto Sans Arabic", sans-serif !important;
}

.max-w-\[1400px\],
.max-w-\[1600px\] {
  max-width: var(--zs-page) !important;
}

@media (min-width: 1024px) {
  .zs-topbar-inner,
  header.sticky > div.max-w-\[1400px\],
  header.sticky > div[class*="max-w"],
  header nav[class*="lg:block"] > div {
    max-width: var(--zs-page) !important;
  }

  /* Hero only — do not stretch Shop by Price tiles */
  section.relative.overflow-hidden .shadow-xl {
    min-height: clamp(240px, 32vw, 320px) !important;
    height: clamp(240px, 32vw, 320px) !important;
    border-radius: 8px !important;
  }
}

/* Less roundness on the main hero banner only */
section.relative.overflow-hidden .shadow-xl,
.relative.rounded-2xl.sm\:rounded-3xl.overflow-hidden.shadow-xl {
  border-radius: 8px !important;
}

/* Hide homepage trust strip: Same-Day / Authentic / Returns / Support */
section.py-3.sm\:py-4.bg-gradient-to-r.from-rose-50\/60.via-white.to-violet-50\/60,
section:has(.from-emerald-50.to-teal-100):has(.from-blue-50.to-indigo-100) {
  display: none !important;
}

/* Shop by Price — even 6-up row, centered type, aligned with page width */
section:has(a[href^="/search?max_price="]) > div {
  max-width: var(--zs-page) !important;
  width: 100%;
}

section:has(a[href^="/search?max_price="]) h2 {
  margin-bottom: 16px !important;
}

section:has(a[href^="/search?max_price="]) .grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 10px !important;
  width: 100% !important;
  align-items: stretch;
}

@media (min-width: 640px) {
  section:has(a[href^="/search?max_price="]) .grid {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }
}

section:has(a[href^="/search?max_price="]) .grid > a {
  width: 100% !important;
  min-height: 0 !important;
  height: auto !important;
  aspect-ratio: 1 / 1 !important;
  border-radius: 10px !important;
  transform: none !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

section:has(a[href^="/search?max_price="]) .grid > a .relative.z-10 {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 2px;
  width: 100%;
  padding: 8px 4px;
  box-sizing: border-box;
}

section:has(a[href^="/search?max_price="]) .grid > a .relative.z-10 p:nth-child(2) {
  font-size: clamp(1.4rem, 4vw, 2.1rem) !important;
  line-height: 1 !important;
  margin: 4px 0 !important;
}

@media (max-width: 639px) {
  section:has(a[href^="/search?max_price="]) .grid {
    gap: 8px !important;
  }

  section:has(a[href^="/search?max_price="]) .grid > a {
    aspect-ratio: unset !important;
    min-height: 108px !important;
    padding: 10px 4px !important;
  }

  section:has(a[href^="/search?max_price="]) .grid > a .relative.z-10 {
    gap: 2px;
    padding: 0;
  }

  section:has(a[href^="/search?max_price="]) .grid > a .relative.z-10 p:first-child,
  section:has(a[href^="/search?max_price="]) .grid > a .relative.z-10 p:last-child {
    font-size: 11px !important;
    line-height: 14px !important;
    letter-spacing: 0.06em !important;
    font-weight: 700 !important;
    opacity: 1 !important;
    margin: 0 !important;
  }

  section:has(a[href^="/search?max_price="]) .grid > a .relative.z-10 p:nth-child(2) {
    font-size: 26px !important;
    line-height: 1.05 !important;
    font-weight: 800 !important;
    margin: 2px 0 !important;
  }
}

/* Collection circles under the banner — one row, aligned to page width, no duplicate wrap */
section:has(a[href="/collections/deals"]):has(a[href="/collections/hair-care-picks"]) {
  padding-top: 12px !important;
  padding-bottom: 8px !important;
}

section:has(a[href="/collections/deals"]):has(a[href="/collections/hair-care-picks"]) > div {
  max-width: var(--zs-page) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

section:has(a[href="/collections/deals"]):has(a[href="/collections/hair-care-picks"]) .flex {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  justify-items: center;
  align-items: start;
  gap: 8px 16px !important;
  overflow: visible !important;
  padding: 0 !important;
}

section:has(a[href="/collections/deals"]):has(a[href="/collections/hair-care-picks"]) .flex > a {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 8px !important;
  min-width: 0 !important;
  width: 100%;
  max-width: 110px;
  text-decoration: none;
}

section:has(a[href="/collections/deals"]):has(a[href="/collections/hair-care-picks"]) .flex > a > div.relative {
  width: 88px !important;
  height: 88px !important;
  flex-shrink: 0;
}

section:has(a[href="/collections/deals"]):has(a[href="/collections/hair-care-picks"]) .flex > a img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

section:has(a[href="/collections/deals"]):has(a[href="/collections/hair-care-picks"]) .flex > a span {
  display: block !important;
  font-size: 13px !important;
  line-height: 1.25 !important;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

@media (max-width: 639px) {
  section:has(a[href="/collections/deals"]):has(a[href="/collections/hair-care-picks"]) .flex {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 12px 8px !important;
  }

  section:has(a[href="/collections/deals"]):has(a[href="/collections/hair-care-picks"]) .flex > a > div.relative {
    width: 72px !important;
    height: 72px !important;
  }
}

/* Product breadcrumb — one line, aligned to page gutter on mobile */
@media (max-width: 1023px) {
  div.max-w-\[1400px\].mx-auto.px-4.pt-4:has(> nav) {
    padding: 8px 15px 0 !important;
    max-width: none !important;
  }

  nav.flex.items-center.gap-2.text-sm.text-gray-400 {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 6px !important;
    width: 100%;
    min-width: 0;
    overflow: hidden;
    font-size: 12px !important;
    line-height: 16px !important;
    margin-bottom: 0 !important;
  }

  nav.flex.items-center.gap-2.text-sm.text-gray-400 > a,
  nav.flex.items-center.gap-2.text-sm.text-gray-400 > span {
    flex-shrink: 0;
    white-space: nowrap;
    line-height: 16px;
    vertical-align: middle;
  }

  nav.flex.items-center.gap-2.text-sm.text-gray-400 > span.truncate,
  nav.flex.items-center.gap-2.text-sm.text-gray-400 > span.max-w-\[200px\] {
    flex: 1 1 0% !important;
    flex-shrink: 1 !important;
    min-width: 0 !important;
    max-width: none !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* Category heroes: keep left title readable, no color wash on the right-side photo */
section:has(nav.flex.items-center.gap-2.text-sm.text-gray-400) .relative.rounded-2xl.sm\:rounded-3xl.overflow-hidden.group > .absolute.inset-0.bg-gradient-to-r {
  background: linear-gradient(to right, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.18) 34%, transparent 58%) !important;
}

html[dir="rtl"] section:has(nav.flex.items-center.gap-2.text-sm.text-gray-400) .relative.rounded-2xl.sm\:rounded-3xl.overflow-hidden.group > .absolute.inset-0.bg-gradient-to-r,
html[lang="ar"] section:has(nav.flex.items-center.gap-2.text-sm.text-gray-400) .relative.rounded-2xl.sm\:rounded-3xl.overflow-hidden.group > .absolute.inset-0.bg-gradient-to-r {
  background: linear-gradient(to left, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.18) 34%, transparent 58%) !important;
}

/* In-grid category promo banners — show the image, no color overlay */
.relative.col-span-2.rounded-2xl.overflow-hidden.group > .absolute.inset-0[class*="bg-gradient-to-br"] {
  background: none !important;
  opacity: 0 !important;
}
