/* ==========================================================================
   NOVA MART — Unified Ultra-Fast & Fully Responsive Stylesheet (Inter Font)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  --primary: #7c3aed;
  --primary-hover: #6d28d9;
  --primary-light: #f5f3ff;
  --primary-glow: rgba(124, 58, 237, 0.28);
  --primary-gradient: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
  --navy-dark: #1e1b4b;
  --navy-slate: #2e1065;
  --text-main: #1f2937;
  --text-muted: #6b7280;
  --text-light: #9ca3af;
  --bg-page: #f9f6fc;
  --bg-card: #ffffff;
  --border-color: #ede9fe;
  --border-focus: #c4b5fd;
  --accent-price: #d97706;
  --success-green: #16a34a;
  --success-light: #dcfce7;
  --danger-red: #ef4444;
  --danger-light: #fee2e2;
  --warning-amber: #f59e0b;
  --warning-light: #fef3c7;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 22px;
  --radius-full: 9999px;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --shadow-sm: 0 2px 4px 0 rgba(124, 58, 237, 0.04);
  --shadow-md: 0 4px 14px -1px rgba(124, 58, 237, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 12px 28px -5px rgba(124, 58, 237, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  font-family: var(--font-family);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-main);
  background-color: var(--bg-page);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body {
  font-family: var(--font-family);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  width: 100%;
  background-color: #f9f6fc;
  background-image: 
    radial-gradient(circle at 85% 12%, rgba(139, 92, 246, 0.14) 0%, transparent 38%),
    radial-gradient(circle at 10% 45%, rgba(192, 132, 252, 0.12) 0%, transparent 42%),
    radial-gradient(circle at 80% 88%, rgba(124, 58, 237, 0.09) 0%, transparent 46%);
  background-attachment: fixed;
  position: relative;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: var(--transition);
}

a {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

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

/* ==========================================================================
   MAIN STORE HEADER — MEDIUM PROPORTIONED SPACIOUS HEIGHT & RESPONSIVE DESIGN
   ========================================================================== */
.main-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  padding: 18px 28px;
  position: sticky;
  top: 0;
  z-index: 500;
  box-shadow: 0 2px 10px rgba(124, 58, 237, 0.04);
  width: 100%;
  box-sizing: border-box;
}

.header-container {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
}

/* Brand */
.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
  user-select: none;
  flex-shrink: 0;
  min-width: 0;
}

