/**
 * JioMart web storefront — inspired by luci reference layout.
 */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700;900&display=swap');

:root {
  --jio-red: #e4252a;
  --jio-blue: #0078ad;
  --jio-blue-dark: #005a82;
  --jio-blue-soft: #e8f4fa;
  --jio-green: #00a651;
  --jio-yellow: #f7a600;
  --bg-gray: #f5f5f5;
  --text-dark: #212121;
  --text-light: #757575;
  --white: #ffffff;
  --green: var(--jio-blue);
  --red: var(--jio-red);
  --yellow: var(--jio-yellow);
  --safe-bottom: env(safe-area-inset-bottom, 16px);
  --safe-top: env(safe-area-inset-top, 0px);
}

/* —— Store shell (all pages) —— */
.jio-store body,
body.jio-store {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg-gray) !important;
  padding-bottom: calc(88px + var(--safe-bottom));
}

.jio-header {
  background: var(--white);
  padding: calc(8px + var(--safe-top)) 12px 10px;
  box-shadow: 0 1px 0 #e8ecea;
  position: sticky;
  top: 0;
  z-index: 100;
}
.jio-header-top {
  display: flex;
  align-items: center;
  gap: 10px;
}
.jio-back {
  color: var(--text-dark);
  font-size: 1.1rem;
  padding: 8px;
  text-decoration: none;
}
.jio-logo-link { flex: 1; min-width: 0; }
.jio-header-icons {
  display: flex;
  align-items: center;
  gap: 4px;
}
.jio-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dark);
  text-decoration: none;
  position: relative;
  font-size: 1.05rem;
}
.jio-cart-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background: var(--jio-red);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  border-radius: 50%;
  min-width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}
.jio-search-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}
.jio-location {
  font-size: 11px;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 6px;
}
.jio-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f0f2f5;
  border-radius: 12px;
  padding: 10px 12px;
}
.jio-search i { color: var(--text-light); }
.jio-search input {
  border: none;
  background: transparent;
  flex: 1;
  font-size: 14px;
  outline: none;
  font-family: inherit;
}

.jio-subnav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 12px;
  background: var(--white);
  border-bottom: 1px solid #eee;
  scrollbar-width: none;
}
.jio-subnav::-webkit-scrollbar { display: none; }
.jio-pill {
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: 20px;
  background: #f0f2f5;
  color: var(--text-dark);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.jio-pill--blue {
  background: var(--jio-blue);
  color: #fff;
}
.jio-pill--blue i { margin-right: 4px; }

.jio-page { padding: 12px; }
.jio-card {
  background: var(--white);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.jio-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f0f0f0;
}
.btn-jio-primary {
  background: var(--jio-blue);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.btn-jio-primary:hover { filter: brightness(1.05); }
.btn-jio-outline {
  background: var(--white);
  color: var(--jio-blue);
  border: 1.5px solid var(--jio-blue);
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.jio-savings { color: var(--jio-blue) !important; font-weight: 700; }
.jio-free { color: var(--jio-green); font-weight: 700; }

.jio-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  background: var(--white);
  padding: 12px 16px calc(12px + var(--safe-bottom));
  box-shadow: 0 -4px 16px rgba(0,0,0,0.1);
  z-index: 90;
}
.jio-bottom-bar .btn-jio-primary {
  width: 100%;
  padding: 14px 16px;
  font-size: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Cart line items */
.jio-cart-item {
  display: flex;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid #f5f5f5;
}
.jio-cart-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.jio-cart-item img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border: 1px solid #eee;
  border-radius: 8px;
  background: #fff;
}
.jio-cart-item .name { font-size: 12px; font-weight: 600; line-height: 1.4; margin-bottom: 4px; }
.jio-cart-item .price { font-size: 15px; font-weight: 800; }
.jio-qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  margin-top: 8px;
}
.jio-qty button {
  border: none;
  background: #f5f5f5;
  width: 30px;
  height: 30px;
  font-weight: 700;
  cursor: pointer;
}
.jio-qty span { width: 32px; text-align: center; font-size: 13px; font-weight: 700; }
.bill-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #555;
  margin-bottom: 8px;
}
.bill-row.total {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-dark);
  border-top: 1px dashed #ddd;
  padding-top: 10px;
  margin-top: 8px;
}

.jio-empty {
  text-align: center;
  padding: 48px 20px;
  background: var(--white);
  border-radius: 12px;
}
.jio-empty i { color: #ddd; margin-bottom: 16px; }

/* Footer */
.jio-footer {
  background: var(--white);
  margin-top: 16px;
  padding: 24px 16px calc(100px + var(--safe-bottom));
  border-top: 1px solid #e8ecea;
}
.jio-footer-brand { margin-bottom: 20px; }
.jio-footer-brand p {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 10px;
  line-height: 1.5;
}
.jio-footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
  text-align: left;
}
.jio-footer-cols h4 {
  font-size: 11px;
  font-weight: 800;
  color: var(--jio-red);
  margin-bottom: 8px;
  text-transform: uppercase;
}
.jio-footer-cols a {
  display: block;
  font-size: 11px;
  color: var(--text-dark);
  text-decoration: none;
  margin-bottom: 6px;
}
.jio-footer-cols a:hover { color: var(--jio-blue); }
.jio-footer-payments {
  font-size: 10px;
  color: var(--text-light);
  margin-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  justify-content: center;
}
.pay-chip {
  background: var(--jio-blue-soft);
  color: var(--jio-blue);
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 9px;
}
.jio-footer-copy {
  text-align: center;
  font-size: 10px;
  color: #9e9e9e;
  line-height: 1.5;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Roboto', sans-serif;
  background: var(--bg-gray) !important;
  color: var(--text-dark);
  -webkit-tap-highlight-color: transparent;
}

