/* قلم لاله‌زار در بخش اصلی سند پیش‌بارگذاری می‌شود. */

/* ==========================================================================
   فروشگاه عمده رنگارنگ - RangaRang Wholesale Store
   Crisp, Modern, Premium Light Theme CSS
   ========================================================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

:root {
  /* Crisp Light Palette */
  --bg: #f3f6fb;
  --surface: #ffffff;
  --surface2: #eaf1f8;
  --surface-glass: rgba(248, 251, 255, 0.96);
  --line: #d3deea;
  --line-light: #e7eef6;

  /* Typography Colors */
  --text: #17263d;
  --text-sub: #40546e;
  --muted: #5e718a;

  /* Accent Colors */
  --b1: #e11d48; /* Vibrant Rose Pink */
  --b1-hover: #be123c;
  --b2: #f59e0b; /* Amber Gold */
  --b3: #6366f1; /* Indigo */
  
  /* Gradients */
  --grad: linear-gradient(135deg, #e11d48, #f59e0b);
  --grad-hover: linear-gradient(135deg, #be123c, #d97706);
  --grad-subtle: linear-gradient(135deg, rgba(225,29,72,0.06), rgba(245,158,11,0.06));

  /* Status Colors & Tints */
  --ok: #059669;
  --okbg: #ecfdf5;
  --warn: #d97706;
  --warnbg: #fffbeb;
  --danger: #dc2626;
  --dangerbg: #fef2f2;
  --info: #2563eb;
  --infobg: #eff6ff;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05);
  --shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 20px 30px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
  --shadow-pink: 0 8px 24px -4px rgba(225, 29, 72, 0.28);

  /* Radius & Spacing */
  --r-sm: 10px;
  --r: 18px;
  --r-lg: 24px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Lalezar', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: 15px;
  line-height: 1.8;
  -webkit-overflow-scrolling: touch;
}

main {
  flex: 1;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
  user-select: none;
}

input, select, textarea {
  font-family: inherit;
  font-size: 14px;
}

/* Helper Utilities */
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; margin-top: 18px; }

/* Container Sections */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 18px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}

.section-head h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
}

.head-line {
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, var(--line), transparent);
  margin-inline-start: 12px;
  border-radius: 999px;
}

/* Card Container */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 22px;
  box-shadow: var(--shadow);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  border-color: #cbd5e1;
}

/* Reveal Animation */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   1. Sticky Top Navigation Bar
   ========================================================================== */

#topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}

.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 900;
  color: var(--text);
}

.logo-mark {
  width: 34px;
  height: 34px;
  flex: none;
  filter: drop-shadow(0 3px 8px rgba(225, 29, 72, 0.35));
  transition: transform 0.4s ease;
}

.logo:hover .logo-mark {
  transform: rotate(90deg) scale(1.1);
}

.logo-text {
  letter-spacing: -0.5px;
}

.mainnav {
  display: flex;
  gap: 6px;
  background: var(--surface2);
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--line);
}

.mainnav a {
  padding: 7px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-sub);
  transition: all 0.2s ease;
}

.mainnav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.8);
}

.mainnav a.active {
  color: #ffffff;
  background: var(--grad);
  box-shadow: var(--shadow-pink);
}

.mainnav a.nav-admin.active {
  background: var(--b3);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-inline-start: auto;
}

.icon-btn {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  width: 42px;
  height: 42px;
  border-radius: 12px;
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.icon-btn:hover {
  border-color: var(--b1);
  color: var(--b1);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.15);
}

.icon-btn:active {
  transform: scale(0.95);
}

.cart-btn {
  position: relative;
}

.badge {
  position: absolute;
  top: -6px;
  inset-inline-start: -6px;
  background: var(--b1);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  box-shadow: 0 2px 8px rgba(225, 29, 72, 0.4);
  animation: pop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 4px 10px 4px 6px;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--grad);
  color: #ffffff;
  font-weight: 800;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==========================================================================
   2. Mobile Telegram-Style Bottom Navigation Bar
   ========================================================================== */

.mobile-bottom-nav {
  display: none;
}

