/* ==========================================================================
   ZhatpatOrder — Clean Light Design System & UI/UX Guidelines
   ========================================================================== */

:root {
  /* Color Palette — Light Elegant Aesthetic */
  --primary-color: #6366f1;
  /* Indigo 500 */
  --primary-hover: #4f46e5;
  /* Indigo 600 */
  --primary-glow: rgba(99, 102, 241, 0.18);
  --accent-color: #0891b2;
  /* Cyan 600 */
  --accent-glow: rgba(8, 145, 178, 0.18);

  --bg-dark: #ffffff;
  --bg-surface: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;

  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;

  --border-glass: #e2e8f0;
  --border-glass-hover: #cbd5e1;

  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-blur: blur(20px);

  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-glow: 0 8px 24px -4px var(--primary-glow);
  --shadow-lg: 0 12px 32px -8px rgba(0, 0, 0, 0.1);

  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Global Reset & Body */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background-image:
    radial-gradient(circle at 15% 15%, rgba(99, 102, 241, 0.04) 0%, transparent 45%),
    radial-gradient(circle at 85% 85%, rgba(8, 145, 178, 0.04) 0%, transparent 45%);
  background-attachment: fixed;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

/* Headings */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

/* Dynamic Gradient Text */
.text-gradient {
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--accent-color) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, #818cf8 50%, var(--accent-color) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Modern Glass Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-glass);
  padding: 0.9rem 1.5rem;
  transition: all var(--transition-normal);
}

.nav-container {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--text-primary);
}

.brand-logo img {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-glass);
}

.brand-icon-box {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.1rem;
  box-shadow: var(--shadow-glow);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.35rem;
}

.nav-link {
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-color);
  background: rgba(99, 102, 241, 0.06);
}

/* Buttons System */
.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
  color: #ffffff;
  padding: 0.6rem 1.35rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px var(--primary-glow);
  transition: all var(--transition-bounce);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px var(--primary-glow);
  color: white;
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: #ffffff;
  color: var(--text-primary);
  padding: 0.6rem 1.35rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid var(--border-glass);
  cursor: pointer;
  transition: all var(--transition-normal);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-secondary:hover {
  background: var(--bg-surface);
  border-color: var(--border-glass-hover);
  color: var(--primary-color);
  transform: translateY(-1px);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
  transition: all var(--transition-fast);
}

.btn-danger:hover {
  background: #b91c1c;
  transform: translateY(-1px);
}

/* Layout Containers & Grids */
.main-wrapper {
  max-width: 1320px;
  margin: 2rem auto;
  padding: 0 1.5rem;
  flex: 1;
  width: 100%;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.75rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.75rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

/* Cards & Containers */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.card-hover:hover {
  background: var(--bg-card-hover);
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-glass-hover);
}

/* Shop Hero Banner Showcase */
.shop-hero {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 2.25rem;
  border: 1px solid var(--border-glass);
  background-size: cover;
  background-position: center;
  min-height: 240px;
  display: flex;
  align-items: flex-end;
  box-shadow: var(--shadow-lg);
}

.shop-hero-overlay {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(15, 23, 42, 0.85) 100%);
  backdrop-filter: blur(4px);
  width: 100%;
  padding: 2.25rem;
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.shop-logo-large {
  width: 96px;
  height: 96px;
  border-radius: var(--radius-md);
  object-fit: cover;
  border: 3px solid #ffffff;
  box-shadow: var(--shadow-lg);
}

.shop-title-box h1 {
  font-size: 2.25rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
}

.shop-title-box p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1rem;
  max-width: 680px;
  margin-top: 0.35rem;
}

/* Empty Shop State Component */
.empty-shop-state {
  text-align: center;
  padding: 4.5rem 2rem;
  background: var(--bg-card);
  border: 2px dashed var(--border-glass);
  border-radius: var(--radius-lg);
  margin: 3rem 0;
  box-shadow: var(--shadow-sm);
}

.empty-shop-icon {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--primary-color);
  margin: 0 auto 1.5rem auto;
  box-shadow: 0 0 25px var(--primary-glow);
  animation: floatIcon 3s ease-in-out infinite;
}

