*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue: #2563EB;
  --blue-dark: #1d4ed8;
  --blue-light: #eff6ff;
  --text: #111827;
  --text-secondary: #6b7280;
  --border: #e5e7eb;
  --bg: #ffffff;
  --bg-gray: #f9fafb;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

/* ── AUTH PAGES ── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-gray);
  padding: 24px;
}

.auth-card {
  background: var(--bg);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
  justify-content: center;
}

.auth-logo-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.auth-logo-text span {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0;
}

.auth-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.auth-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.form-group input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  outline: none;
  transition: border-color .15s;
}

.form-group input:focus {
  border-color: var(--blue);
}

.btn-primary {
  width: 100%;
  padding: 12px;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, transform .1s;
  margin-top: 8px;
}

.btn-primary:hover { background: var(--blue-dark); }
.btn-primary:active { transform: scale(.98); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; }

.auth-link {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: var(--text-secondary);
}

.auth-link a {
  color: var(--blue);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.error-msg {
  background: #fef2f2;
  color: #dc2626;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  margin-bottom: 16px;
  display: none;
}

/* ── HEADER ── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  cursor: pointer;
}

.header-logo-text {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.2px;
}

.header-logo-text span {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--text-secondary);
}

.header-nav {
  display: flex;
  gap: 4px;
}

.nav-btn {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  transition: background .15s, color .15s;
}

.nav-btn:hover { background: var(--bg-gray); color: var(--text); }
.nav-btn.active { background: var(--blue-light); color: var(--blue); font-weight: 600; }

.header-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-user-name {
  font-size: 14px;
  color: var(--text-secondary);
}

.btn-logout {
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  transition: all .15s;
}

.btn-logout:hover { border-color: #dc2626; color: #dc2626; }

/* ── CATALOG ── */
.catalog-page { padding: 24px 24px 100px; max-width: 1500px; margin: 0 auto; }

.catalog-layout { display: flex; gap: 24px; align-items: flex-start; }

.catalog-title { font-size: 24px; font-weight: 700; margin-bottom: 24px; color: var(--text); }

.catalog-content { flex: 1; min-width: 0; }

/* ── Category Sidebar ── */
.category-sidebar {
  width: 200px;
  flex-shrink: 0;
  position: sticky;
  top: 80px;
}

.cat-item-wrap { margin-bottom: 2px; }

.cat-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: none;
  border-radius: 10px;
  background: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-align: left;
  transition: background .15s, color .15s;
}
.cat-item:hover { background: var(--bg-gray); color: var(--text); }
.cat-item.active { background: #EFF6FF; color: var(--blue); font-weight: 600; }
.cat-item.active-parent { color: var(--text); font-weight: 600; }

.cat-icon { width: 20px; height: 20px; flex-shrink: 0; }
.cat-icon svg { width: 20px; height: 20px; display: block; }
.cat-label { flex: 1; }

.cat-chevron {
  font-size: 16px;
  color: var(--text-secondary);
  transition: transform .2s;
  line-height: 1;
}
.cat-chevron.open { transform: rotate(90deg); }

.cat-sub { padding-left: 16px; margin-top: 2px; }
.cat-sub-item {
  width: 100%;
  display: block;
  padding: 7px 12px;
  border: none;
  border-radius: 8px;
  background: none;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary);
  text-align: left;
  transition: background .15s, color .15s;
}
.cat-sub-item:hover { background: var(--bg-gray); color: var(--text); }
.cat-sub-item.active { background: #EFF6FF; color: var(--blue); font-weight: 600; }

.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 1300px) { .products-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) {
  .catalog-layout { flex-direction: column; }
  .category-sidebar { width: 100%; position: static; display: flex; flex-wrap: wrap; gap: 6px; }
  .cat-item-wrap { margin-bottom: 0; }
  .cat-item { width: auto; padding: 7px 14px; border: 1px solid var(--border); }
  .cat-sub { display: flex; flex-wrap: wrap; gap: 4px; padding-left: 0; margin-top: 6px; }
  .products-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) { .products-grid { grid-template-columns: repeat(2, 1fr); } .catalog-page { padding: 16px 12px 100px; } }