@media (max-width: 768px) {
  body {
    padding-bottom: 70px;
  }

  .mainnav {
    display: none;
  }

  .mobile-bottom-nav {
    position: fixed;
    bottom: 12px;
    left: 12px;
    right: 12px;
    z-index: 90;
    height: 60px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 6px;
  }

  .b-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 48px;
    border-radius: 14px;
    color: var(--text-sub);
    transition: all 0.2s ease;
    text-decoration: none;
  }

  .b-nav-icon {
    font-size: 20px;
    line-height: 1;
    position: relative;
    transition: transform 0.2s ease;
  }

  .b-nav-label {
    font-size: 11px;
    font-weight: 700;
    margin-top: 2px;
  }

  .b-nav-item.active {
    color: var(--b1);
    background: rgba(225, 29, 72, 0.08);
  }

  .b-nav-item.active .b-nav-icon {
    transform: translateY(-2px) scale(1.1);
  }

  .b-nav-item.b-nav-admin.active {
    color: var(--b3);
    background: rgba(99, 102, 241, 0.1);
  }
}

/* ==========================================================================
   3. Buttons & Controls
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 14px;
  padding: 11px 22px;
  font-size: 14px;
  font-weight: 700;
  transition: all 0.2s ease;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}

.btn-brand {
  background: var(--grad);
  color: #ffffff;
  box-shadow: var(--shadow-pink);
}

.btn-brand:hover {
  background: var(--grad-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -4px rgba(225, 29, 72, 0.38);
}

.btn-brand:active {
  transform: scale(0.97);
}

.btn-light {
  background: #ffffff;
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.btn-light:hover {
  background: var(--surface2);
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.btn-ghost {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--line);
}

.btn-ghost:hover {
  background: #e2e8f0;
  color: var(--text);
}

.btn-danger {
  background: var(--dangerbg);
  color: var(--danger);
  border: 1px solid color-mix(in srgb, var(--danger) 25%, transparent);
}

.btn-danger:hover {
  background: var(--danger);
  color: #ffffff;
}

.btn-ok {
  background: var(--okbg);
  color: var(--ok);
  border: 1px solid color-mix(in srgb, var(--ok) 25%, transparent);
}

.btn-ok:hover {
  background: var(--ok);
  color: #ffffff;
}

.btn-sm {
  padding: 7px 14px;
  font-size: 13px;
  border-radius: 10px;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
  border-radius: 16px;
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ==========================================================================
   4. Hero Section (Home Page)
   ========================================================================== */

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(800px 400px at 85% -10%, rgba(225, 29, 72, 0.15), transparent 60%),
    radial-gradient(600px 380px at 10% 110%, rgba(245, 158, 11, 0.15), transparent 60%),
    linear-gradient(135deg, #0f172a, #1e293b);
  color: #ffffff;
  border-bottom: 1px solid var(--line);
  padding: 64px 18px 72px;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1.5px, transparent 1.5px);
  background-size: 24px 24px;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  padding: 6px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 20px;
  backdrop-filter: blur(10px);
}

.hero-title {
  font-size: clamp(42px, 8vw, 76px);
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -1.5px;
}

