/* ═══════════════════════════════════════════════════════════════
   SHARED DESIGN TOKENS  (used by both mobile + desktop code)
═══════════════════════════════════════════════════════════════ */
:root {
  --black:   #0a0a0a;
  --black2:  #111111;
  --black3:  #1a1a1a;
  --card-bg: #161616;
  --red:     #e8142a;
  --red-dk:  #b80f20;
  --white:   #ffffff;
  --w70:     rgba(255,255,255,0.70);
  --w40:     rgba(255,255,255,0.40);
  --w10:     rgba(255,255,255,0.08);
  --gold:    #d4a847;
  --green:   #22c55e;
  --border:  rgba(255,255,255,0.08);
  --r:       10px;
  --r-sm:    6px;
}
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; }
body {
  background: var(--black);
  color: var(--white);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  line-height: 1.4;
  overflow-x: hidden;
}
a { color: inherit; }

/* ═══════════════════════════════════════════════════════════════
   MOBILE LAYOUT CODE  — primary experience  (base / no query)
═══════════════════════════════════════════════════════════════ */


/* --- Hero --- */
.hero {
  background: linear-gradient(180deg, #1a0305 0%, var(--black) 100%);
  padding: 22px 16px 20px;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: -50px; left: 50%; transform: translateX(-50%);
  width: 360px; height: 180px;
  background: radial-gradient(ellipse, rgba(232,20,42,.22) 0%, transparent 70%);
  pointer-events: none;
}
.hero-title {
  font-family: 'Inter', sans-serif;
  font-size: 32px; font-weight: 800; letter-spacing: -.5px;
  text-align: center; margin-bottom: 16px; line-height: 1.1;
}
.hero-title span { color: var(--red); }
.search-box {
  background: #e8e8e8; border-radius: 12px;
  overflow: hidden; max-width: 700px; margin: 0 auto;
  display: flex; flex-wrap: wrap; align-items: stretch;
}
.search-field {
  flex: 1 1 auto; min-width: 100px;
  display: flex; align-items: center; gap: 6px;
  padding: 0 14px; border-right: 1px solid #d0d0d0;
}
.search-field:last-of-type { border-right: none; }
.search-field select {
  flex: 1; border: none; outline: none; background: none;
  font-family: 'Inter',sans-serif; font-size: 14px; font-weight: 500;
  color: #111; cursor: pointer; padding: 12px 0; min-width: 0;
  -webkit-appearance: none; appearance: none;
}
.search-field-text {
  min-width: 140px;
}
.search-field-text input {
  flex: 1; border: none; outline: none; background: none;
  font-family: 'Inter',sans-serif; font-size: 14px; font-weight: 500;
  color: #111; padding: 12px 0; min-width: 0;
}
.search-field-text input::placeholder { color: #999; }
.btn-search {
  background: var(--red); color: var(--white); border: none;
  border-radius: 0 12px 12px 0; padding: 12px 24px;
  font-size: 14px; font-weight: 700; font-family: 'Inter',sans-serif;
  cursor: pointer; flex-shrink: 0;
}

/* --- Category pills --- */
.categories {
  display: flex; gap: 8px; overflow-x: auto;
  padding: 12px 14px; scrollbar-width: none;
  background: var(--black2); border-bottom: 1px solid var(--border);
}
.categories::-webkit-scrollbar { display: none; }
.cat-pill {
  display: flex; align-items: center; gap: 5px;
  background: var(--w10); border: 1px solid var(--border);
  border-radius: 20px; padding: 6px 13px;
  font-size: 12px; font-weight: 500;
  white-space: nowrap; cursor: pointer;
  transition: all .2s; flex-shrink: 0; color: var(--w70);
  text-decoration: none;
}
.cat-pill:hover, .cat-pill.active {
  background: var(--red); border-color: var(--red); color: var(--white);
}
.cat-pill .e { font-size: 15px; }

/* --- Section layout --- */
.section {
  padding: 18px 14px;
  max-width: 1200px; margin: 0 auto;
}
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.section-title {
  font-family: 'Inter', sans-serif;
  font-size: 22px; font-weight: 700; letter-spacing: -.2px;
  display: flex; align-items: center; gap: 8px;
}
.section-title .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--red); flex-shrink: 0;
}
.see-all {
  font-size: 12px; color: var(--red);
  text-decoration: none; font-weight: 600;
}
.see-all:hover { text-decoration: underline; }
.divider { height: 1px; background: var(--border); margin: 0 14px; }

/* --- Featured shops: MOBILE = horizontal scroll row --- */
.sponsored-scroll {
  display: flex; gap: 10px; overflow-x: auto;
  padding-bottom: 4px; scrollbar-width: none;
}
.sponsored-scroll::-webkit-scrollbar { display: none; }
.sponsored-scroll .sp-card { flex-shrink: 0; width: 200px; }

