/* ── LOGEET STORE CSS ────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Space+Mono:wght@400;700&display=swap');

:root {
  --primary: #7C3AED;
  --primary-dark: #6D28D9;
  --primary-light: #EDE9FE;
  --primary-glow: rgba(124, 58, 237, 0.20);
  --grad: linear-gradient(140deg,#9061F9,#6D28D9);
  --beacon: #EDE0FF;
  --body-bg: #f8fafc;
  --card-bg: #ffffff;
  --card-border: #e2e8f0;
  --text: #0f172a;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
  --radius: 14px;
  --radius-sm: 8px;
  --transition: 0.2s ease;
  --nav-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; scroll-behavior: smooth; }
body {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  background: var(--body-bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── STORE NAV ───────────────────────────────────────────────────────────── */

.store-nav {
  background: #ffffff;
  border-bottom: 1px solid var(--card-border);
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
}
.store-nav-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex; align-items: center; gap: 24px;
}
.store-brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
}
.store-logo-mark {
  width: 36px; height: 36px;
  background: var(--primary);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 15px; font-weight: 900;
}
.store-brand-name {
  font-size: 18px; font-weight: 800;
  color: var(--text); letter-spacing: -0.4px;
}
.store-brand-tag {
  font-size: 10px; font-weight: 500;
  color: var(--text-muted);
  display: block; margin-top: -2px;
}

.store-search-bar {
  flex: 1; max-width: 480px;
  display: flex; align-items: center; gap: 8px;
  background: var(--body-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 9px 14px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.store-search-bar:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background: white;
}
.store-search-bar i { color: var(--text-muted); }
.store-search-bar input {
  border: none; background: none; outline: none;
  font-family: inherit; font-size: 13.5px; color: var(--text);
  flex: 1;
}

.store-nav-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }

.cart-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 16px;
  background: var(--primary);
  color: white; border: none;
  border-radius: 10px;
  font-family: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer; text-decoration: none;
  transition: background var(--transition);
  position: relative;
}
.cart-btn:hover { background: var(--primary-dark); }
.cart-count {
  background: white; color: var(--primary);
  font-size: 10px; font-weight: 800;
  min-width: 18px; height: 18px;
  border-radius: 9px; padding: 0 4px;
  display: flex; align-items: center; justify-content: center;
}

.track-btn {
  display: flex; align-items: center; gap: 7px;
  padding: 9px 14px;
  background: var(--body-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  font-family: inherit; font-size: 13px; font-weight: 500;
  color: var(--text); cursor: pointer; text-decoration: none;
  transition: all var(--transition);
}
.track-btn:hover { background: var(--card-bg); border-color: #cbd5e1; }

/* ── STORE HERO / BANNER ─────────────────────────────────────────────────── */

.store-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0f172a 100%);
  color: white;
  padding: 52px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.store-banner::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 60% 50%, rgba(124,58,237,0.2) 0%, transparent 60%);
}
.store-banner-inner {
  max-width: 640px; margin: 0 auto;
  position: relative;
}
.store-banner h1 {
  font-size: 32px; font-weight: 900;
  letter-spacing: -1px; line-height: 1.1;
  margin-bottom: 10px;
}
.store-banner h1 span { color: var(--primary); }
.store-banner p {
  font-size: 15px; color: rgba(255,255,255,0.7);
  margin-bottom: 24px;
}
.banner-stats {
  display: flex; justify-content: center; gap: 32px;
  margin-top: 24px;
}
.banner-stat { text-align: center; }
.banner-stat-val { font-size: 22px; font-weight: 800; color: var(--primary); }
.banner-stat-label { font-size: 11px; color: rgba(255,255,255,0.6); margin-top: 2px; }

/* ── MAIN STORE LAYOUT ───────────────────────────────────────────────────── */

.store-layout {
  max-width: 1200px; margin: 0 auto;
  padding: 32px 24px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
}

.store-sidebar {
  position: sticky; top: calc(var(--nav-h) + 16px);
  align-self: start;
}
.store-sidebar-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.store-sidebar-title {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.8px;
  color: var(--text-muted); margin-bottom: 12px;
}
.cat-filter-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px; font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.cat-filter-item:hover { background: var(--body-bg); color: var(--text); }
.cat-filter-item.active {
  background: var(--primary-light);
  color: var(--primary); font-weight: 600;
}
.cat-filter-count {
  font-size: 11px; color: var(--text-muted);
  background: var(--body-bg);
  padding: 1px 6px; border-radius: 10px;
}

/* ── PRODUCT GRID ────────────────────────────────────────────────────────── */

