/* ===== Premium polish on every page ===== */
:root {
  --glass: rgba(255, 255, 255, 0.72);
  --glass-strong: rgba(255, 255, 255, 0.88);
  --glass-border: rgba(255, 255, 255, 0.7);
  --glass-shadow: 0 10px 28px rgba(13, 71, 161, 0.1), inset 0 1px 0 rgba(255,255,255,.7);
  --liquid-1: #1a73e8;
  --liquid-2: #4f8ef7;
  --liquid-3: #c6ddff;
}

body {
  background:
    radial-gradient(980px 420px at 8% -12%, rgba(26,115,232,.11), transparent 62%),
    radial-gradient(760px 380px at 100% 0%, rgba(79,142,247,.1), transparent 58%),
    var(--background);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Header stays solid so scroll stays smooth */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: #fff;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(13,71,161,.04);
}
.site-header::before { content: none; }
.header-inner { position: relative; z-index: 1; }
.search-wrap input {
  background: #fff;
  border: 0;
  box-shadow: none;
}
.icon-btn {
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(13,71,161,.05);
  border-radius: 10px;
}
.side-toggle { border-radius: 8px; }
.find-block { box-shadow: 0 4px 14px rgba(13,71,161,.06); }

/* iOS liquid tab bar */
.bottom-nav {
  background: rgba(255,255,255,.62);
  backdrop-filter: blur(22px) saturate(1.7);
  -webkit-backdrop-filter: blur(22px) saturate(1.7);
  border: 1px solid rgba(255,255,255,.76);
  box-shadow:
    0 10px 28px rgba(13,71,161,.14),
    inset 0 1px 0 rgba(255,255,255,.85);
  overflow: hidden;
}
.bottom-nav::before {
  content: "";
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(115deg, rgba(255,255,255,.62) 0%, rgba(255,255,255,0) 42%, rgba(168,212,255,.24) 100%);
}
.bottom-nav a { position: relative; z-index: 1; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .bottom-nav { background: rgba(255,255,255,.96); }
}

