:root {
  --bg: #F9F5EB;
  --surface: #ffffff;
  --text: #1a2e28;
  --muted: #6b7c76;
  --accent: #1B835E;
  --accent-dark: #145C44;
  --accent-light: rgba(27, 131, 94, 0.1);
  --gold: #DBA832;
  --gold-dark: #b88a1f;
  --orange: #F27F1A;
  --success: #1B835E;
  --border: #E2DDD2;
  --shadow: 0 8px 32px rgba(20, 92, 68, 0.1);
  --radius: 14px;
  --font: 'Cairo', 'Segoe UI', Tahoma, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.55;
}

.hidden { display: none !important; }

/* ── Announcement bar ── */
.announce-bar {
  background: linear-gradient(90deg, var(--accent-dark), var(--accent));
  color: #fff;
  text-align: center;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}
.announce-bar a {
  color: var(--gold);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.announce-bar a:hover { color: #fff; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.store-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(20, 92, 68, 0.06);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.brand img { height: 44px; width: auto; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; gap: 0; line-height: 1.15; }
.brand h1 { font-size: 17px; font-weight: 800; letter-spacing: -0.02em; margin: 0; color: var(--accent-dark); }
.brand-tag { font-size: 9px; font-weight: 700; letter-spacing: 0.12em; color: var(--gold); }

.store-nav {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 0 16px 10px;
  max-width: 1200px;
  margin: 0 auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.store-nav::-webkit-scrollbar { display: none; }
.nav-link {
  flex-shrink: 0;
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--text);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  white-space: nowrap;
  transition: 0.2s;
}
.nav-link:hover { border-color: var(--accent); color: var(--accent); }
.nav-link.on {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.search-wrap {
  flex: 1;
  min-width: 200px;
  display: flex;
  gap: 8px;
}
.search-wrap input {
  flex: 1;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 12px 18px;
  font-size: 15px;
  font-family: var(--font);
  background: #fff;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-wrap input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(27, 131, 94, 0.15);
}
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: var(--gold-dark); }
.btn-outline-light {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.65);
}
.btn-outline-light:hover { background: rgba(255,255,255,0.15); border-color: #fff; }
.btn {
  border: none;
  border-radius: 999px;
  padding: 11px 20px;
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  transition: transform 0.15s, background 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-qr {
  background: #fff;
  color: var(--text);
  border: 1.5px solid var(--border);
  padding: 11px 14px;
  flex-shrink: 0;
}
.btn-qr:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 8px 12px; font-size: 13px; }
.btn-ghost { background: #fff; color: var(--text); border: 1px solid var(--border); }

.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.cart-btn {
  position: relative;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font);
}
.cart-badge {
  position: absolute;
  top: -6px;
  left: -6px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.hero-banner {
  background: linear-gradient(135deg, var(--accent-dark) 0%, var(--accent) 55%, #2a9d6e 100%);
  color: #fff;
  padding: 28px 20px 16px;
  position: relative;
  overflow: hidden;
}
.hero-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 85% 20%, rgba(219,168,50,0.25), transparent 45%);
  pointer-events: none;
}
.hero-banner-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: relative;
  z-index: 1;
}
.hero-banner-text { flex: 1; min-width: 0; }
.hero-eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--gold);
  margin-bottom: 8px;
}
.hero-banner h2 {
  font-size: clamp(24px, 5vw, 36px);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 10px;
}
.hero-lead { font-size: 14px; opacity: 0.92; margin-bottom: 16px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-banner-art { flex-shrink: 0; display: none; }
@media (min-width: 640px) {
  .hero-banner-art { display: block; }
}
.hero-badge {
  width: 120px; height: 120px;
  border-radius: 50%;
  background: var(--gold);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  font-size: 13px; font-weight: 800;
  line-height: 1.3;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  border: 4px solid rgba(255,255,255,0.35);
}
.hero-banner .quick-tags {
  max-width: 1200px;
  margin: 18px auto 0;
  position: relative;
  z-index: 1;
}
.hero-banner .quick-tag {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.35);
  color: #fff;
}
.hero-banner .quick-tag:hover {
  background: rgba(255,255,255,0.28);
  border-color: var(--gold);
  color: #fff;
}

