/* ==========================================================
   MonjoMart - style.css
   Matches the provided MonjoMart UI mockups
   (white desktop header + app-like mobile experience)
   ========================================================== */

:root {
  --blue: #2F6BF0;
  --blue-dark: #1E50C8;
  --strip: #1F3BB3;
  --strip-dark: #182FA0;
  --yellow: #FFC400;
  --yellow-dark: #F0B400;
  --green: #388E3C;
  --red: #E53935;
  --ink: #212121;
  --muted: #757575;
  --line: #E8E8E8;
  --bg: #F1F3F6;
  --card: #FFFFFF;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(16, 24, 40, .08);
  --shadow-lg: 0 8px 24px rgba(16, 24, 40, .14);
  --bottomnav-h: 60px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Poppins', 'Segoe UI', Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
  min-height: 100dvh;
}

img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }

.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 16px; }

/* Visibility helpers */
.mobile-only { display: none !important; }
.m-location, .header-link.m-hicon, .brand-tagline { display: none; }

@media (max-width: 860px) {
  .mobile-only { display: block !important; }
  .no-mobile { display: none !important; }
  nav.bottom-nav.mobile-only { display: flex !important; }
  button.icon-btn.mobile-only { display: inline-flex !important; }
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 10px 22px;
  border: 0; border-radius: 8px; cursor: pointer;
  font-family: inherit; font-size: 14.5px; font-weight: 600;
  transition: transform .12s ease, background .2s ease, box-shadow .2s ease;
}
.btn:active { transform: scale(.97); }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(47, 107, 240, .45); outline-offset: 2px;
}
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--blue-dark); }
.btn-yellow { background: var(--yellow); color: #212121; }
.btn-yellow:hover { background: var(--yellow-dark); }
.btn-dark { background: #212121; color: #fff; }
.btn-dark:hover { background: #000; }
.btn-outline { background: #fff; color: var(--blue); border: 1.5px solid var(--blue); }
.btn-outline:hover { background: #EEF3FF; }
.btn-block { width: 100%; }
.btn-sm { min-height: 38px; padding: 7px 14px; font-size: 13.5px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 0; background: transparent;
  color: inherit; cursor: pointer; border-radius: 8px;
}

/* ============ Top strip ============ */
.top-strip { background: var(--strip); color: #DCE4FF; font-size: 12.5px; padding: 6px 0; }
.top-strip-in { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.top-strip-in .ts-left { display: inline-flex; align-items: center; gap: 7px; color: #FFD95E; font-weight: 500; }
.top-links { display: flex; align-items: center; }
.top-links a { color: #E4EAFF; padding: 3px 14px; display: inline-flex; align-items: center; gap: 6px; }
.top-links a + a { border-left: 1px solid rgba(255, 255, 255, .22); }
.top-links a:hover { color: var(--yellow); }

/* ============ Header (desktop: white / mobile: blue app bar) ============ */
.site-header {
  background: #fff; color: var(--ink);
  position: sticky; top: 0; z-index: 60; box-shadow: 0 1px 4px rgba(16, 24, 40, .10);
}
.header-in { display: flex; align-items: center; gap: 20px; padding-top: 10px; padding-bottom: 10px; }

.brand { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.brand-badge {
  width: 38px; height: 38px; border-radius: 10px; background: var(--blue);
  display: inline-flex; align-items: center; justify-content: center;
}
.brand-name { font-size: 22px; font-weight: 800; letter-spacing: .2px; color: var(--blue); }
.brand-name span { color: var(--yellow); font-weight: 700; }
.brand-name.small { font-size: 18px; }

.search-bar {
  flex: 1; display: flex; align-items: center; gap: 8px;
  background: #F1F3F6; border-radius: 9px; padding: 5px 5px 5px 14px;
  max-width: 560px;
}
.search-bar input {
  flex: 1; border: 0; outline: 0; background: transparent;
  font-family: inherit; font-size: 14px; color: var(--ink); min-width: 0;
}
.search-bar input::placeholder { color: #9AA1AC; }
.search-bar button {
  border: 0; background: var(--blue); color: #fff;
  width: 38px; height: 38px; border-radius: 50%; cursor: pointer; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.search-bar button:hover { background: var(--blue-dark); }

.header-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.header-link {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--ink); padding: 7px 10px; border-radius: 8px;
  font-weight: 500; font-size: 14.5px; border: 0; background: transparent;
  cursor: pointer; font-family: inherit; min-height: 44px;
}
.header-link:hover { background: #F1F3F6; }
.header-link .stack { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.25; }
.header-link .stack b { font-size: 14px; font-weight: 600; }
.header-link .stack small { font-size: 11.5px; color: var(--muted); font-weight: 400; }

.badge-wrap { position: relative; display: inline-flex; }
.badge {
  position: absolute; top: -6px; right: -9px;
  background: var(--red); color: #fff;
  font-size: 10px; font-weight: 700; line-height: 1;
  min-width: 17px; height: 16px; padding: 2px 4px;
  border-radius: 9px; display: inline-flex; align-items: center; justify-content: center;
}

.account-menu { position: relative; }
.account-dropdown {
  position: absolute; right: 0; top: calc(100% + 6px);
  background: #fff; border-radius: 10px; box-shadow: var(--shadow-lg);
  min-width: 200px; padding: 8px; display: none; z-index: 80;
  border: 1px solid var(--line);
}
.account-dropdown.open { display: block; }
.account-dropdown a { display: block; padding: 10px 12px; color: var(--ink); border-radius: 7px; font-size: 14px; }
.account-dropdown a:hover { background: #F0F4FF; color: var(--blue); }

/* Category nav (desktop) */
.cat-nav { background: #fff; border-bottom: 1px solid var(--line); }
.cat-nav-in { display: flex; gap: 4px; overflow-x: auto; }
.cat-link {
  color: var(--ink); font-size: 14px; font-weight: 500;
  padding: 12px 14px; white-space: nowrap; border-bottom: 3px solid transparent;
}
.cat-link:hover { color: var(--blue); border-bottom-color: var(--blue); }

/* Mobile search row */
.mobile-search-row { padding-bottom: 10px; }
.mobile-search-row .search-bar { max-width: none; background: #fff; }
.home-category-nav { display: none; }

/* ============ Drawer (mobile) ============ */
.drawer-backdrop {
  position: fixed; inset: 0; background: rgba(9, 18, 48, .5);
  opacity: 0; pointer-events: none; transition: opacity .25s ease; z-index: 90;
}
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; left: 0; bottom: 0; width: 290px; max-width: 84vw;
  background: #fff; z-index: 95; transform: translateX(-102%);
  transition: transform .28s ease; display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg);
}
.drawer.open { transform: translateX(0); }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-bottom: 1px solid var(--line);
}
.drawer-links { overflow-y: auto; padding: 8px; }
.drawer-links a { display: block; padding: 13px 12px; color: var(--ink); font-size: 15px; font-weight: 500; border-radius: 8px; }
.drawer-links a:hover { background: #F0F4FF; color: var(--blue); }

/* ============ Flash ============ */
.flash-wrap { padding-top: 12px; }
.alert {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 14px; border-radius: 8px; margin-bottom: 10px;
  font-size: 14px; font-weight: 500; box-shadow: var(--shadow);
}
.alert-success { background: #E8F5E9; color: #1B5E20; border: 1px solid #C8E6C9; }
.alert-error { background: #FDECEA; color: #B71C1C; border: 1px solid #F5C6C0; }
.alert-close { border: 0; background: none; font-size: 20px; cursor: pointer; color: inherit; line-height: 1; padding: 4px 8px; }

/* ============ Page ============ */
.page { padding-bottom: 30px; min-height: 50vh; }

/* ============ HOME: sidebar + banner + promos ============ */
.home-grid {
  display: grid; grid-template-columns: 236px 1fr 252px; gap: 12px;
  margin-top: 14px; align-items: stretch;
}

.side-cats { background: #fff; border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.side-cats h3 {
  display: flex; align-items: center; gap: 9px;
  font-size: 15px; font-weight: 700; padding: 13px 14px;
  border-bottom: 1px solid var(--line);
}
.side-cats a {
  display: flex; align-items: center; gap: 11px;
  padding: 12px 14px; color: var(--ink); font-size: 13.8px; font-weight: 500;
  border-bottom: 1px solid #F2F2F2;
}
.side-cats a:last-child { border-bottom: 0; }
.side-cats a:hover { background: #F6F9FF; color: var(--blue); }
.side-cats a svg:first-child { color: #607D8B; flex-shrink: 0; }
.side-cats a .chev { margin-left: auto; color: #B0B7C3; }

.hero-banner {
  position: relative; border-radius: 12px; overflow: hidden;
  background: linear-gradient(105deg, #1E50C8 0%, #2F6BF0 60%, #5B8CFF 100%);
  display: grid; grid-template-columns: 1.05fr .95fr; align-items: stretch;
  min-height: 330px;
}
.hero-copy { padding: 34px 28px; color: #fff; align-self: center; }
.hero-pill {
  display: inline-block; background: var(--yellow); color: #212121;
  font-size: 12px; font-weight: 700; padding: 5px 13px; border-radius: 999px;
  letter-spacing: .3px; margin-bottom: 15px;
}
.hero-copy h1 { font-size: clamp(28px, 3.4vw, 42px); line-height: 1.12; font-weight: 800; }
.hero-copy h1 em { color: var(--yellow); font-style: normal; }
.hero-copy .hero-off { margin: 12px 0 20px; font-size: 21px; font-weight: 600; color: #fff; }
.hero-copy .hero-off em { color: var(--yellow); font-style: normal; font-size: 30px; font-weight: 800; }
.hero-media { position: relative; }
.hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.promo-minis { display: flex; flex-direction: column; gap: 12px; }
.promo-mini {
  flex: 1; position: relative; border-radius: 12px; overflow: hidden;
  padding: 18px 16px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; justify-content: center;
  color: var(--ink);
}
.promo-mini.blue { background: #E3EDFF; }
.promo-mini.pink { background: #FDE7F0; }
.promo-mini h4 { font-size: 16px; font-weight: 700; max-width: 62%; }
.promo-mini p { font-size: 13px; color: #455A64; margin: 4px 0 8px; font-weight: 500; }
.promo-mini .pm-link { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.promo-mini .pm-link:hover { color: var(--blue); }
.promo-mini img {
  position: absolute; right: 0; bottom: 0; top: 0; width: 40%;
  height: 100%; object-fit: cover; object-position: center;
}

/* ============ Chips row ============ */
.chips-card { background: #fff; border-radius: 12px; box-shadow: var(--shadow); margin-top: 12px; padding: 14px 10px; }
.chips-row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.chip { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 8px 4px; border-radius: 10px; }
.chip:hover { background: #F6F9FF; }
.chip .chip-icon {
  width: 50px; height: 50px; border-radius: 13px;
  display: inline-flex; align-items: center; justify-content: center; color: #fff;
}
.chip .chip-name { font-size: 12.8px; font-weight: 600; color: var(--ink); text-align: center; line-height: 1.3; }
.chip:hover .chip-name { color: var(--blue); }
.ci-yellow { background: #FFB300; }
.ci-purple { background: #7B61FF; }
.ci-blue { background: #2F6BF0; }
.ci-orange { background: #FF7043; }
.ci-green { background: #43A047; }
.ci-pink { background: #EC407A; }
.ci-dark { background: #37474F; }

/* ============ Section cards ============ */
.section { margin-top: 12px; }
.section-card { background: var(--card); border-radius: 12px; box-shadow: var(--shadow); padding: 16px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.section-head h2 { font-size: 19px; font-weight: 700; }
.section-head h2::before {
  content: ''; display: inline-block; width: 5px; height: 19px;
  background: var(--blue); border-radius: 3px; margin-right: 9px; vertical-align: -3px;
}
.view-all { font-size: 14px; font-weight: 600; padding: 8px 12px; border-radius: 7px; }
.view-all:hover { background: #EEF3FF; }

/* Best sellers layout with yellow promo */
.bs-layout { display: grid; grid-template-columns: 1fr 236px; gap: 14px; align-items: stretch; }
.promo-yellow {
  background: var(--yellow); border-radius: 12px; padding: 18px 16px;
  display: flex; flex-direction: column; overflow: hidden; position: relative;
}
.promo-yellow h3 { font-size: 20px; font-weight: 800; line-height: 1.2; color: #212121; }
.promo-yellow .py-sub { font-size: 13px; font-weight: 600; color: #5D4A00; margin: 4px 0 10px; }
.promo-yellow .py-brands { font-size: 12.5px; font-weight: 700; color: #212121; letter-spacing: .3px; margin-bottom: 10px; }
.promo-yellow img { margin: auto -4px 12px; border-radius: 9px; aspect-ratio: 4/3; object-fit: cover; }
.promo-yellow .btn { align-self: flex-start; }

/* ============ Product grid & cards ============ */
.product-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); }
.product-card {
  background: #fff; border: 1px solid #EEEEEE; border-radius: 10px;
  padding: 11px; position: relative; display: flex; flex-direction: column;
  transition: box-shadow .2s ease, transform .15s ease;
}
.product-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.product-card .pc-img { display: block; aspect-ratio: 1 / 1; border-radius: 8px; overflow: hidden; background: #F8F9FB; }
.product-card .pc-img img { width: 100%; height: 100%; object-fit: cover; }
.pc-name {
  margin-top: 10px; font-size: 13.8px; font-weight: 500; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 42px;
}
.pc-name:hover { color: var(--blue); }
.pc-rating { display: flex; align-items: center; gap: 7px; margin-top: 5px; font-size: 12px; color: var(--muted); }
.rating-badge {
  background: var(--green); color: #fff; font-size: 11.5px; font-weight: 700;
  padding: 2px 7px; border-radius: 5px; display: inline-flex; align-items: center; gap: 3px;
}
.pc-price { margin-top: 6px; display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; }
.pc-price .price { font-size: 16.5px; font-weight: 700; }
.pc-price .mrp { font-size: 12.8px; color: var(--muted); text-decoration: line-through; }
.pc-price .off { font-size: 12.5px; color: var(--green); font-weight: 700; }
.pc-actions { margin-top: 10px; display: flex; gap: 8px; }
.pc-actions form { flex: 1; }
.pc-actions .btn { width: 100%; border-radius: 8px; }
.wish-btn {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid #EBEBEB;
  background: #fff; color: #9AA1AC; cursor: pointer; box-shadow: var(--shadow);
  display: inline-flex; align-items: center; justify-content: center;
  transition: color .15s ease, transform .15s ease;
}
.wish-btn:hover { color: var(--red); transform: scale(1.08); }
.wish-btn.active { color: var(--red); }
.wish-btn.active svg path { fill: var(--red); }

/* ============ Countdown ============ */
.countdown { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; color: var(--red); font-size: 13.5px; }
.countdown .cd-box {
  background: #FFEBEE; color: var(--red); border-radius: 6px;
  padding: 4px 9px; min-width: 36px; text-align: center; font-weight: 700; font-size: 14px;
}

/* ============ MOBILE HOME (app-like) ============ */

/* Hero banner */
.m-hero {
  margin: 12px 16px 0; position: relative; overflow: hidden;
  background: #FFC400;
  border-radius: 18px; min-height: 172px;
}
.m-hero-copy { position: relative; z-index: 2; padding: 20px 16px 34px; max-width: 62%; }
.m-hero-copy h3 { font-size: 21px; font-weight: 800; color: #1F2A5A; line-height: 1.22; }
.m-hero-copy h3 em { font-style: normal; color: #2F6BF0; }
.m-hero-off {
  display: inline-block; background: #16215C; color: #fff;
  font-size: 13px; font-weight: 700; padding: 6px 14px; border-radius: 999px; margin: 11px 0;
}
.m-hero-off b { color: var(--yellow); font-size: 17px; font-weight: 800; }
.m-hero-btn {
  display: inline-flex; align-items: center; gap: 7px; background: #fff; color: #212121;
  font-size: 13px; font-weight: 700; padding: 9px 17px; border-radius: 999px; box-shadow: var(--shadow);
}
.m-hero-btn:active { transform: scale(.97); }
.m-hero-media { position: absolute; right: 0; top: 0; bottom: 0; width: 46%; }
.m-hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 80% center; }
.m-hero-media::before {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, #FFC400 0%, #FFC400 12%, rgba(255, 196, 0, 0) 58%);
}
.m-hero-dots { position: absolute; left: 18px; bottom: 13px; z-index: 2; display: flex; gap: 5px; }
.m-hero-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .6); }
.m-hero-dots i.on { width: 17px; border-radius: 4px; background: #fff; }

/* Top deals */
.m-deals { margin: 18px 0 0; }
.m-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 16px; margin-bottom: 10px; }
.m-sec-head h2 { font-size: 19px; font-weight: 800; display: flex; align-items: center; gap: 6px; }
.m-view-all { font-size: 13px; font-weight: 700; color: var(--blue); display: inline-flex; align-items: center; gap: 4px; padding: 6px 2px; }
.m-deals-row {
  display: flex; gap: 10px; overflow-x: auto; padding: 2px 16px 10px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.m-deals-row::-webkit-scrollbar { display: none; }
.m-deal-card {
  min-width: 152px; width: 152px; flex-shrink: 0; position: relative;
  background: #fff; border-radius: 14px; box-shadow: var(--shadow); padding: 10px;
}
.md-badge {
  position: absolute; top: 16px; right: 16px; z-index: 2;
  background: var(--red); color: #fff; font-size: 10px; font-weight: 700;
  padding: 3px 8px; border-radius: 999px;
}
.m-deal-card .md-img { display: block; aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden; background: #F8F9FB; }
.m-deal-card .md-img img { width: 100%; height: 100%; object-fit: cover; }
.m-deal-card .md-name {
  margin-top: 8px; font-size: 13px; font-weight: 600; color: #212121; display: block;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.m-deal-card .md-price { margin-top: 3px; display: flex; align-items: baseline; gap: 6px; }
.m-deal-card .md-price .price { font-size: 15.5px; font-weight: 800; }
.m-deal-card .md-price .mrp { font-size: 11.5px; color: #9AA1AC; text-decoration: line-through; }
.md-cart-btn {
  width: 100%; margin-top: 9px; border: 0; cursor: pointer; font-family: inherit;
  background: var(--yellow); color: #212121; font-size: 12.5px; font-weight: 700;
  padding: 9px 8px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.md-cart-btn:active { transform: scale(.97); background: var(--yellow-dark); }

/* Fashion banner */
.m-fashion {
  margin: 14px 16px 0; display: flex; align-items: stretch; position: relative;
  border-radius: 18px; overflow: hidden; min-height: 108px;
  background: linear-gradient(100deg, #2F6BF0 0%, #2F6BF0 55%, #FFC400 55.2%, #FFD954 100%);
}
.mf-copy { position: relative; z-index: 2; padding: 20px 16px; display: flex; flex-direction: column; justify-content: center; }
.mf-title { color: #fff; font-size: 19px; font-weight: 800; }
.mf-sub { color: var(--yellow); font-size: 13.5px; font-weight: 700; margin-top: 6px; display: inline-flex; align-items: center; gap: 7px; }
.mf-arrow {
  width: 22px; height: 22px; border-radius: 50%; background: #fff; color: #212121;
  display: inline-flex; align-items: center; justify-content: center; font-style: normal;
}
.m-fashion img {
  position: absolute; right: 0; top: 0; bottom: 0; width: 44%; height: 100%; object-fit: cover;
}
.m-fashion::after {
  content: ''; position: absolute; right: 0; top: 0; bottom: 0; width: 44%;
  background: linear-gradient(90deg, #FFC400 0%, rgba(255, 196, 0, 0) 45%); z-index: 1;
}

/* ============ Listing page ============ */
.listing-layout { display: grid; grid-template-columns: 230px 1fr; gap: 14px; margin-top: 14px; align-items: start; }
.filter-card { background: #fff; border-radius: 12px; box-shadow: var(--shadow); padding: 16px; }
.filter-card h3 { font-size: 15px; margin-bottom: 10px; }
.filter-card .f-link { display: block; padding: 8px 10px; border-radius: 7px; color: var(--ink); font-size: 14px; }
.filter-card .f-link:hover { background: #F0F4FF; color: var(--blue); }
.filter-card .f-link.active { background: #E7EDFF; color: var(--blue); font-weight: 600; }
.listing-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: #fff; border-radius: 12px; box-shadow: var(--shadow);
  padding: 12px 16px; margin-bottom: 12px; flex-wrap: wrap;
}
.listing-head h1 { font-size: 18px; }
.listing-head .count { color: var(--muted); font-size: 13px; font-weight: 400; }
.sort-row { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); flex-wrap: wrap; }
.sort-row a { padding: 7px 11px; border-radius: 7px; color: var(--ink); font-weight: 500; }
.sort-row a.active { background: var(--blue); color: #fff; }
.sort-row a:hover:not(.active) { background: #F0F4FF; }

/* ============ Product detail ============ */
.pd-layout {
  display: grid; grid-template-columns: minmax(0, 460px) 1fr; gap: 26px;
  background: #fff; border-radius: 12px; box-shadow: var(--shadow);
  padding: 22px; margin-top: 14px;
}
.pd-img { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #F8F9FB; }
.pd-img img { width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.pd-actions { display: flex; gap: 12px; margin-top: 14px; }
.pd-actions .btn { flex: 1; font-size: 15.5px; min-height: 50px; }
.pd-info h1 { font-size: 21px; font-weight: 600; line-height: 1.35; }
.pd-meta { display: flex; align-items: center; gap: 10px; margin: 10px 0; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.pd-price-row { display: flex; align-items: baseline; gap: 12px; margin: 12px 0 4px; flex-wrap: wrap; }
.pd-price-row .price { font-size: 29px; font-weight: 700; }
.pd-price-row .mrp { color: var(--muted); text-decoration: line-through; font-size: 16px; }
.pd-price-row .off { color: var(--green); font-weight: 700; font-size: 15.5px; }
.pd-stock { font-size: 13.5px; font-weight: 600; color: var(--green); margin-bottom: 10px; }
.pd-stock.low { color: var(--red); }
.pd-box { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin-top: 14px; }
.pd-box h3 { font-size: 15px; margin-bottom: 8px; }
.pd-box ul { padding-left: 18px; color: #374151; font-size: 14px; }
.pd-box li { margin-bottom: 5px; }
.pd-desc { color: #374151; font-size: 14.5px; }
.qty-row { display: flex; align-items: center; gap: 12px; margin: 14px 0; }
.qty-ctrl { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 9px; overflow: hidden; }
.qty-ctrl button { width: 44px; height: 44px; border: 0; background: #F5F6FA; font-size: 20px; cursor: pointer; color: var(--ink); }
.qty-ctrl button:hover { background: #E7EDFF; color: var(--blue); }
.qty-ctrl input { width: 54px; height: 44px; border: 0; text-align: center; font-size: 15px; font-weight: 600; font-family: inherit; outline: 0; }
.breadcrumb { font-size: 13px; color: var(--muted); padding-top: 12px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--blue); }

/* ============ Category directory ============ */
.category-directory { padding-top: 14px; padding-bottom: 24px; }
.category-directory .breadcrumb { padding-top: 0; padding-bottom: 12px; }
.category-directory-card { background: #fff; border-radius: 12px; box-shadow: var(--shadow); padding: 18px; }
.category-directory-head { margin-bottom: 14px; }
.category-directory-head h1 { font-size: 20px; }
.category-directory-head p { color: var(--muted); font-size: 13px; }
.category-directory-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.category-directory-item {
  overflow: hidden; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; color: var(--ink); text-align: center;
}
.category-directory-item:hover { border-color: var(--blue); box-shadow: var(--shadow); color: var(--blue); }
.category-directory-item img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: #F7F8FA; }
.category-directory-placeholder { aspect-ratio: 1 / 1; background: #F7F8FA; }
.category-directory-item span { display: block; padding: 9px 6px; font-size: 13px; font-weight: 600; line-height: 1.35; }

/* ============ Cart ============ */
.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 14px; margin-top: 14px; align-items: start; }
.cart-card { background: #fff; border-radius: 12px; box-shadow: var(--shadow); }
.cart-item { display: grid; grid-template-columns: 96px 1fr; gap: 14px; padding: 16px; border-bottom: 1px solid var(--line); }
.cart-item:last-child { border-bottom: 0; }
.cart-item img { width: 96px; height: 96px; object-fit: cover; border-radius: 9px; border: 1px solid var(--line); }
.ci-name { font-size: 14.5px; font-weight: 500; }
.ci-price { margin: 6px 0; display: flex; align-items: baseline; gap: 8px; }
.ci-price .price { font-weight: 700; font-size: 16px; }
.ci-price .mrp { color: var(--muted); text-decoration: line-through; font-size: 13px; }
.ci-price .off { color: var(--green); font-size: 12.5px; font-weight: 700; }
.ci-actions { display: flex; align-items: center; gap: 14px; margin-top: 8px; flex-wrap: wrap; }
.ci-remove { border: 0; background: none; color: var(--ink); font-weight: 600; font-size: 13.5px; cursor: pointer; padding: 8px 4px; font-family: inherit; }
.ci-remove:hover { color: var(--red); }
.cart-footer-bar { padding: 14px 16px; display: flex; justify-content: flex-end; border-top: 1px solid var(--line); }
.price-card { background: #fff; border-radius: 12px; box-shadow: var(--shadow); padding: 16px; position: sticky; top: 120px; }
.price-card h3 { font-size: 15px; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 10px; }
.price-row { display: flex; justify-content: space-between; font-size: 14px; padding: 5px 0; color: #374151; }
.price-row.total { border-top: 1px dashed var(--line); margin-top: 8px; padding-top: 11px; font-size: 16.5px; font-weight: 700; color: var(--ink); }
.price-row .free { color: var(--green); font-weight: 600; }
.savings { color: var(--green); font-weight: 600; font-size: 13.5px; margin-top: 10px; }
.empty-state { text-align: center; padding: 60px 20px; background: #fff; border-radius: 14px; box-shadow: var(--shadow); margin-top: 14px; }
.empty-state .es-icon { width: 90px; height: 90px; margin: 0 auto 16px; border-radius: 50%; background: #EEF3FF; display: flex; align-items: center; justify-content: center; color: var(--blue); }
.empty-state h2 { font-size: 20px; margin-bottom: 8px; }
.empty-state p { color: var(--muted); margin-bottom: 18px; }

/* ============ Auth ============ */
.auth-wrap { max-width: 420px; margin: 30px auto; }
.auth-card { background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); padding: 28px 26px; }
.auth-card .brand-name { display: block; text-align: center; margin-bottom: 4px; }
.auth-card .sub { text-align: center; color: var(--muted); font-size: 13.5px; margin-bottom: 20px; }
.field { margin-bottom: 15px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; border: 1.5px solid #D3D9E3; border-radius: 9px;
  padding: 11px 13px; font-family: inherit; font-size: 14.5px; color: var(--ink);
  background: #fff; transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47, 107, 240, .14); outline: 0; }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 4px; font-weight: 400; }
.auth-alt { text-align: center; margin-top: 16px; font-size: 14px; color: var(--muted); }
.auth-alt a { font-weight: 600; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .full { grid-column: 1 / -1; }

/* ============ Account panel ============ */
.panel-layout { display: grid; grid-template-columns: 250px 1fr; gap: 14px; margin-top: 14px; align-items: start; }
.panel-side { background: #fff; border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.panel-user { padding: 18px 16px; border-bottom: 1px solid var(--line); display: flex; gap: 12px; align-items: center; }
.avatar {
  width: 48px; height: 48px; border-radius: 50%; background: var(--blue); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 19px; flex-shrink: 0;
}
.panel-user .p-name { font-weight: 600; font-size: 15px; }
.panel-user .p-mail { font-size: 12.5px; color: var(--muted); word-break: break-all; }
.panel-links { padding: 8px; }
.panel-links a { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 8px; color: var(--ink); font-size: 14px; font-weight: 500; }
.panel-links a:hover { background: #F0F4FF; color: var(--blue); }
.panel-links a.active { background: #E7EDFF; color: var(--blue); font-weight: 600; }
.panel-links a svg { flex-shrink: 0; }
.panel-main { min-width: 0; }
.panel-card { background: #fff; border-radius: 12px; box-shadow: var(--shadow); padding: 20px; margin-bottom: 14px; }
.panel-card h2 { font-size: 18px; margin-bottom: 14px; }

.order-card { border: 1px solid var(--line); border-radius: 11px; padding: 14px 16px; margin-bottom: 12px; }
.order-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13.5px; color: var(--muted); margin-bottom: 8px; }
.order-no { font-weight: 700; color: var(--ink); font-size: 14.5px; }
.status-pill { font-size: 12px; font-weight: 700; padding: 4px 11px; border-radius: 999px; }
.status-Processing { background: #FFF4D6; color: #8A6100; }
.status-Shipped { background: #E3F0FF; color: #0B4EA2; }
.status-Delivered { background: #E8F5E9; color: #1B5E20; }
.status-Cancelled { background: #FDECEA; color: #B71C1C; }
.order-item-row { display: flex; gap: 12px; align-items: center; padding: 8px 0; border-top: 1px dashed var(--line); }
.order-item-row img { width: 54px; height: 54px; border-radius: 8px; object-fit: cover; border: 1px solid var(--line); }
.order-item-row .oi-name { font-size: 13.5px; font-weight: 500; }
.order-item-row .oi-meta { font-size: 12.5px; color: var(--muted); }
.order-total-row { display: flex; justify-content: space-between; margin-top: 8px; font-weight: 700; font-size: 15px; }

.addr-card { border: 1.5px solid var(--line); border-radius: 11px; padding: 14px 16px; margin-bottom: 12px; position: relative; }
.addr-card.selected { border-color: var(--blue); background: #F6F9FF; }
.addr-card .a-name { font-weight: 600; }
.addr-card .a-text { color: #374151; font-size: 13.5px; margin-top: 4px; }
.addr-card .a-phone { color: var(--muted); font-size: 13px; margin-top: 3px; }
.addr-pick { position: absolute; top: 14px; right: 14px; }
.new-address-fields[hidden] { display: none !important; }

/* ============ Contact ============ */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; align-items: start; }
.contact-item { display: flex; gap: 13px; padding: 13px 0; border-bottom: 1px dashed var(--line); }
.contact-item:last-child { border-bottom: 0; }
.contact-item .c-icon {
  width: 44px; height: 44px; border-radius: 11px; background: #EEF3FF; color: var(--blue);
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.contact-item .c-label { font-size: 12.5px; color: var(--muted); }
.contact-item .c-value { font-weight: 600; font-size: 14.5px; word-break: break-word; }

/* ============ Footer ============ */
.site-footer { background: #172337; color: #A6B3C9; margin-top: 30px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 26px; padding-top: 34px; padding-bottom: 26px; }
.footer-brand { font-size: 21px; color: #fff; }
.footer-tag { color: var(--yellow); font-size: 13px; margin: 6px 0 10px; }
.footer-text { font-size: 13px; line-height: 1.7; color: #8FA0BD; }
.footer-col h4 { color: #fff; font-size: 14.5px; margin-bottom: 12px; }
.footer-col a { display: block; color: #A6B3C9; font-size: 13.5px; padding: 4.5px 0; }
.footer-col a:hover { color: var(--yellow); }
.footer-col .footer-text a { display: inline; color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .10); padding: 13px 0; font-size: 12.5px; text-align: center; color: #7C8DAF; }

/* ============ Bottom nav (mobile app bar) ============ */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  background: #fff; border-top: 1px solid var(--line);
  display: flex; justify-content: space-around;
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -2px 12px rgba(16, 24, 40, .10);
}
.bn-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 4px 6px; color: #6B7280; font-size: 10.5px; font-weight: 500;
  min-height: var(--bottomnav-h);
}
.bn-item.active { color: var(--blue); }
button.bn-item { background: none; border: 0; cursor: pointer; font-family: inherit; }

/* ============ Admin ============ */
.admin-shell { display: grid; grid-template-columns: 235px 1fr; min-height: 100dvh; }
.admin-side { background: #172337; color: #A6B3C9; padding: 18px 12px; position: sticky; top: 0; height: 100dvh; overflow-y: auto; }
.admin-side .brand-name { display: block; padding: 6px 10px 16px; font-size: 19px; }
.admin-side a {
  display: flex; align-items: center; gap: 11px; padding: 11px 13px;
  color: #A6B3C9; border-radius: 9px; font-size: 14px; font-weight: 500; margin-bottom: 3px;
}
.admin-side a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.admin-side a.active { background: var(--blue); color: #fff; }
.admin-main { padding: 22px; min-width: 0; background: var(--bg); }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.admin-topbar h1 { font-size: 22px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat-card { background: #fff; border-radius: 12px; box-shadow: var(--shadow); padding: 18px; }
.stat-card .s-label { color: var(--muted); font-size: 13px; }
.stat-card .s-value { font-size: 26px; font-weight: 700; margin-top: 5px; }
.stat-card .s-icon { width: 42px; height: 42px; border-radius: 11px; background: #EEF3FF; color: var(--blue); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.table-card { background: #fff; border-radius: 12px; box-shadow: var(--shadow); overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
.data-table th { text-align: left; padding: 12px 14px; background: #F6F8FD; color: var(--muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: .4px; white-space: nowrap; }
.data-table td { padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: middle; }
.data-table tr:hover td { background: #FAFBFF; }
.data-table img.timg { width: 46px; height: 46px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.row-actions { display: flex; gap: 8px; }
.tag { display: inline-block; background: #EEF3FF; color: var(--blue); border-radius: 6px; font-size: 12px; font-weight: 600; padding: 3px 9px; }
.text-danger { color: var(--red); }
.link-danger { color: var(--red); font-weight: 600; }

/* ============ Static page ============ */
.static-page { background: #fff; border-radius: 12px; box-shadow: var(--shadow); padding: 26px; margin-top: 14px; }
.static-page h1 { font-size: 23px; margin-bottom: 14px; }
.static-page h3 { font-size: 16.5px; margin: 18px 0 8px; }
.static-page p { color: #374151; font-size: 14.5px; margin-bottom: 10px; max-width: 75ch; }

/* ============ Responsive ============ */
@media (max-width: 1100px) {
  .home-grid { grid-template-columns: 220px 1fr; }
  .promo-minis { display: none; }
  .hero-banner { min-height: 300px; }
}

@media (max-width: 1024px) {
  .pd-layout { grid-template-columns: minmax(0, 380px) 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  body { padding-bottom: calc(var(--bottomnav-h) + env(safe-area-inset-bottom)); font-size: 14.5px; }

  /* dark mobile app header */
  .site-header { background: #171717; color: #fff; box-shadow: none; }
  .header-in { gap: 10px; padding-top: 10px; padding-bottom: 8px; }
  .site-header .brand-name { font-size: 19px; color: #fff; }
  .site-header .brand-name span { color: #FFC400; }
  .site-header .brand-badge { width: 34px; height: 34px; background: #fff; }
  .brand-text { display: flex; flex-direction: column; line-height: 1.15; }
  .brand-tagline { display: block; font-size: 10px; font-weight: 400; color: #D0D0D0; }
  .account-menu { display: none; }
  .header-link.m-hicon { display: inline-flex; }
  .drawer .brand-name, .auth-card .brand-name { color: var(--blue); }
  .header-link { color: #fff; }
  .header-link:hover { background: rgba(255, 255, 255, .12); }
  .badge { background: var(--red); color: #fff; }

  /* location, search and categories follow the compact app header */
  .m-location { display: flex; align-items: center; gap: 7px; color: #fff; font-size: 13px; padding: 2px 16px 9px; }
  .m-location b { font-weight: 600; }
  .m-location .ml-chev { opacity: .85; }
  .mobile-search-row { padding-bottom: 8px; }
  .mobile-search-row .search-bar { background: #fff; border: 1px solid #D7D7D7; border-radius: 12px; padding: 5px 8px 5px 12px; gap: 6px; min-height: 48px; }
  .mobile-search-row .sb-lead { color: #9AA1AC; flex-shrink: 0; }
  .mobile-search-row .search-bar button { width: 34px; height: 34px; background: transparent; color: #616161; }
  .home-category-nav {
    display: block !important;
    background: #171717;
    color: #fff;
  }
  .home-category-row {
    display: flex;
    gap: 0;
    overflow-x: auto;
    padding: 2px 8px 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .home-category-row::-webkit-scrollbar { display: none; }
  .home-category-item {
    position: relative;
    display: flex;
    flex: 0 0 78px;
    min-width: 0;
    min-height: 68px;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 3px;
    padding: 0 3px 7px;
    color: #F7F7F7;
    text-align: center;
  }
  .home-category-icon {
    display: flex;
    width: 30px;
    height: 31px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #F4F4F4;
  }
  .home-category-icon svg { width: 27px; height: 27px; }
  .home-category-name {
    display: block;
    width: 100%;
    overflow: hidden;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .home-category-item.is-active { color: #fff; }
  .home-category-item.is-active .home-category-name { font-weight: 700; }
  .home-category-item.is-active::after {
    position: absolute;
    right: 15px;
    bottom: 0;
    left: 15px;
    height: 2px;
    border-radius: 2px 2px 0 0;
    background: #fff;
    content: '';
  }

  .listing-layout { grid-template-columns: 1fr; }
  .filter-card { display: none; }
  .category-directory { padding-top: 12px; }
  .category-directory-card { padding: 12px; }
  .category-directory-head h1 { font-size: 18px; }
  .category-directory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .category-directory-item span { min-height: 52px; display: flex; align-items: center; justify-content: center; padding: 7px 5px; font-size: 12.5px; }
  .pd-layout { grid-template-columns: 1fr; padding: 14px; gap: 16px; }
  .pd-info h1 { font-size: 18px; }
  .cart-layout { grid-template-columns: 1fr; }
  .price-card { position: static; }
  .panel-layout { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .pc-actions .btn { font-size: 12.5px; padding: 8px 6px; min-height: 40px; }
  .bs-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 18px; padding-bottom: 20px; }
  .admin-shell { grid-template-columns: 1fr; align-content: start; }
  .admin-side { position: static; height: auto; display: flex; overflow-x: auto; align-items: center; padding: 8px 10px; gap: 4px; }
  .admin-side .brand-name { padding: 6px 10px; margin-right: 6px; }
  .admin-side a { white-space: nowrap; margin-bottom: 0; }
  .admin-main { padding: 14px; }
  .cart-item { grid-template-columns: 76px 1fr; }
  .cart-item img { width: 76px; height: 76px; }
  .auth-wrap { margin: 18px auto; }
}
