/* GREENPODAKKUDI BUSINESS PLATFORM - CORE STYLES */
/* Design Principle: POWERFUL INSIDE - SIMPLE OUTSIDE */

:root {
  --primary: #15803d;         /* Forest Green - Trust & Growth */
  --primary-hover: #166534;
  --primary-light: #dcfce7;
  --secondary: #0284c7;       /* Ocean Blue - Actions */
  --secondary-hover: #0369a1;
  --secondary-light: #e0f2fe;
  --accent: #d97706;          /* Amber - Warnings & Highlights */
  --danger: #dc2626;          /* Crimson - Deletions & Alerts */
  --danger-light: #fee2e2;
  --bg-main: #f8fafc;         /* Clean soft background */
  --bg-card: #ffffff;
  --text-main: #0f172a;       /* Deep slate - High contrast readable text */
  --text-muted: #475569;
  --border: #cbd5e1;
  --border-light: #e2e8f0;
  --radius: 12px;
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.08), 0 2px 4px -2px rgb(0 0 0 / 0.06);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans Ethiopic', 'Noto Sans Tamil', Oxygen, Ubuntu, Cantarell, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  font-size: 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header & Top Bar */
.app-header {
  background-color: #1b4329;
  border-bottom: 2px solid #143520;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-icon {
  width: 38px;
  height: 38px;
  background: #ffffff;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-size: 22px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  flex-shrink: 0;
}

.brand-title {
  font-size: 13px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.2px;
  line-height: 1.15;
  text-transform: uppercase;
}

.brand-subtitle {
  display: none;
}

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

/* Language Selector Button (Yellow matching mockup media_1787485402055.png) */
.btn-lang {
  display: flex;
  align-items: center;
  gap: 6px;
  background-color: #fde047;
  color: #000000;
  border: 1.5px solid #eab308;
  border-radius: 9999px;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.btn-lang:hover {
  background-color: #facc15;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  font-size: 16px;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  min-height: 48px;
  transition: all 0.15s ease;
  text-decoration: none;
}

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

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

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--border);
  color: var(--text-main);
}
.btn-outline:hover {
  background-color: var(--border-light);
}

/* Navigation Drawer & Tabs */
.nav-bar {
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-light);
  padding: 8px 16px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-bar::-webkit-scrollbar {
  display: none;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: var(--radius);
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  min-height: 44px;
  cursor: pointer;
}

.nav-item.active {
  background-color: var(--primary-light);
  color: var(--primary-hover);
}

/* Main Container */
.main-container {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 20px 16px;
}

/* Dashboard Metric Cards */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.metric-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 16px;
}

.metric-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.icon-sales { background-color: var(--primary-light); color: var(--primary); }
.icon-purchase { background-color: var(--secondary-light); color: var(--secondary); }
.icon-stock { background-color: #fef3c7; color: var(--accent); }
.icon-accounting { background-color: #f3e8ff; color: #7e22ce; }

.metric-info h3 {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 600;
}

.metric-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-main);
  margin-top: 4px;
}

/* Quick Action Tiles */
.section-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text-main);
}

.actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.action-tile {
  background-color: var(--bg-card);
  border: 2px solid var(--border-light);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.action-tile:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.action-tile-icon {
  font-size: 32px;
}

.action-tile-label {
  font-weight: 700;
  font-size: 16px;
  color: var(--text-main);
}

/* Modal Overlay & Card */
.modal,
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.6);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal.active,
.modal-overlay.active {
  display: flex !important;
}

@media (max-width: 768px) {
  .admin-only-modal,
  #quickOfferModal,
  #productModal,
  #manageCategoriesModal {
    display: none !important;
  }
}

.modal-card {
  background-color: var(--bg-card);
  border-radius: var(--radius);
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  box-shadow: var(--shadow-lg);
  position: relative;
}

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

.modal-title {
  font-size: 20px;
  font-weight: 700;
}

.btn-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-muted);
}

/* Language Selection Grid */
.lang-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lang-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border: 2px solid var(--border-light);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  min-height: 52px;
  transition: all 0.15s;
}

.lang-option:hover {
  border-color: var(--primary);
  background-color: var(--primary-light);
}

.lang-option.selected {
  border-color: var(--primary);
  background-color: var(--primary-light);
  color: var(--primary-hover);
}

/* Form Controls */
.form-group {
  margin-bottom: 16px;
}

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

.form-input {
  width: 100%;
  padding: 12px 14px;
  font-size: 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background-color: #ffffff;
  color: var(--text-main);
  min-height: 48px;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
}