.brand-grad {
  background: linear-gradient(90deg, #ff4d94, #ff9f43, #feca57, #ff4d94);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 6s linear infinite;
}

@keyframes shimmer {
  to { background-position: 200% center; }
}

.hero p {
  max-width: 680px;
  margin: 0 auto 28px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 16px;
  line-height: 1.8;
}

.hero p b.hl {
  color: #fde047;
  font-weight: 800;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.hero-chips {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.chip {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 13px;
  backdrop-filter: blur(8px);
}

.btn-ghost-light {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.btn-ghost-light:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-2px);
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  pointer-events: none;
}

.blob1 { width: 340px; height: 340px; background: #e11d48; top: -90px; right: -70px; }
.blob2 { width: 320px; height: 320px; background: #6366f1; bottom: -100px; left: -60px; }
.blob3 { width: 240px; height: 240px; background: #f59e0b; top: 30%; left: 40%; opacity: 0.2; }

/* Category Grid */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}

.cat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.25s ease;
  text-align: center;
}

.cat-card:hover {
  transform: translateY(-4px);
  border-color: var(--b1);
  box-shadow: var(--shadow-pink);
}

.cat-card img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.cat-card:hover img {
  transform: scale(1.08);
}

.cat-ph {
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  background: var(--surface2);
}

.cat-card h3 {
  padding: 12px;
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
}

/* ==========================================================================
   5. Products Grid & Product Cards
   ========================================================================== */

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

.p-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
  position: relative;
}

.p-card:hover {
  transform: translateY(-5px);
  border-color: var(--b1);
  box-shadow: var(--shadow-pink);
}

.p-img {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--surface2);
  overflow: hidden;
}

.p-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.p-card:hover .p-img img {
  transform: scale(1.08);
}

.p-ph {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
}

.stock {
  position: static;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.55;
  white-space: normal;
  padding: 4px 10px;
  border-radius: 999px;
  box-shadow: none;
  vertical-align: middle;
}

.stock.ok { background: #e8f7ef; color: #17633d; border: 1px solid #b5dfc7; }
.stock.low { background: #fff5df; color: #80520b; border: 1px solid #eed39c; }
.stock.out { background: #fff0f2; color: #a32643; border: 1px solid #e9b5c0; }


.p-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.p-cat {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.p-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.7em;
}

.p-price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.p-price {
  font-size: 18px;
  font-weight: 900;
  color: var(--b1);
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.p-price small {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.p-meta-row {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  margin-top: 1px;
}

.p-type-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-height: 27px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid #ccd9e8;
  background: #edf3f9;
  color: #36516d;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.5;
  white-space: normal;
}
.p-type-tag.pack { background: #f1edff; border-color: #d7cdf7; color: #5a478e; }
.p-type-tag.single { background: #fff4e7; border-color: #f1d4ad; color: #80511c; }

.p-unit {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface2);
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-block;
  width: fit-content;
}

.p-body .btn {
  margin-top: auto;
  padding: 9px 12px;
  font-size: 13px;
  border-radius: 12px;
}

/* ==========================================================================
   6. Shop Toolbar, Chips & Search Inputs
   ========================================================================== */

.shop-toolbar {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
  flex-wrap: nowrap;
  flex: 1;
}

.chips::-webkit-scrollbar { display: none; }

.chip-btn {
  flex: none;
  white-space: nowrap;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text-sub);
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  transition: all 0.2s ease;
  cursor: pointer;
}

.chip-btn:hover {
  border-color: var(--b1);
  color: var(--text);
}

.chip-btn.active {
  background: var(--grad);
  color: #ffffff;
  border-color: transparent;
  box-shadow: var(--shadow-pink);
}

.input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 12px;
  padding: 11px 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-size: 14px;
}

.input:focus {
  outline: none;
  border-color: var(--b1);
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.12);
}

.input.sm {
  padding: 6px 12px;
  font-size: 13px;
  width: auto;
}

.search {
  width: 260px;
  max-width: 100%;
}

/* Product Detail Page */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

.pd-img {
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface2);
  aspect-ratio: 1 / 1;
  width: 100%;
  box-shadow: var(--shadow);
}

.pd-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pd-ph {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 90px;
}

.pd-info h1 {
  font-size: 26px;
  margin: 6px 0 12px;
  line-height: 1.4;
  font-weight: 800;
}

.pd-price {
  font-size: 30px;
  font-weight: 900;
  color: var(--b1);
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 14px 0 6px;
}

.pd-price small {
  font-size: 14px;
  color: var(--muted);
}

.pd-unit {
  color: var(--muted);
  font-size: 13px;
  background: var(--surface2);
  padding: 4px 12px;
  border-radius: 8px;
  display: inline-block;
  margin-bottom: 12px;
}

.pd-desc {
  color: var(--text-sub);
  margin: 16px 0;
  line-height: 1.8;
}

.pd-buy {
  display: flex;
  gap: 14px;
  align-items: center;
  margin: 22px 0 14px;
  flex-wrap: wrap;
}

.pd-note {
  background: var(--infobg);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 13px;
  color: var(--info);
  line-height: 1.7;
  border: 1px solid color-mix(in srgb, var(--info) 20%, transparent);
}

/* Quantity Box */
.qty-box {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
}

.qty-box button {
  width: 42px;
  height: 42px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
  transition: background 0.2s;
  cursor: pointer;
}

.qty-box button:hover {
  background: var(--surface2);
}

.qty-box button:active {
  background: var(--okbg);
  color: var(--ok);
}

.qty-box span {
  width: 44px;
  text-align: center;
  font-weight: 800;
  font-size: 15px;
  color: var(--text);
}

.qty-box.sm button { width: 34px; height: 36px; font-size: 16px; }
.qty-box.sm span { width: 36px; }

/* ==========================================================================
   7. Cart & Checkout Views
   ========================================================================== */

.cart-layout {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 20px;
  align-items: start;
}

.cart-list {
  padding: 8px;
}

.cart-row {
  display: grid;
  grid-template-columns: 66px 1fr auto auto auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-radius: 16px;
  transition: background 0.2s;
  border-bottom: 1px solid var(--line-light);
}

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

.cart-row:hover {
  background: var(--surface2);
}

.cart-thumb {
  width: 66px;
  height: 66px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.cart-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-info h4 {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
}

.cart-pack {
  font-size: 12px;
  color: var(--muted);
}

.cart-line-total {
  font-weight: 900;
  color: var(--b1);
  font-size: 16px;
  white-space: nowrap;
}

.cart-line-total small {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}

.cart-summary h3 {
  margin-bottom: 16px;
  font-size: 18px;
  font-weight: 800;
}

.sum-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 14px;
  color: var(--text-sub);
}

.sum-row.total {
  border: none;
  font-size: 17px;
  padding: 16px 0;
  color: var(--text);
}

.sum-row.total b {
  color: var(--b1);
  font-size: 22px;
  font-weight: 900;
}

/* Checkout Form */
.checkout-layout {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 20px;
  align-items: start;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-sub);
}

.f-title {
  font-weight: 800;
  font-size: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
}

.mini-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.mini-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
  border-bottom: 1px dashed var(--line);
  padding-bottom: 8px;
}

