/* ============================================================
   26mart.online — Universal Header (CSS)
   Sab classes "uh-" se shuru hoti hain, taake site ke baqi CSS se na takrayen.
   Rang badalne hain to sirf neeche wale :root variables badlein.
   ============================================================ */
:root {
  --uh-orange: #f47b1f;
  --uh-orange-dark: #d9650f;
  --uh-blue: #1f5fd1;
  --uh-ink: #1c2433;
  --uh-muted: #6b7484;
  --uh-line: #dfe4ec;
  --uh-bg: #ffffff;
  --uh-page: #eef2fa;
  --uh-radius: 999px;
  --uh-font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

/* Sticky ka kaam mount div se hota hai (parent body hai, is liye chipakta hai) */
.uh-mount { position: sticky; top: 0; z-index: 1000; }

.uh {
  font-family: var(--uh-font);
  background: var(--uh-bg);
  color: var(--uh-ink);
  box-shadow: 0 6px 24px rgba(31, 60, 120, .10);
  border-radius: 0 0 22px 22px;
}
.uh *, .uh *::before, .uh *::after { box-sizing: border-box; }
:where(.uh) a { color: inherit; text-decoration: none; }
:where(.uh) button { font-family: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
.uh :focus-visible { outline: 3px solid var(--uh-blue); outline-offset: 2px; border-radius: 8px; }

.uh-inner { max-width: 1280px; margin: 0 auto; padding: 14px 32px 16px; }

/* ---------- Top row: logo + actions ---------- */
.uh-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }

.uh-logo { display: inline-flex; align-items: center; gap: 6px; line-height: 1; flex-shrink: 0; }
.uh-logo svg { width: 56px; height: 56px; flex-shrink: 0; }
.uh-logo img { height: 64px; width: auto; display: block; }
.uh-logo-text { font-size: 52px; font-weight: 800; letter-spacing: -1.5px; }
.uh-logo-text .n26 { color: var(--uh-orange); }
.uh-logo-text .mart { color: var(--uh-blue); }
.uh-logo-text .online { color: var(--uh-blue); font-weight: 400; letter-spacing: -1px; }

.uh-actions { display: flex; align-items: center; gap: 18px; position: relative; }

/* Location */
.uh-loc-wrap { position: relative; }
.uh-loc { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; padding: 6px 4px; }
.uh-loc svg { flex-shrink: 0; }
.uh-loc .uh-chev { transition: transform .15s; }
.uh-loc[aria-expanded="true"] .uh-chev { transform: rotate(180deg); }
.uh-menu-pop {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 190px; z-index: 5;
  background: #fff; border: 1px solid var(--uh-line); border-radius: 14px;
  box-shadow: 0 14px 34px rgba(20, 40, 90, .16); padding: 6px; display: none;
}
.uh-menu-pop.open { display: block; }
.uh-menu-pop button, .uh-menu-pop a {
  display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 10px;
  font-size: 15px; font-weight: 600;
}
.uh-menu-pop button:hover, .uh-menu-pop a:hover { background: var(--uh-page); }
.uh-menu-pop [aria-selected="true"] { color: var(--uh-blue); background: #eaf1ff; }

/* Cart + user */
.uh-icon-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; color: #5b6272; }
.uh-icon-btn:hover { background: var(--uh-page); }
.uh-badge {
  position: absolute; top: -2px; right: -3px; min-width: 20px; height: 20px; padding: 0 5px;
  background: var(--uh-orange); color: #fff; border-radius: 10px; font-size: 12px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center; border: 2px solid #fff;
}
.uh-badge[hidden] { display: none; }
.uh-user { width: 42px; height: 42px; border-radius: 50%; background: #e3e6ec; color: #707786; display: inline-flex; align-items: flex-end; justify-content: center; overflow: hidden; }
.uh-burger { display: none; }

/* ---------- Bottom row: nav + search ---------- */
.uh-bottom { display: flex; align-items: center; gap: 22px; margin-top: 10px; }
.uh-nav { order: 1; display: flex; align-items: center; gap: 22px; }
.uh-nav a.uh-link { font-size: 16px; font-weight: 600; white-space: nowrap; padding: 6px 2px; color: var(--uh-ink); }
.uh-nav a.uh-link:hover { color: var(--uh-blue); }
.uh-nav a.uh-link.active { color: var(--uh-blue); }
.uh-cta {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  background: var(--uh-orange); color: #fff !important; font-weight: 700; font-size: 16px;
  padding: 10px 20px; border-radius: var(--uh-radius);
  box-shadow: 0 6px 16px rgba(244, 123, 31, .32);
}
.uh-cta:hover { background: var(--uh-orange-dark); }
.uh-cta .plus { font-size: 20px; line-height: 1; font-weight: 500; }

.uh-searchbar { order: 2; display: flex; align-items: center; gap: 10px; flex: 1; max-width: 460px; margin-left: auto; }
.uh-search { flex: 1; min-width: 0; position: relative; }
.uh-search input {
  width: 100%; height: 46px; border: 1.5px solid #c9d0dc; border-radius: var(--uh-radius);
  padding: 0 18px 0 48px; font: inherit; font-size: 16px; color: var(--uh-ink); background: #fff;
}
.uh-search input::placeholder { color: #7a8292; }
.uh-search input:focus { border-color: var(--uh-blue); outline: 3px solid rgba(31, 95, 209, .18); }
.uh-search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: #5b6272; pointer-events: none; }

/* ---------- Filter (brand + price) ---------- */
.uh-filter-wrap { position: relative; flex-shrink: 0; }
.uh-filter-btn { color: #5b6272; border: 1.5px solid #c9d0dc; border-radius: var(--uh-radius); width: 46px; height: 46px; }
.uh-filter-btn:hover { background: var(--uh-page); }
.uh-filter-panel { min-width: 240px; max-width: 280px; right: 0; left: auto; padding: 14px; }
.uh-filter-title { font-size: 13px; font-weight: 800; color: var(--uh-muted); text-transform: uppercase; letter-spacing: .04em; margin: 8px 0 6px; }
.uh-filter-title:first-child { margin-top: 0; }
.uh-filter-brands { max-height: 180px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.uh-filter-check { display: flex !important; align-items: center; gap: 8px; padding: 6px 4px !important; font-size: 14px; font-weight: 600 !important; border-radius: 8px; cursor: pointer; }
.uh-filter-check:hover { background: var(--uh-page); }
.uh-filter-check input { width: 16px; height: 16px; accent-color: var(--uh-blue); cursor: pointer; }
.uh-filter-price { display: flex; align-items: center; gap: 8px; }
.uh-filter-price input {
  width: 0; flex: 1; height: 38px; border: 1.5px solid #c9d0dc; border-radius: 10px;
  padding: 0 10px; font: inherit; font-size: 14px; color: var(--uh-ink);
}
.uh-filter-price input:focus { border-color: var(--uh-blue); outline: 3px solid rgba(31, 95, 209, .18); }
.uh-filter-price span { color: var(--uh-muted); font-size: 13px; flex-shrink: 0; }
.uh-filter-actions { display: flex; gap: 8px; margin-top: 14px; }
.uh-filter-actions button {
  flex: 1; text-align: center !important; padding: 10px !important; border-radius: var(--uh-radius);
  font-size: 14px; font-weight: 700 !important;
}
#uhFilterClear { border: 1.5px solid #c9d0dc; color: var(--uh-ink); }
#uhFilterClear:hover { background: var(--uh-page); }
.uh-filter-apply { background: var(--uh-orange); color: #fff !important; }
.uh-filter-apply:hover { background: var(--uh-orange-dark); }

/* Mobile-only menu panel */
.uh-drawer { display: none; }

/* ============================================================
   Mobile (<= 760px): logo + location + cart + menu, phir search, phir chips
   ============================================================ */
@media (max-width: 760px) {
  .uh { border-radius: 0 0 18px 18px; }
  .uh-inner { padding: 10px 14px 12px; }
  .uh-top { align-items: center; gap: 8px; }
  .uh-logo { gap: 3px; }
  .uh-logo svg { width: 26px; height: 26px; }
  .uh-logo img { height: 30px; }
  .uh-logo-text { font-size: 22px; letter-spacing: -.8px; }
  .uh-actions { gap: 4px; margin-left: auto; }
  .uh-loc { font-size: 11px; gap: 3px; white-space: nowrap; padding: 6px 2px; }
  .uh-loc svg:first-child { width: 16px; height: 16px; }
  .uh-loc .uh-chev { width: 12px; height: 12px; }
  .uh-icon-btn { width: 36px; height: 36px; }
  .uh-icon-btn svg { width: 26px; height: 26px; }
  .uh-user { display: none; }
  .uh-burger { display: inline-flex; width: 34px; height: 38px; align-items: center; justify-content: center; color: #8a91a0; }

  .uh-bottom { flex-direction: column; align-items: stretch; gap: 10px; margin-top: 10px; }
  .uh-searchbar { order: 1; max-width: none; margin-left: 0; gap: 8px; }
  .uh-search input { height: 44px; font-size: 15px; }
  .uh-filter-btn { width: 44px; height: 44px; flex-shrink: 0; }
  .uh-filter-panel { right: 0; }

  .uh-nav {
    order: 2; gap: 4px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
    background: #fff; border-radius: var(--uh-radius); padding: 4px;
    margin: 0 -4px; box-shadow: 0 3px 12px rgba(31, 60, 120, .10);
  }
  .uh-nav::-webkit-scrollbar { display: none; }
  .uh-nav a.uh-link { font-size: 13px; font-weight: 700; padding: 8px 10px; border-radius: var(--uh-radius); flex-shrink: 0; }
  .uh-nav a.uh-link.active { background: var(--uh-orange); color: #fff; }
  .uh-cta {
    background: #fff; color: var(--uh-ink) !important; box-shadow: none; flex-shrink: 0;
    border: 1.5px solid #9aa2b1; font-size: 13px; padding: 6px 12px;
  }
  .uh-cta .plus { display: none; }

  .uh-drawer { display: block; position: relative; }
  .uh-drawer .uh-menu-pop { right: 0; top: 4px; }
}

@media (max-width: 360px) {
  .uh-logo-text { font-size: 19px; }
  .uh-logo svg { width: 22px; height: 22px; }
}

@media (prefers-reduced-motion: reduce) { .uh * { transition: none !important; } }
