/* ================================================================
   RSDH Collections — Design System v3.0
   Responsive: Mobile 320px · Tablet 768px · Desktop 1200px+
   ================================================================ */

/* ── Reset & Root ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --brand:        #d4245a;
  --brand-dark:   #a81b46;
  --brand-light:  #fbe9ef;
  --brand-2:      #ff6b35;
  --text-1:       #1a1a1a;
  --text-2:       #444;
  --text-3:       #888;
  --text-inv:     #fff;
  --bg-page:      #f4f4f4;
  --bg-card:      #fff;
  --bg-input:     #f9f9f9;
  --border:       #e8e8e8;
  --border-2:     #d0d0d0;
  --success:      #1a7a3f;
  --error:        #c0392b;
  --warning:      #e67e22;
  --info:         #2563eb;
  --radius-sm:    6px;
  --radius-md:    10px;
  --radius-lg:    16px;
  --shadow-sm:    0 1px 4px rgba(0,0,0,.07);
  --shadow-md:    0 3px 12px rgba(0,0,0,.10);
  --shadow-lg:    0 8px 32px rgba(0,0,0,.12);
  --nav-h:        56px;
  --bottom-nav-h: 60px;
  --safe-b:       env(safe-area-inset-bottom, 0px);
  --sidebar-w:    260px;
  --content-max:  1280px;
  --t:            .18s ease;
}

html { scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
               'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-page);
  color: var(--text-1);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a    { color: inherit; text-decoration: none; }
img  { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; border: none; outline: none; }
input, select, textarea { font-family: inherit; outline: none; }
select { appearance: none; -webkit-appearance: none; }

/* ── Desktop layout wrapper ───────────────────────────────────── */
/* On desktop the app sits inside a max-width centered container  */
@media (min-width: 1024px) {
  body { display: flex; flex-direction: column; }
  #top-nav { padding: 0 max(24px, calc((100vw - var(--content-max)) / 2)); }
  #cat-strip { justify-content: center; }
  #cat-strip .cat-chip { padding: 12px 20px; }
  #app {
    max-width: var(--content-max);
    margin: 0 auto;
    width: 100%;
    padding-bottom: 40px;
  }
  /* No bottom nav on desktop */
  #bottom-nav { display: none !important; }
  /* Desktop sidebar nav instead */
  #desktop-nav {
    display: flex;
    position: fixed;
    left: max(0px, calc((100vw - var(--content-max)) / 2 - var(--sidebar-w) - 16px));
    top: calc(var(--nav-h) + 80px);
    width: var(--sidebar-w);
    flex-direction: column;
    gap: 4px;
  }
}

/* ── Top Navigation ───────────────────────────────────────────── */
#top-nav {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--nav-h);
  background: var(--brand);
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.nav-logo {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.5px;
  flex-shrink: 0;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  white-space: nowrap;
}
@media (min-width: 768px) { .nav-logo { font-size: 22px; } }

.nav-search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.18);
  border: 1.5px solid rgba(255,255,255,.3);
  border-radius: 22px;
  padding: 0 14px;
  height: 38px;
  max-width: 520px;
  transition: background var(--t);
}
.nav-search:focus-within { background: rgba(255,255,255,.25); }
.nav-search input {
  flex: 1;
  background: none;
  border: none;
  color: #fff;
  font-size: 14px;
}
.nav-search input::placeholder { color: rgba(255,255,255,.65); }
@media (min-width: 768px) {
  .nav-search { max-width: 420px; height: 40px; }
}
@media (min-width: 1024px) {
  .nav-search { max-width: 560px; border-radius: 8px; }
}

.nav-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  border-radius: 50%;
  color: #fff;
  position: relative;
  transition: background var(--t);
  flex-shrink: 0;
}
.nav-icon:hover { background: rgba(255,255,255,.15); }

.nav-actions { display: flex; align-items: center; gap: 2px; }
@media (min-width: 768px) { .nav-actions { gap: 6px; } }

/* Desktop nav items */
.nav-desktop-link {
  display: none;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,.9);
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 20px;
  transition: background var(--t);
  white-space: nowrap;
}
.nav-desktop-link:hover { background: rgba(255,255,255,.15); }
@media (min-width: 1024px) { .nav-desktop-link { display: flex; align-items: center; gap: 6px; } }