@media (max-width: 400px) { .products-grid { grid-template-columns: 1fr; } }

/* ── PRODUCT CARD ── */
.product-card {
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.product-image {
  aspect-ratio: 1;
  background: var(--bg-gray);
  overflow: hidden;
  position: relative;
}

.product-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s ease;
}

.product-card:hover .product-image img {
  transform: scale(1.04);
}

.product-image-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.product-image-placeholder svg { width: 56px; height: 56px; opacity: .35; }

.product-image-text {
  font-size: 12px;
  color: var(--text-secondary);
}

.product-info { padding: 12px 12px 14px; flex: 1; display: flex; flex-direction: column; gap: 8px; }

.product-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}

.product-price {
  font-size: 17px;
  font-weight: 700;
  color: var(--blue);
}

.card-actions { margin-top: auto; }

.btn-add {
  width: 100%;
  padding: 9px;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}

.btn-add:hover { background: var(--blue-dark); }

.qty-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
}

.qty-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
  flex-shrink: 0;
}

.qty-btn:hover { border-color: var(--blue); color: var(--blue); }

.qty-btn.qty-trash {
  border-color: #fee2e2;
  color: #ef4444;
  font-size: 14px;
}

.qty-btn.qty-trash:hover { background: #fef2f2; border-color: #ef4444; }

.qty-number {
  flex: 1;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

/* ── FLOATING CART ── */
.cart-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(37,99,235,.4);
  transition: background .15s, transform .15s;
  z-index: 200;
}

.cart-fab:hover { background: var(--blue-dark); transform: scale(1.05); }

.cart-fab-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  padding: 0 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  display: none;
}

/* ── CART PANEL ── */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.3);
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}

.cart-overlay.open { opacity: 1; pointer-events: all; }

.cart-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 420px;
  max-width: 100vw;
  background: var(--bg);
  z-index: 400;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .25s cubic-bezier(.4,0,.2,1);
  box-shadow: var(--shadow-lg);
}

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

.cart-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-header h2 { font-size: 20px; font-weight: 700; }

.cart-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--bg-gray);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 20px;
  transition: background .15s;
}

.cart-close:hover { background: var(--border); }

.cart-items { flex: 1; overflow-y: auto; padding: 16px 24px; }

.cart-empty {
  text-align: center;
  padding: 60px 0;
  color: var(--text-secondary);
  font-size: 15px;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.cart-item-name {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.cart-item-qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--bg);
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
}

.cart-item-qty-btn:hover { border-color: var(--blue); color: var(--blue); }

.cart-item-qty-num { font-size: 14px; font-weight: 600; min-width: 20px; text-align: center; }

.cart-item-remove {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: #fef2f2;
  color: #ef4444;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
  flex-shrink: 0;
}

.cart-item-remove:hover { background: #fee2e2; }

.cart-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.cart-total-label { font-size: 15px; color: var(--text-secondary); }
.cart-total-amount { font-size: 22px; font-weight: 700; color: var(--text); }

.btn-checkout {
  width: 100%;
  padding: 14px;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}

.btn-checkout:hover { background: var(--blue-dark); }
.btn-checkout:disabled { opacity: .6; cursor: not-allowed; }

/* ── ORDERS PAGE ── */
.orders-page { padding: 32px 24px; max-width: 900px; margin: 0 auto; }
.orders-title { font-size: 24px; font-weight: 700; margin-bottom: 24px; }

.order-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  overflow: hidden;
}

.order-card-header {
  padding: 16px 20px;
  background: var(--bg-gray);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.order-id { font-weight: 700; font-size: 15px; }

.order-date { font-size: 13px; color: var(--text-secondary); }

.order-status {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--blue-light);
  color: var(--blue);
}

