/* ==========================================================================
   SHOPMEE — Design System & Global Styles
   ========================================================================== */

:root {
  --color-primary: #9c1c8c;
  --color-primary-dark: #7a1570;
  --color-primary-light: #f9e6f6;
  --color-accent: #ff6b35;
  --color-success: #17a672;
  --color-bg: #ffffff;
  --color-bg-soft: #faf7fb;
  --color-text: #24202a;
  --color-text-muted: #6b6570;
  --color-border: #ece5ec;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(30, 15, 30, 0.06);
  --shadow-md: 0 6px 20px rgba(30, 15, 30, 0.08);
  --shadow-lg: 0 12px 32px rgba(30, 15, 30, 0.12);
  --header-h: 64px;
  --bottom-nav-h: 62px;
  --max-width: 1280px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", "Inter", -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.5;
  padding-bottom: calc(var(--bottom-nav-h) + 8px);
}
@media (min-width: 900px) { body { padding-bottom: 0; } }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0 0 8px; font-weight: 700; line-height: 1.25; }
p { margin: 0 0 8px; }
ul { padding: 0; margin: 0; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 15px; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 16px; }
.section { padding: 32px 0; }
.section-title { font-size: 22px; margin-bottom: 4px; }
.section-sub { color: var(--color-text-muted); font-size: 14px; margin-bottom: 20px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; flex-wrap: wrap; gap: 8px;}
.section-head .view-all { color: var(--color-primary); font-weight: 600; font-size: 14px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; border-radius: var(--radius-sm); padding: 12px 20px;
  font-weight: 600; font-size: 15px; cursor: pointer; transition: transform .12s ease, box-shadow .12s ease, background .15s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--color-primary); color: #fff; }