.brand-logo-circle {
  width: 46px;
  height: 46px;
  min-width: 46px;
  background: var(--navy-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(124, 58, 237, 0.12);
  border: 2px solid rgba(237, 233, 254, 0.8);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.cart-logo-icon {
  width: 22px;
  height: 22px;
  stroke: #ffffff;
}

.brand-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-name {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.2px;
  color: var(--navy-dark);
  line-height: 1.2;
  white-space: nowrap;
}

.brand-location {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
  margin-top: 2px;
}

.pin-icon {
  width: 12px;
  height: 12px;
  stroke: var(--text-muted);
}

.status-dot {
  width: 6px;
  height: 6px;
  background-color: #22c55e;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.status-text {
  color: #16a34a;
  font-weight: 600;
}

/* Desktop Navigation */
.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  padding: 6px 0;
  transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
  font-weight: 600;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
  border-radius: var(--radius-full);
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-sync-odoo {
  height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  background: #ffffff;
  border: 1.5px solid var(--border-color);
  color: var(--navy-dark);
  font-size: 0.86rem;
  font-weight: 600;
  transition: var(--transition);
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.btn-sync-odoo:hover {
  background: var(--primary-light);
  border-color: #c4b5fd;
  color: var(--primary);
}

.btn-icon-header {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1.5px solid var(--border-color);
  background: #ffffff;
  color: var(--navy-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.btn-icon-header:hover {
  background: var(--primary-light);
  border-color: #c4b5fd;
  color: var(--primary);
}

.btn-cart-header {
  background: var(--primary-gradient);
  color: #ffffff;
  height: 42px;
  padding: 0 18px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  box-shadow: 0 4px 14px var(--primary-glow);
  transition: var(--transition);
  flex-shrink: 0;
}

.btn-cart-header:hover {
  box-shadow: 0 6px 18px var(--primary-glow);
  transform: translateY(-1px);
}

.cart-icon-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.cart-badge-count {
  background: #ffffff;
  color: var(--primary);
  font-size: 0.74rem;
  font-weight: 800;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
}

/* Responsive Header */
@media (max-width: 768px) {
  .desktop-nav { display: none; }
  .main-header { padding: 16px 18px; }
  .brand-name { font-size: 1.05rem; }
  .brand-logo-circle { width: 42px; height: 42px; min-width: 42px; }
  .btn-icon-header { width: 40px; height: 40px; }
  .btn-sync-odoo { width: 40px; height: 40px; }
  .btn-cart-header { height: 40px; padding: 0 14px; }
}

@media (max-width: 540px) {
  .sync-text { display: none; }
  .btn-sync-odoo { width: 40px; height: 40px; padding: 0; justify-content: center; border-radius: 10px; }
  .btn-icon-header { width: 40px; height: 40px; border-radius: 10px; }
  .cart-btn-text { display: none; }
  .btn-cart-header { height: 40px; padding: 0 12px; gap: 6px; border-radius: 10px; }
}

@media (max-width: 360px) {
  .brand-location { display: none; }
  .main-header { padding: 14px 12px; }
}

/* ==========================================================================
   PAGE 1: PRODUCTS CATALOG
   ========================================================================== */
.shop-main {
  flex: 1;
  padding: 20px 20px 24px;
  width: 100%;
}

@media (max-width: 768px) {
  .shop-main {
    padding: 14px 12px 16px;
  }
}

.shop-container {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
}

/* Search Bar */
.search-bar-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.search-icon {
  position: absolute;
  left: 16px;
  width: 18px;
  height: 18px;
  stroke: var(--primary);
  pointer-events: none;
}

.search-filter-icon-btn {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: var(--transition);
}

.search-filter-icon-btn:hover {
  background: var(--primary-light);
}

.search-input {
  width: 100%;
  padding: 12px 46px 12px 46px;
  background: #ffffff;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.92rem;
  color: var(--text-main);
  outline: none;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.04);
  transition: var(--transition);
}

.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.search-clear-btn {
  position: absolute;
  right: 42px;
  font-size: 1.2rem;
  color: var(--text-muted);
}

/* Ambient Backdrop Decor */
.shop-container {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
  position: relative;
}

.shop-container::before {
  content: '';
  position: absolute;
  top: 80px;
  right: -60px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.16) 0%, rgba(216, 180, 254, 0.05) 50%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.shop-container::after {
  content: '';
  position: absolute;
  top: 500px;
  left: -80px;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.12) 0%, rgba(233, 213, 255, 0.04) 55%, transparent 75%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

/* Controls Section: Category Pills & Sort Select */
.controls-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  width: 100%;
}

.category-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
  max-width: 100%;
}

.category-pills::-webkit-scrollbar { 
  display: none; 
}

.pill-btn {
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 0.86rem;
  font-weight: 600;
  background: #ffffff;
  border: 1.5px solid var(--border-color);
  color: var(--text-muted);
  white-space: nowrap;
  transition: var(--transition);
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(124, 58, 237, 0.03);
  cursor: pointer;
}

.pill-btn:hover {
  color: var(--primary);
  border-color: #c4b5fd;
  background: var(--primary-light);
}

.pill-btn.active {
  background: var(--primary-gradient);
  color: #ffffff;
  border-color: transparent;
  font-weight: 700;
  box-shadow: 0 4px 14px var(--primary-glow);
  transform: translateY(-1px);
}

.sort-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .sort-wrapper {
    display: none !important;
  }
}

.sort-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

.custom-select {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: auto;
}

.custom-select select {
  appearance: none;
  -webkit-appearance: none;
  padding: 7px 32px 7px 12px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  outline: none;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  height: 36px;
}

.custom-select select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.custom-select .chevron-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px !important;
  height: 14px !important;
  max-width: 14px !important;
  max-height: 14px !important;
  stroke: var(--text-muted);
  pointer-events: none;
  display: block;
}

/* ==========================================================================
   HORIZONTAL PRODUCT CARD (Exact match to uploaded image)
   ========================================================================== */
.shop-unified-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  width: 100%;
}

