/* ViaCart - Dynamic CSS Design System */

:root {
  --primary-color: #3b82f6;
  --primary-hover: #2563eb;
  --secondary-color: #0f172a;
  --secondary-light: #1e293b;
  --accent-color: #f59e0b;
  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --bg-muted: #f1f5f9;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --border-color: #e2e8f0;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 20px -2px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 30px -5px rgba(0,0,0,0.12);
  --font-heading: 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--secondary-color);
  line-height: 1.25;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.2s ease;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  overflow-x: hidden;
}

/* ============================================
   Reusable Responsive Grid Layout Utilities
   ============================================ */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
}

.layout-cart {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 40px;
  align-items: start;
}

.layout-checkout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 40px;
  align-items: start;
}

.layout-contact {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 50px;
  align-items: start;
}

.layout-shop {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 40px;
  align-items: start;
}

.layout-product {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: start;
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 40px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.is-hidden {
  display: none !important;
}

/* ============================================
   Deals Page — Countdown, Combos, Coupons
   ============================================ */
.deal-countdown {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--secondary-color);
  color: #fff;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 6px 12px;
  border-radius: 8px;
  letter-spacing: 0.3px;
}

.deal-countdown.countdown-ended {
  background: #94a3b8;
}

.deal-section-title {
  font-size: clamp(1.3rem, 3.5vw, 1.7rem);
  font-weight: 800;
  margin-bottom: 6px;
}

.discount-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: #ef4444;
  color: #fff;
  font-weight: 800;
  font-size: 0.78rem;
  padding: 5px 10px;
  border-radius: 6px;
  z-index: 2;
}

.combo-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.combo-card .combo-img-wrap {
  height: 220px;
  overflow: hidden;
  position: relative;
}

.combo-card .combo-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.combo-card .combo-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.combo-items-list {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.coupon-card {
  background: linear-gradient(135deg, var(--secondary-color), #1e293b);
  color: #fff;
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  overflow: hidden;
  border: 2px dashed rgba(255,255,255,0.25);
}

.coupon-card .coupon-code {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--primary-color);
}

.coupon-card .coupon-copy-btn {
  align-self: flex-start;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}

.coupon-card .coupon-copy-btn:hover {
  background: rgba(255,255,255,0.22);
}

@media (max-width: 768px) {
  .combo-card .combo-img-wrap {
    height: 180px;
  }
}

.surface-box {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 40px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

@media (max-width: 600px) {
  .surface-box {
    padding: 20px;
  }
}

/* Header & Navigation */
.site-header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border-color);
}

.header-top {
  background: var(--secondary-color);
  color: #fff;
  font-size: 0.85rem;
  padding: 6px 0;
  text-align: center;
}

.header-top a {
  color: var(--primary-color);
  font-weight: 600;
  margin-left: 5px;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--secondary-color);
}

.brand-logo img {
  max-height: 48px;
  width: auto;
  border-radius: var(--radius-sm);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  font-weight: 500;
  font-size: 0.98rem;
  color: var(--text-main);
  position: relative;
  padding: 8px 0;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary-color);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary-color);
  border-radius: 2px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.btn-icon {
  background: var(--bg-muted);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  position: relative;
  transition: transform 0.2s ease, background 0.2s ease;
}

.btn-icon:hover {
  transform: translateY(-2px);
  background: var(--border-color);
}

.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--primary-color);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 99px;
  padding: 2px 7px;
  min-width: 20px;
  text-align: center;
}

.btn-primary {
  background: var(--primary-color);
  color: #ffffff;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.1);
  transition: all 0.25s ease;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.btn-secondary {
  background: var(--secondary-color);
  color: #ffffff;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.25s ease;
}

.btn-secondary:hover {
  background: var(--secondary-light);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--secondary-color);
  border: 1px solid var(--border-color);
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-outline:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: rgba(59, 130, 246, 0.05);
}

/* Hero Section */
.hero-section {
  padding: 60px 0 80px 0;
  background: linear-gradient(135deg, rgba(248,250,252,1) 0%, rgba(241,245,249,1) 100%);
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary-color);
  padding: 6px 16px;
  border-radius: 99px;
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
}