.order-total { font-weight: 700; font-size: 16px; }

.order-items { padding: 16px 20px; }

.order-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--bg-gray);
}

.order-item-row:last-child { border-bottom: none; }

.order-card-footer {
  padding: 12px 20px 16px;
  border-top: 1px solid var(--border);
}

.btn-reorder {
  width: 100%;
  padding: 9px;
  background: transparent;
  color: var(--blue);
  border: 2px solid var(--blue);
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s;
}

.btn-reorder:hover {
  background: var(--blue);
  color: #fff;
}

.order-item-name { color: var(--text); flex: 1; }
.order-item-qty { color: var(--text-secondary); margin: 0 16px; }
.order-item-price { font-weight: 600; }

.orders-empty {
  text-align: center;
  padding: 80px 0;
  color: var(--text-secondary);
}

.orders-empty p { font-size: 16px; margin-bottom: 20px; }

/* ── SUCCESS TOAST ── */
.toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #111;
  color: #fff;
  padding: 14px 24px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: all .3s;
  z-index: 500;
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── LOADING ── */
.loader {
  text-align: center;
  padding: 60px 0;
  color: var(--text-secondary);
}

.spinner {
  display: inline-block;
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin-bottom: 12px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ─── ADMIN PANEL ─────────────────────────────────────────────────────────── */
.admin-layout { min-height: 100vh; background: var(--bg-gray); display: flex; flex-direction: column; }

.admin-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  display: flex;
  align-items: center;
  gap: 32px;
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.admin-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 800;
  color: #FF69B4;
  letter-spacing: -0.4px;
  white-space: nowrap;
}

.admin-tabs { display: flex; gap: 4px; flex: 1; }

.admin-tab {
  padding: 6px 18px;
  border: none;
  background: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background .15s, color .15s;
}

.admin-tab:hover { background: var(--bg-gray); color: var(--text); }
.admin-tab.active { background: #FF69B4; color: #fff; font-weight: 600; }

.admin-logout {
  padding: 7px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: none;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background .15s;
}
.admin-logout:hover { background: var(--bg-gray); }

.admin-main { flex: 1; padding: 32px; max-width: 1200px; width: 100%; margin: 0 auto; }

.admin-loading { color: var(--text-secondary); padding: 48px; text-align: center; font-size: 15px; }
.admin-empty   { color: var(--text-secondary); padding: 32px; text-align: center; }

.admin-section-title { font-size: 20px; font-weight: 700; margin: 0 0 20px; color: var(--text); }

.admin-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
  align-items: center;
}

.admin-input {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
  color: var(--text);
  outline: none;
  transition: border-color .15s;
}
.admin-input:focus { border-color: #FF69B4; }

.admin-btn {
  padding: 8px 18px;
  background: #FF69B4;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.admin-btn:hover { background: #e05aa0; }
.admin-btn-ghost { background: #fff; color: var(--text); border: 1px solid var(--border); }
.admin-btn-ghost:hover { background: var(--bg-gray); }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  font-size: 14px;
}
.admin-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-gray);
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.admin-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--bg-gray);
  color: var(--text);
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: #fafafa; }
.tc { text-align: center; }
.tr { text-align: right; }

/* Orders */
.admin-order-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-bottom: 10px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}