.badge {
  position: absolute;
  top: 4px; right: 4px;
  background: #fff;
  color: var(--brand);
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  padding: 0 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.badge[data-n="0"] { display: none; }

/* ── Category Strip ───────────────────────────────────────────── */
#cat-strip {
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
#cat-strip::-webkit-scrollbar { display: none; }
.cat-chip {
  flex-shrink: 0;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-3);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color var(--t), border-color var(--t);
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
}
.cat-chip.active,
.cat-chip:hover { color: var(--brand); border-bottom-color: var(--brand); }

/* ── App Container ─────────────────────────────────────────────── */
#app {
  min-height: calc(100vh - var(--nav-h) - var(--bottom-nav-h) - var(--safe-b));
  padding-bottom: calc(var(--bottom-nav-h) + var(--safe-b) + 8px);
}
@media (min-width: 1024px) {
  #app {
    min-height: calc(100vh - var(--nav-h) - 60px);
    padding-bottom: 60px;
  }
}

.page        { display: none !important; }
.page.active { display: block !important; animation: fadeIn .18s ease; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: none; }
}

/* ── Hero Banner ──────────────────────────────────────────────── */
.hero-banner { position: relative; overflow: hidden; }
.hero-banner img {
  width: 100%;
  aspect-ratio: 16/7;
  object-fit: cover;
  background: var(--brand-light);
}
@media (min-width: 768px) { .hero-banner img { aspect-ratio: 21/7; } }
.hero-dots {
  position: absolute;
  bottom: 10px; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 6px;
}
.hero-dots span {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,.55);
  transition: all var(--t);
}
.hero-dots span.active {
  background: #fff;
  width: 22px;
  border-radius: 4px;
}

/* ── Section Head ─────────────────────────────────────────────── */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 12px 8px;
}
.section-head h2 { font-size: 16px; font-weight: 700; }
.section-head a, .section-head button.view-all {
  font-size: 13px;
  color: var(--brand);
  font-weight: 500;
  background: none;
  border: none;
  cursor: pointer;
}
@media (min-width: 768px) {
  .section-head { padding: 20px 16px 10px; }
  .section-head h2 { font-size: 18px; }
}

/* ── Product Grid ─────────────────────────────────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 4px 10px 10px;
}
@media (min-width: 480px)  { .product-grid { grid-template-columns: repeat(3,1fr); } }
@media (min-width: 768px)  { .product-grid { grid-template-columns: repeat(4,1fr); gap: 14px; padding: 4px 14px 14px; } }
@media (min-width: 1024px) { .product-grid { grid-template-columns: repeat(5,1fr); gap: 16px; } }
@media (min-width: 1280px) { .product-grid { grid-template-columns: repeat(6,1fr); } }

/* ── Product Card ─────────────────────────────────────────────── */
.p-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: transform var(--t), box-shadow var(--t);
}
.p-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.p-card:active { transform: scale(.98); }

.p-card__img {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
  background: #f0f0f0;
}
.p-card__img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.p-card:hover .p-card__img img { transform: scale(1.05); }

.p-card__badge {
  position: absolute;
  top: 8px; left: 8px;
  background: var(--brand);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
}
.p-card__wish {
  position: absolute;
  top: 6px; right: 6px;
  width: 30px; height: 30px;
  background: rgba(255,255,255,.92);
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--t);
}
.p-card__wish:hover { transform: scale(1.15); }
.p-card__wish.active svg { fill: var(--brand); stroke: var(--brand); }

.p-card__info {
  padding: 8px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}