.btn--primary:hover { background: var(--color-primary-dark); }
.btn--accent { background: var(--color-accent); color: #fff; }
.btn--accent:hover { filter: brightness(0.95); }
.btn--outline { background: #fff; color: var(--color-primary); border: 1.5px solid var(--color-primary); }
.btn--outline:hover { background: var(--color-primary-light); }
.btn--whatsapp { background: #25d366; color: #fff; }
.btn--whatsapp:hover { background: #1ebc59; }
.btn--sm { padding: 8px 12px; font-size: 13px; }
.btn--block { width: 100%; }
.btn--ghost { background: transparent; color: var(--color-text); border: 1px solid var(--color-border); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-resell-link {
  background: none; border: none; color: var(--color-accent); font-weight: 600; font-size: 12.5px;
  padding: 6px 0 0; text-align: left; width: 100%;
}
.btn-resell-link:hover { text-decoration: underline; }

/* Badges */
.badge { display: inline-block; padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; }
.badge--discount { position: absolute; top: 8px; left: 8px; background: var(--color-success); color: #fff; }
.badge--tag { background: var(--color-primary-light); color: var(--color-primary); }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 100; background: #fff;
  border-bottom: 1px solid var(--color-border); box-shadow: var(--shadow-sm);
}
.site-header__top { display: flex; align-items: center; gap: 16px; height: var(--header-h); }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 22px; color: var(--color-primary); flex-shrink: 0; }
.logo__mark {
  width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 18px; font-weight: 800;
}
.logo__text small { display: block; font-size: 9px; font-weight: 600; color: var(--color-text-muted); letter-spacing: 0.5px; }

.search-bar { position: relative; flex: 1; max-width: 560px; display: none; }
.search-bar input {
  width: 100%; padding: 10px 40px 10px 16px; border: 1.5px solid var(--color-border); border-radius: 24px;
  background: var(--color-bg-soft); outline: none; transition: border-color .15s;
}
.search-bar input:focus { border-color: var(--color-primary); background: #fff; }
.search-bar__icon { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--color-text-muted); }

.search-suggestions {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: #fff; border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg); border: 1px solid var(--color-border); max-height: 400px; overflow-y: auto; z-index: 200; display: none;
}
.search-suggestions.open { display: block; }
.search-suggestions__item { display: flex; gap: 10px; padding: 10px 14px; align-items: center; }
.search-suggestions__item:hover { background: var(--color-bg-soft); }
.search-suggestions__item img { width: 42px; height: 42px; border-radius: 8px; object-fit: cover; }
.ss-name { font-size: 13.5px; font-weight: 600; margin: 0; }
.ss-cat { font-size: 12px; color: var(--color-text-muted); margin: 0; }
.search-suggestions__empty { padding: 16px; color: var(--color-text-muted); font-size: 14px; }

.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.icon-btn {
  position: relative; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: transparent; border: none; font-size: 20px; color: var(--color-text); flex-shrink: 0;
}
.icon-btn:hover { background: var(--color-bg-soft); }
.cart-count {
  position: absolute; top: -2px; right: -2px; background: var(--color-accent); color: #fff; font-size: 10px; font-weight: 700;
  min-width: 17px; height: 17px; border-radius: 999px; display: none; align-items: center; justify-content: center; padding: 0 3px;
}

.header-nav {
  display: none; gap: 24px; align-items: center; padding: 10px 0; border-top: 1px solid var(--color-border);
}
.header-nav a { font-size: 14px; font-weight: 600; color: var(--color-text-muted); }
.header-nav a:hover, .header-nav a.active { color: var(--color-primary); }
.mobile-search-row { padding: 8px 0 10px; }

.desktop-only { display: none; }

@media (min-width: 900px) {
  .search-bar { display: block; }
  .header-nav { display: flex; }
  .mobile-search-row { display: none; }
  .desktop-only { display: inline-flex; }
}

/* ==========================================================================
   Bottom Mobile Nav
   ========================================================================== */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100; background: #fff; border-top: 1px solid var(--color-border);
  display: flex; height: var(--bottom-nav-h); box-shadow: 0 -4px 12px rgba(0,0,0,0.05);
}
.bottom-nav__item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--color-text-muted); font-size: 11px; font-weight: 600; position: relative;
}
.bottom-nav__item .bn-icon { font-size: 20px; }
.bottom-nav__item.active { color: var(--color-primary); }
@media (min-width: 900px) { .bottom-nav { display: none; } }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  background: linear-gradient(135deg, var(--color-primary-light) 0%, #fff 60%);
  padding: 28px 0 20px;
}
.hero__inner { display: flex; flex-direction: column-reverse; gap: 20px; align-items: center; }
.hero__content { text-align: center; }
.hero__eyebrow { color: var(--color-accent); font-weight: 700; font-size: 13px; letter-spacing: 1px; text-transform: uppercase; }
.hero__title { font-size: 30px; margin: 6px 0 10px; }
.hero__desc { color: var(--color-text-muted); margin-bottom: 18px; }
.hero__image { width: 100%; max-width: 420px; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
.hero__image img { width: 100%; height: 260px; object-fit: cover; }

@media (min-width: 900px) {
  .hero__inner { flex-direction: row; text-align: left; }
  .hero__content { text-align: left; flex: 1; }
  .hero__title { font-size: 42px; }
  .hero__image { flex: 1; max-width: 520px; }
  .hero__image img { height: 340px; }
}

/* ==========================================================================
   Categories
   ========================================================================== */
.category-scroll { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.category-scroll::-webkit-scrollbar { display: none; }
.category-chip {
  flex-shrink: 0; width: 84px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
}
.category-chip__icon {
  width: 64px; height: 64px; border-radius: 50%; background: var(--color-primary-light); display: flex; align-items: center;
  justify-content: center; font-size: 28px; transition: transform .15s;
}
.category-chip:hover .category-chip__icon { transform: translateY(-3px); }
.category-chip span { font-size: 12px; font-weight: 600; }

.category-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 600px) { .category-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 900px) { .category-grid { grid-template-columns: repeat(6, 1fr); } }
.category-card {
  background: var(--color-bg-soft); border-radius: var(--radius-md); padding: 16px; text-align: center; border: 1px solid var(--color-border);
  transition: box-shadow .15s, transform .15s;
}
.category-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.category-card .icon { font-size: 30px; display: block; margin-bottom: 6px; }
.category-card .name { font-weight: 600; font-size: 13px; }

/* ==========================================================================
   Product Grid & Cards
   ========================================================================== */
.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (min-width: 640px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .product-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1200px) { .product-grid { grid-template-columns: repeat(5, 1fr); } }

.product-card {
  background: #fff; border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm); transition: box-shadow .15s, transform .15s; display: flex; flex-direction: column;
}
.product-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.product-card__image-link { position: relative; display: block; background: var(--color-bg-soft); }
.product-card__media { position: relative; }
.product-card__favorite { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; display: grid; place-items: center; border: 1.5px solid #111; border-radius: 50%; background: #fff; color: #111; font-size: 22px; line-height: 1; cursor: pointer; z-index: 3; transition: .18s ease; }
.product-card__favorite:hover { transform: scale(1.06); }
.product-card__favorite.is-favorite { color: #e53935; border-color: #111; }
.product-card--home .product-card__body { padding-top: 9px; }
.pd-secondary-actions { display: flex; gap: 10px; margin-top: -8px; margin-bottom: 14px; }
.pd-icon-action { min-height: 40px; padding: 8px 14px; border: 1px solid #111; border-radius: 9px; background: #fff; color: #111; font-weight: 700; cursor: pointer; }
.pd-icon-action:hover { background: #f7f7f7; }
.pd-icon-action.is-favorite .pd-icon-action__heart { color: #e53935; }
.pd-icon-action__heart { font-size: 20px; line-height: 1; vertical-align: -2px; margin-right: 4px; }

.product-card__image { width: 100%; height: 160px; object-fit: cover; }
@media (min-width: 640px) { .product-card__image { height: 200px; } }
.product-card__body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.product-card__name { font-size: 13.5px; font-weight: 600; display: block; line-clamp: 2; -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.product-card__desc { font-size: 12px; line-height: 1.35; color: var(--color-text-muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; min-height: 32px; max-height: 32px; margin: 0; }
.product-card__rating { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.stars { color: #ff9f1c; letter-spacing: 1px; font-size: 12px; }
.rating-count { color: var(--color-text-muted); }
.product-card__price { display: flex; align-items: center; gap: 8px; }
.price { font-weight: 700; font-size: 15px; }
.mrp { color: var(--color-text-muted); text-decoration: line-through; font-size: 12.5px; }
.product-card__actions { display: flex; gap: 6px; margin-top: 4px; }
.product-card__actions .btn { flex: 1; padding: 8px 6px; font-size: 12.5px; }

.empty-state { grid-column: 1 / -1; text-align: center; padding: 60px 20px; color: var(--color-text-muted); }
.empty-state .btn { margin-top: 12px; }

/* ==========================================================================
   Promo / Trust sections
   ========================================================================== */
.promo-banner {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%); color: #fff;
  border-radius: var(--radius-lg); padding: 28px 24px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start;
}
.promo-banner h2 { font-size: 24px; }
.promo-banner p { opacity: 0.9; max-width: 480px; }
@media (min-width: 900px) {
  .promo-banner { flex-direction: row; align-items: center; justify-content: space-between; }
}

.trust-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (min-width: 700px) { .trust-grid { grid-template-columns: repeat(4, 1fr); } }
.trust-card { background: var(--color-bg-soft); border-radius: var(--radius-md); padding: 18px; text-align: center; }
.trust-card .icon { font-size: 28px; margin-bottom: 8px; }
.trust-card h4 { font-size: 14px; }
.trust-card p { font-size: 12.5px; color: var(--color-text-muted); margin: 0; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: #1c1520; color: #e9e3ec; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 28px; padding: 40px 0 20px; }
@media (min-width: 700px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .footer-grid { grid-template-columns: 1.2fr 0.8fr 0.8fr 1.6fr; } }
.footer-col h4 { color: #fff; font-size: 15px; margin-bottom: 12px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-col a { color: #cabfd1; font-size: 13.5px; }
.footer-col a:hover { color: #fff; }
.footer-col p { color: #cabfd1; font-size: 13.5px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 16px 0; text-align: center; font-size: 12.5px; color: #a89bb0; }

.footer-form { display: flex; flex-direction: column; gap: 10px; }
.footer-form input, .footer-form textarea, .footer-form select {
  padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid rgba(255,255,255,0.15); background: rgba(255,255,255,0.06);
  color: #fff; outline: none;
}
.footer-form input::placeholder, .footer-form textarea::placeholder { color: #a89bb0; }
.footer-form-row { display: flex; gap: 10px; }
.footer-form-row > * { flex: 1; }
.footer-form .btn-group { display: flex; gap: 10px; flex-wrap: wrap; }

/* ==========================================================================
   Forms (shared)
   ========================================================================== */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--color-border); outline: none;
  transition: border-color .15s; background: #fff;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--color-primary); }
.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }
.field-error { color: #d9302f; font-size: 12.5px; margin-top: 4px; display: none; }
.form-group.error input, .form-group.error select, .form-group.error textarea { border-color: #d9302f; }
.form-group.error .field-error { display: block; }
.checkbox-row { display: flex; align-items: flex-start; gap: 8px; font-size: 13.5px; }
.checkbox-row input { width: auto; margin-top: 3px; }

.card-box { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 20px; box-shadow: var(--shadow-sm); }

@media (max-width: 640px) {
  .form-row { flex-direction: column; gap: 0; }
}

/* ==========================================================================
   Page header / breadcrumb
   ========================================================================== */
.page-header { padding: 20px 0 10px; }
.breadcrumb { font-size: 12.5px; color: var(--color-text-muted); margin-bottom: 6px; }
.breadcrumb a { color: var(--color-primary); }

/* ==========================================================================
   Filters / Sort bar
   ========================================================================== */
.filter-bar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.filter-bar select { padding: 9px 12px; border-radius: var(--radius-sm); border: 1.5px solid var(--color-border); background: #fff; font-size: 13.5px; }
.filter-toggle-btn { display: none; }
.filters-panel { display: flex; flex-direction: column; gap: 18px; }
.filters-panel .filter-group h4 { font-size: 13.5px; margin-bottom: 8px; }
.filters-panel label { display: flex; align-items: center; gap: 8px; font-size: 13.5px; margin-bottom: 6px; }
.filters-panel input[type="checkbox"], .filters-panel input[type="radio"] { width: auto; }

.products-layout { display: flex; gap: 24px; align-items: flex-start; }
.products-layout .filters-sidebar { width: 220px; flex-shrink: 0; display: none; }
@media (min-width: 900px) { .products-layout .filters-sidebar { display: block; } }
.products-layout .products-main { flex: 1; min-width: 0; }

/* ==========================================================================
   Product Details Page
   ========================================================================== */
.pd-layout { display: flex; flex-direction: column; gap: 28px; }
@media (min-width: 900px) { .pd-layout { flex-direction: row; } }
.pd-gallery { flex: 1; max-width: 480px; }
.pd-gallery__main { border-radius: var(--radius-lg); overflow: hidden; background: var(--color-bg-soft); margin-bottom: 10px; }
.pd-gallery__main img { width: 100%; height: 380px; object-fit: cover; }
.pd-gallery__thumbs { display: flex; gap: 8px; }
.pd-gallery__thumbs img { width: 64px; height: 64px; object-fit: cover; border-radius: var(--radius-sm); border: 2px solid transparent; cursor: pointer; }
.pd-gallery__thumbs img.active { border-color: var(--color-primary); }

.pd-info { flex: 1; }
.pd-info h1 { font-size: 22px; }
.pd-price-row { display: flex; align-items: baseline; gap: 10px; margin: 12px 0; }
.pd-price-row .price { font-size: 26px; }
.pd-price-row .mrp { font-size: 15px; }
.pd-price-row .badge--discount { position: static; }

.option-group { margin: 14px 0; }
.option-group h4 { font-size: 13.5px; margin-bottom: 8px; }
.option-pill-group { display: flex; gap: 8px; flex-wrap: wrap; }
.option-pill {
  padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--color-border); font-size: 13.5px; font-weight: 600; cursor: pointer; background: #fff;
}
.option-pill.selected { border-color: var(--color-primary); background: var(--color-primary-light); color: var(--color-primary); }

.qty-selector { display: flex; align-items: center; gap: 0; border: 1.5px solid var(--color-border); border-radius: var(--radius-sm); width: fit-content; }
.qty-selector button { width: 36px; height: 36px; background: none; border: none; font-size: 18px; font-weight: 700; }
.qty-selector input { width: 44px; text-align: center; border: none; outline: none; font-weight: 600; }

.pd-actions { display: flex; gap: 10px; margin: 18px 0; flex-wrap: wrap; }
.pd-actions .btn { flex: 1; min-width: 130px; }

.pd-info-blocks { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.pd-info-block { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--color-text-muted); }
.pd-info-block .icon { font-size: 18px; }

.spec-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.spec-table tr td { padding: 8px 10px; border-bottom: 1px solid var(--color-border); font-size: 13.5px; }
.spec-table tr td:first-child { color: var(--color-text-muted); width: 40%; }

.tabs { display: flex; gap: 20px; border-bottom: 1px solid var(--color-border); margin: 28px 0 16px; }
.tab-btn { background: none; border: none; padding: 10px 0; font-weight: 600; color: var(--color-text-muted); border-bottom: 2px solid transparent; }
.tab-btn.active { color: var(--color-primary); border-color: var(--color-primary); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ==========================================================================
   Cart Page
   ========================================================================== */
.cart-layout { display: flex; flex-direction: column; gap: 20px; }
@media (min-width: 900px) { .cart-layout { flex-direction: row; align-items: flex-start; } }
.cart-items { flex: 1.6; display: flex; flex-direction: column; gap: 12px; }
.cart-summary { flex: 1; }
.cart-item { display: flex; gap: 12px; padding: 14px; background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-md); align-items: center; }
.cart-item img { width: 72px; height: 72px; object-fit: cover; border-radius: var(--radius-sm); flex-shrink: 0; }
.cart-item__info { flex: 1; min-width: 0; }
.cart-item__info h4 { font-size: 14px; margin-bottom: 2px; }
.cart-item__meta { font-size: 12px; color: var(--color-text-muted); }
.cart-item__price { font-weight: 700; margin-top: 4px; }
.cart-item__actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.cart-item__remove { background: none; border: none; color: #d9302f; font-size: 12.5px; font-weight: 600; }

.summary-row { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 10px; color: var(--color-text-muted); }
.summary-row.total { font-size: 17px; font-weight: 700; color: var(--color-text); border-top: 1px solid var(--color-border); padding-top: 12px; margin-top: 6px; }
.summary-row .value { color: var(--color-text); font-weight: 600; }
.summary-row.discount .value { color: var(--color-success); }

/* ==========================================================================
   Reseller
   ========================================================================== */
.reseller-hero { background: linear-gradient(135deg, #fff4e8 0%, #fff 60%); border-radius: var(--radius-lg); padding: 28px 22px; margin-bottom: 24px; }
.margin-calc { display: grid; gap: 16px; }
@media (min-width: 800px) { .margin-calc { grid-template-columns: 1fr 1fr; } }
.margin-result { background: var(--color-primary-light); border-radius: var(--radius-md); padding: 20px; }
.margin-result-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed rgba(156,28,140,0.25); font-size: 14px; }
.margin-result-row:last-child { border-bottom: none; font-weight: 700; font-size: 16px; }
.margin-type-toggle { display: flex; gap: 8px; margin-bottom: 12px; }
.margin-type-toggle button { flex: 1; padding: 10px; border-radius: var(--radius-sm); border: 1.5px solid var(--color-border); background: #fff; font-weight: 600; font-size: 13.5px; }
.margin-type-toggle button.active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

.reseller-product-picker { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; max-height: 340px; overflow-y: auto; padding: 4px; }
@media (min-width: 700px) { .reseller-product-picker { grid-template-columns: repeat(3, 1fr); } }
.rp-pick-card { border: 1.5px solid var(--color-border); border-radius: var(--radius-sm); padding: 8px; text-align: center; cursor: pointer; background: #fff; }
.rp-pick-card.selected { border-color: var(--color-primary); background: var(--color-primary-light); }
.rp-pick-card img { width: 100%; height: 70px; object-fit: cover; border-radius: 6px; margin-bottom: 6px; }
.rp-pick-card p { font-size: 11.5px; font-weight: 600; margin: 0; }

/* ==========================================================================
   Confirmation Screen
   ========================================================================== */
.confirmation { text-align: center; padding: 40px 16px; }
.confirmation .icon { font-size: 56px; margin-bottom: 12px; }
.confirmation h1 { font-size: 22px; }
.confirmation p { color: var(--color-text-muted); max-width: 420px; margin: 0 auto 20px; }
.confirmation .btn-group { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }

/* ==========================================================================
   Toast
   ========================================================================== */
.shopmee-toast {
  position: fixed; bottom: calc(var(--bottom-nav-h) + 16px); left: 50%; transform: translateX(-50%) translateY(20px);
  background: #1c1520; color: #fff; padding: 12px 22px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
  opacity: 0; transition: opacity .2s, transform .2s; z-index: 999; box-shadow: var(--shadow-lg); pointer-events: none;
}
.shopmee-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (min-width: 900px) { .shopmee-toast { bottom: 24px; } }

/* ==========================================================================
   Static content pages
   ========================================================================== */
.policy-page { max-width: 800px; margin: 0 auto; }
.policy-page h2 { margin-top: 28px; font-size: 18px; }
.policy-page p, .policy-page li { color: var(--color-text-muted); font-size: 14.5px; }
.policy-page li { margin-bottom: 6px; }

/* Account */
.account-list { display: flex; flex-direction: column; gap: 10px; }
.account-list a { display: flex; align-items: center; gap: 14px; padding: 16px; background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-md); font-weight: 600; }
.account-list a .icon { font-size: 22px; }
.account-list a:hover { box-shadow: var(--shadow-sm); }


/* ==========================================================================
   Mobile shopping UI — Meesho-style inspiration (SHOPMEE)
   ========================================================================== */
.mobile-filter-strip { display: none; }
.mobile-sort-sheet { display: none; }

@media (max-width: 899px) {
  .products-page { background: #f7f7f8; }
  .products-page .site-header { box-shadow: none; border-bottom: 1px solid #e5e5e7; }
  .products-page .site-header__top { height: 58px; gap: 8px; }
  .products-page .logo { font-size: 17px; gap: 5px; }
  .products-page .logo__mark { width: 30px; height: 30px; border-radius: 8px; font-size: 15px; }
  .products-page .logo__text small { font-size: 7px; }
  .products-page .header-actions { gap: 1px; }
  .products-page .logo::after { content: "🎁 Refer & Earn"; display: block; font-size: 11px; font-weight: 700; color: var(--color-primary); background: var(--color-primary-light); border-radius: 999px; padding: 5px 7px; margin-left: 3px; white-space: nowrap; }
  .products-page .header-actions .icon-btn { width: 34px; height: 34px; font-size: 19px; }
  .products-page .header-actions::before {
    content: "₹0"; display: flex; align-items: center; justify-content: center; height: 30px;
    padding: 0 7px; border-radius: 9px; background: var(--color-primary-light); color: var(--color-primary);
    font-weight: 800; font-size: 12px; margin-right: 1px;
  }
  .products-page .header-actions::after {
    content: "♡"; display: flex; align-items: center; justify-content: center; width: 34px; height: 34px;
    font-size: 28px; color: #333; line-height: 1;
  }
  .products-page .header-actions .icon-btn[aria-label="Account"] { display: none; }
  .products-page .header-actions .icon-btn[aria-label="Cart"] { order: 4; }
  .products-page .header-actions .icon-btn[aria-label="Cart"]::before { content: "🛒"; }
  .products-page .header-actions .icon-btn[aria-label="Cart"] { font-size: 0; }
  .products-page .header-actions .icon-btn[aria-label="Cart"] .cart-count { font-size: 10px; }

  .products-page .mobile-search-row { padding: 7px 0 10px; }
  .products-page .mobile-search-row .search-bar { display: block; max-width: none; }
  .products-page .mobile-search-row .search-bar input {
    height: 44px; padding: 10px 42px 10px 43px; border: 1.5px solid #d7d7dc; border-radius: 13px;
    background: #fff; font-size: 14px;
  }
  .products-page .mobile-search-row .search-bar::before {
    content: "⌕"; position: absolute; z-index: 2; left: 14px; top: 50%; transform: translateY(-52%);
    font-size: 27px; color: #777;
  }
  .products-page .mobile-search-row .search-bar::after {
    content: "⌕"; position: absolute; z-index: 2; right: 14px; top: 50%; transform: translateY(-52%);
    font-size: 23px; color: #777;
  }
  .products-page .mobile-search-row .search-bar__icon { display: none; }

  .products-page .header-nav { display: none; }
  .products-page main.container { padding-left: 0; padding-right: 0; }
  .products-page .page-header { display: none; }
  .products-page .page-header .breadcrumb { display: none; }
  .products-page .page-header .section-title { font-size: 17px; margin: 0; }
  .products-page .products-layout { display: block; }
  .products-page .products-layout .filters-sidebar { display: none; width: auto; margin: 0; border-radius: 0; border-left: 0; border-right: 0; }
  .products-page .products-layout .filters-sidebar.open-mobile { display: block !important; }
  .products-page .products-main { width: 100%; }
  .products-page .desktop-filter-bar { display: none; }
  .products-page .mobile-filter-strip {
    display: grid; grid-template-columns: 1.15fr 1fr 1fr 1fr; background: #fff;
    border-top: 1px solid #e2e2e5; border-bottom: 1px solid #ddd; position: sticky; top: 108px; z-index: 90;
  }
  .products-page .mobile-filter-btn {
    min-width: 0; height: 48px; background: #fff; border: 0; border-right: 1px solid #e5e5e8;
    font-size: 13px; color: #333; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .products-page .mobile-filter-btn:last-child { border-right: 0; }

  .products-page .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; background: #e6e6e8; margin: 0;
  }
  .products-page .product-card {
    min-width: 0; border: 0; border-radius: 0; box-shadow: none; overflow: hidden; background: #fff;
  }
  .products-page .product-card:hover { transform: none; box-shadow: none; }
  .products-page .product-card__image-link { aspect-ratio: 1 / 1; background: #f2f2f3; }
  .products-page .product-card__image { width: 100%; height: 100%; object-fit: contain; padding: 0; }
  .products-page .product-card__body { padding: 7px 9px 10px; gap: 3px; }
  .products-page .product-card__name { font-size: 13px; line-height: 1.28; min-height: 33px; }
  .products-page .product-card__desc { display: none; }
  .products-page .product-card__rating { font-size: 11px; gap: 5px; }
  .products-page .stars { font-size: 11px; letter-spacing: 0; }
  .products-page .product-card__price { gap: 6px; flex-wrap: wrap; }
  .products-page .price { font-size: 16px; }
  .products-page .mrp { font-size: 11px; }
  .products-page .product-card__actions { gap: 4px; margin-top: 4px; }
  .products-page .product-card__actions .btn { padding: 7px 4px; font-size: 11px; border-radius: 7px; }
  .products-page .btn-resell-link { display: none; }
  .products-page .badge--discount { top: 7px; left: 7px; padding: 3px 6px; font-size: 10px; border-radius: 5px; }

  .products-page .bottom-nav { height: 64px; }
  .products-page .bottom-nav__item { font-size: 10.5px; }
  .products-page .bottom-nav__item .bn-icon { font-size: 20px; }

  .products-page .mobile-sort-sheet.open { display: block; position: fixed; inset: 0; z-index: 500; background: rgba(0,0,0,.32); }
  .products-page .mobile-sort-sheet__inner {
    position: absolute; left: 0; right: 0; bottom: 0; background: #fff; border-radius: 18px 18px 0 0;
    padding: 12px 16px 24px; box-shadow: 0 -8px 24px rgba(0,0,0,.14);
  }
  .products-page .mobile-sheet-title { font-size: 16px; font-weight: 800; padding: 8px 0 10px; }
  .products-page .mobile-sort-sheet button {
    display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid #eee;
    background: #fff; padding: 13px 2px; font-size: 14px;
  }
}

/* ==========================================================================
   Mobile product-detail overflow fix
   ========================================================================== */
@media (max-width: 899px) {
  html, body { width: 100%; max-width: 100%; overflow-x: hidden; }
  #pdRoot, #pdLayout, .pd-layout { width: 100%; max-width: 100%; min-width: 0; }
  .pd-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
  .pd-gallery, .pd-info { width: 100%; max-width: 100%; min-width: 0; }
  .pd-gallery__main { width: 100%; }
  .pd-gallery__main img {
    width: 100%; height: auto; max-height: 420px; object-fit: contain;
  }
  .pd-gallery__thumbs {
    width: 100%; max-width: 100%; overflow-x: auto; overflow-y: hidden;
    padding-bottom: 3px; scrollbar-width: none;
  }
  .pd-gallery__thumbs::-webkit-scrollbar { display: none; }
  .pd-info { overflow-wrap: anywhere; word-break: normal; }
  .pd-info h1 { font-size: 20px; line-height: 1.3; overflow-wrap: anywhere; }
  .pd-info > p { font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
  .pd-price-row { flex-wrap: wrap; }
  .pd-actions { width: 100%; }
  .pd-actions .btn { min-width: 0; flex: 1 1 120px; }
  .tabs { width: 100%; max-width: 100%; overflow-x: auto; white-space: nowrap; gap: 18px; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab-panel { width: 100%; max-width: 100%; overflow-wrap: anywhere; }
  .spec-table { table-layout: fixed; }
  .spec-table td { overflow-wrap: anywhere; word-break: break-word; }
}

/* ==========================================================================
   SHOPMEE Premium Responsive Header — Desktop + Mobile
   ========================================================================== */
.site-header { background:#fff; border-bottom:1px solid #eee7f0; box-shadow:0 3px 14px rgba(35,20,40,.06); }
.header-benefits { background:linear-gradient(90deg,var(--color-primary),#d20c7d 48%,var(--color-accent)); color:#fff; }
.header-benefits__inner { min-height:42px; display:flex; align-items:center; gap:28px; font-size:12px; white-space:nowrap; overflow:hidden; }
.header-benefits__inner > span { display:flex; align-items:center; gap:5px; }
.header-benefits__cta { margin-left:auto; padding:8px 16px; border-radius:999px; background:rgba(255,255,255,.18); font-weight:700; }
.site-header__top { min-height:82px; height:auto; gap:18px; }
.logo { gap:10px; color:#10233f; }
.logo__bag { width:54px; height:54px; border-radius:14px; position:relative; display:flex; align-items:center; justify-content:center; background:linear-gradient(145deg,#9c1c8c 5%,#e30c80 48%,#ff7a22 100%); box-shadow:0 7px 16px rgba(156,28,140,.22); transform:rotate(-2deg); }
.logo__bag:before { content:""; position:absolute; width:22px; height:13px; left:16px; top:-6px; border:4px solid #ff8a24; border-bottom:0; border-radius:14px 14px 0 0; transform:rotate(7deg); }
.logo__bag span { color:#fff; font-size:30px; font-weight:900; line-height:1; transform:rotate(2deg); }
.logo__text strong { display:block; font-size:30px; letter-spacing:-1.2px; line-height:1; color:#122541; }
.logo__text strong span { background:linear-gradient(90deg,#e10b82,#ff6b35); -webkit-background-clip:text; background-clip:text; color:transparent; }
.logo__text small { margin-top:5px; font-size:10px; letter-spacing:.65px; color:#6b6570; font-weight:700; }
.search-bar { max-width:none; height:48px; display:flex; align-items:center; border:1.5px solid #dcd5df; border-radius:26px; background:#fff; overflow:hidden; box-shadow:0 2px 7px rgba(30,15,30,.03); }
.search-bar input { border:0; background:transparent; padding:10px 10px 10px 0; height:100%; outline:none; flex:1; min-width:0; }
.search-bar__leading { font-size:27px; line-height:1; color:#667085; padding:0 11px 2px 15px; transform:rotate(-20deg); }
.search-category { height:28px; border:0; border-left:1px solid #e6e0e7; background:#fff; color:#26364e; font-size:12px; font-weight:700; padding:0 12px; outline:none; }
.search-submit { height:100%; border:0; padding:0 21px; background:linear-gradient(90deg,#b315a0,#ff6b35); color:#fff; font-weight:800; font-size:14px; }
.header-actions { gap:2px; }
.header-action { position:relative; min-width:68px; min-height:52px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:1px; border-left:1px solid #eee8ef; color:#182941; font-size:11px; font-weight:700; }
.header-action__icon { font-size:23px; line-height:1; }
.header-action__label { line-height:1.2; }
.reseller-action { min-width:auto; flex-direction:row; padding:0 13px; border:1px solid var(--color-primary); border-radius:9px; color:var(--color-primary); font-size:13px; margin-right:7px; min-height:38px; }
.cart-count { top:4px; right:11px; }
.header-nav { display:flex; gap:0; min-height:54px; padding:0; border-top:1px solid #eee8ef; align-items:stretch; overflow-x:auto; scrollbar-width:none; }
.header-nav::-webkit-scrollbar { display:none; }
.header-nav a { display:flex; align-items:center; gap:6px; padding:0 14px; color:#25344d; font-size:13px; font-weight:700; white-space:nowrap; border-bottom:3px solid transparent; }
.header-nav a:hover, .header-nav a.active { color:var(--color-primary); border-bottom-color:var(--color-primary); }
.header-nav .nav-category { min-width:215px; justify-content:space-between; color:#fff; background:linear-gradient(90deg,#a8149a,#ff6b35); border-radius:24px; margin:8px 12px 8px 0; padding:0 18px; border:0; }
.header-nav .nav-category span { font-size:22px; }
.header-nav .nav-category b { font-size:17px; }
.header-nav .nav-more { margin-left:auto; }
.mobile-menu-btn, .mobile-menu-panel { display:none; }
.mobile-search-row { display:none; }
@media (min-width:900px) {
  .search-bar { display:flex; flex:1; }
}
@media (max-width:899px) {
  .header-benefits { display:none; }
  .site-header__top { min-height:60px; height:60px; gap:8px; }
  .mobile-menu-btn { display:flex; width:38px; height:38px; border:0; background:transparent; align-items:center; justify-content:center; font-size:25px; color:#182941; flex-shrink:0; }
  .logo { gap:7px; }
  .logo__bag { width:42px; height:42px; border-radius:11px; }
  .logo__bag:before { width:16px; height:9px; left:12px; top:-5px; border-width:3px; }
  .logo__bag span { font-size:23px; }
  .logo__text strong { font-size:21px; letter-spacing:-.8px; }
  .logo__text small { font-size:7px; margin-top:3px; letter-spacing:.35px; }
  .header-actions { margin-left:auto; }
  .header-action { min-width:42px; min-height:42px; border:0; }
  .header-action__icon { font-size:21px; }
  .header-action__label, .account-action { display:none; }
  .cart-action { display:flex; }
  .cart-count { top:0; right:0; }
  .mobile-search-row { display:block; padding:7px 0 10px; }
  .mobile-search-row .search-bar { display:flex; width:100%; height:44px; }
  .mobile-search-row .search-submit { width:45px; padding:0; font-size:19px; }
  .header-nav { display:none; }
  .mobile-menu-panel { display:flex; flex-direction:column; max-height:0; overflow:hidden; transition:max-height .2s ease; border-top:0 solid #eee8ef; }
  .mobile-menu-panel.open { max-height:420px; border-top-width:1px; padding:6px 0 10px; }
  .mobile-menu-panel a { padding:11px 12px; font-weight:700; font-size:14px; border-radius:8px; }
  .mobile-menu-panel a:hover { background:var(--color-primary-light); color:var(--color-primary); }
  .search-category { display:none; }
}
CSS
cat >> /mnt/data/shopmee_latest/src/js/app.js <<'JS'

// Premium responsive header menu
(function(){
  const btn=document.querySelector('.mobile-menu-btn');
  const panel=document.querySelector('.mobile-menu-panel');
  if(btn && panel){
    btn.addEventListener('click',()=>{
      const open=panel.classList.toggle('open');
      btn.setAttribute('aria-expanded',String(open));
      btn.textContent=open?'✕':'☰';
      panel.setAttribute('aria-hidden',String(!open));
    });
  }
})();
JS