.admin-order-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  cursor: pointer;
  user-select: none;
  transition: background .15s;
}
.admin-order-head:hover { background: #fafafa; }

.admin-order-id    { font-weight: 700; color: var(--blue); min-width: 48px; }
.admin-order-user  { flex: 1; font-weight: 500; }
.admin-order-email { color: var(--text-secondary); font-weight: 400; font-size: 13px; margin-left: 6px; }
.admin-order-date  { color: var(--text-secondary); font-size: 13px; }
.admin-order-total { font-weight: 700; min-width: 80px; text-align: right; }
.admin-order-chevron { color: var(--text-secondary); transition: transform .2s; }

.admin-order-body { display: none; border-top: 1px solid var(--border); padding: 0 20px 16px; }
.admin-order-body.open { display: block; }

/* Products */
.admin-products-table { table-layout: fixed; }
.admin-products-table th:nth-child(1) { width: 48px; }
.admin-products-table th:nth-child(3) { width: 110px; }
.admin-products-table th:nth-child(4) { width: 100px; }
.admin-products-table th:nth-child(5) { width: 110px; }

.admin-price-input {
  width: 80px;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  text-align: center;
  outline: none;
}
.admin-price-input:focus { border-color: #FF69B4; }

.admin-cat-select {
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  background: #fff;
  color: var(--text);
  outline: none;
  max-width: 180px;
}
.admin-cat-select:focus { border-color: #FF69B4; }

.admin-toggle { position: relative; display: inline-block; width: 40px; height: 22px; }
.admin-toggle input { opacity: 0; width: 0; height: 0; }
.admin-toggle-slider {
  position: absolute; inset: 0;
  background: #ccc; border-radius: 22px; cursor: pointer; transition: background .2s;
}
.admin-toggle-slider:before {
  content: ''; position: absolute;
  width: 16px; height: 16px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: transform .2s;
}
.admin-toggle input:checked + .admin-toggle-slider { background: #FF69B4; }
.admin-toggle input:checked + .admin-toggle-slider:before { transform: translateX(18px); }

.admin-img-btn {
  padding: 5px 12px;
  background: var(--bg-gray);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  color: var(--text);
  transition: background .15s;
  white-space: nowrap;
}
.admin-img-btn:hover { background: var(--border); }

.admin-toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: #333; color: #fff; padding: 10px 22px; border-radius: 8px;
  font-size: 14px; opacity: 0; transition: all .3s; z-index: 9999; pointer-events: none;
}
.admin-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ─── ADDRESS SELECT IN CART ─────────────────────────────────────────────── */
.cart-address-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0 4px;
  border-top: 1px solid var(--border);
  margin-bottom: 4px;
}
.cart-address-label {
  font-size: 13px;
  color: var(--text-light);
  white-space: nowrap;
  flex-shrink: 0;
}
.cart-address-select {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  background: var(--bg-gray);
  cursor: pointer;
  outline: none;
}
.cart-address-select:focus { border-color: var(--blue); }

/* ─── CONFIRM ORDER MODAL ────────────────────────────────────────────────── */
.confirm-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 10000;
}
.confirm-modal {
  background: #fff;
  border-radius: 16px;
  padding: 32px 28px 24px;
  max-width: 360px;
  width: 90%;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
}
.confirm-modal-text {
  font-size: 17px;
  line-height: 1.5;
  color: var(--text);
  margin: 0 0 24px;
}
.confirm-modal-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.btn-confirm-yes {
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 13px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.btn-confirm-yes:hover { background: #1d4ed8; }
.btn-confirm-no {
  background: var(--bg-gray);
  color: var(--text);
  border: none;
  border-radius: 10px;
  padding: 12px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s;
}
.btn-confirm-no:hover { background: var(--border); }

/* ─── EXPRESS NAV BUTTON ──────────────────────────────────────────────────── */
.nav-btn-express.active { background: #fff7ed; color: #ea580c; }
.nav-btn-express:hover { background: #fff7ed; color: #ea580c; }

/* ─── EXPRESS PAGE ────────────────────────────────────────────────────────── */
.express-page { padding: 24px 24px 100px; max-width: 1500px; margin: 0 auto; }

.express-title-text { color: #ea580c !important; }
.express-page-subtitle { font-size: 14px; color: var(--text-secondary); margin: -18px 0 20px; }

.express-empty {
  text-align: center;
  padding: 80px 0;
  color: var(--text-secondary);
}
.express-empty p { font-size: 16px; margin-bottom: 8px; }

.express-stock-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
}
.express-stock-badge.low {
  background: rgba(234,88,12,.85);
}

.express-price { color: #ea580c !important; }

.btn-add-express { background: #ea580c !important; }
.btn-add-express:hover { background: #c2410c !important; }

.btn-checkout-express { background: #ea580c !important; }
.btn-checkout-express:hover:not(:disabled) { background: #c2410c !important; }

/* ─── EXPRESS CART ────────────────────────────────────────────────────────── */
.express-cart-fab { background: #ea580c; box-shadow: 0 4px 12px rgba(234,88,12,.4); }
.express-cart-fab:hover { background: #c2410c; }

.express-cart-header { background: linear-gradient(135deg, #ea580c, #f97316); }
.express-cart-header h2 { color: #fff; }
.express-cart-header .cart-close { background: rgba(255,255,255,.2); color: #fff; }
.express-cart-header .cart-close:hover { background: rgba(255,255,255,.35); }

.express-cart-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  color: rgba(255,255,255,.8);
  margin-bottom: 2px;
}

.express-delivery-date {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

/* ─── CONFIRM MODAL EXPRESS ───────────────────────────────────────────────── */
.confirm-modal-express-badge {
  display: inline-block;
  background: #fff7ed;
  color: #ea580c;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
}
.confirm-modal-date {
  font-size: 14px;
  color: var(--text-secondary);
  margin: -16px 0 20px;
}
.btn-confirm-express { background: #ea580c !important; }
.btn-confirm-express:hover { background: #c2410c !important; }

/* ─── MOBILE ──────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  body { overflow-x: hidden; }

  /* Header */
  .header {
    padding: 0 12px;
    height: auto;
    min-height: 52px;
    flex-wrap: nowrap;
    gap: 4px;
  }
  .header-logo { flex-shrink: 1; min-width: 0; }
  .header-logo-img { width: 28px; height: 28px; }
  .header-logo-text { font-size: 12px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 90px; }
  .header-logo-text span { display: none; }
  .header-nav { gap: 2px; flex-shrink: 0; }
  .nav-btn { padding: 6px 9px; font-size: 12px; border-radius: 6px; }
  .header-user { gap: 6px; flex-shrink: 0; }
  .header-user-name { display: none; }
  .btn-logout { padding: 5px 10px; font-size: 12px; }

  /* Pages padding */
  .catalog-page { padding: 16px 12px 100px; }
  .orders-page { padding: 16px 12px 80px; }
  .express-page { padding: 16px 12px 100px; }

  /* Catalog title */
  .catalog-title { font-size: 20px; margin-bottom: 16px; }
  .express-page-subtitle { margin: -12px 0 16px; }

  /* Category sidebar pills */
  .cat-item { padding: 6px 12px; font-size: 13px; }
  .cat-sub-item { font-size: 12px; }

  /* Product grid – 2 columns */
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .product-name { font-size: 12px; }
  .product-price { font-size: 15px; }
  .btn-add { font-size: 12px; padding: 8px; }
  .qty-btn { width: 28px; height: 28px; font-size: 15px; }
  .qty-number { font-size: 14px; }

  /* Order cards */
  .orders-title { font-size: 20px; margin-bottom: 16px; }
  .order-card-header { padding: 12px 14px; gap: 8px; }
  .order-id { font-size: 14px; }
  .order-date { font-size: 12px; }
  .order-items { padding: 10px 14px; }
  .order-item-row { font-size: 13px; }
  .order-card-footer { padding: 8px 14px 12px; }
  .order-total { font-size: 15px; }

  /* Cart panel */
  .cart-panel { width: 100%; max-width: 100%; right: 0; border-radius: 20px 20px 0 0; bottom: 0; top: auto; height: 85vh; }
  .cart-fab { bottom: 20px; right: 16px; }

  /* Confirm modal */
  .confirm-modal { padding: 24px 20px; margin: 16px; }

  /* Express page subtitle */
  .express-title-text { font-size: 22px; }
}