@media (max-width: 960px) {
  .shop-unified-layout {
    display: block;
    width: 100%;
  }

  /* On mobile, HIDE the bottom checkout summary box so mobile keeps the dedicated Cart page flow */
  .order-summary-panel {
    display: none !important;
  }
}

.product-list-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.product-item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid rgba(237, 233, 254, 0.85);
  border-radius: 16px;
  padding: 14px 16px;
  gap: 14px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
}

.product-item-card:hover {
  border-color: #c4b5fd;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(124, 58, 237, 0.09), 0 2px 6px rgba(0, 0, 0, 0.03);
}

.product-item-card:active {
  transform: scale(0.99);
}

.product-item-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}

.product-item-thumb-wrap {
  width: 52px;
  height: 52px;
  min-width: 52px;
  border-radius: 12px;
  background: #fdfaff;
  border: 1px solid #ede9fe;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.product-item-thumb {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 3px;
  transition: transform 0.2s ease;
}

.product-item-card:hover .product-item-thumb {
  transform: scale(1.06);
}

.product-item-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  gap: 3px;
}

.product-item-title {
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--navy-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  line-height: 1.25;
  width: 100%;
  display: block;
}

/* Stock Tag directly under name */
.product-item-stock-tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 1px;
}

.product-item-stock-tag.in-stock {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.product-item-stock-tag.low-stock {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.product-item-stock-tag.out-stock {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.product-item-price {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--accent-price); /* Warm golden amber price */
  margin-top: 2px;
  line-height: 1.2;
}

/* Horizontal Stepper (Matching uploaded image: [ - ]  1  [ + ]) */
.product-item-stepper-wrap {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-left: 10px;
}

.stepper-horizontal {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  user-select: none;
}

.stepper-btn-h {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: var(--navy-dark);
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.stepper-btn-h:hover:not(:disabled) {
  background: var(--primary-light);
  border-color: #c4b5fd;
  color: var(--primary);
  transform: translateY(-1px);
}

.stepper-btn-h:active:not(:disabled) {
  transform: scale(0.92);
}

.stepper-btn-h:disabled {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #cbd5e1;
  cursor: not-allowed;
  box-shadow: none;
}

.stepper-val-h {
  font-size: 0.96rem;
  font-weight: 800;
  color: var(--navy-dark);
  min-width: 18px;
  text-align: center;
  line-height: 1;
}

/* Order Summary Sticky Panel (Image 2 Style - Desktop Only) */
.order-summary-panel {
  position: sticky;
  top: 80px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  width: 100%;
  box-sizing: border-box;
}

.summary-items-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}

.summary-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.84rem;
}

.summary-item-name {
  color: var(--navy-dark);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60%;
}

.summary-item-qty {
  color: var(--text-muted);
  font-size: 0.78rem;
  margin-left: 4px;
}

.summary-item-amount {
  font-weight: 700;
  color: var(--navy-dark);
}

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

@media (min-width: 1400px) {
  .products-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 1100px) {
  .products-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
}
@media (max-width: 768px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .shop-main { padding: 14px 12px 80px; }
}
@media (max-width: 380px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}

.product-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 12px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: var(--transition);
  overflow: hidden;
}

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

.product-card.out-of-stock {
  opacity: 0.75;
}

/* Product Card Image Wrapper — Clickable with Feedback */
.product-card-img-wrap {
  width: 100%;
  height: 175px;
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #f8fafc;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.product-card-img-wrap:active {
  transform: scale(0.96);
}

@media (max-width: 768px) {
  .product-card-img-wrap {
    height: 135px;
    margin-bottom: 8px;
  }
}

.product-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Stock Badge */
.stock-badge-tag {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  z-index: 5;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(6px);
  pointer-events: none;
}

.stock-badge-tag.in-stock {
  background: rgba(220, 252, 231, 0.92);
  color: #15803d;
  border: 1px solid rgba(134, 239, 172, 0.8);
}

.stock-badge-tag.low-stock {
  background: rgba(254, 243, 199, 0.92);
  color: #b45309;
  border: 1px solid rgba(253, 230, 138, 0.8);
}

.stock-badge-tag.out-stock {
  background: rgba(254, 226, 226, 0.92);
  color: #b91c1c;
  border: 1px solid rgba(252, 165, 165, 0.8);
}

.product-card-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--navy-dark);
  line-height: 1.35;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.7em;
  cursor: pointer;
}