.site-header-logo {
  display: block;
  height: 34px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  object-position: left center;
}

.jio-logo-text {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--jio-blue);
  letter-spacing: -0.02em;
  line-height: 1;
}
.jio-logo-text span { color: var(--jio-green); }

.promo-bar {
  background: linear-gradient(90deg, var(--jio-red), #c41e22);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.promo-bar .promo-close {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  opacity: 0.9;
  padding: 0 4px;
}

.deliver-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  font-size: 12px;
  color: var(--text-light);
}
.deliver-row strong { color: var(--text-dark); font-weight: 700; }
.deliver-pin {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}
.deliver-pin input {
  flex: 1;
  min-width: 0;
  border: 1px solid #dde3ea;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
}
.deliver-pin button {
  background: var(--jio-blue);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
}

button, .buy-btn, .btn-checkout, .nav-btn {
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
button:active, .buy-btn:active { transform: scale(0.98); }
a { color: var(--jio-blue); }

.trust-strip {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  padding: 12px;
  background: var(--white);
  border-bottom: 1px solid #e8ecea;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-light);
}
.trust-strip .trust-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  line-height: 1.25;
}
.trust-strip .trust-item i { color: var(--jio-blue); font-size: 18px; }
.trust-strip .trust-item strong {
  display: block;
  color: var(--text-dark);
  font-size: 10px;
}

.cat-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 12px;
  background: var(--white);
  scrollbar-width: none;
}
.cat-scroll::-webkit-scrollbar { display: none; }
.cat-chip {
  flex-shrink: 0;
  padding: 8px 12px;
  border-radius: 20px;
  background: var(--bg-gray);
  border: 1px solid #e0e0e0;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dark);
  text-decoration: none;
  white-space: nowrap;
}
.cat-chip.active, .cat-chip:hover {
  background: var(--jio-blue-soft);
  border-color: var(--jio-blue);
  color: var(--jio-blue);
}

.hero-carousel {
  position: relative;
  overflow: hidden;
  background: #e8f4fa;
}
.hero-slide {
  display: none;
  padding: 20px 16px 24px;
  min-height: 140px;
  background: linear-gradient(135deg, var(--jio-blue) 0%, var(--jio-red) 100%);
  color: #fff;
}
.hero-slide.active { display: block; }
.hero-slide h2 { font-size: 1.25rem; font-weight: 900; margin-bottom: 6px; }
.hero-slide p { font-size: 12px; opacity: 0.92; margin-bottom: 12px; }
.hero-slide .hero-cta {
  display: inline-block;
  background: #fff;
  color: var(--jio-blue);
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 12px;
  text-decoration: none;
}
.hero-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 8px;
  background: var(--white);
}
.hero-dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: #ccc;
  padding: 0;
  cursor: pointer;
}
.hero-dots button.active { background: var(--jio-blue); }

.perks-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 12px;
  background: var(--white);
}
.perk-card {
  text-align: center;
  padding: 10px 6px;
  border-radius: 10px;
  background: var(--jio-blue-soft);
  font-size: 10px;
  font-weight: 600;
  color: var(--text-dark);
}
.perk-card .perk-icon { font-size: 1.4rem; display: block; margin-bottom: 4px; }

.section-heading-block { padding: 12px 14px 4px; }
.section-heading-block .section-kicker {
  font-size: 11px;
  font-weight: 600;
  color: var(--jio-blue);
  text-transform: uppercase;
}
.section-heading-block .section-title-lg {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-dark);
}

.promo-card {
  margin: 12px;
  padding: 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ff6f00, #ff9800);
  color: #fff;
}
.promo-card h3 { font-size: 1rem; font-weight: 800; margin-bottom: 4px; }
.promo-card p { font-size: 12px; opacity: 0.95; }

.site-footer {
  margin-top: 8px;
  padding: 22px 16px calc(28px + env(safe-area-inset-bottom, 16px));
  background: var(--white);
  border-top: 1px solid #e8ecea;
  text-align: center;
}
.site-footer .footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 20px;
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 600;
}
.site-footer .footer-links a { color: var(--text-dark); text-decoration: none; }
.site-footer .footer-note { font-size: 11px; color: var(--text-light); line-height: 1.55; }
.site-footer .footer-copy { font-size: 10px; color: #9e9e9e; }

.pin-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0,0,0,0.45);
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
}
.pin-modal.open { display: flex; }
.pin-modal .sheet {
  background: var(--white);
  border-radius: 16px 16px 0 0;
  padding: 20px;
  width: 100%;
  max-width: 430px;
  max-height: 85vh;
  overflow-y: auto;
}
.pin-modal h3 { font-size: 1rem; margin-bottom: 8px; }
.pin-modal input {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 10px;
  font-size: 16px;
  margin: 10px 0;
}
.pin-modal .btn-row { display: flex; gap: 8px; margin-top: 12px; }
.pin-modal .btn-row button {
  flex: 1;
  padding: 12px;
  border-radius: 10px;
  font-weight: 700;
  border: none;
  cursor: pointer;
}
.pin-modal .btn-primary { background: var(--jio-blue); color: #fff; }
.pin-modal .btn-ghost { background: #f0f0f0; color: var(--text-dark); }