@keyframes floatIcon {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

.empty-shop-title {
  font-size: 1.65rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.empty-shop-desc {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 500px;
  margin: 0 auto 1.75rem auto;
}

/* Category Filter Tabs */
.category-tabs {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.category-tab {
  padding: 0.55rem 1.35rem;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: all var(--transition-normal);
}

.category-tab.active,
.category-tab:hover {
  background: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
  box-shadow: 0 4px 14px var(--primary-glow);
}

/* Product Card Component */
.product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product-img-wrap {
  position: relative;
  width: 100%;
  padding-top: 75%;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: #f1f5f9;
  margin-bottom: 1.25rem;
}

.product-img-wrap img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.product-cat-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-glass);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.product-new-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #10b981;
  color: #ffffff;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 2;
  box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.3);
}

.product-price {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary-color);
}

.product-stock-tag {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  display: inline-block;
  margin-left: 0.5rem;
}

.stock-in {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.stock-low {
  background: rgba(245, 158, 11, 0.1);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.775rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-pending {
  background: rgba(245, 158, 11, 0.1);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-processing {
  background: rgba(59, 130, 246, 0.1);
  color: #2563eb;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.badge-shipped {
  background: rgba(139, 92, 246, 0.1);
  color: #7c3aed;
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.badge-delivered {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-cancelled {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Form Components */
.form-group {
  margin-bottom: 1.35rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.45rem;
  color: var(--text-primary);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: #ffffff;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.925rem;
  font-family: inherit;
  transition: all var(--transition-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background: #ffffff;
}

/* Tables System */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
  background: #ffffff;
}

.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.table th {
  background: var(--bg-surface);
  padding: 1rem 1.25rem;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  font-size: 0.775rem;
  letter-spacing: 0.75px;
  border-bottom: 1px solid var(--border-glass);
}

.table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
  color: var(--text-secondary);
}

.table tr:hover {
  background: rgba(99, 102, 241, 0.03);
}

/* Toast & Alert Boxes */
.alert {
  padding: 1rem 1.35rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
  font-size: 0.925rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.alert-success {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: #059669;
}

.alert-error {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #dc2626;
}

/* Product Detail Image */
.product-detail-img {
  height: 420px;
}

/* ==========================================================================
    Cart Page Layout
    ========================================================================== */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2rem;
  align-items: start;
}

.cart-items-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cart-item-card {
  padding: 1.25rem !important;
}

.cart-item-top {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.cart-item-img {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border-glass);
}

.cart-item-info {
  min-width: 0;
  flex: 1;
}

.cart-item-title {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cart-item-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
  margin-top: 0.15rem;
}

.cart-item-shop {
  font-size: 0.8rem;
  color: var(--primary-color);
  font-weight: 600;
  display: inline-block;
  margin-top: 0.2rem;
}

.cart-item-bottom {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-glass);
  flex-wrap: wrap;
}

.cart-item-price {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 600;
  min-width: 70px;
}

.cart-qty-form {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.cart-qty-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

.cart-qty-select {
  width: 60px !important;
  padding: 0.3rem 0.4rem !important;
  font-size: 0.85rem !important;
}

.cart-item-subtotal {
  font-size: 1.05rem;
  font-weight: 800;
  color: #059669;
  margin-left: auto;
}

.cart-remove-btn {
  padding: 0.35rem 0.6rem !important;
  font-size: 0.8rem !important;
}

.cart-summary-section .card {
  position: sticky;
  top: 5rem;
}

/* Footer */
footer {
  margin-top: auto;
  border-top: 1px solid var(--border-glass);
  background: var(--glass-bg);
  padding: 2.25rem 1.5rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Hamburger Toggle Button
   ========================================================================== */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.65rem;
  font-size: 1.15rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.nav-toggle:hover {
  background: var(--bg-surface);
  border-color: var(--border-glass-hover);
}

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

/* ==========================================================================
   Responsive — Tablet (≤ 768px)
   ========================================================================== */
@media (max-width: 768px) {
   /* Show hamburger */
   .nav-toggle {
     display: flex;
     align-items: center;
     justify-content: center;
   }

   /* Mobile nav drawer */
   .nav-links {
     display: none;
     position: absolute;
     top: 100%;
     left: 0;
     right: 0;
     background: #ffffff;
     border-bottom: 1px solid var(--border-glass);
     box-shadow: var(--shadow-lg);
     flex-direction: column;
     padding: 1rem;
     gap: 0.25rem;
     z-index: 99;
   }

   .nav-links.nav-open {
     display: flex;
   }

   .nav-link {
     width: 100%;
     padding: 0.75rem 1rem;
     border-radius: var(--radius-sm);
     font-size: 1rem;
   }

   .nav-link:hover,
   .nav-link.active {
     background: var(--bg-surface);
   }

   .btn-primary,
   .btn-secondary {
     width: 100%;
     justify-content: center;
     text-align: center;
   }

   .nav-label-mobile {
     display: inline;
   }

   /* Navbar positioning for dropdown */
   .navbar {
     position: sticky;
   }

   .nav-container {
     position: relative;
   }

    .mobile-quick-nav {
      display: block !important;
    }

    .desktop-only-table {
      display: none !important;
    }

    .mobile-only-orders {
      display: block !important;
    }

    .mobile-only-products {
      display: block !important;
    }

    .mobile-only-customers {
      display: block !important;
    }

   /* Layout */
   .main-wrapper {
     padding: 0 1rem;
     margin: 1.25rem auto;
   }

   /* Grid columns stack */
   .grid-2,
   .grid-3 {
     grid-template-columns: 1fr;
     gap: 1.25rem;
   }

   .grid-4 {
     grid-template-columns: repeat(2, 1fr);
     gap: 1rem;
   }

   /* Cart layout stacks vertically */
   .cart-layout {
     grid-template-columns: 1fr;
     gap: 1.25rem;
   }

   /* Cart page mobile fixes */
   .cart-page h1 {
     font-size: 1.25rem !important;
   }

   .cart-item-card {
     padding: 0.75rem !important;
   }

   .cart-item-top {
     flex-direction: column;
     align-items: flex-start;
     gap: 0.5rem;
   }

   .cart-item-img {
     width: 48px;
     height: 48px;
   }

   .cart-item-title {
     font-size: 0.85rem;
   }

   .cart-item-bottom {
     flex-wrap: wrap;
     align-items: center;
     gap: 0.5rem;
   }

   .cart-item-price {
     font-size: 0.85rem;
   }

   .cart-item-subtotal {
     margin-left: auto;
   }

   .cart-qty-select {
     width: 45px !important;
     padding: 0.3rem !important;
     font-size: 0.8rem !important;
   }

   .cart-summary-section .card {
     position: static;
   }

   /* Checkout layout stacks vertically */
   .checkout-grid {
     grid-template-columns: 1fr !important;
   }

   .cart-remove-btn {
     padding: 0.5rem 0.7rem !important;
     font-size: 0.85rem !important;
   }

   .card-hover:hover {
     transform: none;
   }

   /* Shop Hero */
   .shop-hero {
     min-height: 180px;
     border-radius: var(--radius-md);
     margin-bottom: 1.5rem;
   }

   .shop-hero-overlay {
     padding: 1.5rem;
     gap: 1rem;
     flex-direction: column;
     align-items: flex-start;
   }

   .shop-logo-large {
     width: 64px;
     height: 64px;
   }

   .shop-title-box h1 {
     font-size: 1.5rem;
   }

   .shop-title-box p {
     font-size: 0.875rem;
   }

   /* Empty shop state */
   .empty-shop-state {
     padding: 3rem 1.5rem;
     margin: 2rem 0;
   }

   .empty-shop-icon {
     width: 64px;
     height: 64px;
     font-size: 1.75rem;
   }

   .empty-shop-title {
     font-size: 1.35rem;
   }

   /* Category tabs scroll */
   .category-tabs {
     gap: 0.5rem;
     margin-bottom: 1.25rem;
     -webkit-overflow-scrolling: touch;
   }

   .category-tab {
     padding: 0.45rem 1rem;
     font-size: 0.8rem;
   }

   /* Product cards */
   .product-price {
     font-size: 1.15rem;
   }

   /* Tables */
   .table th,
   .table td {
     padding: 0.75rem 0.85rem;
     font-size: 0.825rem;
   }

   /* Footer */
   footer {
     padding: 1.5rem 1rem;
   }

   /* Form grid stacks on mobile */
   .form-grid-2 {
     grid-template-columns: 1fr !important;
   }

   /* Prevent hover effects on touch devices */
   .card-hover:hover {
     transform: none;
   }

   /* Product detail image */
   .product-detail-img {
     height: 250px !important;
   }

   /* Form grid stacks on mobile */
   .form-grid-2 {
     grid-template-columns: 1fr !important;
   }

   /* Make tap targets at least 44px for touch */
   .nav-link,
   .btn-primary,
   .btn-secondary,
   .btn-danger,
   .category-tab {
     min-height: 44px;
     display: inline-flex;
     align-items: center;
   }

   /* Image responsiveness */
   img {
     max-width: 100%;
     height: auto;
   }

   /* Ensure select dropdowns are usable on mobile */
   select {
     -webkit-appearance: none;
     -moz-appearance: none;
     appearance: none;
     background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
     background-repeat: no-repeat;
     background-position: right 12px center;
     padding-right: 32px !important;
   }
 }

 /* Prevent text zoom on form inputs in iOS */
 input, select, textarea {
   font-size: 16px;
 }

 /* Better touch interaction */
 a, button, .btn-primary, .btn-secondary, .btn-danger, .category-tab, .nav-link {
   touch-action: manipulation;
   -webkit-tap-highlight-color: transparent;
 }

  /* Prevent hover on touch devices */
  .card-hover:hover {
    transform: none;
  }

  @media (hover: hover) {
  .card-hover:hover {
    background: var(--bg-card-hover);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-glass-hover);
  }
}

/* Fix modals to be full-screen on very small devices */
@media (max-width: 480px) {
  div[id$="Modal"] {
    padding: 1rem !important;
  }

  div[id$="Modal"] .card {
    margin: 0;
    border-radius: var(--radius-sm);
  }
}

/* ==========================================================================
   Responsive — Mobile (≤ 480px)
   ========================================================================== */
@media (max-width: 480px) {
  /* Typography scale down */
  h1 {
    font-size: 1.6rem !important;
  }

  h2 {
    font-size: 1.25rem !important;
  }

  h3 {
    font-size: 1.05rem !important;
  }

  /* Grid all single column */
  .grid-4 {
    grid-template-columns: 1fr;
  }

  /* Smaller card padding */
  .card {
    padding: 1rem;
  }

  /* Buttons full width */
  .btn-primary,
  .btn-secondary {
    font-size: 0.85rem;
    padding: 0.55rem 1rem;
  }

  /* Navbar compact */
  .navbar {
    padding: 0.65rem 1rem;
  }

  .brand-logo {
    font-size: 1.15rem;
    gap: 0.6rem;
  }

  .brand-logo img,
  .brand-icon-box {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }

  /* Shop hero very compact */
  .shop-hero {
    min-height: 140px;
    border-radius: var(--radius-sm);
  }

  .shop-hero-overlay {
    padding: 1rem;
  }

  .shop-logo-large {
    width: 48px;
    height: 48px;
  }

  .shop-title-box h1 {
    font-size: 1.25rem;
  }

  /* Forms */
  .form-input,
  .form-select,
  .form-textarea {
    padding: 0.65rem 0.85rem;
    font-size: 0.875rem;
  }

  /* Alerts */
  .alert {
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
  }

  /* Product stock tag */
  .product-stock-tag {
    margin-left: 0;
    margin-top: 0.25rem;
    display: block;
    text-align: center;
    width: fit-content;
  }

  /* Footer links stack */
  footer {
    padding: 1.25rem 1rem;
    font-size: 0.8rem;
  }
}

/* ==========================================================================
   Auth pages responsive (login, register, etc.)
   ========================================================================== */
@media (max-width: 480px) {
  .main-wrapper[style*="min-height"] {
    min-height: auto !important;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
  }
}

/* Switch Toggle Component */
.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.switch .slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #cbd5e1;
  transition: .3s;
  border-radius: 34px;
}
.switch .slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}
.switch input:checked + .slider {
  background-color: var(--primary-color);
}
.switch input:checked + .slider:before {
  transform: translateX(18px);
}