.hero-title {
  font-size: clamp(1.9rem, 5.5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 20px;
  color: var(--secondary-color);
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  max-width: 540px;
}

.hero-image-wrapper {
  position: relative;
}

.hero-image-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.hero-image-card img {
  width: 100%;
  height: 440px;
  object-fit: cover;
  border-radius: var(--radius-md);
}

.hero-tag {
  position: absolute;
  bottom: -20px;
  left: -20px;
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 16px 24px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Category Grid Section */
.section-title-wrap {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 48px auto;
}

.section-tag {
  color: var(--primary-color);
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.section-title {
  font-size: clamp(1.5rem, 4.5vw, 2.2rem);
  font-weight: 800;
  margin-top: 6px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  margin-top: 10px;
}

.categories-section {
  padding: 80px 0;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.category-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.category-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.category-img-wrap {
  position: relative;
  height: 240px;
  overflow: hidden;
}

.category-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.category-card:hover .category-img-wrap img {
  transform: scale(1.08);
}

.category-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.category-name {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.category-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 20px;
  flex-grow: 1;
}

/* Products Section */
.products-section {
  padding: 80px 0;
  background: #ffffff;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 30px;
}

.product-card {
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  position: relative;
}

.product-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.product-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--primary-color);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 99px;
  z-index: 2;
}

.product-img-wrap {
  position: relative;
  height: 260px;
  background: var(--bg-muted);
  overflow: hidden;
}

.product-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.product-card:hover .product-img-wrap img {
  transform: scale(1.06);
}

.product-info {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-category {
  font-size: 0.8rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  margin-bottom: 6px;
}

.product-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--secondary-color);
  margin-bottom: 10px;
  line-height: 1.3;
}

.product-price-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  margin-bottom: 16px;
}

.product-price {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary-color);
}

.product-old-price {
  font-size: 0.95rem;
  color: var(--text-light);
  text-decoration: line-through;
}

/* Feature Value Props */
.features-bar {
  padding: 50px 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-body);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 16px;
}

.feature-icon {
  width: 50px;
  height: 50px;
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary-color);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.feature-title {
  font-size: 1rem;
  font-weight: 700;
}

.feature-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Cart & Checkout */
.cart-table-wrap {
  background: #fff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
  margin-bottom: 30px;
}

.cart-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  min-width: 600px;
}

.cart-table th, .cart-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
}

.cart-table th {
  background: var(--bg-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-muted);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  width: fit-content;
}

.qty-btn {
  background: transparent;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0 8px;
  font-weight: 700;
}

.cart-summary-card {
  background: #fff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
  font-size: 1rem;
}

.summary-row.total {
  font-size: 1.25rem;
  font-weight: 800;
  border-top: 1px solid var(--border-color);
  padding-top: 14px;
  color: var(--secondary-color);
}

/* Order Tracking Timeline */
.tracking-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 36px;
  box-shadow: var(--shadow-md);
  max-width: 800px;
  margin: 0 auto;
}