/* Toast Notifications */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background-color: #0f172a;
  color: #ffffff;
  padding: 14px 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  font-weight: 600;
  z-index: 2000;
  display: none;
  animation: slideUp 0.2s ease-out;
}

.toast.show {
  display: block;
}

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

/* View Switching */
.app-view {
  display: none;
}
.app-view.active {
  display: block;
}

/* Data Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  margin-top: 14px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 15px;
}

.data-table th {
  background-color: #f8fafc;
  color: var(--text-muted);
  font-weight: 700;
  padding: 14px 16px;
  border-bottom: 2px solid var(--border-light);
  white-space: nowrap;
}

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

.data-table tr:hover {
  background-color: #f8fafc;
}

.company-logo-preview {
  min-height: 72px;
  margin-top: 8px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--text-muted);
  font-size: 13px;
}

.company-logo-preview img {
  max-width: 100%;
  max-height: 80px;
  object-fit: contain;
}

.company-logo-remove {
  min-height: 34px;
  margin-top: 8px;
  padding: 4px 10px;
  font-size: 13px;
  color: var(--danger);
}

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

.product-catalog-card {
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.product-catalog-card:focus-visible {
  outline: 3px solid var(--secondary);
  outline-offset: 2px;
}

.product-catalog-media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #f1f5f9;
  border-bottom: 1px solid var(--border-light);
}

.product-catalog-image {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #f8fafc;
  padding: 4px;
}

.product-catalog-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
}

.product-catalog-body {
  position: relative;
  padding: 14px;
}

.product-catalog-body h3 {
  padding-right: 68px;
  font-size: 16px;
  line-height: 1.3;
}

.product-catalog-status {
  position: absolute;
  top: 12px;
  right: 12px;
}

.product-catalog-code {
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 12px;
}

.product-catalog-meta {
  min-height: 38px;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  color: var(--text-muted);
  font-size: 12px;
}

.product-catalog-price {
  margin: 10px 0 8px;
  color: var(--primary-hover);
  font-size: 19px;
  font-weight: 800;
}

.product-catalog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.product-catalog-actions .btn {
  min-height: 36px;
  padding: 5px 8px;
  font-size: 13px;
}

.product-catalog-empty {
  grid-column: 1 / -1;
  padding: 30px;
  text-align: center;
  color: var(--text-muted);
}

.accounting-entry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.accounting-entry-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--border-light);
  background: var(--bg-card);
}

.accounting-entry-panel h3 { font-size: 15px; }

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: capitalize;
}

.badge-success { background-color: var(--primary-light); color: var(--primary-hover); }
.badge-warning { background-color: #fef3c7; color: var(--accent); }
.badge-danger { background-color: var(--danger-light); color: var(--danger); }
.badge-info { background-color: var(--secondary-light); color: var(--secondary-hover); }
.badge-neutral { background-color: #f1f5f9; color: var(--text-muted); }

/* POS View Layout */
.pos-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 20px;
  align-items: start;
}

.pos-search-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.pos-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  max-height: 600px;
  overflow-y: auto;
  padding-right: 4px;
}

.pos-product-card {
  background-color: var(--bg-card);
  border: 2px solid var(--border-light);
  border-radius: var(--radius);
  padding: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 120px;
}

.pos-product-media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  margin-bottom: 10px;
  overflow: hidden;
  background: #f1f5f9;
  color: var(--text-muted);
  display: grid;
  place-items: center;
  font-size: 12px;
}

.pos-product-media img,
.product-thumb-button img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #f8fafc;
  padding: 2px;
}

.product-thumb-button {
  position: relative;
  width: 52px;
  height: 52px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border-light);
  background: #f1f5f9;
  color: var(--text-muted);
  font-size: 9px;
  cursor: zoom-in;
}

.product-thumb-button:disabled { cursor: default; }

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

.pos-cart-panel {
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.pos-cart-items {
  max-height: 280px;
  overflow-y: auto;
  margin: 12px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pos-cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  background-color: #f8fafc;
  border-radius: 8px;
  border: 1px solid var(--border-light);
}

.pos-cart-summary {
  border-top: 2px dashed var(--border-light);
  padding-top: 12px;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.view-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

/* Category Quick Filter Pills Bar */
.category-pill-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 8px 2px;
  margin-bottom: 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.category-pill-bar::-webkit-scrollbar {
  display: none;
}

.category-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #ffffff;
  border: 1.5px solid var(--border-light);
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

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

.category-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(21, 128, 61, 0.3);
}

html, body {
  max-width: 100vw;
  overflow-x: hidden;
  position: relative;
}

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

@media (max-width: 768px) {
  .nav-bar {
    display: none !important;
  }
  .admin-only-btn {
    display: none !important;
  }
  .view-header {
    display: none !important;
  }
  #view-dashboard,
  #view-pos,
  #view-purchases,
  #view-inventory,
  #view-accounting,
  #view-reports,
  #view-settings {
    display: none !important;
  }
}