.hero {
  display: none;
}
.quick-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.quick-tag {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  cursor: pointer;
  font-family: var(--font);
  color: var(--text);
}
.quick-tag:hover { border-color: var(--accent); color: var(--accent); }

.main { max-width: 1200px; margin: 0 auto; padding: 0 20px 120px; }

.store-home { padding-top: 8px; }
.home-sections { display: flex; flex-direction: column; gap: 32px; padding: 20px 0; }
.home-loading { text-align: center; padding: 48px 20px; color: var(--muted); }
.home-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.home-section-head h2 {
  font-size: clamp(18px, 3.5vw, 24px);
  font-weight: 800;
  color: var(--accent-dark);
}
.home-section-more {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--font);
}
.home-section-more:hover { text-decoration: underline; }
.home-scroll-row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}
.home-scroll-row .product-card {
  flex: 0 0 min(200px, 42vw);
  scroll-snap-align: start;
}
.home-collections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.collection-tile {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 1;
  cursor: pointer;
  border: 2px solid var(--border);
  background: #fff;
  transition: transform 0.2s, box-shadow 0.2s;
}
.collection-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}
.collection-tile img { width: 100%; height: 100%; object-fit: cover; }
.collection-tile-ph {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(145deg, var(--accent-light), #fff);
  font-size: 36px;
}
.collection-tile-label {
  position: absolute;
  inset: auto 0 0 0;
  padding: 28px 10px 10px;
  background: linear-gradient(transparent, rgba(20,92,68,0.85));
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.catalog-view { padding-top: 16px; }
.catalog-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.catalog-title { font-size: 20px; font-weight: 800; margin: 0; color: var(--accent-dark); }
.btn-back-home {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font);
  color: var(--accent);
}
.btn-back-home:hover { border-color: var(--accent); background: var(--accent-light); }

.store-footer {
  background: var(--accent-dark);
  color: rgba(255,255,255,0.88);
  padding: 32px 20px 100px;
  margin-top: 24px;
}
.footer-inner { max-width: 1200px; margin: 0 auto; text-align: center; }
.footer-brand img { margin-bottom: 8px; }
.footer-brand p { font-size: 14px; margin-bottom: 16px; }
.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
}
.footer-links a { color: var(--gold); font-weight: 700; text-decoration: none; }
.footer-links a:hover { color: #fff; text-decoration: underline; }
.footer-copy { font-size: 12px; opacity: 0.65; }

.results-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 12px;
  flex-wrap: wrap;
}
.results-bar span { color: var(--muted); font-size: 14px; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 18px;
}
@media (max-width: 480px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.product-card .img-wrap {
  aspect-ratio: 1;
  background: #f5f0e6;
  overflow: hidden;
  position: relative;
}
.product-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-card .img-ph {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 48px; color: #cbd5e1;
}
.badge-sale {
  position: absolute; top: 10px; right: 10px;
  background: var(--orange); color: #fff;
  font-size: 11px; font-weight: 800;
  padding: 4px 8px; border-radius: 8px;
}
.product-body { padding: 14px; }
.product-title {
  font-size: 14px; font-weight: 700;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.9em;
}
.product-code { font-size: 11px; color: var(--muted); margin-top: 4px; }
.badge-soldout {
  position: absolute; top: 10px; left: 10px;
  background: rgba(26,46,40,0.75); color: #fff;
  font-size: 10px; font-weight: 800;
  padding: 4px 8px; border-radius: 8px;
}
.product-price { margin-top: 8px; font-size: 16px; font-weight: 800; color: var(--accent-dark); }
.product-price-old { font-size: 12px; color: var(--muted); text-decoration: line-through; margin-inline-start: 6px; font-weight: 500; }
.product-meta { font-size: 11px; color: var(--success); margin-top: 6px; }

.empty-state, .loading-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}
.empty-state h3 { color: var(--text); margin-bottom: 8px; font-size: 20px; }
.spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.cart-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #fff;
  border-top: 1px solid var(--border);
  box-shadow: 0 -8px 32px rgba(15, 23, 42, 0.1);
  padding: 12px 20px;
  z-index: 90;
  display: none;
}
.cart-bar.visible { display: block; }
.cart-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.cart-bar-total { font-weight: 800; font-size: 16px; }
.cart-bar.visible { cursor: pointer; }
.cart-bar.visible .cart-bar-total::before { content: '👁 '; opacity: 0.85; }

