/* Mobile-first homepage layout shared by guest/authenticated and ZMW/USD pages. */
*, *::before, *::after { box-sizing: border-box; }
html, body { max-width: 100%; }
img, video { max-width: 100%; height: auto; }
body { min-width: 0; }
#cms-banner { display: none !important; }
.home-currency { display: flex; gap: .25rem; align-items: center; }
.home-currency a, .home-currency span { min-width: 44px; min-height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: .55rem; font-size: .8rem; }
#search-results:not(.hidden), #mobile-search-results:not(.hidden) { display: flex !important; flex-direction: column !important; }
#search-results > *, #mobile-search-results > * { width: 100% !important; min-width: 0; flex: 0 0 auto; }
#search-results a, #mobile-search-results a { display: flex !important; flex-direction: row !important; align-items: center; min-height: 68px; }
#search-results img, #mobile-search-results img { flex: 0 0 48px; width: 48px !important; height: 48px !important; object-fit: cover; }
#search-results a > div, #mobile-search-results a > div { min-width: 0; }
#search-results a > div > div:first-child, #mobile-search-results a > div > div:first-child { white-space: normal; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.popular-stores-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }
.store-card { min-width: 0; overflow: hidden; border: 1px solid #e5e7eb; border-radius: .75rem; padding: 0 0 .75rem; background: #fff; display: flex; flex-direction: column; align-items: stretch; gap: .75rem; transition: box-shadow .2s, transform .2s; }
.store-card:hover { box-shadow: 0 10px 24px rgba(15,23,42,.09); transform: translateY(-2px); }
.store-card:focus-visible { outline: 3px solid #fabb12; outline-offset: 2px; }
.store-card > .store-card-media { display: block; width: 100%; height: clamp(9.5rem, 47vw, 12rem); }
.store-card > .store-card-copy { padding-inline: .75rem; }
.store-logo { width: 64px; height: 64px; border-radius: .75rem; object-fit: contain; padding: .35rem; background: #f3f4f6; }
.popular-stores-grid .store-logo { width: 100%; height: 100%; border-radius: 0; padding: .75rem; }
.store-logo-placeholder { display: grid; place-items: center; color: #1c74cf; font-size: 1.4rem; font-weight: 700; }

.store-login-modal[hidden] { display: none !important; }
.store-login-modal { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 1rem; background: rgba(15, 23, 42, .58); backdrop-filter: blur(3px); }
.store-login-card { position: relative; width: min(100%, 28rem); padding: 2rem 1.5rem 1.5rem; border-radius: 1rem; background: #fff; box-shadow: 0 24px 70px rgba(15, 23, 42, .25); text-align: center; }
.store-login-card h2 { margin-top: .8rem; color: #111827; font-size: 1.35rem; line-height: 1.25; }
.store-login-card > p { margin: .65rem auto 1.4rem; max-width: 23rem; color: #6b7280; font-size: .9rem; line-height: 1.6; }
.store-login-icon { width: 3.5rem; height: 3.5rem; margin: 0 auto; display: grid; place-items: center; border-radius: 999px; background: #eaf4ff; color: #1c74cf; font-size: 1.35rem; }
.store-login-close { position: absolute; top: .65rem; right: .65rem; width: 44px; height: 44px; display: grid; place-items: center; border-radius: .6rem; color: #6b7280; }
.store-login-close:hover { background: #f3f4f6; color: #111827; }
.store-login-actions { display: grid; gap: .65rem; }
.store-login-primary, .store-login-secondary, .store-login-cancel { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; border-radius: .7rem; font-size: .9rem; font-weight: 600; }
.store-login-primary { background: #1c74cf; color: #fff; }
.store-login-primary:hover { background: #1764b2; }
.store-login-secondary { border: 2px solid #1c74cf; background: #fff; color: #1c74cf; }
.store-login-secondary:hover { background: #f0f7ff; }
.store-login-cancel { min-height: 44px; color: #4b5563; }
.store-login-cancel:hover { color: #1c74cf; }
.store-login-modal :focus-visible { outline: 3px solid #fabb12; outline-offset: 2px; }
.store-modal-open { overflow: hidden; }

/* Header: controls stay reachable, then navigation and search get their own rows. */
header > .container:first-child {
  display: grid !important;
  grid-template-columns: minmax(0, auto) 1fr auto;
  align-items: center;
  gap: .35rem;
  margin-block: 0 !important;
  padding: .55rem .75rem !important;
}
header > .container:first-child > a {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  font-size: clamp(1rem, 5vw, 1.25rem) !important;
  white-space: nowrap;
}
.home-currency {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
}
header > .container:first-child > div:last-child {
  grid-column: 1 / -1;
  grid-row: 2;
  min-width: 0;
  gap: .2rem !important;
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
}
header > .container:first-child > div:last-child > div.flex {
  gap: .15rem !important;
}
header > .container:first-child > div:last-child a,
header > .container:first-child > div:last-child button,
#mobile-menu-close {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  margin: 0 !important;
  border-radius: .6rem;
}
#hamburger-button { display: none !important; }

.home-primary-nav {
  grid-column: 1 / -1;
  grid-row: 3;
  width: 100%;
  display: flex !important;
  gap: .35rem !important;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  padding: .25rem .75rem .65rem;
  border-top: 1px solid #e5e7eb;
  background: #fff;
  -webkit-overflow-scrolling: touch;
}
.home-primary-nav::-webkit-scrollbar,
.home-category-row::-webkit-scrollbar { display: none; }
.home-primary-nav a {
  flex: 0 0 auto;
  min-width: 76px;
  min-height: 54px;
  padding: .45rem .65rem;
  display: inline-flex !important;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: .2rem !important;
  border-radius: .65rem;
  font-size: .78rem;
  line-height: 1.15;
  white-space: nowrap;
  scroll-snap-align: start;
}
.home-primary-nav a:first-child { background: #eaf4ff; color: #1c74cf; }
.home-primary-nav i,
header button i,
header a i { color: #111827 !important; }
.home-primary-nav a:hover i,
header button:hover i,
header a:hover i { color: #000 !important; }
.home-primary-nav a:focus-visible,
.home-category-row a:focus-visible,
header a:focus-visible,
header button:focus-visible,
.home-search input:focus-visible {
  outline: 3px solid #fabb12;
  outline-offset: 2px;
}
.home-primary-nav img { width: 20px; height: 20px; object-fit: contain; }

.home-search {
  position: relative;
  width: calc(100% - 1.5rem);
  max-width: 80rem;
  margin: .75rem auto .35rem;
}
.home-search > div {
  position: relative;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
}
.home-search input {
  width: 100%;
  min-height: 48px;
  padding: .75rem 3rem .75rem 1rem !important;
  border: 1px solid #d1d5db;
  border-radius: .75rem !important;
  background: #f7f8fa !important;
  color: #111827;
  text-align: left !important;
  font-size: .875rem;
}
.home-search::after {
  content: "\f002";
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  color: #1c74cf;
  pointer-events: none;
}
#mobile-search-results { width: 100%; max-height: min(60vh, 24rem); }

.home-category-wrap { width: 100%; max-width: 80rem; margin: .4rem auto 1rem; padding-inline: .75rem; }
.home-category-row {
  display: flex;
  gap: .5rem;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: .2rem .1rem .55rem;
}
.home-category-row a {
  flex: 0 0 auto;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: .6rem .9rem;
  border: 1px solid #dbe2ea;
  border-radius: 999px;
  background: #fff;
  color: #374151;
  font-size: .875rem;
  white-space: nowrap;
}
.home-category-row a:first-child { color: #fff; background: #1c74cf; border-color: #1c74cf; }

#homepage-sections-container { padding-top: 1rem !important; }
#homepage-sections-container section,
#section-explore { margin-bottom: 2.5rem !important; padding-inline: .75rem !important; }
#homepage-sections-container h2,
#section-explore h2 { font-size: clamp(1.35rem, 6vw, 1.875rem) !important; line-height: 1.2; }
.section-products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: .85rem !important; }
.section-products-grid > * { min-width: 0; }
.section-products-grid a.group { min-width: 0; overflow: hidden; padding-bottom: .35rem; }
.section-products-grid a.group > div:first-child { height: clamp(9.5rem, 47vw, 12rem) !important; padding: .6rem !important; }
.section-products-grid a.group img { width: 100%; height: 100%; max-height: 100%; object-fit: contain; }
.section-products-grid h3 { overflow-wrap: anywhere; min-height: 2.5em; }
.section-products-grid .text-primary { overflow-wrap: anywhere; font-weight: 600; }
.section-products-grid .add-to-wishlist,
.section-products-grid .add-to-cart,
.section-products-grid .chat-product { width: 34px; height: 34px; padding: 0 !important; display: grid; place-items: center; }
.section-products-grid .add-to-wishlist i,
.section-products-grid .add-to-cart i,
.section-products-grid .chat-product i { font-size: 14px; }
.section-products-grid .absolute.top-3.right-3 { top: .35rem !important; right: .35rem !important; gap: .25rem !important; }

main > section.container.mb-24 { margin-bottom: 3rem !important; gap: 2rem !important; padding-inline: .75rem !important; }
footer { padding-top: 2.5rem !important; }
a.fixed.bottom-6.right-6 { width: 52px; height: 52px; padding: 0 !important; display: grid; place-items: center; right: .75rem !important; bottom: .75rem !important; }
#install-banner { gap: .5rem; padding: .75rem !important; }

@media (max-width: 349px) {
  .section-products-grid { grid-template-columns: 1fr !important; }
  .section-products-grid a.group > div:first-child { height: 13rem !important; }
  header > .container:first-child { gap: .2rem; padding-inline: .5rem !important; }
  header > .container:first-child > a { font-size: 1rem !important; letter-spacing: -.02em; }
  .home-currency { gap: 0; }
  .home-currency a, .home-currency span { font-size: .7rem; padding-inline: .2rem !important; }
}

@media (min-width: 768px) {
  header > .container:first-child { grid-template-columns: auto minmax(0, 1fr) auto auto; gap: .75rem; padding-inline: 1rem !important; }
  .home-primary-nav { grid-column: 2; grid-row: 1; border: 0; padding: 0; overflow-x: auto; justify-content: flex-start; }
  .home-currency { grid-column: 3; grid-row: 1; }
  header > .container:first-child > div:last-child { grid-column: 4; grid-row: 1; display: flex !important; }
  .home-primary-nav a { min-width: auto; min-height: 44px; padding: .4rem .35rem; flex-direction: row; font-size: .82rem; background: transparent !important; }
  .home-search { margin-top: 1rem; }
  .section-products-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 1.25rem !important; }
  .popular-stores-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-products-grid a.group > div:first-child { height: 14rem !important; }
}

@media (min-width: 1024px) {
  header > .container:first-child { grid-template-columns: auto minmax(0, 1fr) auto auto; }
  .home-search { display: none; }
  .home-category-wrap { margin-top: 1rem; }
  .section-products-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 1.5rem !important; }
  .popular-stores-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .section-products-grid a.group > div:first-child { height: 16rem !important; }
}