@media (max-width: 640px) {
  html, body {
    max-width: 100vw;
    overflow-x: hidden;
    position: relative;
    touch-action: pan-y;
  }
  .app-header {
    padding: 6px 8px;
  }
  .header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
  }
  .btn-lang {
    padding: 3px 6px;
    font-size: 11px;
    min-height: 28px;
  }
  #authBtn {
    padding: 3px 8px;
    font-size: 11px;
    min-height: 28px;
    max-width: 100px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-flex;
    align-items: center;
  }
  .brand-icon {
    width: 32px;
    height: 32px;
    font-size: 16px;
    border-radius: 6px;
  }
  .brand-title {
    font-size: 12px;
    font-weight: 900;
    line-height: 1.15;
  }
  .brand-subtitle {
    display: none;
  }
  .main-container {
    padding: 6px;
    max-width: 100vw;
    overflow-x: hidden;
  }
  .view-header {
    margin-bottom: 6px;
    gap: 4px;
  }
  .view-header h1 {
    font-size: 17px;
    margin-bottom: 0;
  }
  .view-header p {
    display: none;
  }
  .product-catalog-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
  }
  .product-catalog-card {
    border-radius: 10px;
  }
  .product-catalog-body {
    padding: 8px;
  }
  .product-catalog-body h3 {
    font-size: 13px;
    padding-right: 0;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .product-catalog-price {
    font-size: 16px;
    margin: 4px 0;
  }
  .product-catalog-meta {
    font-size: 11px;
    min-height: unset;
    margin-top: 4px;
  }
  .category-pill {
    padding: 6px 12px;
    font-size: 12px;
  }
  .metric-value { font-size: 20px; }
  .actions-grid { grid-template-columns: repeat(2, 1fr); }
  .pos-products-grid { grid-template-columns: repeat(2, 1fr); }
}

/* =========================================================
   STOREFRONT SCREEN (Matching media_1787467348126.png)
   ========================================================= */

/* Top Yellow Category Bar on Dark Forest Green Container */
.store-cat-container {
  background: #1e293b;
  padding: 8px 6px;
  margin-bottom: 8px;
  border-radius: 8px;
}

.store-cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

@media (max-width: 480px) {
  .store-cat-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
  }
}

.store-cat-btn {
  background: #facc15;
  color: #0f172a;
  border: 1px solid #eab308;
  border-radius: 4px;
  padding: 6px 2px;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

.store-cat-btn:hover {
  background: #fde047;
}

.store-cat-btn.active {
  background: #ffffff;
  color: #15803d;
  border: 2px solid #22c55e;
  font-weight: 800;
}

/* Store Search Bar */
.store-search-bar {
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 6px;
  padding: 4px 10px;
  margin-bottom: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.store-search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 13px;
  padding: 4px;
}

.store-search-icons {
  display: flex;
  gap: 8px;
  color: #64748b;
  font-size: 16px;
}

/* Today Special Magenta Banner */
.today-special-banner {
  background: linear-gradient(135deg, #e11d48, #db2777);
  color: #ffffff;
  text-align: center;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.5px;
  padding: 6px 10px;
  border-radius: 6px 6px 0 0;
  text-transform: lowercase;
}

.today-special-content {
  background: #ffffff;
  border: 1.5px solid #fecdd3;
  border-top: none;
  border-radius: 0 0 6px 6px;
  padding: 10px;
  margin-bottom: 12px;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}
.today-special-content::-webkit-scrollbar { display: none; }

.today-special-item {
  flex: 0 0 100px;
  text-align: center;
  cursor: pointer;
}

.today-special-item img {
  width: 90px;
  height: 75px;
  object-fit: contain;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 2px;
}

/* Dedicated New Arrival Emerald Green Banner */
.new-arrival-banner {
  background: linear-gradient(135deg, #15803d, #16a34a);
  color: #ffffff;
  text-align: center;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.5px;
  padding: 6px 10px;
  border-radius: 6px 6px 0 0;
}

.new-arrival-content {
  background: #ffffff;
  border: 1.5px solid #bbf7d0;
  border-top: none;
  border-radius: 0 0 6px 6px;
  padding: 10px;
  margin-bottom: 12px;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}
.new-arrival-content::-webkit-scrollbar { display: none; }

.new-arrival-item {
  flex: 0 0 100px;
  text-align: center;
  cursor: pointer;
  position: relative;
}

.new-arrival-item img {
  width: 90px;
  height: 75px;
  object-fit: contain;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 2px;
}

/* 2-Column Store Products Grid */
.store-products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 60px;
}

.store-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.store-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

.store-card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #f8fafc;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.store-card-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
}

.store-quick-view-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  background: #ffffff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 15px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  border: none;
  cursor: pointer;
  z-index: 2;
  transition: transform 0.15s ease;
}