.products-area {}
.products-toolbar {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 20px;
}
.products-count {
  font-size: 13px; color: var(--text-secondary);
  flex: 1;
}
.products-count span { font-weight: 700; color: var(--text); }

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 18px;
}

.product-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
}
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.product-card-img {
  width: 100%; height: 160px;
  background: linear-gradient(135deg, var(--primary-light) 0%, #f0fdf9 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 48px;
  position: relative;
}
.product-card-img .stock-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 13px; font-weight: 700;
}

.product-card-body { padding: 14px; }
.product-card-name {
  font-size: 13.5px; font-weight: 700;
  color: var(--text); line-height: 1.3;
  margin-bottom: 4px;
}
.product-card-cat {
  font-size: 11px; color: var(--text-muted);
  margin-bottom: 10px;
}
.product-card-price {
  font-size: 17px; font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.3px;
}
.product-card-unit {
  font-size: 11px; color: var(--text-muted);
  font-weight: 500;
}
.product-card-footer {
  padding: 10px 14px;
  border-top: 1px solid var(--card-border);
  display: flex; align-items: center; gap: 8px;
}
.add-cart-btn {
  flex: 1; padding: 8px;
  background: var(--primary);
  color: white; border: none;
  border-radius: 8px;
  font-family: inherit; font-size: 12px; font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.add-cart-btn:hover { background: var(--primary-dark); }
.add-cart-btn:disabled {
  background: var(--card-border); color: var(--text-muted); cursor: not-allowed;
}
.qty-adj-btn {
  width: 30px; height: 30px;
  border-radius: 7px; border: 1px solid var(--card-border);
  background: var(--body-bg); color: var(--text);
  font-size: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.qty-adj-btn:hover { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }
.qty-display {
  font-size: 13px; font-weight: 700;
  min-width: 24px; text-align: center;
}

/* ── CART PAGE ───────────────────────────────────────────────────────────── */

.cart-layout {
  max-width: 1000px; margin: 0 auto;
  padding: 32px 24px;
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 28px;
}

.cart-items-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.cart-item-row {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid #f1f5f9;
}
.cart-item-row:last-child { border-bottom: none; }
.cart-item-img {
  width: 56px; height: 56px;
  background: var(--primary-light);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; flex-shrink: 0;
}
.cart-item-info { flex: 1; }
.cart-item-name { font-size: 14px; font-weight: 700; }
.cart-item-unit { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.cart-item-qty-row {
  display: flex; align-items: center; gap: 8px;
  margin-top: 8px;
}
.cart-item-price { font-size: 15px; font-weight: 800; color: var(--primary); white-space: nowrap; }
.cart-remove-btn {
  background: none; border: none;
  color: var(--text-muted); font-size: 14px;
  cursor: pointer; padding: 4px;
  transition: color var(--transition);
}
.cart-remove-btn:hover { color: var(--danger); }

.checkout-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 22px;
  position: sticky; top: calc(var(--nav-h) + 16px);
}
.checkout-title { font-size: 15px; font-weight: 700; margin-bottom: 16px; }
.order-summary-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0;
  font-size: 13px; color: var(--text-secondary);
}
.order-summary-row.total {
  font-size: 16px; font-weight: 800; color: var(--text);
  border-top: 1px solid var(--card-border);
  margin-top: 8px; padding-top: 14px;
}
.order-summary-row.total span:last-child { color: var(--primary); }

.checkout-form-group { margin-bottom: 12px; }
.checkout-form-label { font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: 4px; display: block; }
.checkout-form-input {
  width: 100%; height: 38px; padding: 0 12px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  font-family: inherit; font-size: 13.5px; color: var(--text);
  background: var(--body-bg); outline: none;
  transition: border-color var(--transition);
}
.checkout-form-input:focus { border-color: var(--primary); background: white; }
.checkout-form-textarea {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  font-family: inherit; font-size: 13.5px; color: var(--text);
  background: var(--body-bg); outline: none; resize: none;
  height: 70px;
}

.checkout-btn {
  width: 100%; padding: 13px;
  background: var(--primary);
  color: white; border: none;
  border-radius: 10px;
  font-family: inherit; font-size: 14px; font-weight: 700;
  cursor: pointer; transition: background var(--transition);
  margin-top: 16px;
}
.checkout-btn:hover { background: var(--primary-dark); }

/* ── ORDER TRACKING ──────────────────────────────────────────────────────── */

.track-container {
  max-width: 680px; margin: 40px auto;
  padding: 0 24px;
}

.track-search-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  text-align: center;
  margin-bottom: 28px;
}
.track-search-card h2 {
  font-size: 22px; font-weight: 800; margin-bottom: 8px;
}
.track-search-card p { font-size: 14px; color: var(--text-secondary); margin-bottom: 20px; }