/* Modal */
.modal-backdrop {
  background: rgba(10, 26, 46, 0.34);
  backdrop-filter: blur(6px);
}
.modal-sheet {
  background: linear-gradient(180deg, #ffffff 0%, #f6f9ff 100%);
  border: 1px solid rgba(255,255,255,.8);
  box-shadow: 0 18px 48px rgba(13,71,161,.16);
  position: relative;
  overflow: hidden;
}
.modal-sheet::before {
  content: "";
  position: absolute; width: 140px; height: 140px; border-radius: 50%;
  background: radial-gradient(circle, rgba(26,115,232,.12), transparent 70%);
  top: -50px; right: -30px; pointer-events: none;
}
.modal-sheet > * { position: relative; z-index: 1; }

.glass-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.btn-liquid {
  background: linear-gradient(135deg, #1a73e8 0%, #0b4aa8 100%);
  color: #fff;
  border: none;
  border-radius: 12px;
  box-shadow: 0 8px 16px rgba(26,115,232,.22);
}
.btn-liquid:hover { color: #fff; filter: brightness(1.04); }
.btn-ghost {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 12px;
}
.glass-input {
  background: #fff !important;
  border: 1px solid var(--border) !important;
}
.glass-input::placeholder {
  color: #93a4b8;
  font-weight: 500;
  opacity: 1;
}
.field-hint {
  margin: 2px 0 6px;
  color: #8aa0b8;
  font-size: .72rem;
  font-weight: 600;
  line-height: 1.3;
}

/* Auth pages */
.auth-liquid {
  position: relative;
  min-height: auto;
  display: grid;
  place-items: center;
  padding: 8px 0 16px;
  overflow: visible;
}
.liquid-blob {
  position: absolute;
  border-radius: 46% 54% 52% 48%;
  filter: blur(12px);
  opacity: .28;
  pointer-events: none;
  z-index: 0;
  animation: authDrift 9s ease-in-out infinite;
}
.blob-a {
  width: 180px; height: 180px; left: -20px; top: -30px;
  background: radial-gradient(circle at 30% 30%, #9cc4ff, #1a73e8 68%, transparent 74%);
}
.blob-b {
  width: 200px; height: 200px; right: -30px; bottom: -40px;
  background: radial-gradient(circle at 70% 40%, #d7e8ff, #4f8ef7 60%, transparent 74%);
  animation-delay: -3s;
}
.blob-c {
  width: 120px; height: 120px; right: 18%; top: 8%;
  background: radial-gradient(circle, rgba(13, 184, 140, .55), transparent 70%);
  animation-delay: -6s;
}
.auth-card, .form-card.glass-card, .auth-liquid .form-card {
  width: min(400px, 100%);
  padding: 16px 14px 12px;
  position: relative;
  z-index: 2;
  border-radius: 22px;
  border: 1px solid #d7e6fb;
  background: #fff;
  box-shadow: 0 18px 40px rgba(11, 74, 168, .14), inset 0 1px 0 #fff;
  backdrop-filter: blur(14px);
  animation: authRise .45s cubic-bezier(.2,.8,.2,1) both;
}
.auth-card::before {
  content: "";
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(120deg, rgba(26,115,232,.08), transparent 36%, rgba(255,255,255,0) 60%);
}
.auth-card > * { position: relative; z-index: 1; }
.auth-brand { text-align: center; margin-bottom: 10px; }
.auth-brand .brand-live { justify-content: center; }
.auth-liquid h1 {
  margin: 0 0 8px; font-size: 1.05rem; color: var(--primary-dark); letter-spacing: -.02em;
}
.auth-brand p { margin: 4px 0 0; color: var(--muted); font-size: .78rem; }
.auth-tabs {
  position: relative;
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  background: #eef4fc;
  border: 1px solid #d7e6fb;
  border-radius: 14px; padding: 3px; margin-bottom: 12px;
}
.auth-tab-glider {
  position: absolute; top: 3px; bottom: 3px; left: 3px;
  width: calc(50% - 3px);
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(11, 74, 168, .1);
  transition: transform .28s cubic-bezier(.2,.8,.2,1);
}
.auth-tabs.is-otp .auth-tab-glider { transform: translateX(100%); }
.auth-tab {
  position: relative; z-index: 1;
  border: none; background: transparent; border-radius: 11px;
  padding: 8px 6px; font-weight: 700; font-size: .78rem; color: var(--muted); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.auth-tab i { font-size: .85rem; }
.auth-tab.active { color: var(--primary-dark); }
.auth-tab.active .fa-whatsapp { color: #128C7E; }
.otp-channels { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.otp-channel {
  flex: 1 1 30%; border: 1px solid #d7e6fb; background: #fff; color: var(--muted);
  border-radius: 11px; padding: 7px 6px; font-weight: 700; font-size: .75rem; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.otp-channel.is-on { color: var(--primary-dark); border-color: #9ec4f5; background: #f3f8ff; }
.otp-channel.is-on .fa-whatsapp { color: #128C7E; }
.otp-wa-mini {
  flex: 0 0 auto; width: auto; margin: 0 0 8px; padding: 4px 10px;
  border-radius: 999px; font-size: .68rem; font-weight: 700;
}
.otp-wa-mini .fa-whatsapp { color: #128C7E; }
.auth-pane { display: none; }
.auth-pane.active { display: block; animation: authIn .28s ease both; }
.auth-card [hidden] { display: none !important; }
.auth-hint { color: var(--muted); font-size: .75rem; margin: 0 0 8px; line-height: 1.35; }
.auth-card .form-group { margin-bottom: 8px; }
.auth-card .form-group label,
.auth-label-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: .7rem; margin-bottom: 4px; color: #5c6b80; font-weight: 700; letter-spacing: .02em;
}
.auth-label-row a { font-weight: 700; font-size: .7rem; }
.auth-input {
  display: flex; align-items: center; gap: 8px;
  min-height: 40px; padding: 0 8px 0 10px;
  background: #fff; border: 1px solid #d5e4f6; border-radius: 12px;
  transition: border-color .2s, box-shadow .2s;
}
.auth-input > i { color: #1a73e8; width: 14px; text-align: center; font-size: .85rem; flex-shrink: 0; }
.auth-input .fa-whatsapp { color: #128C7E; }
.auth-tab { width: 100%; }
.auth-trust { margin: 8px 0 0; font-size: .68rem; }
.auth-input:focus-within {
  border-color: #1a73e8;
  box-shadow: 0 0 0 4px rgba(26, 115, 232, .12);
}
.auth-card .auth-input .form-control {
  border: 0 !important; box-shadow: none !important; background: transparent !important;
  padding: 8px 0 !important; min-width: 0; height: auto; flex: 1;
}
.auth-eye {
  border: 0; background: transparent; color: #7b8ba3; width: 28px; height: 28px;
  border-radius: 8px; cursor: pointer; flex-shrink: 0;
}
.auth-eye:hover { color: #0b4aa8; background: #eef4fc; }
.auth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.auth-more { margin: 0 0 8px; }
.auth-more summary {
  cursor: pointer; font-size: .72rem; font-weight: 700; color: #0b4aa8; margin-bottom: 6px;
  list-style: none;
}
.auth-more summary::-webkit-details-marker { display: none; }
.auth-more summary::before { content: "+ "; }
.auth-more[open] summary::before { content: "– "; }
.auth-more input { text-transform: uppercase; }
.auth-card .btn-liquid {
  position: relative; overflow: hidden; min-height: 40px; margin-top: 2px;
}
.auth-card .btn-liquid::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(110deg, transparent 32%, rgba(255,255,255,.38) 50%, transparent 68%);
  transform: translateX(-130%);
  animation: authShine 3.4s ease-in-out infinite;
}
.auth-resend { margin-top: 6px; min-height: 36px; }
.auth-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px;
  margin: 14px 0 0; padding-top: 12px;
  border-top: 1px solid #d7e6fb;
  font-size: .78rem; text-align: center; color: var(--muted);
}
.auth-foot a {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 36px; padding: 0 14px;
  border: 1px solid #9ec4f5; border-radius: 12px; background: #fff;
  font-weight: 800; color: #0b4aa8;
}
.auth-foot a:hover { border-color: #1a73e8; background: #f3f8ff; }
.auth-feedback { min-height: 0; margin: 6px 0 0; font-size: .75rem; color: var(--primary-dark); }
.auth-feedback:empty { display: none; }
.otp-input { letter-spacing: .28em; font-weight: 800; font-size: 1.05rem; }
.debug-note { margin-top: 8px; font-size: .7rem; color: var(--muted); text-align: center; }
@keyframes authRise {
  from { opacity: 0; transform: translateY(12px) scale(.985); }
  to { opacity: 1; transform: none; }
}
@keyframes authIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
@keyframes authDrift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(10px, -12px, 0) scale(1.08); }
}
@keyframes authShine {
  0%, 62% { transform: translateX(-130%); }
  100% { transform: translateX(130%); }
}

.panel, .form-card, .product-card, .stat-card, .table-wrap, .gallery {
  background: #fff;
  border-color: var(--border);
}
.product-card { box-shadow: 0 1px 2px rgba(16,56,120,.04); }
.product-card:hover { box-shadow: 0 8px 20px rgba(16,56,120,.08); }
.btn-add { transition: background .15s, color .15s, border-color .15s; }
.cat-icon {
  background: linear-gradient(180deg, #fff 0%, var(--secondary) 100%);
  border: 1px solid var(--border);
}
.banner-card {
  box-shadow: none;
}
.section-head h2 { color: var(--primary-dark); }
.footer { background: #eef3fa; }

.toast {
  background: rgba(10,26,46,.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.12);
}
.toast.success { background: rgba(13,155,86,.94); }
.toast.error { background: rgba(217,45,32,.94); }

.qty-control { background: #fff; }
.form-control { background: #fff; }
.alert { border: 1px solid transparent; }
.alert-success { background: #e8f8ef; color: #0a6b3c; border-color: #c7ebd5; }
.alert-error { background: #fdeceb; color: #a31212; border-color: #f5c6c3; }

.admin-top { box-shadow: 0 1px 0 rgba(13,71,161,.04); }
.stat-card { box-shadow: 0 4px 14px rgba(16,56,120,.05); }
table.data th { background: #f4f8fd; }

@media (prefers-reduced-motion: reduce) {
  .liquid-blob, .logo-ring, .auth-card, .auth-pane.active, .auth-card .btn-liquid::after { animation: none !important; }
  .auth-tab-glider { transition: none; }
  html { scroll-behavior: auto; }
}

/* ===== Storefront: compact, colorful, premium ===== */
body.storefront {
  background:
    radial-gradient(680px 240px at -4% -6%, rgba(255, 122, 89, .18), transparent 62%),
    radial-gradient(620px 220px at 108% -8%, rgba(26, 115, 232, .18), transparent 60%),
    radial-gradient(480px 200px at 50% 12%, rgba(13, 184, 140, .1), transparent 64%),
    #f3f7fc;
}
body.storefront .container { padding: 8px 10px 2px; }
body.storefront .main h1 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}
body.storefront .section { margin: 10px 0; }
body.storefront .section-head { margin-bottom: 6px; }
body.storefront .section-head h2 {
  font-size: .92rem;
  display: flex;
  align-items: center;
  gap: 7px;
}
body.storefront .section-head h2::before {
  content: "";
  width: 4px;
  height: 13px;
  border-radius: 99px;
  background: #1a73e8;
  flex-shrink: 0;
}
body.storefront .section:nth-of-type(4n+2) .section-head h2::before { background: #0d9b56; }
body.storefront .section:nth-of-type(4n+3) .section-head h2::before { background: #ff7a59; }
body.storefront .section:nth-of-type(4n) .section-head h2::before { background: #7c5cfc; }
body.storefront .section-head a { font-weight: 700; font-size: .75rem; }

body.storefront .find-block {
  border-color: #d3e3f6;
  box-shadow: 0 8px 18px rgba(26, 115, 232, .08);
}
body.storefront .banner-card {
  aspect-ratio: 16 / 7;
  height: auto;
  min-height: 0;
  border-radius: 0;
  padding: 16px;
  justify-content: flex-end;
  box-shadow: none;
}
body.storefront .banner-card h3 {
  font-size: 1.12rem;
  margin: 0 0 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
body.storefront .banner-card p {
  font-size: .82rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
body.storefront .cat-row { gap: 8px; }
body.storefront .cat-item { width: 68px; }
body.storefront .cat-icon {
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 15px;
  color: #fff;
  font-size: 1.05rem;
  box-shadow: 0 6px 12px rgba(16, 56, 120, .14);
}
body.storefront .cat-item:nth-child(6n+1) .cat-icon { background: linear-gradient(145deg, #4c97ff, #0b4aa8); }
body.storefront .cat-item:nth-child(6n+2) .cat-icon { background: linear-gradient(145deg, #34d399, #047857); }
body.storefront .cat-item:nth-child(6n+3) .cat-icon { background: linear-gradient(145deg, #ff8a65, #e11d48); }
body.storefront .cat-item:nth-child(6n+4) .cat-icon { background: linear-gradient(145deg, #c4b5fd, #6d28d9); }
body.storefront .cat-item:nth-child(6n+5) .cat-icon { background: linear-gradient(145deg, #fbbf24, #d97706); }
body.storefront .cat-item:nth-child(6n) .cat-icon { background: linear-gradient(145deg, #22d3ee, #0e7490); }
body.storefront .cat-item span { font-size: .68rem; font-weight: 700; line-height: 1.2; }

body.storefront .product-grid { gap: 8px; }
body.storefront .product-card {
  border-radius: 14px;
  border-color: #e3eef8;
  box-shadow: 0 4px 12px rgba(16, 56, 120, .05);
}
body.storefront .product-card .body { padding: 6px 7px 8px; gap: 2px; }
body.storefront .product-card .name { font-size: .78rem; }
body.storefront .price { color: #0b4aa8; }
body.storefront .disc {
  background: #fff1ea;
  color: #c2410c;
  border-radius: 999px;
  font-weight: 800;
}
body.storefront .btn-add {
  border: 0;
  background: linear-gradient(180deg, #2f86f3, #1565d8);
  color: #fff;
  padding: 6px 8px;
  border-radius: 9px;
  font-size: .74rem;
  box-shadow: 0 4px 10px rgba(26, 115, 232, .2);
}
body.storefront .btn-add:hover { background: #0b4aa8; color: #fff; }

body.storefront .panel,
body.storefront .gallery,
body.storefront .table-wrap,
body.storefront .addr-pick,
body.storefront .pay-card {
  border-radius: 14px;
  border-color: #e3eef8;
  box-shadow: 0 6px 16px rgba(16, 56, 120, .045);
}
body.storefront .panel { padding: 10px 12px; }
body.storefront .cart-item { padding: 8px 0; gap: 10px; }
body.storefront .totals-row { margin: 5px 0; font-size: .86rem; }
body.storefront .totals-row.grand { color: #0b4aa8; }
body.storefront .form-card { margin: 10px auto; padding: 16px 14px; }
body.storefront .form-group { margin-bottom: 10px; }
body.storefront .form-control { padding: 9px 12px; }
body.storefront .empty { padding: 28px 12px; }
body.storefront table.data th,
body.storefront table.data td { padding: 8px 10px; }
body.storefront .footer {
  background: linear-gradient(180deg, #f8fbff 0%, #e7f1ff 48%, #fff3ec 100%);
  border-top: 0;
  padding: 16px 14px calc(84px + env(safe-area-inset-bottom, 0px));
}
body.storefront .footer strong { color: #0b4aa8; }
body.storefront.is-auth .footer { display: none; }
body.storefront.is-auth .main { padding-bottom: 12px; }
body.storefront .auth-liquid { min-height: auto; padding: 4px 0 12px; }
body.storefront .auth-card,
body.storefront .auth-liquid .form-card { padding: 16px 14px 12px; }
body.storefront .auth-card .form-group { margin-bottom: 8px; }
@media (max-width: 340px) {
  .auth-grid { grid-template-columns: 1fr; }
}
body.storefront .track-eta { color: #0d9b56; }
body.storefront .chip:hover { background: #e8f8ee; border-color: #7dcea0; }
@media (min-width: 992px) {
  body.storefront .footer { padding-bottom: 14px; }
  body.storefront .container { padding: 10px 16px 4px; }
}

body.storefront .promise-item {
  border-color: #e3eef8;
  box-shadow: 0 4px 12px rgba(16, 56, 120, .04);
}
body.storefront .how-step,
body.storefront .trust-band,
body.storefront .filter-bar,
body.storefront .order-list,
body.storefront .account-aside {
  border-color: #e3eef8;
  box-shadow: 0 6px 16px rgba(16, 56, 120, .045);
}
body.storefront .photo-search .search-filters {
  border: 0;
  border-top: 1px solid #d5e4f7;
  border-radius: 0;
  box-shadow: none;
  background: rgba(255,255,255,.8);
}
body.storefront .banner-card:not(.is-plain) { text-shadow: 0 1px 8px rgba(10, 26, 46, .25); }
body.storefront .banner-card.is-plain { text-shadow: none; }
body.storefront .empty-hero { padding: 32px 16px; }

/* Admin / retailer / rider — same liquid chrome on phones */
body.portal .admin-top {
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
}
body.portal .admin-content .panel,
body.portal .admin-content .stat-card,
body.portal .admin-content .table-wrap,
body.portal .admin-content .form-card {
  border-color: #e3eef8;
  box-shadow: 0 6px 16px rgba(16, 56, 120, .05);
}
body.portal .admin-side .brand-live { justify-content: flex-start; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  body.portal .admin-top { background: #fff; }
}