.tracking-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 20px;
  margin-bottom: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.status-badge {
  padding: 6px 16px;
  border-radius: 99px;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-Pending { background: #fef3c7; color: #92400e; }
.status-Processing { background: #dbeafe; color: #1e40af; }
.status-Shipped { background: #e0e7ff; color: #3730a3; }
.status-Delivered { background: #dcfce7; color: #166534; }
.status-Cancelled { background: #fee2e2; color: #991b1b; }

.timeline {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin: 40px 0;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--border-color);
  z-index: 1;
}

.timeline-step {
  position: relative;
  z-index: 2;
  text-align: center;
  flex: 1;
}

.timeline-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 3px solid var(--border-color);
  margin: 0 auto 10px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--text-muted);
}

.timeline-step.completed .timeline-icon {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #ffffff;
}

.timeline-step.active .timeline-icon {
  border-color: var(--primary-color);
  color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

.timeline-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
}

.timeline-step.completed .timeline-label,
.timeline-step.active .timeline-label {
  color: var(--secondary-color);
  font-weight: 700;
}

/* Admin Panel Layout */
.admin-wrapper {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 260px;
  background: var(--secondary-color);
  color: #fff;
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.admin-brand {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 36px;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: #94a3b8;
  font-weight: 500;
}

.admin-menu a:hover, .admin-menu a.active {
  background: var(--secondary-light);
  color: #ffffff;
}

.admin-main {
  flex-grow: 1;
  background: var(--bg-body);
  padding: 36px;
  overflow-y: auto;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 16px;
}

.admin-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 24px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
  overflow-x: auto;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 24px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.stat-val {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--secondary-color);
  margin-top: 8px;
}

/* Forms & Inputs */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 8px;
  color: var(--secondary-color);
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s ease;
  background: #ffffff;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

/* ============================================
   Mobile Topbar Toggle & Sidebar Drawer (Public Site)
   ============================================ */
.nav-toggle {
  display: none;
  background: var(--bg-muted);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--secondary-color);
}

.public-sidebar-overlay {
  display: none;
}

.public-sidebar {
  display: none;
  flex-direction: column;
  width: 280px;
  background: #ffffff;
  transition: transform 0.3s ease;
}

@media (max-width: 900px) {
  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .public-sidebar-overlay.open {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 199;
  }

  .public-sidebar {
    display: flex;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 200;
    width: 280px;
    max-width: 82vw;
    transform: translateX(-100%);
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
    padding-bottom: env(safe-area-inset-bottom);
  }

  .public-sidebar.open {
    transform: translateX(0);
  }
}

.public-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
}

.public-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--secondary-color);
}

.public-sidebar-brand img {
  max-height: 36px;
  width: auto;
}

.public-sidebar-close {
  background: var(--bg-muted);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  width: 36px;
  height: 36px;
  font-size: 1rem;
  cursor: pointer;
  color: var(--secondary-color);
}

.public-sidebar-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  padding: 10px;
  gap: 4px;
}

.public-sidebar-menu a {
  display: block;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  color: var(--text-main);
}

.public-sidebar-menu a:hover,
.public-sidebar-menu a.active {
  background: var(--bg-muted);
  color: var(--primary-color);
}

/* ============================================
   Mobile Bottom Navigation (Admin Panel)
   ============================================ */
.admin-bottom-nav {
  display: none;
}

@media (max-width: 992px) {
  .admin-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 998;
    background: var(--secondary-color);
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)) 4px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
  }

  .admin-main {
    padding-bottom: calc(28px + 64px + env(safe-area-inset-bottom)) !important;
  }
}

.admin-bottom-nav .bnav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px 2px;
  color: #94a3b8;
  font-size: 0.68rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
}

.admin-bottom-nav .bnav-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.admin-bottom-nav .bnav-item.active {
  color: var(--primary-color);
}

/* Sidebar Drawer Overlay */
.admin-sidebar-overlay {
  display: none;
}

@media (max-width: 992px) {
  .admin-sidebar-overlay.open {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 199;
  }

  .admin-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 200;
    width: 280px;
    max-width: 82vw;
    transform: translateX(-100%);
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }

  .admin-sidebar.open {
    transform: translateX(0);
    display: flex !important;
  }
}

/* ============================================
   Responsive Card-Style Tables (Mobile)
   ============================================ */
@media (max-width: 700px) {
  table.cart-table.responsive-stack thead {
    display: none;
  }

  table.cart-table.responsive-stack, 
  table.cart-table.responsive-stack tbody, 
  table.cart-table.responsive-stack tr, 
  table.cart-table.responsive-stack td {
    display: block;
    width: 100%;
  }

  table.cart-table.responsive-stack {
    min-width: 0;
  }

  table.cart-table.responsive-stack tr {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 14px;
    padding: 6px 14px;
    background: #fff;
  }

  table.cart-table.responsive-stack td {
    border-bottom: 1px solid var(--bg-muted);
    padding: 10px 0;
    text-align: right;
    position: relative;
  }

  table.cart-table.responsive-stack td:last-child {
    border-bottom: none;
  }

  table.cart-table.responsive-stack td[data-label]::before {
    content: attr(data-label);
    float: left;
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-muted);
    margin-right: 10px;
  }
}