/* Cart drawer */
.cart-drawer-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  z-index: 155;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}
.cart-drawer-overlay.open { display: flex; }
.cart-drawer {
  background: #fff;
  width: 100%;
  max-width: 520px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -8px 40px rgba(15, 23, 42, 0.15);
  overflow: hidden;
}
@media (min-width: 640px) {
  .cart-drawer-overlay { align-items: center; padding: 20px; }
  .cart-drawer { border-radius: 20px; max-height: 85vh; }
}
.cart-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  background: #fff;
  flex-shrink: 0;
}
.cart-drawer-head h2 { font-size: 18px; font-weight: 800; margin: 0; }
.cart-drawer-close {
  width: 36px; height: 36px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  font-size: 16px;
  color: var(--muted);
}
.cart-drawer-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 14px 16px;
  -webkit-overflow-scrolling: touch;
}
.cart-drawer-footer {
  flex-shrink: 0;
  padding: 14px 16px 18px;
  border-top: 1px solid var(--border);
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cart-drawer-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 14px;
  color: var(--muted);
}
.cart-drawer-summary strong { font-size: 18px; color: var(--accent); }
.cart-drawer-checkout {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  font-weight: 800;
  border-radius: 14px;
}
.cart-drawer-empty {
  text-align: center;
  padding: 40px 16px;
  color: var(--muted);
}
.cart-drawer-qty-ctrl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}
.cart-drawer-qty-ctrl button {
  width: 28px; height: 28px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface, #f8fafc);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
}
.cart-drawer-qty-ctrl span {
  min-width: 24px;
  text-align: center;
  font-weight: 800;
  font-size: 14px;
}

.toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #0f172a;
  color: #fff;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 200;
  max-width: 90vw;
  text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Modal */
.modal-bg {
  display: none;
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.55);
  z-index: 150;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}