.mini-item b {
  color: var(--text);
}

/* Payment Wrap */
.pay-wrap {
  max-width: 540px;
  margin: 0 auto;
  padding: 40px 18px 60px;
}

.pay-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.pay-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 18px;
}

.pay-card {
  padding: 32px;
  text-align: center;
}

.pay-info-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 14px;
  color: var(--text-sub);
}

.pay-amount-box {
  margin: 24px 0;
  padding: 22px;
  background: var(--surface2);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pay-amount-box b {
  font-size: 34px;
  color: var(--b1);
  font-weight: 900;
}

.pay-cancel {
  display: inline-block;
  margin-top: 16px;
  color: var(--muted);
  font-size: 13px;
}

.pay-cancel:hover {
  color: var(--danger);
}

/* Success Card */
.success-card {
  text-align: center;
  padding: 54px 30px;
}

.success-ico {
  font-size: 74px;
  margin-bottom: 12px;
  animation: pop 0.5s ease;
}

.success-card h1 {
  font-size: 26px;
  margin-bottom: 10px;
  font-weight: 800;
}

.success-card p {
  color: var(--muted);
  max-width: 460px;
  margin: 0 auto;
}

.success-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
  flex-wrap: wrap;
}

@keyframes pop {
  0% { transform: scale(0.3); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* ==========================================================================
   8. Support & AI Chat UI
   ========================================================================== */

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

.ticket-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 18px;
  box-shadow: var(--shadow);
  transition: all 0.2s ease;
  display: block;
}

.ticket-card:hover {
  border-color: var(--b1);
  transform: translateY(-3px);
  box-shadow: var(--shadow-pink);
}

.ticket-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.ticket-top b {
  font-size: 14px;
}

.ticket-subject {
  font-weight: 800;
  font-size: 15px;
  margin-bottom: 4px;
  color: var(--text);
}

.ticket-last {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ticket-date {
  color: var(--muted);
  font-size: 12px;
  margin-top: 8px;
}

.pill {
  font-size: 12px;
  font-weight: 800;
  padding: 3px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.pill.ok { background: var(--okbg); color: var(--ok); }
.pill.warn { background: var(--warnbg); color: var(--warn); }
.pill.danger { background: var(--dangerbg); color: var(--danger); }
.pill.info { background: var(--infobg); color: var(--info); }
.pill.muted { background: var(--surface2); color: var(--muted); }

/* Chat Card Layout */
.chat-card {
  padding: 0;
  overflow: hidden;
  max-width: 860px;
  margin: 0 auto;
  border-radius: 22px;
}

.chat-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--surface2);
}

.chat-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.chat-box {
  height: 460px;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--bg);
}

