/* PriceMe — style.css — Theme D: Black + Deep Orange */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black:       #1A1A1A;
  --black-dark:  #111111;
  --black-mid:   #2A2A2A;
  --orange:      #E8400C;
  --orange-dark: #C73509;
  --orange-light:#FFF0EB;
  --white:       #FFFFFF;
  --text:        #1A1A1A;
  --text-muted:  #888888;
  --grey-light:  #F5F5F5;
  --grey-mid:    #E8E8E8;
  --radius:      8px;
  --radius-lg:   12px;
  --shadow:      0 2px 12px rgba(0,0,0,0.10);
  --shadow-md:   0 4px 24px rgba(0,0,0,0.15);
}

html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--grey-light);
  line-height: 1.6;
  min-width: 320px;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

/* ── CONTAINER ── */
.container { width: 100%; margin: 0 auto; padding: 0 16px; box-sizing: border-box; }

/* ── NAVBAR ── */
.navbar {
  background: var(--white);
  border-bottom: 1px solid var(--grey-mid);
  position: sticky;
  top: 0;
  z-index: 100;
  height: 56px;
  display: flex;
  align-items: center;
  box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  overflow: hidden;
}

.logo { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.logo-pin {
  width: 26px; height: 26px;
  background: var(--orange);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.logo-pin span { transform: rotate(45deg); font-size: 11px; font-weight: 700; color: #fff; display: block; }

.logo-text { font-size: 20px; font-weight: 800; color: var(--black); letter-spacing: -0.5px; }
.logo-me   { color: var(--orange); }

.nav-locality {
  display: flex; align-items: center; gap: 4px;
  background: var(--grey-light);
  border: 1px solid var(--grey-mid);
  border-radius: 20px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 11px; font-weight: 500; color: var(--black);
  transition: background 0.2s;
  flex: 1; min-width: 0; max-width: 130px; overflow: hidden;
}
.nav-locality span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-locality:hover { background: var(--grey-mid); }
.nav-locality svg { stroke: var(--orange); flex-shrink: 0; }

.nav-actions { flex-shrink: 0; display:flex; align-items:center; gap:5px; }

.nav-btn {
  display: inline-flex; align-items: center;
  font-size: 11px; font-weight: 600;
  padding: 5px 9px; border-radius: 6px;
  white-space: nowrap; text-decoration: none;
  flex-shrink: 0; transition: opacity 0.2s;
}
.nav-btn:hover { opacity: 0.85; }
.nav-btn-dark   { color:#fff; background:#333; border:1px solid #555; font-size:14px; padding:5px 7px; }
.nav-btn-orange { color:#fff; background:#E8400C; }
.nav-btn-purple { color:#fff; background:#7C3AED; }

.btn-outline {
  border: 1.5px solid var(--orange);
  color: var(--orange);
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 11px; font-weight: 600;
  transition: all 0.2s; white-space: nowrap;
  flex-shrink: 0;
}
.btn-outline:hover { background: var(--orange); color: #fff; }

/* ── HERO ── */
.hero {
  background: var(--black);
  padding: 28px 0 24px;
}

/* Hero two-col layout on desktop */
.hero-inner {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero-eyebrow {
  font-size: 10px; font-weight: 600;
  color: var(--orange);
  text-transform: uppercase; letter-spacing: 2px;
  margin-bottom: 8px;
}

.hero-title {
  font-size: 22px; font-weight: 800;
  color: #fff; line-height: 1.2;
  letter-spacing: -0.5px; margin-bottom: 10px;
  white-space: nowrap;
}
.hero-title .highlight { color: var(--orange); }

.hero-sub {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 18px;
}

.hero-left  { flex: 1; }
.hero-right {
  flex: 1;
  display: flex; flex-direction: column;
  justify-content: center; gap: 12px;
}

/* Hero stats */
.hero-stats {
  display: flex; gap: 0;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px; overflow: hidden;
  width: 100%;
}
.hero-stat {
  flex: 1; padding: 12px 10px; text-align: center;
  border-right: 1px solid rgba(255,255,255,0.08);
}
.hero-stat:last-child { border-right: none; }
.hero-stat-num   { font-size: 18px; font-weight: 800; color: var(--orange); line-height: 1; }
.hero-stat-label { font-size: 10px; color: rgba(255,255,255,0.45); margin-top: 3px; }

/* Category quick links */
.hero-quick-cats {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.hero-quick-cat {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px; padding: 5px 12px;
  font-size: 11px; color: rgba(255,255,255,0.7);
  text-decoration: none; transition: all 0.15s;
  white-space: nowrap;
}
.hero-quick-cat:hover { background: var(--orange); border-color: var(--orange); color: #fff; }

/* ── SEARCH ── */
.search-form { margin-bottom: 0; }

.search-box {
  display: flex; align-items: center;
  background: #fff; border-radius: 8px;
  padding: 4px 4px 4px 12px;
  width: 100%; max-width: 640px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  box-sizing: border-box;
}

.search-icon { flex-shrink: 0; margin-right: 8px; width: 16px; height: 16px; }
.search-input {
  flex: 1; border: none; outline: none;
  font-size: 14px; font-family: inherit;
  color: var(--text); background: transparent; min-width: 0;
}
.search-input::placeholder { color: #BBB; }

.search-btn {
  background: var(--orange);
  color: #fff; border: none;
  border-radius: 6px;
  padding: 9px 18px;
  font-size: 13px; font-weight: 600;
  cursor: pointer; transition: background 0.2s;
  white-space: nowrap; flex-shrink: 0;
}
.search-btn:hover { background: var(--orange-dark); }

/* ── CATEGORY BAR ── */
.category-section {
  background: var(--black-mid);
  padding: 12px 0;
  border-bottom: 1px solid #333;
}

.category-pills {
  display: flex; gap: 8px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; padding-bottom: 2px;
}
.category-pills::-webkit-scrollbar { display: none; }

.pill {
  background: #333;
  border: 1px solid #444;
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 13px; font-weight: 600;
  color: #CCC;
  cursor: pointer; transition: all 0.18s;
  white-space: nowrap; flex-shrink: 0;
  display: flex; align-items: center; gap: 6px;
}
.pill:hover, .pill.active {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
}

/* ── GPS PROMPT ── */
.gps-prompt {
  display: flex; align-items: center; gap: 10px;
  background: rgba(232,64,12,0.1);
  border: 1px solid rgba(232,64,12,0.2);
  border-radius: 8px;
  padding: 10px 14px;
  margin-top: 12px;
  cursor: pointer;
  font-size: 12px; color: #fff;
}
.gps-prompt:hover { background: rgba(232,64,12,0.18); }

/* ── SORT BAR ── */
.sort-bar {
  display: flex; align-items: center; gap: 6px;
  flex-wrap: wrap; margin-bottom: 14px;
  padding: 8px 12px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid var(--grey-mid);
}
.sort-label { font-size: 11px; font-weight: 600; color: var(--text-muted); white-space: nowrap; }
.sort-pill {
  padding: 4px 12px; border-radius: 6px;
  font-size: 11px; font-weight: 600;
  color: var(--text-muted);
  border: 1.5px solid var(--grey-mid);
  background: #fff; transition: all 0.18s;
  white-space: nowrap; text-decoration: none;
}
.sort-pill:hover, .sort-pill.active { background: var(--black); color: #fff; border-color: var(--black); }

/* ── SECTIONS ── */
.section { padding: 20px 0; }
.section-alt { background: #fff; }

.section-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px; flex-wrap: wrap;
}

.section-title { font-size: 16px; font-weight: 700; color: var(--black); }
.section-title.text-center { text-align: center; margin-bottom: 24px; }

.section-badge {
  background: var(--orange-light);
  color: var(--orange);
  border-radius: 6px; padding: 3px 10px;
  font-size: 11px; font-weight: 600;
}

.orange { color: var(--orange); }

/* ── PRODUCT GRID ── */
.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }

.product-card {
  background: #fff;
  border: 1px solid var(--grey-mid);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
  display: flex; flex-direction: column;
  aspect-ratio: 1;
}
.product-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.product-img-wrap {
  position: relative;
  background: var(--grey-light);
  flex: 1; min-height: 0;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  min-height: 120px;
}
.product-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0; left: 0;
  transition: transform 0.3s;
}
.product-card:hover .product-img-wrap img { transform: scale(1.05); }

.badge-discount {
  position: absolute; top: 8px; left: 8px;
  background: var(--orange); color: #fff;
  font-size: 9px; font-weight: 700;
  padding: 2px 7px; border-radius: 4px;
}

.product-info { padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.product-brand { font-size: 9px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.product-name { font-size: 12px; font-weight: 700; color: var(--black); line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-unit { font-size: 10px; color: var(--text-muted); }
.product-pricing { display: flex; align-items: baseline; gap: 4px; flex-wrap: wrap; margin-top: 2px; }
.price-best { font-size: 14px; font-weight: 800; color: var(--orange); }
.price-mrp  { font-size: 10px; color: var(--text-muted); text-decoration: line-through; }
.vendor-count { font-size: 10px; color: var(--text-muted); }

/* ── HOW IT WORKS ── */
.steps-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }

.step {
  background: #fff; border-radius: var(--radius-lg);
  padding: 16px; border: 1px solid var(--grey-mid);
  display: flex; align-items: flex-start; gap: 14px;
}
.step-icon { font-size: 26px; flex-shrink: 0; line-height: 1; }
.step h3 { font-size: 14px; font-weight: 700; margin-bottom: 4px; color: var(--black); }
.step p  { font-size: 12px; color: var(--text-muted); line-height: 1.5; }

/* ── VENDOR CTA ── */
.section-vendor-cta { background: var(--black); }
.section-vendor-cta h2 { font-size: 20px; font-weight: 700; color: #fff; margin-bottom: 8px; }
.section-vendor-cta p  { font-size: 13px; color: rgba(255,255,255,0.5); margin-bottom: 18px; }
.text-center { text-align: center; }

/* ── BUTTONS ── */
.btn-primary {
  background: var(--orange); color: #fff; border: none;
  border-radius: 6px; padding: 11px 22px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background 0.2s; display: inline-block;
  -webkit-tap-highlight-color: transparent; text-decoration: none; font-family: inherit;
}
.btn-primary:hover { background: var(--orange-dark); color: #fff; }
.btn-lg   { padding: 13px 28px; font-size: 15px; }
.btn-full { width: 100%; text-align: center; }

/* ── DISTANCE + WHATSAPP ── */
.distance-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: #E8F5E9; color: #2E7D32;
  font-size: 11px; font-weight: 600;
  padding: 3px 9px; border-radius: 20px;
}
.btn-whatsapp {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 5px; padding: 7px 12px; border-radius: 6px;
  font-size: 12px; font-weight: 600;
  background: #25D366; color: #fff;
  transition: background 0.18s; text-decoration: none; flex: 1;
}
.btn-whatsapp:hover { background: #20BA5A; color: #fff; }

/* ── EMPTY STATE ── */
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-muted); }
.empty-icon  { font-size: 40px; margin-bottom: 12px; }
.empty-state h3 { font-size: 16px; font-weight: 600; margin-bottom: 6px; color: var(--black); }
.empty-state p  { font-size: 13px; }
.empty-state a  { color: var(--orange); font-weight: 500; }

/* ── FOOTER ── */
.footer { background: var(--black-dark); color: #aaa; padding: 28px 0 20px; }
.footer-inner { display: flex; flex-direction: column; gap: 16px; align-items: center; text-align: center; }
.footer-brand .logo-text { color: #ccc; font-size: 18px; }
.footer-brand p { font-size: 12px; color: #555; margin-top: 4px; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; }
.footer-links a { font-size: 12px; color: #666; transition: color 0.2s; }
.footer-links a:hover { color: var(--orange); }
.footer-copy { font-size: 11px; color: #444; }

/* ── MODAL ── */
.modal-overlay {
  display: none !important; position: fixed; inset: 0;
  background: rgba(0,0,0,0.65); z-index: 9999;
  align-items: flex-end; justify-content: center;
}
.modal-overlay.open { display: flex !important; }

.modal {
  background: #fff; border-radius: 16px 16px 0 0;
  width: 100%; max-width: 480px;
  max-height: 85vh; overflow-y: auto;
  padding-bottom: env(safe-area-inset-bottom);
  box-sizing: border-box;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--grey-mid);
  position: sticky; top: 0; background: #fff; z-index: 1;
}
.modal-header::before { content: ''; position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 32px; height: 4px; background: var(--grey-mid); border-radius: 2px; }
.modal-header h3 { font-size: 15px; font-weight: 700; color: var(--black); }
.modal-close { background: var(--grey-light); border: none; font-size: 15px; cursor: pointer; color: var(--text-muted); width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.modal-body { padding: 16px 18px 20px; }

.form-group { margin-bottom: 12px; }
.form-group label { display: block; font-size: 12px; font-weight: 600; color: var(--black); margin-bottom: 5px; }
.form-group select, .form-group input[type="text"], .form-group input[type="tel"], .form-group input[type="number"] {
  width: 100%; padding: 11px 13px;
  border: 1.5px solid var(--grey-mid); border-radius: 8px;
  font-size: 14px; font-family: inherit; color: var(--text);
  background: #fff; outline: none; -webkit-appearance: none; box-sizing: border-box;
}
.form-group select:focus, .form-group input:focus { border-color: var(--orange); }

/* ── TABLET 600px+ ── */
@media (min-width: 600px) {
  .container { padding: 0 20px; }
  .hero { padding: 32px 0 28px; }
  .hero-title { font-size: 30px; }
  .section { padding: 32px 0; }
  .section-title { font-size: 18px; }
  .product-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .steps-grid { grid-template-columns: repeat(3, 1fr); }
  .step { flex-direction: column; }
  .modal { border-radius: 16px 16px 0 0; }
}

/* ── DESKTOP 1024px+ ── */
@media (min-width: 1024px) {
  .container { max-width: 100%; padding: 0 32px; }
  .navbar { height: 60px; }
  .logo-text { font-size: 22px; }
  .hero { padding: 40px 0 36px; }
  .hero-title { font-size: 42px; letter-spacing: -1px; }
  /* Hero two column on desktop */
  .hero .container > div:first-child {
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 40px !important;
  }
  .hero .container > div:first-child > div:first-child { flex: 1; }
  .hero .container > div:first-child > div:last-child  { flex: 1; }
  .section { padding: 44px 0; }
  .section-title { font-size: 20px; }
  .product-grid { grid-template-columns: repeat(5, 1fr); gap: 14px; }
  .modal { border-radius: 16px; max-width: 420px; margin: auto; align-self: center; }
  .modal-overlay { align-items: center; }
  .modal-header::before { display: none; }
}

@media (min-width: 1400px) {
  .container { padding: 0 48px; }
  .product-grid { grid-template-columns: repeat(6, 1fr); }
}

@media (hover: none) {
  .product-card:hover { transform: none; box-shadow: none; }
}

@supports (padding: env(safe-area-inset-bottom)) {
  .footer { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
}