.store-quick-view-btn:hover {
  transform: scale(1.1);
}

.store-card-body {
  padding: 10px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.store-card-brand {
  font-size: 10px;
  font-weight: 800;
  color: #b91c1c;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.store-card-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
  height: 32px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.store-card-pricing {
  margin: 6px 0 8px 0;
}

.store-selling-price {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
}

.store-mrp-price {
  font-size: 11px;
  color: #94a3b8;
  text-decoration: line-through;
  margin-left: 4px;
}

.btn-add-cart-red {
  background: #dc2626;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 8px 0;
  font-size: 13px;
  font-weight: 700;
  width: 100%;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s ease;
  margin-top: auto;
}

.btn-add-cart-red:hover {
  background: #b91c1c;
}

.btn-add-cart-red:disabled {
  background: #cbd5e1;
  color: #64748b;
  cursor: not-allowed;
}

/* Store Bottom Sort / Filter Bar & Floating Cart */
.store-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
  z-index: 90;
  max-width: 100vw;
  box-sizing: border-box;
}

.store-bottom-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  cursor: pointer;
  padding: 6px 10px;
  flex: 1;
  max-width: 130px;
  text-align: center;
  white-space: nowrap;
  border-radius: 8px;
  transition: background 0.15s ease;
}

.store-bottom-action:active {
  background: #f1f5f9;
}

.store-chat-bubble {
  position: fixed;
  bottom: 60px;
  right: 14px;
  width: 50px;
  height: 50px;
  background: #dc2626;
  color: #ffffff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 24px;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.45);
  cursor: pointer;
  z-index: 92;
  transition: transform 0.15s ease;
}

.store-chat-bubble:hover {
  transform: scale(1.08);
}

.floating-cart-pill {
  position: fixed;
  bottom: 58px;
  left: 14px;
  right: 70px;
  background: #15803d;
  color: #ffffff;
  padding: 10px 16px;
  border-radius: 9999px;
  font-weight: 800;
  font-size: 14px;
  box-shadow: 0 4px 14px rgba(21, 128, 61, 0.4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  z-index: 95;
  animation: pulseCart 2s infinite;
}

@keyframes pulseCart {
  0% { transform: scale(1); }
  50% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

/* =========================================================
   CHECKOUT SCREEN (Matching media_1787467348079.png)
   ========================================================= */

.checkout-container {
  max-width: 600px;
  margin: 0 auto;
  background: #ffffff;
  min-height: 100vh;
  padding-bottom: 40px;
}

.checkout-header-yellow {
  background: #facc15;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #eab308;
}

.checkout-brand-title {
  font-size: 17px;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.2px;
}

.checkout-summary-bar {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.checkout-summary-toggle {
  color: #0284c7;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.checkout-summary-amount {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
}

.checkout-summary-details {
  background: #ffffff;
  padding: 14px 16px;
  border-bottom: 1px solid #e2e8f0;
  display: none;
}

.checkout-section {
  padding: 16px;
  border-bottom: 1px solid #f1f5f9;
}

.checkout-section-title {
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.buyer-mode-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 8px;
  margin-bottom: 12px;
}

.buyer-mode-btn {
  padding: 8px 10px;
  border: none;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  color: #475569;
}

.buyer-mode-btn.active {
  background: #ffffff;
  color: #15803d;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.checkout-input {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
  margin-bottom: 10px;
}

.checkout-input:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.15);
}

.payment-badge-card {
  border: 1.5px solid #0284c7;
  border-radius: 8px;
  padding: 14px;
  background: #ffffff;
  margin-top: 10px;
}

.payment-cash-banner {
  background: #facc15;
  color: #000000;
  text-align: center;
  padding: 8px;
  font-size: 26px;
  font-weight: 900;
  border-radius: 6px;
  margin-top: 8px;
  letter-spacing: -0.5px;
}

.btn-complete-order {
  background: #15803d;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 800;
  width: 100%;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(21, 128, 61, 0.3);
  margin-top: 16px;
}

.btn-complete-order:hover {
  background: #166534;
}