.track-input-row {
  display: flex; gap: 10px;
}
.track-input {
  flex: 1; height: 44px; padding: 0 14px;
  border: 2px solid var(--card-border);
  border-radius: 10px;
  font-family: inherit; font-size: 14px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 1px;
  outline: none; color: var(--text);
  transition: border-color var(--transition);
}
.track-input:focus { border-color: var(--primary); }
.track-submit-btn {
  padding: 0 22px; height: 44px;
  background: var(--primary);
  color: white; border: none;
  border-radius: 10px;
  font-family: inherit; font-size: 14px; font-weight: 700;
  cursor: pointer; transition: background var(--transition);
}
.track-submit-btn:hover { background: var(--primary-dark); }

.order-result-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.order-result-header {
  background: linear-gradient(135deg, #0f172a, #1e2d47);
  color: white;
  padding: 20px 24px;
  display: flex; align-items: center; gap: 14px;
}
.order-result-num { font-size: 18px; font-weight: 800; }
.order-result-date { font-size: 12px; color: rgba(255,255,255,0.6); margin-top: 2px; }
.order-result-amt { margin-left: auto; font-size: 20px; font-weight: 900; color: var(--primary); }

.order-tracking-timeline { padding: 24px; }
.timeline-step {
  display: flex; gap: 16px;
  padding-bottom: 24px;
  position: relative;
}
.timeline-step:last-child { padding-bottom: 0; }
.timeline-step:not(:last-child)::after {
  content: '';
  position: absolute; left: 15px; top: 32px;
  width: 2px; bottom: 0;
  background: var(--card-border);
}
.timeline-dot {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--card-border);
  border: 2px solid var(--card-border);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 12px; color: var(--text-muted);
  position: relative; z-index: 1;
}
.timeline-dot.done {
  background: var(--primary); border-color: var(--primary);
  color: white;
}
.timeline-dot.current {
  background: white; border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-glow);
}
.timeline-content { flex: 1; padding-top: 4px; }
.timeline-label { font-size: 13.5px; font-weight: 700; }
.timeline-desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.order-items-summary { padding: 0 24px 20px; }
.order-items-summary-title {
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.6px;
  color: var(--text-muted); margin-bottom: 10px;
}

/* ── SUCCESS SCREEN ──────────────────────────────────────────────────────── */

.success-screen {
  text-align: center; padding: 48px 24px;
  max-width: 500px; margin: 0 auto;
}
.success-icon {
  width: 72px; height: 72px;
  background: var(--primary-light);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; color: var(--primary);
  margin: 0 auto 20px;
}
.success-screen h2 { font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.success-screen p { font-size: 14px; color: var(--text-secondary); margin-bottom: 24px; }
.order-num-display {
  display: inline-block;
  padding: 8px 20px;
  background: var(--primary);
  color: white; border-radius: 10px;
  font-size: 18px; font-weight: 800;
  letter-spacing: 2px; margin-bottom: 24px;
}

/* ── TOAST ───────────────────────────────────────────────────────────────── */

#toastContainer {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 9999;
  display: flex; flex-direction: column; gap: 8px;
}
.toast-msg {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  background: #0f172a;
  color: white; border-radius: 12px;
  font-size: 13px; font-weight: 500;
  box-shadow: var(--shadow-lg);
  transform: translateX(120%);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: 300px;
  border-left: 4px solid var(--primary);
}
.toast-msg.show { transform: none; }
.toast-msg.error { border-left-color: var(--danger); }

/* ── EMPTY / LOADING ─────────────────────────────────────────────────────── */

.store-empty {
  text-align: center; padding: 60px 24px;
  color: var(--text-muted);
}
.store-empty i { font-size: 3rem; margin-bottom: 14px; display: block; }
.store-empty p { font-size: 15px; font-weight: 600; }
.store-empty small { font-size: 13px; margin-top: 4px; display: block; }

.store-loading {
  display: flex; align-items: center; justify-content: center;
  padding: 60px; color: var(--text-muted);
  font-size: 14px; gap: 10px;
}
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── RESPONSIVE ──────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .store-layout { grid-template-columns: 1fr; }
  .store-sidebar { position: static; }
  .cart-layout { grid-template-columns: 1fr; }
  .checkout-card { position: static; }
  .store-banner h1 { font-size: 24px; }
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}

@media (max-width: 480px) {
  .store-nav-inner { padding: 0 16px; }
  .products-grid { grid-template-columns: 1fr; }
  .track-input-row { flex-direction: column; }
}