.chat-note {
  text-align: center;
  font-size: 12px;
  color: var(--text-sub);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 18px;
  align-self: center;
  max-width: 100%;
  box-shadow: var(--shadow-sm);
}

.msg {
  max-width: 80%;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.msg.user { align-self: flex-start; }
.msg.bot, .msg.admin { align-self: flex-end; }

.msg-meta {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  margin: 0 6px;
}

.bubble {
  padding: 13px 18px;
  border-radius: 20px;
  font-size: 14px;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.8;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.msg.user .bubble {
  border-bottom-right-radius: 4px;
  background: var(--grad);
  color: #ffffff;
  border: none;
  box-shadow: var(--shadow-pink);
}

.msg.bot .bubble {
  border-bottom-left-radius: 4px;
  background: var(--infobg);
  color: #1e3a8a;
  border-color: color-mix(in srgb, var(--info) 25%, transparent);
}

.msg.admin .bubble {
  border-bottom-left-radius: 4px;
  background: var(--okbg);
  color: #064e3b;
  border-color: color-mix(in srgb, var(--ok) 25%, transparent);
}

.typing {
  display: flex;
  gap: 5px;
  align-items: center;
  padding: 12px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  width: fit-content;
  align-self: flex-end;
}

.typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  animation: blink 1.2s infinite;
}

.typing span:nth-child(2) { animation-delay: 0.2s; }
.typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes blink {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 1; }
}

.chat-form {
  display: flex;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.chat-form .input {
  flex: 1;
}

/* ==========================================================================
   9. Auth / Admin Login Section Styling
   ========================================================================== */

.auth-section {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 220px);
  padding: 40px 18px;
}

.admin-login-card {
  position: relative;
  max-width: 460px;
  width: 100%;
  padding: 42px 36px 32px;
  background: linear-gradient(145deg, #0f172a, #1e293b);
  color: #ffffff;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35), 0 0 40px rgba(225, 29, 72, 0.15);
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.admin-login-back {
  font-size: 13px;
  font-weight: 700;
  color: #94a3b8;
  transition: color 0.2s ease;
  align-self: flex-start;
  margin-bottom: -6px;
  text-decoration: none;
}

.admin-login-back:hover {
  color: #fde047;
}

.admin-login-head {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.admin-login-icon {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  margin-bottom: 6px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.admin-login-head h1 {
  font-size: 24px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.5px;
}

.admin-login-head p {
  font-size: 13px;
  color: #94a3b8;
}

.admin-login-badge {
  font-size: 12px;
  font-weight: 800;
  color: #fde047;
  background: rgba(253, 224, 71, 0.12);
  border: 1px solid rgba(253, 224, 71, 0.25);
  padding: 4px 14px;
  border-radius: 999px;
  margin-top: 4px;
}

.admin-login-form label span {
  font-size: 13px;
  font-weight: 800;
  color: #e2e8f0;
}

.admin-login-form .input {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 15px;
  border-radius: 14px;
  padding: 12px 18px;
}

.admin-login-form .input::placeholder {
  color: #64748b;
}

.admin-login-form .input:focus {
  border-color: #f43f5e;
  box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.25);
  background: rgba(255, 255, 255, 0.12);
}

.admin-login-btn {
  margin-top: 8px;
  padding: 14px;
  font-size: 16px;
  border-radius: 16px;
}

.admin-login-foot {
  text-align: center;
  font-size: 12px;
  color: #64748b;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 480px) {
  .admin-login-card {
    padding: 32px 22px 24px;
    border-radius: 22px;
  }
}

.auth-section {
  display: flex;
  justify-content: center;
  padding-top: 40px;
  padding-bottom: 60px;
}

.auth-card {
  max-width: 440px;
  width: 100%;
  padding: 38px 32px;
  border-radius: var(--r-lg);
}

.auth-head {
  text-align: center;
  margin-bottom: 24px;
}

.auth-head .logo {
  justify-content: center;
  font-size: 28px;
  margin-bottom: 12px;
}

.auth-head h1 {
  font-size: 22px;
  font-weight: 900;
  color: var(--text);
}

.auth-head p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.auth-switch {
  text-align: center;
  margin-top: 18px;
  font-size: 13px;
  color: var(--muted);
}

.auth-switch a {
  color: var(--b1);
  font-weight: 800;
}

.auth-req {
  max-width: 480px;
  margin: 50px auto;
  text-align: center;
  padding: 44px 30px;
}

.auth-req .empty-icon {
  font-size: 54px;
}

.auth-req p {
  color: var(--muted);
  margin-bottom: 16px;
}

/* Modals & Sheet Overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  animation: fade 0.2s ease;
}

@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  overflow-y: auto;
  animation: rise 0.25s ease;
  border: 1px solid var(--line);
}

.modal-wide { max-width: 660px; }

@keyframes rise {
  from { transform: translateY(18px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
}

.modal-head h3 {
  font-size: 18px;
  font-weight: 800;
}

.modal-body {
  padding: 22px;
}

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

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ==========================================================================
   Super Modern Admin Panel UI Styling
   ========================================================================== */

.admin-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.admin-top-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #ffffff;
  border-radius: var(--r-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-lg);
}

.admin-top-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.admin-avatar-badge {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}

.admin-top-info h2 {
  font-size: 18px;
  font-weight: 900;
  margin-bottom: 2px;
  color: #ffffff;
}

.admin-user-tag {
  font-size: 12px;
  font-weight: 700;
  color: #fde047;
}

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

/* Segmented Control Navbar */
.admin-segmented-nav {
  display: flex;
  gap: 8px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  box-shadow: var(--shadow);
}

.admin-segmented-nav::-webkit-scrollbar { display: none; }

.admin-seg-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-sub);
  white-space: nowrap;
  transition: all 0.2s ease;
  text-decoration: none;
}