@media (max-width: 768px) {
  .product-card-title {
    font-size: 0.84rem;
  }
}

.product-card-price {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

@media (max-width: 768px) {
  .product-card-price {
    font-size: 0.9rem;
    margin-bottom: 6px;
  }
}

/* Stepper */
.stepper-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: #fbfcfe;
  padding: 3px 6px;
  margin-top: auto;
}

.stepper-btn {
  width: 26px;
  height: 26px;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary);
  background: transparent;
  border-radius: 4px;
  user-select: none;
  transition: var(--transition);
}

.stepper-btn:hover:not(:disabled) {
  background: var(--primary-light);
}

.stepper-btn:disabled {
  color: #cbd5e1;
  cursor: not-allowed;
}

.stepper-val {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  min-width: 20px;
  text-align: center;
}

@media (max-width: 768px) {
  .stepper-btn { width: 22px; height: 22px; font-size: 0.95rem; }
  .stepper-val { font-size: 0.82rem; }
}

/* Mobile Floating Cart Bar */
.mobile-floating-cart-bar {
  position: fixed;
  bottom: 16px;
  left: 14px;
  right: 14px;
  background: var(--primary-gradient);
  color: #ffffff;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 8px 24px var(--primary-glow);
  z-index: 600;
  transition: var(--transition);
  text-decoration: none;
}

.mobile-floating-cart-bar:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px var(--primary-glow);
}

.float-cart-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.float-cart-icon-wrap {
  position: relative;
  display: flex;
}

.float-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #ffffff;
  color: var(--primary);
  font-size: 0.65rem;
  font-weight: 800;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.float-cart-text {
  font-size: 0.9rem;
  font-weight: 700;
}

.float-view-cart-btn {
  background: #ffffff;
  color: var(--primary);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
}

@media (min-width: 769px) {
  .mobile-floating-cart-bar { display: none; }
}

/* ==========================================================================
   PAGE 2: CART
   ========================================================================== */
.cart-page-main {
  flex: 1;
  padding: 24px 20px 24px;
  width: 100%;
}

.cart-page-container {
  max-width: 1160px;
  margin: 0 auto;
  width: 100%;
}

.cart-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.cart-heading-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy-dark);
  text-decoration: none;
  transition: color 0.15s ease;
}

.cart-heading-link:hover {
  color: var(--primary);
}

.btn-clear-cart {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 500;
  padding: 6px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: #ffffff;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-clear-cart:hover {
  color: var(--danger-red);
  border-color: var(--danger-red);
  background: #fff5f5;
}

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

@media (max-width: 860px) {
  .cart-grid-layout { grid-template-columns: 1fr; }
}

.cart-card-box {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  width: 100%;
}

.cart-table {
  width: 100%;
  border-collapse: collapse;
}

.cart-table th {
  text-align: left;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.cart-table th.th-price,
.cart-table th.th-qty,
.cart-table th.th-subtotal {
  text-align: center;
}

.cart-table td {
  padding: 12px 4px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.cart-product-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cart-item-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: #f8fafc;
  flex-shrink: 0;
}

.cart-item-meta {
  display: flex;
  flex-direction: column;
}

.cart-item-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy-dark);
}

.cart-item-unit-price {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.cart-price-cell {
  text-align: center;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--navy-dark);
}

.cart-qty-cell {
  text-align: center;
}

.cart-qty-cell .stepper-control {
  display: inline-flex;
  padding: 2px 6px;
}

.cart-qty-cell .stepper-btn {
  width: 22px;
  height: 22px;
  font-size: 0.95rem;
}

.cart-subtotal-cell {
  text-align: center;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--navy-dark);
}

.cart-delete-btn {
  color: #94a3b8;
  padding: 6px;
  border-radius: 6px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.cart-delete-btn:hover {
  color: var(--danger-red);
  background: var(--danger-light);
}

.cart-bottom-actions {
  margin-top: 18px;
}

.btn-outline-continue {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1.5px solid var(--primary);
  border-radius: var(--radius-md);
  color: var(--primary);
  font-size: 0.88rem;
  font-weight: 600;
  background: #ffffff;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-outline-continue:hover {
  background: var(--primary-light);
}

/* Order Summary */
.summary-heading {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy-dark);
  margin-bottom: 16px;
}