@media (max-width: 900px) {
  .shop-sidebar h3 {
    display: none;
  }
  .shop-sidebar ul {
    flex-direction: row !important;
    overflow-x: auto;
    gap: 8px !important;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .shop-sidebar ul::-webkit-scrollbar {
    display: none;
  }
  .shop-sidebar ul li {
    flex-shrink: 0;
  }
  .shop-sidebar ul li a {
    display: block;
    padding: 8px 16px;
    background: var(--bg-muted);
    border-radius: 99px;
    white-space: nowrap;
    font-size: 0.88rem;
  }
  .shop-sidebar {
    padding: 12px !important;
  }
}

/* Floating WhatsApp Button */
.whatsapp-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 60px;
  height: 60px;
  background-color: #25D366;
  color: #FFF;
  border-radius: 50px;
  text-align: center;
  font-size: 30px;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: pulse-wa 2s infinite;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 26px rgba(37, 211, 102, 0.6);
  background-color: #20ba5a;
}

.whatsapp-tooltip {
  position: absolute;
  right: 70px;
  background: #0f172a;
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

@media (max-width: 900px) {
  .whatsapp-float {
    bottom: calc(76px + env(safe-area-inset-bottom));
    width: 52px;
    height: 52px;
    font-size: 26px;
  }
}

.app-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  left: auto;
  background: #0f172a;
  color: #ffffff;
  padding: 14px 22px;
  border-radius: 12px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  z-index: 9999;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  max-width: calc(100vw - 48px);
}

.app-toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 900px) {
  .app-toast {
    left: 16px;
    right: 16px;
    bottom: calc(76px + env(safe-area-inset-bottom));
    text-align: center;
  }
}

.whatsapp-float:hover .whatsapp-tooltip {
  opacity: 1;
}

@keyframes pulse-wa {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  }
  70% {
    box-shadow: 0 0 0 14px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

/* Footer */
.site-footer {
  background: var(--secondary-color);
  color: #94a3b8;
  padding: 70px 0 30px 0;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 50px;
}

.footer-brand h3 {
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 14px;
}

.footer-col h4 {
  color: #ffffff;
  font-size: 1.1rem;
  margin-bottom: 18px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a:hover {
  color: var(--primary-color);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  text-align: center;
  font-size: 0.88rem;
}

/* Responsive Styles */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .admin-mobile-bar {
    display: flex !important;
  }
  .admin-wrapper {
    flex-direction: column;
  }
  .admin-sidebar {
    width: 100%;
    display: none;
    padding: 20px;
  }
  .admin-sidebar.open {
    display: flex !important;
  }
  .admin-main {
    padding: 20px 16px;
  }
  .layout-contact,
  .layout-cart,
  .layout-checkout {
    grid-template-columns: 1fr;
  }
  .layout-shop {
    grid-template-columns: 1fr;
  }
  .layout-product {
    grid-template-columns: 1fr;
    padding: 24px;
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr !important;
  }
  .hero-image-card img {
    height: 280px;
  }
  .category-img-wrap {
    height: 190px;
  }
  .product-img-wrap {
    height: 200px;
  }
  .layout-product img {
    height: 300px !important;
  }
  .admin-header h1 {
    font-size: 1.5rem !important;
  }
  .admin-card {
    padding: 16px;
  }
  .tracking-card {
    padding: 22px;
  }
  .timeline {
    margin: 30px 0;
  }
  .timeline-label {
    font-size: 0.72rem;
  }
  .timeline-icon {
    width: 34px;
    height: 34px;
    font-size: 0.85rem;
  }
}

@media (max-width: 600px) {
  .navbar {
    height: 70px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .hero-title {
    font-size: 2.2rem;
  }
  .stat-grid {
    grid-template-columns: 1fr;
  }
  .header-top span {
    font-size: 0.72rem;
  }
  .header-top {
    padding: 5px 10px;
  }
  .brand-logo {
    font-size: 1.3rem;
  }
  .brand-logo img {
    max-height: 38px;
  }
  .container {
    padding: 0 14px;
  }
  .hero-section {
    padding: 30px 0 40px 0;
  }
  .categories-section,
  .products-section {
    padding: 40px 0;
  }
  .cart-summary-card,
  .tracking-card,
  .layout-product,
  .admin-card {
    padding: 18px;
  }
  .qty-control input {
    width: 34px !important;
  }
  .site-footer {
    padding: 40px 0 20px 0;
  }
}