.modal-bg.open { display: flex; }
.modal-box {
  background: #fff;
  width: 100%;
  max-width: 520px;
  max-height: 92vh;
  overflow-y: auto;
  border-radius: 20px 20px 0 0;
  padding: 20px 20px 28px;
  animation: slide-up 0.3s ease;
}
@media (min-width: 640px) {
  .modal-bg { align-items: center; padding: 20px; }
  .modal-box { border-radius: 20px; max-height: 88vh; }
}
@keyframes slide-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-handle { width: 40px; height: 4px; background: var(--border); border-radius: 4px; margin: 0 auto 16px; }
.modal-img-wrap {
  width: 100%; aspect-ratio: 1; border-radius: 14px;
  overflow: hidden; background: #f1f5f9; margin-bottom: 14px;
}
.modal-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.modal-name { font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.modal-price { font-size: 22px; font-weight: 800; color: var(--accent); margin-bottom: 12px; }
.modal-desc { font-size: 13px; color: var(--muted); margin-bottom: 14px; line-height: 1.6; }
.modal-option-block { margin-bottom: 12px; }
.modal-option-label { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.sizes-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.size-tag {
  padding: 10px 16px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  background: #fff;
}
.size-tag.selected { border-color: var(--accent); background: var(--accent-light); color: var(--accent); }
.size-tag.disabled { opacity: 0.4; pointer-events: none; }
.color-tag.selected { border-color: var(--gold); background: rgba(219,168,50,0.12); color: var(--gold-dark); }
.modal-qty-row { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.modal-qty-btn {
  width: 40px; height: 40px; border-radius: 12px;
  border: 1.5px solid var(--border); background: #fff;
  font-size: 20px; cursor: pointer; font-weight: 700;
}
.modal-qty-val { font-size: 18px; font-weight: 800; min-width: 32px; text-align: center; }
.modal-actions { display: flex; flex-direction: column; gap: 10px; }
.btn-add-cart { background: var(--accent); color: #fff; padding: 14px; border-radius: 14px; font-size: 16px; font-weight: 800; border: none; cursor: pointer; font-family: var(--font); }
.btn-checkout-start { background: var(--success); color: #fff; padding: 14px; border-radius: 14px; font-size: 15px; font-weight: 700; border: none; cursor: pointer; font-family: var(--font); }
.btn-close-modal { background: transparent; color: var(--muted); padding: 10px; border: none; cursor: pointer; font-family: var(--font); }

/* Checkout — modern wizard */
.checkout-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(6px);
  z-index: 160;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}
.checkout-overlay.open { display: flex; }
.checkout-panel {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  width: 100%; max-width: 560px;
  max-height: 94vh;
  display: flex; flex-direction: column;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -8px 40px rgba(15, 23, 42, 0.18);
  overflow: hidden;
}
@media (min-width: 640px) {
  .checkout-overlay { align-items: center; padding: 24px; }
  .checkout-panel { border-radius: 24px; max-height: 90vh; }
}
.checkout-head {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 18px 20px 12px;
  border-bottom: 1px solid var(--border);
  background: #fff;
}
.checkout-close {
  width: 36px; height: 36px; flex-shrink: 0;
  border: 1.5px solid var(--border); border-radius: 12px;
  background: #fff; cursor: pointer; font-size: 16px;
  color: var(--muted); transition: 0.2s;
}
.checkout-close:hover { border-color: #fca5a5; color: #dc2626; background: #fef2f2; }
.checkout-head-text { flex: 1; min-width: 0; }
.checkout-title { font-size: 20px; font-weight: 800; margin: 0 0 4px; letter-spacing: -0.02em; }
.checkout-sub { font-size: 13px; color: var(--muted); margin: 0; }
.checkout-progress {
  display: flex; align-items: center; justify-content: center;
  gap: 0; padding: 14px 16px 10px;
  background: #fff;
  overflow-x: auto;
}
.checkout-wizard-step {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  min-width: 52px; flex-shrink: 0;
}
.checkout-wizard-dot {
  width: 36px; height: 36px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; background: #f1f5f9; color: var(--muted);
  border: 2px solid #e2e8f0; transition: 0.25s;
}
.checkout-wizard-step.active .checkout-wizard-dot {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff; border-color: transparent;
  box-shadow: 0 4px 14px rgba(27, 131, 94, 0.35);
}
.checkout-wizard-step.done .checkout-wizard-dot {
  background: rgba(22, 163, 74, 0.12);
  color: var(--success); border-color: rgba(22, 163, 74, 0.35);
  font-size: 14px; font-weight: 800;
}
.checkout-wizard-label {
  font-size: 10px; font-weight: 700; color: var(--muted);
  white-space: nowrap;
}
.checkout-wizard-step.active .checkout-wizard-label { color: var(--accent); }
.checkout-wizard-step.done .checkout-wizard-label { color: var(--success); }
.checkout-wizard-line {
  flex: 1; min-width: 12px; max-width: 28px; height: 2px;
  background: #e2e8f0; margin: 0 2px 18px; border-radius: 2px;
}
.checkout-wizard-line.done { background: var(--success); }
.checkout-body-scroll {
  flex: 1; overflow-y: auto; padding: 16px 20px;
}
.checkout-footer {
  padding: 12px 20px 20px;
  background: #fff;
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.04);
}
.checkout-footer-row {
  display: flex; gap: 10px; align-items: stretch;
}
.checkout-footer-row .btn-checkout-back { flex: 0 0 auto; min-width: 88px; }
.checkout-footer-row .btn-checkout-next,
.checkout-footer-row .btn-confirm-order { flex: 1; margin-top: 0; }

.checkout-payment-card {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}
.checkout-payment-card h4 {
  margin: 0 0 10px;
  font-size: 14px;
}
.checkout-payment-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 520px) {
  .checkout-payment-options { grid-template-columns: 1fr; }
}
.checkout-pay-opt {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: right;
  padding: 12px;
  border: 2px solid var(--border);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  font-family: var(--font);
}
.checkout-pay-opt.on {
  border-color: var(--accent);
  background: var(--accent-light);
  box-shadow: 0 0 0 1px rgba(27, 131, 94, 0.15);
}
.checkout-pay-opt strong { display: block; font-size: 13px; }
.checkout-pay-opt small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
.checkout-pay-icon { font-size: 22px; line-height: 1; }
.checkout-pay-hint {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.checkout-step-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
}
.checkout-step-intro {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 18px; padding-bottom: 14px;
  border-bottom: 1px dashed var(--border);
}
.checkout-step-icon {
  width: 48px; height: 48px; border-radius: 14px;
  background: linear-gradient(135deg, var(--accent-light), rgba(27,131,94,0.04));
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.checkout-step-intro h3 { font-size: 17px; font-weight: 800; margin: 0 0 2px; }
.checkout-step-intro p { font-size: 13px; color: var(--muted); margin: 0; }
.checkout-optional { font-weight: 500; color: var(--muted); font-size: 12px; }

.checkout-field-label {
  font-size: 13px; font-weight: 700; margin-bottom: 8px; display: block;
  color: var(--text);
}
.checkout-field-input,
.checkout-field-textarea {
  width: 100%; padding: 13px 16px;
  border: 1.5px solid var(--border); border-radius: 14px;
  font-size: 15px; font-family: var(--font);
  background: #fff; transition: border-color 0.2s, box-shadow 0.2s;
}
.checkout-field-input:focus,
.checkout-field-textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.checkout-field-textarea { min-height: 88px; resize: vertical; line-height: 1.5; }

.checkout-cart-list { display: flex; flex-direction: column; gap: 10px; }
.checkout-cart-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px; border-radius: 14px;
  background: #f8fafc; border: 1px solid var(--border);
}
.checkout-cart-item img,
.checkout-cart-ph {
  width: 64px; height: 64px; border-radius: 12px;
  object-fit: cover; flex-shrink: 0;
  background: #e2e8f0;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
}
.checkout-cart-item-body { flex: 1; min-width: 0; }
.checkout-cart-item-body strong {
  display: block; font-size: 14px; margin-bottom: 4px;
  line-height: 1.35;
}
.checkout-cart-meta { font-size: 12px; color: var(--muted); display: block; }
.checkout-cart-item-foot {
  display: flex; align-items: center; gap: 10px; margin-top: 8px;
}
.checkout-cart-qty { font-size: 12px; font-weight: 700; color: var(--muted); }
.checkout-cart-price { font-size: 14px; font-weight: 800; color: var(--accent); margin-inline-start: auto; }
.checkout-cart-remove {
  width: 28px; height: 28px; border-radius: 8px;
  border: 1px solid #fecaca; background: #fff;
  color: #dc2626; cursor: pointer; font-size: 12px;
}
.checkout-cart-item-compact { padding: 10px; }
.checkout-cart-item-compact img, .checkout-cart-item-compact .checkout-cart-ph {
  width: 48px; height: 48px;
}

.checkout-review-grid { display: flex; flex-direction: column; gap: 14px; margin-bottom: 14px; }
.checkout-review-block h4 {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--muted); margin: 0 0 8px; font-weight: 800;
}
.checkout-review-list {
  list-style: none; margin: 0; padding: 0;
  background: #f8fafc; border-radius: 14px; border: 1px solid var(--border);
}
.checkout-review-list li {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 10px 14px; font-size: 13px; border-bottom: 1px solid var(--border);
}
.checkout-review-list li:last-child { border-bottom: none; }
.checkout-review-list span { color: var(--muted); flex-shrink: 0; }
.checkout-review-list strong { text-align: left; font-weight: 700; line-height: 1.4; }

.checkout-promo-card {
  margin: 14px 0; padding: 14px;
  background: #f8fafc; border-radius: 14px; border: 1px solid var(--border);
}
.checkout-promo-row { display: flex; gap: 8px; }
.checkout-promo-row .checkout-field-input { flex: 1; margin: 0; }
.btn-checkout-promo {
  flex-shrink: 0; padding: 0 16px; border: none; border-radius: 12px;
  background: var(--text); color: #fff; font-weight: 700;
  font-family: var(--font); cursor: pointer; font-size: 13px;
}
.checkout-summary-card {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #fff; border-radius: 16px; padding: 16px 18px; margin-top: 4px;
}
.checkout-summary-row {
  display: flex; justify-content: space-between; padding: 7px 0;
  font-size: 14px; border-bottom: 1px solid rgba(255,255,255,0.1);
}
.checkout-summary-row.discount span:last-child { color: #86efac; }
.checkout-summary-row.total {
  font-weight: 800; font-size: 18px; border-bottom: none;
  margin-top: 8px; padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.15);
}
.checkout-summary-row.total span:last-child { color: #93c5fd; }

.btn-checkout-next, .btn-confirm-order {
  width: 100%; padding: 14px 18px; margin-top: 0;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff; border: none; border-radius: 14px;
  font-size: 15px; font-weight: 800; cursor: pointer;
  font-family: var(--font); transition: transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}
.btn-checkout-next:active, .btn-confirm-order:active { transform: scale(0.98); }
.btn-confirm-order {
  background: linear-gradient(135deg, #16a34a, #15803d);
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.35);
}
.btn-checkout-back {
  padding: 14px 16px; background: #fff;
  border: 1.5px solid var(--border); border-radius: 14px;
  font-size: 14px; font-weight: 700; cursor: pointer;
  font-family: var(--font); color: var(--muted);
}
.btn-checkout-skip {
  width: 100%; margin-top: 12px; padding: 11px;
  background: transparent; border: 1.5px dashed var(--border);
  border-radius: 12px; color: var(--muted);
  font-size: 13px; font-weight: 600; cursor: pointer; font-family: var(--font);
}
.btn-checkout-skip:hover { border-color: var(--accent); color: var(--accent); }

.checkout-alert { padding: 12px 14px; border-radius: 12px; margin: 10px 0; font-size: 13px; line-height: 1.5; }
.checkout-alert.ok { background: rgba(22, 163, 74, 0.1); color: #15803d; border: 1px solid rgba(22,163,74,0.2); }
.checkout-alert.err { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.checkout-alert.warn { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }

.checkout-success { text-align: center; padding: 20px 10px; }
.checkout-success .icon {
  width: 72px; height: 72px; margin: 0 auto 14px;
  background: linear-gradient(135deg, rgba(22,163,74,0.15), rgba(22,163,74,0.05));
  border-radius: 999px; display: flex; align-items: center; justify-content: center;
  font-size: 36px;
}
.checkout-success h3 { font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.checkout-order-num { color: var(--muted); margin-top: 10px; font-size: 14px; }
.checkout-order-num strong { color: var(--accent); font-size: 16px; }
.checkout-invoice-img { max-width: 100%; border-radius: 14px; margin-top: 12px; border: 1px solid var(--border); }
.btn-invoice-dl, .btn-checkout-done {
  display: inline-block; margin-top: 12px; padding: 13px 22px;
  background: var(--accent); color: #fff; border-radius: 14px;
  text-decoration: none; font-weight: 700; border: none; cursor: pointer; font-family: var(--font);
}
.waseet-notes-fixed {
  font-size: 12px; color: var(--muted); background: #f8fafc;
  padding: 12px; border-radius: 12px; margin-bottom: 12px; line-height: 1.5;
  border: 1px solid var(--border);
}
.waseet-note-opts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.waseet-note-opt {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: 12px;
  border: 1.5px solid var(--border); background: #fff;
  cursor: pointer; font-size: 13px; font-weight: 600;
}
.waseet-note-opt:has(input:checked) {
  border-color: var(--accent); background: rgba(37,99,235,0.06); color: var(--accent);
}
.cart-top-bar { display: none; }
.employee-bar {
  display: none; padding: 8px 20px; background: rgba(37, 99, 235, 0.08);
  border-bottom: 1px solid rgba(37, 99, 235, 0.15);
  font-size: 13px; justify-content: space-between; align-items: center;
}
.employee-bar.active { display: flex; }
.employee-bar-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.emp-comm-tag { color: var(--muted); font-weight: 600; }
.emp-login-btn {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font);
  white-space: nowrap;
}
.emp-login-btn.hidden { display: none; }
.emp-login-btn:hover { border-color: var(--accent); color: var(--accent); }

/* Employee panel */
.emp-panel-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1300;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}
.emp-panel-overlay.open { display: flex; }
.emp-panel-overlay.hidden:not(.open) { display: none; }
.emp-panel {
  background: #fff;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -8px 40px rgba(15, 23, 42, 0.15);
  overflow: hidden;
}
@media (min-width: 640px) {
  .emp-panel-overlay { align-items: center; padding: 20px; }
  .emp-panel { border-radius: 20px; max-height: 85vh; }
}
.emp-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.emp-panel-head h2 { font-size: 18px; font-weight: 800; margin: 0; }
.emp-panel-close {
  width: 36px; height: 36px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  font-size: 16px;
  color: var(--muted);
}
.emp-panel-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 18px 20px;
  -webkit-overflow-scrolling: touch;
}
.emp-panel-note {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 14px;
  padding: 10px 12px;
  background: rgba(37, 99, 235, 0.06);
  border-radius: 10px;
}
.emp-field-label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
  font-weight: 600;
}
.emp-panel-body input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-size: 15px;
  font-family: var(--font);
  margin-bottom: 12px;
}
.emp-panel-body input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.emp-panel-submit { width: 100%; margin-top: 4px; padding: 14px; }
.emp-panel-foot { font-size: 12px; color: var(--muted); text-align: center; margin-top: 14px; }
.emp-login-err {
  background: #fef2f2;
  color: #dc2626;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 12px;
}
.emp-login-err.hidden { display: none; }
.emp-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}
.emp-stat {
  background: var(--surface, #f8fafc);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 8px;
  text-align: center;
}
.emp-stat-val { display: block; font-size: 15px; font-weight: 800; color: var(--accent); }
.emp-stat.warn .emp-stat-val { color: #d97706; }
.emp-stat-lbl { display: block; font-size: 10px; color: var(--muted); margin-top: 4px; }
.emp-commission-line { font-size: 13px; margin-bottom: 10px; color: var(--text); }
.emp-orders-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 14px 0 10px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.emp-orders-head h3 { font-size: 15px; margin: 0; }
.emp-orders-list { display: flex; flex-direction: column; gap: 0; }
.emp-order-row {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.emp-order-row:last-child { border-bottom: none; }
.emp-order-name { font-weight: 700; font-size: 14px; }
.emp-order-meta { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.5; }
.emp-order-comm { font-size: 14px; font-weight: 800; color: var(--success); margin-top: 6px; }
.emp-order-comm.neg { color: #dc2626; }
.emp-order-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  margin-top: 6px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--accent);
}
.emp-order-badge.cancelled { background: rgba(228, 30, 63, 0.1); color: #E41E3F; }
.emp-order-badge.fulfilled { background: rgba(49, 162, 76, 0.12); color: var(--success); }

.emp-inner-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.emp-inner-tab {
  flex: 1;
  min-width: 120px;
  padding: 10px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface, #fff);
  color: var(--muted);
  cursor: pointer;
  font-family: var(--font);
  font-weight: 700;
  font-size: 12px;
}
.emp-inner-tab.on {
  background: var(--accent-light);
  color: var(--accent);
  border-color: var(--accent);
}
.emp-view-pane.hidden { display: none !important; }
.emp-stats-4 {
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 420px) {
  .emp-stats-4 { grid-template-columns: repeat(4, 1fr); }
}
.emp-finance-block {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.emp-finance-subtitle {
  font-size: 15px;
  margin: 0 0 10px;
}
.emp-finance-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.emp-finance-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  min-width: 520px;
}
.emp-finance-table th,
.emp-finance-table td {
  padding: 8px 6px;
  text-align: right;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.emp-finance-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 11px;
}
.emp-finance-table .pos { color: var(--success); font-weight: 700; }
.emp-finance-table .neg { color: #dc2626; font-weight: 700; }
.emp-payments-list { font-size: 13px; }
.emp-pay-row {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  line-height: 1.5;
}
.emp-pay-row:last-child { border-bottom: none; }

/* Waseet picker — keep functional */
.waseet-picker { margin: 12px 0; }
.waseet-region-list { display: flex; flex-direction: column; gap: 8px; max-height: 280px; overflow-y: auto; }
.waseet-region-btn {
  width: 100%; text-align: right; padding: 12px 14px;
  border-radius: 12px; border: 1.5px solid var(--border);
  background: #f8fafc; cursor: pointer; font-family: var(--font);
}
.waseet-region-btn.selected { border-color: var(--accent); background: var(--accent-light); }
.waseet-city-select, .waseet-region-search, .waseet-region-select {
  width: 100%; padding: 11px 12px; border-radius: 12px;
  border: 1.5px solid var(--border); font-family: var(--font);
}

/* QR scanner */
.qr-scanner-overlay {
  position: fixed; inset: 0; z-index: 1200;
  background: rgba(15, 23, 42, 0.72);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.qr-scanner-overlay.hidden { display: none; }
.qr-scanner-panel {
  width: min(420px, 100%);
  background: #fff;
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}
.qr-scanner-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.qr-scanner-head h3 { margin: 0; font-size: 18px; }
.qr-scanner-hint { font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.qr-scanner-view {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #0f172a;
  min-height: 220px;
}
.qr-cam-video {
  width: 100%; height: auto; display: block;
  max-height: 320px; object-fit: cover;
}
.qr-cam-video.hidden { display: none; }
#qr-cam-reader { width: 100%; }
#qr-cam-reader video { border-radius: 14px; }
.qr-cam-status {
  font-size: 13px; color: var(--muted);
  margin: 12px 0; min-height: 20px; text-align: center;
}
.qr-cam-status.ok { color: var(--success); }
.qr-cam-status.err { color: #dc2626; }
.qr-scanner-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 10px;
  color: var(--muted);
  font-size: 12px;
}
.qr-scanner-divider::before,
.qr-scanner-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.btn-qr-upload {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-bottom: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
}

/* ── Mobile + safe areas ── */
html {
  -webkit-text-size-adjust: 100%;
}
body.store-overlay-open .cart-bar {
  display: none !important;
}
@media (max-width: 768px) {
  .announce-bar {
    font-size: 11px;
    padding: 6px 10px;
    gap: 8px;
  }
  .header-inner {
    display: grid;
    grid-template-columns: 1fr auto auto;
    grid-template-areas:
      "brand actions actions"
      "search search search";
    gap: 8px 10px;
    padding: 10px 14px;
  }
  .brand { grid-area: brand; }
  .header-actions { grid-area: actions; }
  .search-wrap {
    grid-area: search;
    min-width: 0;
    width: 100%;
  }
  .search-wrap input {
    font-size: 16px;
    padding: 11px 14px;
  }
  .brand h1 { font-size: 15px; }
  .brand-tag { display: none; }
  .hero-banner { padding: 20px 14px 12px; }
  .hero-banner h2 { font-size: 22px; }
  .hero-actions .btn { flex: 1; min-width: 120px; text-align: center; }
  .main { padding: 0 14px 100px; }
  .store-footer { padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
  .cart-bar {
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  }
  .cart-bar-inner .btn { flex: 1; min-height: 48px; }
  .cart-bar-total { font-size: 14px; max-width: 45%; line-height: 1.3; }
  .modal-box {
    max-height: calc(100dvh - env(safe-area-inset-top, 0px));
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-direction: column;
  }
  .modal-actions {
    position: sticky;
    bottom: 0;
    background: #fff;
    padding-top: 10px;
    margin-top: auto;
    border-top: 1px solid var(--border);
  }
  .btn-add-cart, .btn-checkout-start {
    min-height: 48px;
    font-size: 15px;
  }
  .size-tag {
    min-height: 44px;
    min-width: 44px;
    padding: 10px 16px;
  }
  .checkout-panel {
    max-height: calc(100dvh - env(safe-area-inset-top, 0px));
    border-radius: 20px 20px 0 0;
  }
  .checkout-footer {
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  }
  .checkout-footer-row .btn {
    min-height: 48px;
    font-size: 15px;
  }
  .cart-drawer {
    max-height: calc(92dvh - env(safe-area-inset-bottom, 0px));
  }
  .cart-drawer-footer {
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  }
  .cart-drawer-checkout { min-height: 48px; }
  .toast {
    bottom: calc(88px + env(safe-area-inset-bottom, 0px));
    max-width: calc(100vw - 32px);
  }
  .home-scroll-row .product-card {
    flex: 0 0 min(168px, 46vw);
  }
  .product-grid { gap: 10px; }
  .product-body { padding: 10px; }
  .product-title { font-size: 13px; min-height: 2.6em; }
}