.summary-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 16px;
}

.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.88rem;
}

.summary-label {
  color: var(--text-muted);
}

.summary-val {
  font-weight: 600;
  color: var(--navy-dark);
}

.discount-val {
  color: var(--success-green);
  font-weight: 700;
}

.total-row {
  margin-top: 2px;
  padding-top: 8px;
  border-top: 1px dashed var(--border-color);
}

.total-row .summary-label {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--navy-dark);
}

.total-val {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
}

.mobile-number-box {
  margin-bottom: 18px;
}

.input-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy-dark);
  margin-bottom: 6px;
}

.phone-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.phone-icon {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  stroke: var(--text-light);
  pointer-events: none;
}

.phone-input {
  width: 100%;
  padding: 10px 12px 10px 38px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text-main);
  outline: none;
  background: #ffffff;
}

.phone-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 71, 187, 0.1);
}

.phone-hint {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.35;
}

.btn-place-order {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px;
  background: var(--primary-gradient);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 14px var(--primary-glow);
  transition: all 0.2s ease;
}

.btn-place-order:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px var(--primary-glow);
}

.btn-place-order:disabled {
  background: #cbd5e1;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.loading-spinner {
  width: 15px;
  height: 15px;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spinLoader 0.75s linear infinite;
  display: inline-block;
}

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

.mobile-cart-list {
  display: none;
  flex-direction: column;
  gap: 10px;
}

.m-cart-card {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px;
  background: #ffffff;
}

@media (max-width: 640px) {
  .cart-table-wrapper { display: none; }
  .mobile-cart-list { display: flex; }
  .cart-page-main { padding: 14px 12px 18px; }
}

/* ==========================================================================
   PAGE 3: ORDER CONFIRMATION
   ========================================================================== */