.admin-seg-item:hover {
  background: var(--surface2);
  color: var(--text);
}

.admin-seg-item.active {
  background: var(--grad);
  color: #ffffff;
  box-shadow: var(--shadow-pink);
}

.seg-icon {
  font-size: 16px;
}

.admin-head-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.admin-head-title h1 {
  font-size: 22px;
  font-weight: 900;
  color: var(--text);
}

/* Admin Product Cards Grid */
.admin-products-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.admin-product-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.admin-prod-card {
  display: flex;
  gap: 14px;
  padding: 16px;
  align-items: center;
  transition: all 0.2s ease;
}

.admin-prod-card:hover {
  border-color: var(--b1);
  box-shadow: var(--shadow-pink);
}

.ap-thumb {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface2);
  flex: none;
}

.ap-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ap-ph {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
}

.ap-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.ap-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ap-cat {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}

.ap-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ap-prices {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 2px;
}

.ap-price-main b {
  font-size: 16px;
  font-weight: 900;
  color: var(--b1);
}

.ap-price-main small {
  font-size: 11px;
  color: var(--muted);
}

.ap-unit-price {
  font-size: 11px;
  color: var(--muted);
  background: var(--surface2);
  padding: 2px 8px;
  border-radius: 6px;
}

.ap-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: none;
}

.admin-wrap {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  align-items: start;
}

.admin-side {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 18px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 86px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-top-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 18px;
}

.admin-brand small {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--b1);
}

.admin-top-acts {
  display: flex;
  gap: 8px;
}

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

.admin-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-sub);
  transition: all 0.2s ease;
}

.admin-nav a:hover {
  background: var(--surface2);
  color: var(--text);
}

.admin-nav a.active {
  background: var(--grad);
  color: #ffffff;
  box-shadow: var(--shadow-pink);
}

.admin-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.admin-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-head h1 {
  font-size: 24px;
  font-weight: 900;
  color: var(--text);
}

.admin-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 18px;
}

.low-row, .recent-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 13px;
  gap: 10px;
}

.low-row:last-child, .recent-row:last-child {
  border-bottom: none;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow);
}

.stat-ic {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex: none;
}

.stat-card > div {
  display: flex;
  flex-direction: column;
}

.stat-card span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}

.stat-card b {
  font-size: 18px;
  font-weight: 900;
  color: var(--text);
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.tab {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text-sub);
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  transition: all 0.2s ease;
  cursor: pointer;
}

.tab:hover {
  color: var(--text);
  border-color: var(--b1);
}

.tab.active {
  background: var(--grad);
  color: #ffffff;
  border-color: transparent;
  box-shadow: var(--shadow-pink);
}