/* --- Banner ad slider --- */
.ad-wrap { padding: 0 14px 4px; max-width: 1200px; margin: 0 auto; }
.ad-slider {
  position: relative; border-radius: var(--r); overflow: hidden; height: 118px;
}
.ad-slide {
  position: absolute; inset: 0;
  display: flex; align-items: center;
  padding: 18px 16px; opacity: 0; transition: opacity .5s; gap: 14px;
}
.ad-slide.active { opacity: 1; }
.ad-s1 { background: linear-gradient(135deg,#1a0008,#6b0015); }
.ad-s2 { background: linear-gradient(135deg,#0a1628,#1a3a6b); }
.ad-s3 { background: linear-gradient(135deg,#1a1200,#5c3d00); }
.ad-img {
  width: 76px; height: 76px; border-radius: 8px;
  object-fit: cover; flex-shrink: 0;
  border: 2px solid rgba(255,255,255,.15);
  background: #2a1a1a;
}
.ad-content { flex: 1; min-width: 0; }
.ad-tag {
  display: inline-block; background: var(--red); color: var(--white);
  font-size: 9px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .5px; padding: 2px 6px; border-radius: 3px; margin-bottom: 4px;
}
.ad-title {
  font-family: 'Inter',sans-serif; font-size: 16px; font-weight: 700;
  letter-spacing: 0; line-height: 1.1; margin-bottom: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ad-sub { font-size: 11px; color: var(--w70); }
.ad-cta {
  background: var(--white); color: var(--black);
  border: none; border-radius: 6px; padding: 8px 12px;
  font-size: 11px; font-weight: 700; font-family: 'Inter',sans-serif;
  cursor: pointer; flex-shrink: 0; white-space: nowrap;
}
.ad-dots {
  position: absolute; bottom: 8px; right: 10px;
  display: flex; gap: 4px;
}
.ad-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: rgba(255,255,255,.3); cursor: pointer; transition: all .2s;
}
.ad-dot.active { background: var(--white); width: 14px; border-radius: 3px; }

/* --- Deals horizontal scroll --- */
.deals-scroll {
  display: flex; gap: 10px; overflow-x: auto;
  padding-bottom: 4px; scrollbar-width: none;
}
.deals-scroll::-webkit-scrollbar { display: none; }
.deals-scroll .sp-card { flex-shrink: 0; width: 148px; }
.deals-scroll .sp-img { height: 88px; }

/* --- Hero subheadline --- */
.hero-sub {
  text-align: center; font-size: 13px; color: var(--w70);
  margin-bottom: 16px; line-height: 1.5;
  max-width: 480px; margin-left: auto; margin-right: auto;
}

/* --- Country tile grid --- */
.country-tiles {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.country-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; padding: 12px 6px;
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--r); cursor: pointer;
  transition: border-color .2s, background .15s;
  text-align: center;
}
.country-tile:hover { border-color: rgba(232,20,42,.3); background: rgba(232,20,42,.06); }
.country-tile.active { border-color: var(--red); background: rgba(232,20,42,.08); }
.country-flag { font-size: 22px; line-height: 1; }
.country-label { font-size: 12px; font-weight: 600; color: var(--white); line-height: 1.2; }
.country-count { font-size: 10px; color: var(--w40); }
.country-expand {
  grid-column: 1 / -1;
  padding: 4px 0 0;
}
.country-expand[style*="display: none"], .country-expand[style*="display:none"] { padding: 0; }

/* --- Explore entry cards --- */
.explore-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.explore-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--r); padding: 16px;
  text-decoration: none; color: inherit;
  transition: border-color .2s, transform .2s;
}
.explore-card:hover { border-color: rgba(232,20,42,.4); transform: translateY(-1px); }
.explore-icon {
  font-size: 28px; width: 48px; height: 48px;
  background: var(--w10); border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.explore-label { font-size: 15px; font-weight: 700; margin-bottom: 2px; }
.explore-desc { font-size: 12px; color: var(--w40); }
.city-chips {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.city-chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--w10); border: 1px solid var(--border);
  border-radius: 20px; padding: 6px 14px;
  font-size: 12px; font-weight: 500; color: var(--w70);
  text-decoration: none; cursor: pointer; transition: all .2s;
}
.city-chip:hover { background: var(--red); border-color: var(--red); color: var(--white); }
.city-chip .chip-count { font-size: 10px; color: var(--w40); }
.city-chip:hover .chip-count { color: rgba(255,255,255,.7); }

/* --- All listings grid (filterable, MOBILE = 2 col) --- */
.listings-filter {
  display: flex; gap: 6px; overflow-x: auto;
  padding: 0 0 12px; scrollbar-width: none; flex-wrap: nowrap;
}
.listings-filter::-webkit-scrollbar { display: none; }
.lf-btn {
  background: var(--w10); border: 1px solid var(--border);
  border-radius: 16px; padding: 5px 12px;
  font-size: 11px; font-weight: 500; color: var(--w70);
  white-space: nowrap; cursor: pointer; transition: all .2s; flex-shrink: 0;
}
.lf-btn.active { background: var(--red); border-color: var(--red); color: var(--white); }

/* --- Footer --- */
footer {
  background: var(--black2); border-top: 1px solid var(--border);
  padding: 24px 16px; margin-top: 16px; text-align: center;
}
footer img { height: 30px; margin: 0 auto 14px; display: block; }
.footer-links {
  display: flex; gap: 14px; justify-content: center;
  flex-wrap: wrap; margin-bottom: 14px;
}
.footer-links a { font-size: 12px; color: var(--w40); text-decoration: none; }
.footer-links a:hover { color: var(--white); }
.footer-disc {
  font-size: 10px; color: var(--w40); line-height: 1.6;
  max-width: 460px; margin: 0 auto;
}
.footer-copy { font-size: 11px; color: var(--w40); margin-top: 12px; }

/* --- Bottom nav (MOBILE only) --- */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 90;
  background: var(--black2); border-top: 1px solid var(--border);
  display: flex; padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
}
.bnav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  gap: 2px; cursor: pointer; color: var(--w40);
  text-decoration: none; transition: color .2s;
}
.bnav-item.active { color: var(--red); }
.bi { font-size: 20px; }
.bl { font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.bn-spacer { height: 70px; }


/* ═══════════════════════════════════════════════════════════════
   DESKTOP LAYOUT CODE  — secondary experience  (≥ 768px)
═══════════════════════════════════════════════════════════════ */
@media (min-width: 768px) {

  /* Center content on large screens — body stays full-width so header spans viewport */
  .hero, .categories, .section, .divider, .ad-wrap { max-width: 1440px; margin-left: auto; margin-right: auto; }
  footer { max-width: 1440px; margin-left: auto; margin-right: auto; }

  /* Hide mobile-only elements */
  .bottom-nav, .bn-spacer { display: none !important; }

  /* Hero */
  .hero { padding: 36px 24px 32px; }
  .hero-title { font-size: 52px; }
  .hero-tagline { font-size: 12px; }

  /* Search box: single-row on desktop */
  .search-box { flex-wrap: nowrap; max-width: 720px; }
  .search-field { min-width: 0; }

  /* Categories */
  .categories { padding: 14px 24px; gap: 10px; }
  .cat-pill { font-size: 13px; padding: 7px 16px; }

  /* Section */
  .section { padding: 24px 24px; }
  .divider { margin: 0 24px; }
  .section-title { font-size: 38px; }

  /* Featured shops: DESKTOP = 4-col square vertical cards */
  .sponsored-scroll {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    overflow: visible;
  }
  .sponsored-scroll .sp-card { width: auto; }
  .sp-body { padding: 10px 12px; }

  /* All-listings grid: DESKTOP = 5 cols */
  .all-grid {
    grid-template-columns: repeat(5, 1fr) !important;
  }

  /* Hero sub */
  .hero-sub { font-size: 15px; max-width: 600px; margin-bottom: 20px; }

  /* Country browse: DESKTOP */
  .country-tiles { grid-template-columns: repeat(6, 1fr); gap: 10px; }
  .country-tile { padding: 14px 8px; }
  .country-flag { font-size: 26px; }
  .country-label { font-size: 13px; }
  .city-chip { font-size: 13px; padding: 7px 16px; }

  /* Explore: 3 columns on desktop */
  .explore-grid { grid-template-columns: repeat(3, 1fr); }

  /* Ad slider */
  .ad-slider { height: 148px; }
  .ad-title { font-size: 22px; }

  /* Deals scroll: wider cards on desktop */
  .deals-scroll .sp-card { width: 180px; }
  .deals-scroll .sp-img  { height: 110px; }

  /* Footer */
  footer { padding: 32px 24px; }
}

@media (min-width: 1024px) {
  .cards-grid { grid-template-columns: repeat(5, 1fr); }
  .all-grid   { grid-template-columns: repeat(6, 1fr) !important; }
  .city-grid  { grid-template-columns: repeat(5, 1fr); }
}

@media (max-width: 479px) {
  .hero-title { font-size: 28px; }
  .btn-login { padding: 6px 10px; font-size: 11px; }
}