.confirmation-main {
  flex: 1;
  padding: 32px 20px 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.confirmation-card-wrapper {
  max-width: 500px;
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

@media (max-width: 640px) {
  .confirmation-main { padding: 14px 12px 18px; }
  .confirmation-card-wrapper { padding: 22px 16px; border-radius: var(--radius-md); }
}

.confetti-badge-wrapper {
  position: relative;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.success-check-circle {
  width: 58px;
  height: 58px;
  background: #22c55e;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(34, 197, 94, 0.35);
  position: relative;
  z-index: 2;
}

.confetti-dots {
  position: absolute;
  width: 100px;
  height: 100px;
  pointer-events: none;
}

.c-dot {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  animation: confettiFloat 3s infinite ease-in-out alternate;
}

.c-dot.c1 { top: 8px; left: 16px; background: #f59e0b; }
.c-dot.c2 { top: 4px; right: 20px; background: #3b82f6; width: 8px; height: 8px; }
.c-dot.c3 { bottom: 12px; left: 10px; background: #ef4444; }
.c-dot.c4 { bottom: 10px; right: 14px; background: #8b5cf6; }
.c-dot.c5 { top: 48px; left: -6px; background: #10b981; width: 7px; height: 7px; }
.c-dot.c6 { top: 45px; right: -6px; background: #ec4899; }
.c-dot.c7 { top: 22px; right: 4px; background: #06b6d4; }
.c-dot.c8 { bottom: 30px; left: 6px; background: #eab308; }

@keyframes confettiFloat {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(-4px) scale(1.15); }
}

.order-received-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #16a34a;
  margin-bottom: 4px;
}

.order-received-sub {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 18px;
}

.order-info-list {
  width: 100%;
  background: #fbfcfe;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.86rem;
}

.info-label-group {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-muted);
}

.info-icon {
  width: 15px;
  height: 15px;
  stroke: var(--navy-dark);
}

.info-val {
  font-weight: 700;
  color: var(--navy-dark);
}

.order-status-block {
  width: 100%;
  text-align: left;
  margin-bottom: 20px;
}

.status-block-heading {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--navy-dark);
  margin-bottom: 10px;
}

.timeline-stepper {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.timeline-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  position: relative;
}

.step-indicator {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  border: 2px solid #cbd5e1;
  flex-shrink: 0;
  margin-top: 1px;
}

.timeline-step.completed .step-indicator {
  background: #22c55e;
  border-color: #22c55e;
  color: #ffffff;
}

.timeline-step.active .step-indicator {
  background: #eff6ff;
  border-color: var(--primary);
}

.pulse-indicator .inner-dot {
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(0, 71, 187, 0.6); }
  70% { box-shadow: 0 0 0 6px rgba(0, 71, 187, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 71, 187, 0); }
}

.grey-dot {
  width: 7px;
  height: 7px;
  background: #94a3b8;
  border-radius: 50%;
}

.step-content {
  display: flex;
  flex-direction: column;
}

.step-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--navy-dark);
}

.timeline-step.completed .step-title { color: #16a34a; }
.timeline-step.active .step-title { color: var(--navy-dark); }
.timeline-step.pending .step-title { color: var(--text-muted); }

.step-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.step-line {
  width: 2px;
  height: 16px;
  background: #cbd5e1;
  margin-left: 9px;
}

.step-line.active {
  background: #22c55e;
}

.confirm-actions,
.confirm-actions-centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin: 24px auto 0;
  text-align: center;
}

.btn-view-order {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  max-width: 360px;
  padding: 10px 16px;
  background: #f1f5f9;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.btn-view-order:hover {
  background: #e2e8f0;
}

.btn-confirm-continue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 360px;
  padding: 13px 24px;
  background: #0047bb;
  color: #ffffff !important;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  border-radius: var(--radius-sm);
  border: none;
  box-shadow: 0 4px 14px rgba(0, 71, 187, 0.28);
  text-align: center;
  margin: 0 auto;
  text-decoration: none;
}

.btn-confirm-continue:hover {
  background: #00368f;
  color: #ffffff !important;
}

@media (max-width: 480px) {
  .confirm-actions,
  .confirm-actions-centered {
    flex-direction: column;
    align-items: center;
  }
}

/* ==========================================================================
   FOOTER & MODALS
   ========================================================================== */
.app-footer {
  background: transparent;
  border-top: none;
  padding: 18px 16px 24px;
  margin-top: auto;
  width: 100%;
  box-sizing: border-box;
}

.footer-container {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  width: 100%;
}

.footer-container p {
  width: 100%;
  text-align: center;
  margin: 0;
  color: #64748b;
  font-weight: 500;
  letter-spacing: 0.2px;
}

.footer-container strong {
  font-weight: 700;
  color: var(--navy-dark);
}

@media (max-width: 768px) {
  .footer-links {
    display: none !important;
  }
  .app-footer {
    padding: 12px 14px 20px;
    background: transparent;
    border-top: none;
  }
  .footer-container {
    justify-content: center !important;
    text-align: center !important;
  }
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 480px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modalScaleUp 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleUp {
  0% { transform: scale(0.95); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.modal-header {
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
}

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-title-group h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy-dark);
}

.modal-close {
  font-size: 1.4rem;
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.modal-close:hover {
  background: #f1f5f9;
  color: var(--text-main);
}

.modal-body {
  padding: 18px;
}

.store-info-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.store-badge-open {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--success-light);
  color: var(--success-green);
  padding: 5px 10px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.82rem;
  width: fit-content;
}

.store-address, .store-service {
  font-size: 0.88rem;
  color: var(--text-main);
  line-height: 1.4;
}

.modal-footer {
  padding: 12px 18px;
  background: #f8fafc;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.btn-primary-modal {
  background: #0047bb;
  color: #ffffff;
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.88rem;
}

.btn-secondary-modal {
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.88rem;
}

/* Receipt Modal */
.receipt-table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
  font-size: 0.84rem;
}

.receipt-table th {
  text-align: left;
  border-bottom: 2px solid var(--border-color);
  padding: 5px 0;
  color: var(--text-muted);
}

.receipt-table td {
  padding: 6px 0;
  border-bottom: 1px solid #f1f5f9;
}

.receipt-totals {
  border-top: 2px dashed var(--border-color);
  padding-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.86rem;
}

.receipt-barcode {
  text-align: center;
  margin-top: 12px;
  font-family: monospace;
  letter-spacing: 4px;
  font-size: 1.05rem;
  color: #64748b;
  background: #f8fafc;
  padding: 6px;
  border-radius: 6px;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--navy-dark);
  color: #ffffff;
  padding: 9px 16px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  animation: toastSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 8px;
}

@keyframes toastSlideIn {
  0% { transform: translateY(20px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}