/* Data Tables */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid var(--line);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: right;
  background: var(--surface);
}

.table th {
  background: var(--surface2);
  padding: 12px 14px;
  font-weight: 800;
  color: var(--text-sub);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-light);
  color: var(--text);
  vertical-align: middle;
}

.table tr:last-child td {
  border-bottom: none;
}

.table tr:hover td {
  background: var(--surface2);
}

/* Printable Commercial Toman Invoice Sheet */
.invoice-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.invoice-sheet {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 36px;
  box-shadow: var(--shadow-lg);
  max-width: 800px;
  margin: 0 auto;
  color: #0f172a;
}

.inv-row {
  display: grid;
  grid-template-columns: 1fr 84px 130px 38px;
  gap: 8px;
  margin-bottom: 8px;
  align-items: center;
}

.inv-num {
  text-align: center;
}

/* ==========================================================================
   11. Footer Section
   ========================================================================== */

#site-footer {
  background: #0f172a;
  color: #f8fafc;
  margin-top: 50px;
  border-top: 1px solid #1e293b;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 18px 36px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
}

.footer-brand .logo {
  color: #ffffff;
  margin-bottom: 14px;
}

.footer-brand p {
  color: #94a3b8;
  font-size: 13px;
  line-height: 1.8;
  max-width: 360px;
}

.footer-col h4 {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 14px;
  color: #ffffff;
}

.footer-col p {
  color: #94a3b8;
  font-size: 13px;
  line-height: 1.9;
}

.footer-col a {
  color: #38bdf8;
}

.footer-bottom {
  border-top: 1px solid #1e293b;
  padding: 20px 18px;
  text-align: center;
  font-size: 13px;
  color: #64748b;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-line1 {
  font-weight: 700;
  color: #94a3b8;
}

.footer-line2 {
  font-size: 12px;
}

/* Toasts */
#toast-root {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(12px);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  padding: 11px 22px;
  border-radius: 999px;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.toast.ok { border: 1px solid var(--ok); }
.toast.err { border: 1px solid var(--danger); }

/* Empty States */
.empty-state {
  text-align: center;
  padding: 50px 20px;
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--r);
}

.empty-icon {
  font-size: 52px;
  margin-bottom: 12px;
}

.empty-state h3 {
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 6px;
}

.empty-state p {
  color: var(--muted);
  font-size: 13px;
}

/* ==========================================================================
   12. Mobile Responsive Adjustments
   ========================================================================== */

@media (max-width: 768px) {
  .section {
    padding: 22px 14px;
  }

  .section-head h2 {
    font-size: 19px;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .p-card {
    border-radius: 16px;
  }

  .p-body {
    padding: 10px 12px 12px;
  }

  .p-name {
    font-size: 13px;
  }

  .p-price {
    font-size: 16px;
  }

  .cat-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  .cat-card h3 {
    padding: 8px 4px;
    font-size: 12px;
  }

  .cat-card img, .cat-ph {
    height: 80px;
  }

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

  .cart-layout, .checkout-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .cart-row {
    grid-template-columns: 56px 1fr;
    grid-template-areas:
      "thumb info"
      "thumb qty"
      "total acts";
    gap: 8px 12px;
    padding: 12px;
    border-radius: 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    margin-bottom: 8px;
  }

  .cart-thumb { grid-area: thumb; width: 56px; height: 56px; border-radius: 12px; }
  .cart-info { grid-area: info; }
  .cart-row .qty-box { grid-area: qty; justify-self: start; }
  .cart-line-total { grid-area: total; font-size: 15px; align-self: center; }
  .cart-row .icon-btn { grid-area: acts; justify-self: end; width: 34px; height: 34px; font-size: 15px; }

  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-top-left-radius: 26px;
    border-top-right-radius: 26px;
    max-height: 88vh;
    width: 100%;
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }

  @keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }
}

@media print {
  #topbar, #site-footer, .invoice-toolbar, #toast-root, #modal-root, .mobile-bottom-nav {
    display: none !important;
  }
  body {
    background: #ffffff;
    padding-bottom: 0 !important;
  }
  .invoice-sheet {
    box-shadow: none;
    border-radius: 0;
    border: none;
    max-width: 100%;
    padding: 0;
  }
}
