:root {
  color-scheme: light;
  --ink: #151f28;
  --muted: #5e6b78;
  --paper: #f5f7fb;
  --panel: #ffffff;
  --line: #e5ecf0;
  --teal: #0078ad;
  --teal-dark: #00557c;
  --green: #28af60;
  --green-dark: #12784f;
  --yellow: #ffca3d;
  --orange: #ffad18;
  --red: #e0292f;
  --rose: #d84c5b;
  --shadow: 0 16px 38px rgba(21, 31, 40, 0.08);
  --header-bg: linear-gradient(135deg, #00557c, #0078ad);
}

[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f1f5f9;
  --muted: #94a3b8;
  --paper: #0b0f19;
  --panel: #161e2e;
  --line: #242f41;
  --teal: #38bdf8;
  --teal-dark: #0ea5e9;
  --green: #34d399;
  --green-dark: #059669;
  --yellow: #fbbf24;
  --orange: #f59e0b;
  --red: #fb7185;
  --rose: #f472b6;
  --shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  --header-bg: linear-gradient(135deg, #0f172a, #1e293b);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  overflow-x: hidden;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--header-bg);
  color: #fff;
  box-shadow: var(--shadow);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.brand-block,
.header-main,
.promo-strip,
.location-strip,
.section-heading,
.view-tabs,
.search-box,
.cart-total,
.order-actions {
  display: flex;
  align-items: center;
}

.brand-block {
  gap: 12px;
  min-width: max-content;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  background: var(--red);
  color: #fff;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.76rem;
}

.brand-block h1 {
  color: #fff;
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  font-weight: 900;
}

.brand-block h1 span {
  color: var(--green);
}

.eyebrow {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.promo-strip {
  justify-content: space-between;
  gap: 16px;
  padding: 7px clamp(16px, 4vw, 34px);
  background: var(--teal-dark);
  font-size: 0.78rem;
}

.header-main {
  gap: 16px;
  padding: 12px clamp(16px, 4vw, 34px);
}

.location-strip {
  gap: 10px;
  padding: 8px clamp(16px, 4vw, 34px);
  background: rgba(5, 83, 122, 0.96);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.82rem;
}

.quick-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  gap: 16px;
  margin: 18px 0 16px;
}

.shopping-list-card,
.mini-cart-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.3s ease, border-color 0.3s ease;
  backdrop-filter: blur(12px);
}

.shopping-list-card:hover,
.mini-cart-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(21, 31, 40, 0.12);
}

.shopping-list-card {
  grid-template-columns: minmax(220px, 0.45fr) minmax(0, 0.55fr);
  align-items: center;
}

.shopping-list-card h2 {
  font-size: 1.35rem;
}

.shopping-list-card p:not(.eyebrow),
.mini-cart-card span {
  margin-bottom: 0;
  color: var(--muted);
}

.shopping-list-actions {
  display: grid;
  gap: 10px;
}

.shopping-list-actions textarea {
  width: 100%;
  min-height: 76px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  resize: vertical;
  outline: none;
}

.shopping-list-actions div {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.mini-cart-card strong {
  font-size: 1.25rem;
}

.mini-cart-card b {
  font-size: 1.45rem;
}

.location-strip > span:first-child {
  padding: 4px 10px;
  border-radius: 999px;
  background: #fff;
  color: var(--teal-dark);
  font-weight: 900;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  line-height: 1.1;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.25rem, 2.5vw, 1.9rem);
}

h3 {
  margin-bottom: 6px;
  font-size: 1rem;
}

.location-field {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.75rem;
  font-weight: 700;
}

.location-field input,
.search-box input,
.checkout-form input,
.checkout-form textarea,
.loyalty-controls input,
.stock-input {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

.location-field input {
  width: 92px;
  padding: 6px 8px;
}

.mode-switch {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 4px;
  padding: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.mode-button {
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 800;
}

.mode-button {
  min-width: 112px;
}

.mode-button.active {
  background: #fff;
  color: var(--teal-dark);
}

main {
  width: min(1320px, 100%);
  margin: 0 auto;
  padding: 0 clamp(16px, 3vw, 24px) 42px;
}

.search-wrapper {
  position: relative;
  flex: 1;
  max-width: 650px;
}

.search-box {
  flex: 1;
  max-width: 100%;
  margin: 0;
  gap: 8px;
  padding: 0 16px;
  background: #fff;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
}

.search-box span {
  position: relative;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  border: 2px solid #7b8792;
  border-radius: 999px;
  font-size: 0;
}

.search-box span::after {
  position: absolute;
  right: -5px;
  bottom: -4px;
  width: 8px;
  height: 2px;
  background: #7b8792;
  border-radius: 999px;
  content: "";
  transform: rotate(45deg);
}

.search-box input {
  width: 100%;
  min-height: 44px;
  border: 0;
}

.header-icon,
.signin-button {
  border: 0;
  background: transparent;
  color: #fff;
  font-weight: 900;
}

.header-icon {
  min-width: 42px;
  height: 42px;
  border-radius: 999px;
}

.cart-open-button {
  padding-inline: 14px;
  background: rgba(255, 255, 255, 0.12);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cart-open-button span {
  padding: 3px 7px;
  border-radius: 999px;
  background: #fff;
  color: var(--teal-dark);
  font-size: 0.72rem;
}

.theme-toggle-button {
  padding-inline: 12px;
  background: rgba(255, 255, 255, 0.08);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  font-size: 0.82rem;
  transition: background 0.2s ease;
}

.theme-toggle-button:hover {
  background: rgba(255, 255, 255, 0.16);
}

.signin-button {
  white-space: nowrap;
}

.category-rail {
  display: flex;
  gap: clamp(18px, 4vw, 56px);
  overflow-x: auto;
  scrollbar-width: none;
  padding: 16px 8px 18px;
  background: #fff;
  border-radius: 0 0 18px 18px;
  border-bottom: 1px solid var(--line);
}

.category-rail::-webkit-scrollbar {
  display: none;
}

.category-rail button {
  display: grid;
  gap: 8px;
  min-width: 90px;
  justify-items: center;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 900;
  white-space: nowrap;
}

.category-rail span {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffe2b8, #fff8e6);
}

.category-rail button:nth-child(2) span {
  background: linear-gradient(135deg, #ddecff, #f7fbff);
}

.category-rail button:nth-child(3) span {
  background: linear-gradient(135deg, #ffd8ec, #fff7fb);
}

.category-rail button:nth-child(4) span {
  background: linear-gradient(135deg, #c9f8e9, #f5fffb);
}

.category-rail button:nth-child(5) span {
  background: linear-gradient(135deg, #ffddeb, #fff8fb);
}

.category-rail button:nth-child(6) span {
  background: linear-gradient(135deg, #ffefbc, #fffaf0);
}

.deal-hero {
  min-height: 230px;
  margin: 16px 0 16px;
  padding: clamp(24px, 4vw, 42px);
  display: flex;
  align-items: center;
  border-radius: 24px;
  background:
    radial-gradient(circle at 82% 38%, rgba(255, 255, 255, 0.42), transparent 18%),
    linear-gradient(110deg, #dff4ff, #ffe990 48%, #ffc43b);
  overflow: hidden;
}

.deal-hero p {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--teal-dark);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-subtitle {
  margin-top: 0;
  max-width: 540px;
  color: var(--teal-dark);
  font-size: 1rem;
  font-weight: 700;
}

.deal-hero h2 {
  color: var(--teal-dark);
  font-size: clamp(2.3rem, 6vw, 4rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.deal-hero a,
.deal-hero button {
  display: inline-flex;
  margin-top: 22px;
  padding: 12px 24px;
  border: 0;
  border-radius: 999px;
  background: var(--teal);
  color: #fff;
  font-weight: 900;
  text-decoration: none;
}

.offer-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

.offer-strip article {
  min-height: 112px;
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, #eaf8ff, #ffffff);
  border: 1px solid var(--line);
  box-shadow: 0 8px 22px rgba(21, 31, 40, 0.07);
}

.offer-strip article[role="button"] {
  cursor: pointer;
}

.offer-strip article:nth-child(2) {
  background: linear-gradient(135deg, #f2fff7, #ffffff);
}

.offer-strip article:nth-child(3) {
  background: linear-gradient(135deg, #fff7df, #ffffff);
}

.offer-strip p {
  margin-bottom: 8px;
  color: var(--teal-dark);
  font-weight: 900;
}

.offer-strip strong,
.offer-strip span {
  display: block;
}

.offer-strip span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.88rem;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.page-view[hidden] {
  display: none;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 16px 0 10px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.breadcrumb button {
  border: 0;
  background: transparent;
  color: var(--teal-dark);
  font-weight: 900;
}

.category-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(135deg, #e9f7ff, #fff8df);
}

.category-hero p:not(.eyebrow) {
  max-width: 640px;
  margin: 8px 0 0;
  color: var(--muted);
}

.subcategory-rail {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  margin-bottom: 14px;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.subcategory-rail::-webkit-scrollbar {
  display: none;
}

.subcategory-rail button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-weight: 900;
  white-space: nowrap;
}

.subcategory-rail button.active {
  border-color: #bfe8f7;
  background: #eaf7fd;
  color: var(--teal-dark);
}

.catalog-panel,
.cart-panel,
.management-layout > section,
.delivery-card,
.metric-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.catalog-panel,
.cart-panel,
.management-layout > section {
  padding: 16px;
}

.section-heading {
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.section-heading.compact {
  margin-bottom: 12px;
}

.promise-pill,
.status-pill {
  margin: 0;
  padding: 8px 10px;
  border-radius: 999px;
  background: #e9f5ef;
  color: var(--green-dark);
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 14px;
}

.product-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.3s ease, border-color 0.3s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  border-color: var(--teal);
}

.product-card h3,
.product-meta {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
}

.product-card h3 {
  -webkit-line-clamp: 2;
}

.product-meta {
  -webkit-line-clamp: 2;
}

.product-card img {
  width: 100%;
  height: 220px;
  object-fit: contain;
  background: #ffffff;
  padding: 8px;
  display: block;
}

.card-thumbnails {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 6px 0;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.card-thumb-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.card-thumb-dot:hover,
.card-thumb-dot.active {
  background: var(--teal);
  transform: scale(1.25);
}

.product-image-button,
.product-title-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.product-image-button {
  display: block;
  width: 100%;
}

.product-title-button {
  display: -webkit-box;
  overflow: hidden;
  width: 100%;
  margin: 0 0 6px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.2;
}

.rating-line {
  margin: 4px 0;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 900;
}

.rating-line span {
  color: var(--muted);
  font-weight: 700;
}

.product-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 8px;
  padding: 13px;
}

.product-meta {
  color: var(--muted);
  font-size: 0.83rem;
}

.product-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
}

.price {
  font-size: 1.15rem;
  font-weight: 900;
}

.mrp {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: line-through;
}

.primary-button,
.secondary-button,
.add-button,
.icon-button {
  border: 0;
  border-radius: 8px;
  font-weight: 900;
}

.primary-button,
.add-button {
  background: var(--green);
  color: #fff;
}

.primary-button {
  min-height: 46px;
  width: 100%;
}

.primary-button:disabled {
  background: #b7c4ca;
  cursor: not-allowed;
}

.secondary-button {
  min-height: 34px;
  padding: 0 10px;
  background: #eef6f2;
  color: var(--green-dark);
}

.add-button {
  min-width: 92px;
  min-height: 38px;
  border-radius: 999px;
  background: #eaf7fd;
  color: var(--teal-dark);
  border: 1px solid #bfe8f7;
}

.icon-button {
  width: 36px;
  height: 36px;
  background: #f7e8ea;
  color: var(--rose);
  font-size: 1.25rem;
}

.cart-panel {
  color: var(--ink);
}

.cart-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(5, 17, 25, 0.42);
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 70;
  width: min(420px, 100vw);
  height: 100dvh;
  overflow-y: auto;
  border-radius: 0;
  border-right: 0;
  transform: translateX(100%);
  transition: transform 0.24s ease;
}

.cart-drawer.open {
  transform: translateX(0);
}

.cart-title-actions {
  display: flex;
  gap: 8px;
}

.close-cart-button {
  width: auto;
  padding-inline: 12px;
  font-size: 0.8rem;
}

.cart-items {
  display: grid;
  gap: 10px;
  min-height: 90px;
}

.cart-item {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.cart-item img {
  width: 52px;
  height: 52px;
  border-radius: 6px;
  object-fit: cover;
}

.cart-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.loyalty-panel {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(24, 76, 120, 0.07) 0%, rgba(40, 175, 96, 0.07) 100%);
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 12px rgba(255,255,255,0.4), 0 4px 12px rgba(0,0,0,0.02);
  backdrop-filter: blur(8px);
}

.loyalty-panel::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 60%);
  pointer-events: none;
}

.loyalty-panel strong {
  display: block;
  margin-bottom: 2px;
  font-size: 1.25rem;
  font-weight: 800;
  background: linear-gradient(90deg, var(--ink), var(--teal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.loyalty-panel p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.coupon-panel {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(0, 120, 173, 0.25);
  border-radius: 8px;
  background: rgba(0, 120, 173, 0.06);
}

.coupon-panel strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1.12rem;
}

.coupon-panel p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.loyalty-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.coupon-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.coupon-controls input {
  min-width: 0;
}

.loyalty-controls input {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
}

.quantity-control {
  display: grid;
  grid-template-columns: 28px 30px 28px;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.quantity-control button {
  height: 30px;
  border: 0;
  background: #f4f7f5;
  font-weight: 900;
}

.quantity-control span {
  text-align: center;
  font-size: 0.85rem;
  font-weight: 900;
}

.cart-total {
  align-items: stretch;
  flex-direction: column;
  gap: 8px;
  margin: 16px 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.cart-total > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cart-total span {
  color: var(--muted);
}

.grand-total {
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  font-size: 1.15rem;
}

.checkout-form {
  display: grid;
  gap: 10px;
}

.checkout-select {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.checkout-select select {
  width: 100%;
  min-height: 42px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.checkout-form input,
.checkout-form textarea {
  width: 100%;
  padding: 11px;
}

.checkout-form textarea {
  min-height: 76px;
  resize: vertical;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.metric-card {
  padding: 16px;
}

.metric-card strong {
  display: block;
  margin-top: 5px;
  font-size: 1.45rem;
}

.management-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(330px, 0.75fr);
  gap: 18px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  padding: 11px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.stock-input {
  width: 78px;
  padding: 7px;
}

.order-list,
.delivery-grid {
  display: grid;
  gap: 12px;
}

.delivery-grid {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.order-card,
.delivery-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.order-card p,
.delivery-card p {
  margin: 4px 0;
  color: var(--muted);
}

.order-actions {
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9999;
  max-width: 360px;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.admin-body {
  background: linear-gradient(180deg, #f2f7fb 0%, #eef4f8 100%);
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px clamp(16px, 4vw, 36px);
  background: #0b5f86;
  color: #fff;
}

.admin-header h1 {
  margin-top: 4px;
  font-size: 1.7rem;
}

.admin-main {
  width: min(1320px, 100%);
  margin: 0 auto;
  padding: 18px clamp(16px, 3vw, 24px) 36px;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.admin-note {
  color: var(--muted);
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.admin-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.admin-select {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.admin-select select,
.admin-body input[type="file"] {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.admin-result {
  overflow: auto;
  min-height: 96px;
  margin-top: 12px;
  padding: 12px;
  border-radius: 8px;
  background: #f8fafb;
  color: var(--ink);
  white-space: pre-wrap;
}

.admin-details {
  margin-top: 12px;
}

.admin-details summary {
  cursor: pointer;
  font-weight: 900;
  color: var(--teal-dark);
}

.admin-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.admin-settings-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.admin-settings-grid input,
.admin-settings-grid textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  resize: vertical;
}

.admin-settings-grid textarea {
  min-height: 72px;
}

.admin-settings-grid .span-2 {
  grid-column: 1 / -1;
}

.admin-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.admin-toggles label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 800;
}

.admin-save {
  width: auto;
  min-width: 140px;
}

.empty-state {
  display: grid;
  min-height: 150px;
  place-items: center;
  color: var(--muted);
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.product-detail {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
  gap: 18px;
  margin-bottom: 16px;
}

.detail-gallery,
.detail-panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
}

.detail-gallery {
  display: grid;
  place-items: center;
  min-height: 420px;
  overflow: hidden;
}

.detail-gallery img {
  width: 100%;
  height: 340px;
  object-fit: contain;
  padding: 10px;
}

.thumbnail-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  width: 100%;
  padding: 12px 14px 14px;
  box-sizing: border-box;
}

.thumb-button {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 3px;
}

.thumb-button.active {
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(25, 165, 83, 0.12);
}

.thumb-button img {
  width: 68px;
  height: 68px;
  display: block;
  object-fit: contain;
  background: #ffffff;
  border-radius: 9px;
}

.detail-panel {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 22px;
}

.detail-panel h2 {
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  line-height: 1.08;
}

.detail-price-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.detail-price-row strong {
  font-size: 2rem;
}

.detail-price-row span {
  color: var(--muted);
  font-weight: 800;
  text-decoration: line-through;
}

.detail-add-button {
  max-width: 260px;
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 4px;
}

.spec-grid span {
  min-height: 48px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
  color: var(--muted);
  font-weight: 750;
}

.related-panel {
  margin-bottom: 8px;
}

@media (max-width: 980px) {
  .promo-strip {
    display: none;
  }

  .header-main {
    align-items: stretch;
    flex-wrap: wrap;
    gap: 10px;
  }

  .brand-block {
    flex: 1;
  }

  .mode-switch {
    order: 4;
    width: 100%;
    grid-template-columns: 1fr 1fr;
  }

  .search-wrapper {
    order: 3;
    max-width: 100%;
    flex: 0 0 100%;
    width: 100%;
  }

  .management-layout {
    grid-template-columns: 1fr;
  }

  .quick-tools,
  .shopping-list-card,
  .offer-strip {
    grid-template-columns: 1fr;
  }
}

  @media (max-width: 420px) {
    .brand-block h1 {
      display: none;
    }
  }

@media (max-width: 560px) {
  .hide-mobile-text {
    display: none;
  }

  body {
    background: #eef4f7;
  }

  main {
    padding: 0 10px 28px;
  }

  .header-main,
  .location-strip {
    padding-inline: 10px;
  }

  .header-main {
    padding-block: 8px;
    gap: 8px;
  }

  .brand-block {
    min-width: 0;
    gap: 8px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    font-size: 0.9rem;
  }

  .brand-block h1 {
    font-size: 1.25rem;
  }

  .header-icon,
  .signin-button {
    height: 34px;
    min-width: 40px;
    padding: 0 8px;
    font-size: 0.78rem;
  }

  .header-icon[aria-label="Wishlist"],
  .signin-button {
    display: none;
  }

  .cart-open-button {
    margin-left: auto;
    background: rgba(255, 255, 255, 0.18);
  }

  .search-box {
    min-height: 38px;
    padding-inline: 14px;
  }

  .search-box input {
    min-height: 38px;
    font-size: 0.92rem;
  }

  .mode-switch {
    min-height: 38px;
  }

  .mode-button {
    min-width: 0;
    min-height: 30px;
    font-size: 0.9rem;
  }

  .location-strip {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px 8px;
    padding-block: 7px;
    font-size: 0.76rem;
  }

  .location-strip #storeLabel {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .location-strip .location-field {
    grid-column: auto;
    justify-content: end;
    width: auto;
    margin-left: 0;
  }

  .location-field span {
    display: none;
  }

  .location-field input {
    width: 86px;
    min-height: 32px;
    padding: 5px 6px;
    text-align: center;
  }

  .quick-tools {
    gap: 10px;
    margin: 12px 0;
  }

  .shopping-list-card,
  .mini-cart-card {
    padding: 12px;
    border-radius: 14px;
  }

  .shopping-list-card h2 {
    font-size: 1.08rem;
  }

  .shopping-list-card p:not(.eyebrow),
  .mini-cart-card span {
    font-size: 0.82rem;
  }

  .shopping-list-actions textarea {
    min-height: 58px;
    padding: 10px;
    font-size: 0.86rem;
  }

  .shopping-list-actions div {
    display: grid;
    grid-template-columns: 0.8fr 1fr;
  }

  .mini-cart-card {
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 6px 12px;
  }

  .mini-cart-card .eyebrow,
  .mini-cart-card span {
    grid-column: 1 / 2;
  }

  .mini-cart-card button {
    grid-column: 2 / 3;
    grid-row: 1 / 4;
    min-height: 40px;
  }

  .mini-cart-card b {
    font-size: 1.08rem;
  }

  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .section-heading {
    align-items: center;
    flex-direction: row;
    gap: 8px;
    margin-bottom: 12px;
  }

  .section-heading h2 {
    font-size: 1.25rem;
  }

  .promise-pill {
    padding: 6px 8px;
    font-size: 0.68rem;
    white-space: normal;
    text-align: center;
  }

  .category-rail {
    margin-inline: -10px;
    padding: 10px 10px 12px;
    gap: 10px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    overflow-x: hidden;
  }

  .category-rail button {
    min-width: 0;
    max-width: 100%;
    gap: 6px;
    font-size: 0.72rem;
    line-height: 1.15;
    white-space: normal;
  }

  .category-rail span {
    width: 46px;
    height: 46px;
  }

  .deal-hero {
    min-height: 150px;
    margin: 14px 0 14px;
    padding: 18px;
    border-radius: 16px;
  }

  .deal-hero p {
    margin-bottom: 10px;
    padding: 6px 10px;
    font-size: 0.65rem;
  }

  .deal-hero h2 {
    font-size: 1.82rem;
    max-width: 300px;
  }

  .deal-hero a,
  .deal-hero button {
    margin-top: 14px;
    padding: 10px 18px;
    font-size: 0.86rem;
  }

  .offer-strip {
    gap: 10px;
    margin-bottom: 12px;
  }

  .offer-strip article {
    min-height: auto;
    padding: 12px;
    border-radius: 14px;
  }

  .offer-strip span {
    font-size: 0.78rem;
  }

  .catalog-panel {
    padding: 12px;
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(21, 31, 40, 0.08);
  }

  .product-card {
    min-height: 0;
    border-radius: 12px;
  }

  .product-card img {
    height: 180px;
  }

  .product-body {
    gap: 6px;
    padding: 9px;
  }

  .product-card .eyebrow {
    font-size: 0.62rem;
  }

  .product-card h3 {
    margin-bottom: 2px;
    font-size: 0.88rem;
    line-height: 1.18;
  }

  .rating-line {
    margin: 0;
    font-size: 0.72rem;
  }

  .product-meta {
    font-size: 0.7rem;
    line-height: 1.25;
  }

  .price {
    font-size: 0.98rem;
  }

  .mrp {
    font-size: 0.68rem;
  }

  .add-button {
    min-width: 58px;
    min-height: 32px;
    padding: 0 10px;
    font-size: 0.8rem;
  }

  .cart-drawer {
    left: 0;
    right: 0;
    width: auto;
    padding: 14px;
  }

  .cart-title-actions {
    gap: 6px;
  }

  .icon-button {
    height: 34px;
    min-width: 34px;
  }

  .close-cart-button {
    padding-inline: 10px;
  }

  .cart-item {
    grid-template-columns: 48px 1fr auto;
  }

  .checkout-form input,
  .checkout-form textarea {
    min-height: 44px;
  }

  .coupon-controls,
  .loyalty-controls {
    grid-template-columns: 1fr;
  }

  .toast {
    right: 10px;
    bottom: 10px;
    left: 10px;
    max-width: none;
  }

  .breadcrumb {
    margin: 12px 0 8px;
    font-size: 0.78rem;
  }

  .category-hero {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
    border-radius: 14px;
  }

  .category-hero .secondary-button {
    width: 100%;
    min-height: 40px;
  }

  .subcategory-rail {
    gap: 8px;
    margin-bottom: 12px;
  }

  .subcategory-rail button {
    min-height: 34px;
    padding: 0 12px;
    font-size: 0.78rem;
  }

  .product-title-button {
    margin-bottom: 2px;
    font-size: 0.88rem;
    line-height: 1.18;
  }

  .product-detail {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .detail-gallery {
    min-height: 260px;
    border-radius: 14px;
  }

  .detail-panel {
    gap: 10px;
    padding: 14px;
    border-radius: 14px;
  }

  .detail-panel h2 {
    font-size: 1.45rem;
  }

  .detail-price-row strong {
    font-size: 1.5rem;
  }

  .detail-add-button {
    max-width: none;
  }

  .thumbnail-strip {
    padding: 10px 12px 12px;
  }

  .thumb-button img {
    width: 56px;
    height: 56px;
  }

  .spec-grid {
    grid-template-columns: 1fr;
  }

  .admin-header,
  .admin-grid {
    flex-direction: column;
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .admin-settings-grid {
    grid-template-columns: 1fr;
  }

  .admin-settings-grid .span-2 {
    grid-column: auto;
  }

  .admin-header h1 {
    font-size: 1.4rem;
  }
}

/* Autocomplete Search Suggestions */
.suggestion-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
}
.suggestion-item:hover {
  background: var(--paper);
}
.suggestion-item img {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  object-fit: cover;
}
.suggestion-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.suggestion-name {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--ink);
}
.suggestion-price {
  font-size: 0.76rem;
  color: var(--teal);
  font-weight: 800;
}
.suggestion-action {
  background: var(--teal);
  color: #fff;
  border: 0;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  transition: opacity 0.2s ease;
}
.suggestion-action:hover {
  opacity: 0.9;
}

/* Admin Chart & Inline Editor */
.admin-chart-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  margin-top: 18px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.admin-inventory-table-container {
  overflow-x: auto;
  margin-top: 14px;
}
.admin-inventory-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.admin-inventory-table th,
.admin-inventory-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 0.88rem;
  color: var(--ink);
}
.admin-inventory-table th {
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}
.admin-inventory-table input {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  width: 80px;
}
.admin-inventory-table .save-row-btn {
  background: var(--teal);
  color: #fff;
  border: 0;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
}
.admin-inventory-table .save-row-btn:hover {
  opacity: 0.95;
}

/* Category Cards Styling */
.category-cards-section {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  margin: 20px 0;
  padding: 0 4px;
}

@media (max-width: 768px) {
  .category-cards-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding-bottom: 8px;
  }
}

.category-card {
  text-align: center;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.06) !important;
}

.category-card img {
  transition: transform 0.2s ease;
}

.category-card:hover img {
  transform: scale(1.05);
}

/* Admin Sidebar Layout */
.admin-layout-wrapper {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

.admin-sidebar {
  width: 250px;
  background: #0b5f86;
  color: white;
  display: flex;
  flex-direction: column;
  padding: 24px 0;
  box-shadow: 2px 0 10px rgba(0,0,0,0.05);
  flex-shrink: 0;
}

.admin-sidebar h2 {
  margin: 0 24px 24px;
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 15px;
}

.admin-sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-sidebar nav button {
  background: none;
  border: none;
  color: rgba(255,255,255,0.8);
  padding: 14px 24px;
  text-align: left;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-sidebar nav button:hover {
  background: rgba(255,255,255,0.08);
  color: white;
}

.admin-sidebar nav button.active {
  background: rgba(255,255,255,0.15);
  color: white;
  border-left: 4px solid var(--green);
}

.admin-content-area {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background: #f4f8fa;
}

/* Category Admin Layout styling */
.admin-category-card {
  background: white;
  border-radius: 12px;
  padding: 15px;
  border: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.admin-subcat-badge {
  background: rgba(0, 120, 173, 0.08);
  color: var(--teal);
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-right: 6px;
  display: inline-block;
}

@media (max-width: 768px) {
  .admin-layout-wrapper {
    flex-direction: column;
  }
  .admin-sidebar {
    width: 100%;
    padding: 15px 0 10px;
  }
  .admin-sidebar h2 {
    margin: 0 15px 12px;
    font-size: 1.1rem;
    padding-bottom: 8px;
  }
  .admin-sidebar nav {
    flex-direction: row;
    overflow-x: auto;
    white-space: nowrap;
    padding: 0 15px;
    gap: 4px;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }
  .admin-sidebar nav::-webkit-scrollbar {
    display: none;
  }
  .admin-sidebar nav button {
    padding: 8px 16px;
    font-size: 0.82rem;
    border-radius: 6px;
    width: auto;
    border-left: none !important;
    border-bottom: 2px solid transparent;
  }
  .admin-sidebar nav button.active {
    background: rgba(255,255,255,0.15);
    border-bottom: 2px solid var(--green);
  }
  .admin-content-area {
    height: auto;
    min-height: calc(100vh - 120px);
  }
  .metrics-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important;
    gap: 12px !important;
  }
}

/* Upgraded Floating Chatbot Panel Styles */
.chatbot-widget-container {
  position: fixed;
  bottom: 85px;
  right: 20px;
  z-index: 999;
  font-family: inherit;
}

.chatbot-toggle-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(40, 175, 96, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.25s ease;
}

.chatbot-toggle-btn:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 10px 28px rgba(40, 175, 96, 0.4);
}

.chatbot-panel-premium {
  display: none;
  width: 360px;
  height: 500px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  position: absolute;
  bottom: 75px;
  right: 0;
  flex-direction: column;
  overflow: hidden;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  transform-origin: bottom right;
}

.chatbot-panel-premium.open {
  display: flex;
  animation: chatbotGrow 0.3s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

@keyframes chatbotGrow {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Micro-animation: bouncing cart totals */
@keyframes cartBounce {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.cart-bounce-anim {
  animation: cartBounce 0.3s ease-in-out;
}

.detect-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background-color: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s;
  height: 28px;
}

.detect-btn:hover {
  background-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.detect-btn.loading {
  opacity: 0.7;
  cursor: wait;
}