.p-card__brand { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: .3px; }
.p-card__name  {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.p-card__price {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-top: 4px;
  flex-wrap: wrap;
}
.price-sale { font-size: 14px; font-weight: 700; }
.price-mrp  { font-size: 11px; color: var(--text-3); text-decoration: line-through; }
.price-off  { font-size: 11px; color: var(--success); font-weight: 600; }
.p-card__rating { display: flex; align-items: center; gap: 3px; font-size: 11px; color: var(--text-3); }
.star { color: #f4a62a; }

/* ── Skeleton ─────────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, #ececec 25%, #f8f8f8 50%, #ececec 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── Bottom Navigation (mobile/tablet only) ───────────────────── */
#bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 200;
  height: calc(var(--bottom-nav-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  background: #fff;
  border-top: 1px solid var(--border);
  display: flex;
  box-shadow: 0 -2px 12px rgba(0,0,0,.07);
}
.bnav {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text-3);
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
  transition: color var(--t);
  position: relative;
  background: none;
  border: none;
  padding: 0;
}
.bnav.active, .bnav:hover { color: var(--brand); }
.bnav svg { width: 22px; height: 22px; stroke-width: 2; }
.bnav-badge {
  position: absolute;
  top: 6px; right: calc(50% - 18px);
  background: var(--brand);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  min-width: 15px; height: 15px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px;
}
.bnav-badge[data-n="0"] { display: none; }

/* ── Product Detail ───────────────────────────────────────────── */
.pd-gallery { background: #f5f5f5; }
.pd-gallery-main { position: relative; overflow: hidden; }
.pd-gallery-main img { width: 100%; aspect-ratio: 1; object-fit: cover; }

@media (min-width: 768px) {
  .pd-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
  .pd-gallery { position: sticky; top: var(--nav-h); height: fit-content; }
  .pd-gallery-main img { aspect-ratio: auto; max-height: 600px; }
}

.pd-thumbs {
  display: flex; gap: 8px;
  padding: 10px 12px;
  overflow-x: auto;
  scrollbar-width: none;
}
.pd-thumbs::-webkit-scrollbar { display: none; }
.pd-thumb {
  flex-shrink: 0;
  width: 62px; height: 62px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color var(--t);
}
.pd-thumb.active { border-color: var(--brand); }
.pd-thumb img { width: 100%; height: 100%; object-fit: cover; }

.pd-info { padding: 14px 16px; }
.pd-brand { font-size: 12px; color: var(--text-3); text-transform: uppercase; margin-bottom: 4px; letter-spacing: .3px; }
.pd-name  { font-size: 18px; font-weight: 700; line-height: 1.3; }
@media (min-width: 768px) { .pd-name { font-size: 22px; } }

.pd-price { display: flex; align-items: baseline; gap: 10px; margin: 10px 0; flex-wrap: wrap; }
.pd-price .sale { font-size: 26px; font-weight: 800; }
.pd-price .mrp  { font-size: 16px; color: var(--text-3); text-decoration: line-through; }
.pd-price .off  { font-size: 15px; color: var(--success); font-weight: 600; }

.pd-section { padding: 14px 16px; border-top: 8px solid var(--bg-page); }
.pd-section h3 { font-size: 14px; font-weight: 700; margin-bottom: 10px; }
.size-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.size-btn {
  min-width: 44px; height: 38px;
  padding: 0 14px;
  border: 1.5px solid var(--border-2);
  border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500;
  background: #fff;
  cursor: pointer;
  transition: all var(--t);
}
.size-btn.active {
  border-color: var(--brand);
  background: var(--brand-light);
  color: var(--brand);
}
.size-btn:disabled { opacity: .4; cursor: not-allowed; text-decoration: line-through; }

.pd-cta {
  position: sticky;
  bottom: calc(var(--bottom-nav-h) + var(--safe-b));
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 10px 14px;
  display: flex; gap: 10px;
  z-index: 100;
}
@media (min-width: 1024px) { .pd-cta { bottom: 0; } }

.btn-wish-lg {
  width: 48px; height: 48px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-2);
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all var(--t);
}
.btn-wish-lg.active { border-color: var(--brand); }
.btn-wish-lg:hover  { background: var(--brand-light); }
.btn-add-cart {
  flex: 1; height: 48px;
  border-radius: var(--radius-md);
  background: var(--brand);
  color: #fff;
  font-size: 15px; font-weight: 700;
  transition: background var(--t);
}
.btn-add-cart:hover { background: var(--brand-dark); }
.btn-buy-now {
  flex: 1; height: 48px;
  border-radius: var(--radius-md);
  background: var(--brand-2);
  color: #fff;
  font-size: 15px; font-weight: 700;
}

/* ── Cart ─────────────────────────────────────────────────────── */
@media (min-width: 768px) {
  .cart-layout { display: grid; grid-template-columns: 1fr 360px; gap: 20px; padding: 20px; }
  .cart-items-col {}
  .cart-summary-col { position: sticky; top: calc(var(--nav-h) + 16px); height: fit-content; }
}

.cart-item {
  background: #fff;
  margin: 8px 10px;
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex; gap: 12px;
  box-shadow: var(--shadow-sm);
}
@media (min-width: 768px) { .cart-item { margin: 0 0 12px; border: 1px solid var(--border); box-shadow: none; } }

.cart-item__img {
  width: 84px; height: 106px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: #f0f0f0;
}
.cart-item__img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item__info { flex: 1; }
.cart-item__name  { font-size: 14px; font-weight: 500; margin-bottom: 3px; line-height: 1.3; }
.cart-item__meta  { font-size: 12px; color: var(--text-3); }
.cart-item__price { font-size: 16px; font-weight: 700; margin: 6px 0; }
.cart-item__remove { background: none; border: none; color: var(--text-3); font-size: 12px; text-decoration: underline; cursor: pointer; margin-top: 4px; }

.qty-ctrl { display: flex; align-items: center; border: 1.5px solid var(--border-2); border-radius: 6px; overflow: hidden; width: fit-content; }
.qty-btn   { width: 32px; height: 32px; background: var(--bg-input); font-size: 18px; font-weight: 500; border: none; display: flex; align-items: center; justify-content: center; }
.qty-num   { width: 38px; text-align: center; font-size: 14px; font-weight: 600; border: none; background: #fff; pointer-events: none; }

.cart-summary { background: #fff; margin: 8px 10px; border-radius: var(--radius-md); padding: 16px; box-shadow: var(--shadow-sm); }
@media (min-width: 768px) { .cart-summary { margin: 0; border: 1px solid var(--border); box-shadow: none; } }
.cart-summary h3 { font-size: 14px; font-weight: 700; margin-bottom: 12px; text-transform: uppercase; letter-spacing: .5px; }
.summary-row { display: flex; justify-content: space-between; font-size: 13px; padding: 5px 0; border-bottom: 1px dashed var(--border); }
.summary-row:last-child { border: none; }
.summary-row.total { font-size: 16px; font-weight: 700; border-top: 1.5px solid var(--border-2); border-bottom: none; margin-top: 6px; padding-top: 10px; }
.summary-row.green { color: var(--success); }
.coupon-row { display: flex; gap: 8px; margin: 12px 0; }
.coupon-input { flex: 1; height: 40px; padding: 0 12px; border: 1.5px solid var(--border-2); border-radius: var(--radius-sm); background: var(--bg-input); font-size: 14px; text-transform: uppercase; letter-spacing: 1px; }
.coupon-input:focus { border-color: var(--brand); background: #fff; }
.btn-apply { height: 40px; padding: 0 16px; background: var(--brand); color: #fff; font-size: 13px; font-weight: 700; border-radius: var(--radius-sm); white-space: nowrap; }
.btn-checkout { display: block; width: 100%; height: 52px; background: var(--brand); color: #fff; font-size: 16px; font-weight: 700; border-radius: var(--radius-md); margin: 12px 0 0; transition: background var(--t); }
.btn-checkout:hover { background: var(--brand-dark); }

/* ── Checkout ─────────────────────────────────────────────────── */
@media (min-width: 768px) {
  .checkout-layout { display: grid; grid-template-columns: 1fr 360px; gap: 20px; padding: 20px; align-items: start; }
}
.checkout-section { background: #fff; margin: 8px 10px; border-radius: var(--radius-md); padding: 16px; box-shadow: var(--shadow-sm); }
@media (min-width: 768px) { .checkout-section { margin: 0 0 14px; border: 1px solid var(--border); box-shadow: none; } }
.checkout-section h3 { font-size: 14px; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.step-num { width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-weight: 700; }
.form-group { margin-bottom: 12px; }
.form-label { font-size: 12px; color: var(--text-3); margin-bottom: 4px; display: block; font-weight: 500; }
.form-input {
  width: 100%; height: 44px;
  padding: 0 12px;
  border: 1.5px solid var(--border-2);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  font-size: 14px;
  transition: border-color var(--t), background var(--t);
}
.form-input:focus { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(212,36,90,.08); }
.form-textarea { width: 100%; padding: 10px 12px; border: 1.5px solid var(--border-2); border-radius: var(--radius-sm); background: var(--bg-input); font-size: 14px; resize: vertical; min-height: 80px; transition: border-color var(--t); }
.form-textarea:focus { border-color: var(--brand); background: #fff; }
.form-select { width: 100%; height: 44px; padding: 0 36px 0 12px; border: 1.5px solid var(--border-2); border-radius: var(--radius-sm); background: var(--bg-input) url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23888' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center; font-size: 14px; cursor: pointer; }
.form-row { display: flex; gap: 10px; }
.form-row .form-group { flex: 1; }

.payment-option { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-md); cursor: pointer; margin-bottom: 8px; transition: border-color var(--t), background var(--t); }
.payment-option:hover   { border-color: var(--brand); }
.payment-option.selected { border-color: var(--brand); background: var(--brand-light); }
.payment-option input[type=radio] { accent-color: var(--brand); width: 18px; height: 18px; flex-shrink: 0; }
.payment-option__label strong { display: block; font-size: 14px; }
.payment-option__label span   { font-size: 12px; color: var(--text-3); }

/* ── Auth / Registration ──────────────────────────────────────── */
.auth-wrap {
  min-height: calc(100vh - var(--nav-h));
  background: var(--bg-page);
}
@media (min-width: 768px) {
  .auth-wrap { display: grid; grid-template-columns: 1fr 1fr; min-height: calc(100vh - var(--nav-h)); }
  .auth-hero { display: flex !important; }
}
.auth-hero {
  display: none;
  background: linear-gradient(135deg, #d4245a, #7b1fa2);
  padding: 60px 40px;
  flex-direction: column;
  justify-content: center;
  color: #fff;
}
.auth-hero h2 { font-size: 32px; font-weight: 800; margin-bottom: 16px; }
.auth-hero p  { font-size: 15px; opacity: .85; line-height: 1.7; }
.auth-hero-list { margin-top: 32px; display: flex; flex-direction: column; gap: 14px; }
.auth-hero-item { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.auth-hero-icon { width: 36px; height: 36px; background: rgba(255,255,255,.2); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }

.auth-form-wrap {
  background: #fff;
  overflow-y: auto;
}
@media (min-width: 768px) { .auth-form-wrap { padding: 0; } }

/* Auth tabs */
.auth-tabs {
  display: flex;
  background: var(--bg-page);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.auth-tab {
  flex: 1;
  padding: 14px 6px;
  border: none;
  background: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-3);
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: all var(--t);
  white-space: nowrap;
}
.auth-tab.active { color: var(--brand); border-bottom-color: var(--brand); background: #fff; }

/* Registration form styles */
.rg-wrap { padding: 24px 20px 60px; max-width: 480px; margin: 0 auto; }
@media (min-width: 768px) { .rg-wrap { padding: 40px 48px 60px; } }
.rg-title { font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.rg-sub   { font-size: 14px; color: var(--text-3); margin-bottom: 28px; line-height: 1.5; }
.rg-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--text-3); font-size: 12px; }
.rg-divider::before, .rg-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.rg-field { margin-bottom: 16px; }
.rg-label { display: block; font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .4px; }
.rg-input {
  width: 100%; height: 46px;
  padding: 0 14px;
  border: 1.5px solid var(--border-2);
  border-radius: 8px;
  background: var(--bg-input);
  font-size: 14px;
  transition: all var(--t);
}
.rg-input:focus { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(212,36,90,.08); }
.rg-input.error { border-color: var(--error); background: #fff7f7; }
.rg-input-hint { font-size: 11px; color: var(--text-3); margin-top: 4px; }
.rg-input-hint.err { color: var(--error); }

.rg-phone-wrap { display: flex; border: 1.5px solid var(--border-2); border-radius: 8px; overflow: hidden; background: var(--bg-input); transition: border-color var(--t), box-shadow var(--t); }
.rg-phone-wrap:focus-within { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(212,36,90,.08); }
.rg-isd { padding: 0 14px; background: #f0f0f0; display: flex; align-items: center; font-size: 14px; color: var(--text-2); font-weight: 600; white-space: nowrap; border-right: 1px solid var(--border-2); flex-shrink: 0; }
.rg-phone-wrap .rg-input { border: none; border-radius: 0; background: transparent; box-shadow: none; }
.rg-phone-wrap .rg-input:focus { border: none; box-shadow: none; }

.rg-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rg-3col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }

.rg-btn-primary {
  display: block; width: 100%; height: 50px;
  background: var(--brand);
  color: #fff;
  font-size: 15px; font-weight: 700;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: background var(--t), transform .1s;
  box-shadow: 0 4px 12px rgba(212,36,90,.25);
  margin-bottom: 12px;
}
.rg-btn-primary:hover   { background: var(--brand-dark); }
.rg-btn-primary:active  { transform: scale(.98); }
.rg-btn-primary:disabled { opacity: .6; cursor: not-allowed; }

.rg-btn-outline {
  flex: 1; height: 44px;
  background: #fff;
  color: var(--text-2);
  font-size: 13px; font-weight: 600;
  border: 1.5px solid var(--border-2);
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--t);
}
.rg-btn-outline:hover { border-color: var(--brand); color: var(--brand); }

.rg-btn-google {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; height: 48px;
  background: #fff;
  color: var(--text-1);
  font-size: 14px; font-weight: 600;
  border: 1.5px solid var(--border-2);
  border-radius: 10px;
  cursor: pointer;
  margin-bottom: 10px;
  transition: all var(--t);
}
.rg-btn-google:hover { border-color: #4285f4; box-shadow: 0 2px 8px rgba(66,133,244,.15); }

.rg-step-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 700;
  margin-bottom: 18px; color: var(--text-1);
}
.rg-step-num {
  width: 26px; height: 26px;
  background: var(--brand);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  flex-shrink: 0;
}
.rg-step-done { background: var(--success); }

.rg-progress {
  display: flex; gap: 4px;
  margin-bottom: 28px;
}
.rg-progress-step {
  flex: 1; height: 4px;
  background: var(--border);
  border-radius: 2px;
  transition: background .3s;
}
.rg-progress-step.done    { background: var(--success); }
.rg-progress-step.active  { background: var(--brand); }

.rg-info-box {
  background: #e3f2fd;
  border: 1px solid #90caf9;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 16px;
  display: flex; gap: 10px; align-items: flex-start;
}
.rg-info-box.success { background: #e8f5e9; border-color: #a5d6a7; }
.rg-info-box.warning { background: #fff8e1; border-color: #ffe082; }
.rg-info-box.danger  { background: #ffeaea; border-color: #ffcdd2; }
.rg-info-box p { font-size: 13px; line-height: 1.5; color: var(--text-2); }

.rg-doc-upload {
  border: 2px dashed var(--border-2);
  border-radius: 10px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--t);
  background: #fafafa;
}
.rg-doc-upload:hover { border-color: var(--brand); background: var(--brand-light); }
.rg-doc-upload.uploaded { border-color: var(--success); background: #e8f5e9; border-style: solid; }

.rg-checkbox-row { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 16px; }
.rg-checkbox-row input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--brand); flex-shrink: 0; margin-top: 2px; }
.rg-checkbox-row label { font-size: 13px; color: var(--text-3); line-height: 1.4; }

/* OTP box */
.otp-box { font-size: 28px; letter-spacing: 16px; text-align: center; font-weight: 800; height: 60px; }

/* Status badges */
.badge-pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.badge-pending  { background: #fff8e1; color: #f57f17; }
.badge-verified { background: #e8f5e9; color: #1b5e20; }
.badge-rejected { background: #fceaea; color: #c62828; }
.badge-active   { background: #e3f2fd; color: #1565c0; }
.badge-admin    { background: #ede7f6; color: #4527a0; }
.badge-seller   { background: #fff3e0; color: #e65100; }
.badge-buyer    { background: #e8f5e9; color: #1b5e20; }

/* KYC progress tracker */
.kyc-tracker { display: flex; flex-direction: column; gap: 0; }
.kyc-step { display: flex; gap: 14px; padding-bottom: 20px; position: relative; }
.kyc-step:not(:last-child)::before {
  content: ''; position: absolute;
  left: 15px; top: 28px;
  width: 2px; bottom: 0;
  background: var(--border);
}
.kyc-step.done::before { background: var(--success); }
.kyc-dot { width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; border: 2px solid var(--border); background: #fff; z-index: 1; }
.kyc-step.done   .kyc-dot { border-color: var(--success); background: var(--success); color: #fff; }
.kyc-step.active .kyc-dot { border-color: var(--brand); background: var(--brand); color: #fff; }
.kyc-content h4 { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.kyc-content p  { font-size: 12px; color: var(--text-3); }

/* ── Profile / Account page ───────────────────────────────────── */
.profile-header {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  padding: 28px 20px 44px;
  text-align: center;
}
@media (min-width: 768px) {
  .profile-header { padding: 40px 40px 56px; }
  .profile-header h2 { font-size: 24px; }
}
.profile-avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: rgba(255,255,255,.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; font-weight: 800; color: #fff;
  margin: 0 auto 12px;
  border: 3px solid rgba(255,255,255,.4);
  overflow: hidden;
}
.profile-name { font-size: 20px; font-weight: 800; color: #fff; }
.profile-sub  { font-size: 13px; color: rgba(255,255,255,.75); margin-top: 4px; }

.profile-card {
  margin: -24px 12px 12px;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
@media (min-width: 768px) {
  .profile-layout { display: grid; grid-template-columns: 280px 1fr; gap: 20px; padding: 20px; align-items: start; }
  .profile-sidebar { position: sticky; top: calc(var(--nav-h) + 16px); }
  .profile-card   { margin: -24px 0 0; }
}

.menu-item {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--t);
}
.menu-item:last-child { border-bottom: none; }
.menu-item:hover { background: #fafafa; }
.menu-item__icon { font-size: 20px; width: 28px; text-align: center; flex-shrink: 0; }
.menu-item__label { font-size: 14px; font-weight: 500; flex: 1; }
.menu-item__badge { background: var(--brand); color: #fff; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 10px; }
.menu-item.danger { color: var(--error); }

/* ── Orders ───────────────────────────────────────────────────── */
.order-card {
  background: #fff; margin: 8px 10px;
  border-radius: var(--radius-md);
  overflow: hidden; box-shadow: var(--shadow-sm);
}
@media (min-width: 768px) { .order-card { margin: 0 0 14px; } }
.order-card__header { padding: 12px 14px; background: var(--bg-page); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.order-card__items  { padding: 10px 14px; }
.order-status { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 700; }
.status-placed    { background: #e3f2fd; color: #1565c0; }
.status-confirmed { background: #e8eaf6; color: #3949ab; }
.status-shipped   { background: #fff8e1; color: #f57f17; }
.status-delivered { background: #e8f5e9; color: #1b5e20; }
.status-cancelled { background: #fceaea; color: #c62828; }
.status-returned  { background: #f3e5f5; color: #6a1b9a; }

/* ── Toast ────────────────────────────────────────────────────── */
#toast-wrap {
  position: fixed;
  bottom: calc(var(--bottom-nav-h) + var(--safe-b) + 14px);
  left: 50%; transform: translateX(-50%);
  z-index: 9999;
  display: flex; flex-direction: column-reverse; gap: 8px;
  pointer-events: none;
  width: max-content; max-width: calc(100vw - 32px);
}
@media (min-width: 1024px) { #toast-wrap { bottom: 24px; } }
.toast {
  background: #1a1a1a; color: #fff;
  font-size: 14px; padding: 12px 20px;
  border-radius: 24px;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
  animation: toastIn .25s ease-out;
  white-space: nowrap;
}
.toast.success { background: #1a7a3f; }
.toast.error   { background: var(--error); }
.toast.warn    { background: var(--warning); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ── Empty State ──────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-3);
}
.empty-state svg { margin: 0 auto 16px; }
.empty-state h3  { font-size: 17px; color: var(--text-2); font-weight: 700; margin-bottom: 6px; }
.empty-state p   { font-size: 14px; line-height: 1.6; }
.empty-state .empty-cta {
  display: inline-block;
  margin-top: 20px; padding: 12px 28px;
  background: var(--brand); color: #fff;
  font-size: 14px; font-weight: 700;
  border-radius: 22px; border: none; cursor: pointer;
  text-decoration: none;
}

/* ── Spinner ──────────────────────────────────────────────────── */
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin: 0 auto;
}
.spinner-wrap { text-align: center; padding: 48px 24px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Offline Bar ──────────────────────────────────────────────── */
#offline-bar { display: none; background: var(--warning); color: #fff; text-align: center; padding: 8px; font-size: 13px; font-weight: 500; }
body.offline #offline-bar { display: block; }

/* ── Animations ───────────────────────────────────────────────── */
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%     { transform: translateX(-8px); }
  40%     { transform: translateX(8px); }
  60%     { transform: translateX(-6px); }
  80%     { transform: translateX(6px); }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}
.slide-up { animation: slideUp .3s ease; }

/* ── Utility helpers ──────────────────────────────────────────── */
.text-brand  { color: var(--brand); }
.text-success{ color: var(--success); }
.text-error  { color: var(--error); }
.text-muted  { color: var(--text-3); }
.fw-700      { font-weight: 700; }
.fw-800      { font-weight: 800; }
.mt-8        { margin-top: 8px; }
.mt-16       { margin-top: 16px; }
.gap-8       { gap: 8px; }
.flex        { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between{ display: flex; align-items: center; justify-content: space-between; }
.d-none      { display: none !important; }
.d-block     { display: block !important; }
.w-full      { width: 100%; }
.sr-only     { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }