/**
 * OmniPOS for WooCommerce — Scoped Stylesheet (assets/omnipos-app.css v2.8.0)
 * 6-Column Product Grid, Whole-Card Selection, Self-Service Order Thumbnails & Scroll-Down Loader
 */
.omnipos-wp-wrap {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #0f172a;
  max-width: 1680px;
  margin: 16px auto;
}
.omnipos-shell {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px;
}
.omnipos-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-variant-numeric: tabular-nums;
}
.omnipos-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 20px;
  margin-bottom: 18px;
}
.omnipos-brand strong {
  font-size: 18px;
  color: #0f172a;
  display: block;
}
.omnipos-meta {
  font-size: 12px;
  color: #64748b;
}
.omnipos-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
}
.omnipos-tab, .omnipos-tab-link {
  background: transparent;
  border: 1px solid transparent;
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  text-decoration: none;
}
.omnipos-tab.active {
  background: #0f172a;
  color: #ffffff;
}
.omnipos-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.omnipos-customer-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
  font-size: 12px;
}
.omnipos-customer-head {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  margin-bottom: 4px;
}
.omnipos-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
}
.omnipos-btn-primary {
  background: #0284c7;
  color: #ffffff;
}
.omnipos-btn-primary:hover {
  background: #0369a1;
  color: #ffffff;
}
.omnipos-btn-secondary {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #1e293b;
}
.omnipos-btn-dark {
  background: #0f172a;
  color: #ffffff;
}
.omnipos-w-full {
  width: 100%;
}
.omnipos-banner {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
}
.omnipos-banner-warn {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}
.omnipos-banner-info {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}
.omnipos-grid {
  display: grid;
  grid-template-columns: minmax(0, 3.1fr) minmax(320px, 1fr);
  gap: 18px;
  align-items: start;
}
@media (max-width: 1100px) {
  .omnipos-grid {
    grid-template-columns: 1fr;
  }
}
.omnipos-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px;
}
.omnipos-cart-dock {
  position: sticky;
  top: 20px;
}
.omnipos-top-filters-card {
  margin-bottom: 16px;
}
.omnipos-top-filter-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}
@media (max-width: 1024px) {
  .omnipos-top-filter-row {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 640px) {
  .omnipos-top-filter-row {
    grid-template-columns: 1fr;
  }
}
.omnipos-scan-bar-row {
  border-top: 1px solid #f1f5f9;
  padding-top: 12px;
}
.omnipos-control-group label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 5px;
}
.omnipos-input {
  width: 100%;
  padding: 7px 10px;
  font-size: 13px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
}
.omnipos-scan-row {
  display: flex;
  gap: 8px;
}
/* 6-COLUMN PRODUCT GRID */
.omnipos-products-grid {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 12px !important;
}
@media (max-width: 1440px) {
  .omnipos-products-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}
@media (max-width: 960px) {
  .omnipos-products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}
@media (max-width: 640px) {
  .omnipos-products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
.omnipos-product-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer !important;
  user-select: none;
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}
.omnipos-product-card:hover {
  transform: translateY(-2px);
  border-color: #94a3b8;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}
.omnipos-card-selected {
  border-color: #0284c7 !important;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.25) !important;
  background: #f0f9ff;
}
.omnipos-p-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #f8fafc;
  border-bottom: 1px solid #f1f5f9;
  overflow: hidden;
}
.omnipos-p-img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}
.omnipos-selected-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: #0284c7;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.omnipos-p-body {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.omnipos-p-meta {
  font-size: 10px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.omnipos-p-title {
  font-size: 12px;
  font-weight: 600;
  margin: 0;
  color: #0f172a;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 31px;
}
.omnipos-p-supplier {
  font-size: 10px;
  color: #475569;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.omnipos-p-price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 4px;
  margin-top: auto;
  border-top: 1px solid #f1f5f9;
}
.omnipos-p-price {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
}
.omnipos-p-barcode {
  font-size: 10px;
  color: #047857;
  font-weight: 600;
}
/* SCROLL-DOWN LOADER SENTINEL */
.omnipos-scroll-loader {
  margin-top: 16px;
  padding: 14px;
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.omnipos-loader-box {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #0f172a;
}
.omnipos-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #cbd5e1;
  border-top-color: #0284c7;
  border-radius: 50%;
  display: inline-block;
  animation: omnipos-spin 0.7s linear infinite;
}
@keyframes omnipos-spin {
  to { transform: rotate(360deg); }
}
/* SELF-SERVICE ORDER CART ITEMS & THUMBNAILS */
.omnipos-cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 10px;
  margin-bottom: 12px;
}
.omnipos-cart-header h3 {
  margin: 0;
  font-size: 15px;
}
.omnipos-cart-list {
  max-height: 380px;
  overflow-y: auto;
  margin-bottom: 14px;
}
.omnipos-cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 12px;
}
.omnipos-cart-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.omnipos-cart-thumb-box {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  flex-shrink: 0;
}
.omnipos-cart-thumb {
  width: 48px !important;
  height: 48px !important;
  min-width: 48px !important;
  max-width: 48px !important;
  border-radius: 8px !important;
  object-fit: cover !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}
.omnipos-cart-item-info {
  min-width: 0;
  flex: 1;
}
.omnipos-cart-item-title {
  display: block;
  font-size: 12px;
  line-height: 1.25;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.omnipos-cart-item-sub {
  font-size: 10px;
  color: #64748b;
  margin-top: 2px;
}
.omnipos-cart-item-unit {
  font-size: 10px;
  color: #0284c7;
  font-weight: 600;
  margin-top: 2px;
}
.omnipos-cart-item-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}
.omnipos-qty-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}
.omnipos-qty-val {
  font-size: 12px;
  min-width: 18px;
  text-align: center;
  font-weight: 600;
}
.omnipos-cart-line-price {
  display: flex;
  align-items: center;
  gap: 6px;
}
.omnipos-qty-btn {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  width: 22px;
  height: 22px;
  cursor: pointer;
  font-weight: bold;
}
.omnipos-remove-btn {
  background: #fee2e2;
  color: #b91c1c;
  border: none;
  border-radius: 4px;
  width: 22px;
  height: 22px;
  cursor: pointer;
  font-weight: bold;
}
.omnipos-empty {
  text-align: center;
  padding: 28px 10px;
  color: #64748b;
  font-size: 12px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
}
.omnipos-cart-totals {
  border-top: 1px solid #e2e8f0;
  padding-top: 12px;
  margin-bottom: 14px;
}
.omnipos-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 6px;
}
.omnipos-total-row {
  font-size: 15px;
  border-top: 1px solid #e2e8f0;
  padding-top: 8px;
  margin-top: 8px;
}
.omnipos-cart-cta {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.omnipos-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  margin-bottom: 18px;
}
@media (max-width: 900px) {
  .omnipos-kpi-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.omnipos-kpi-cell {
  padding: 18px;
  border-right: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.omnipos-kpi-cell:last-child {
  border-right: none;
}
.omnipos-kpi-label {
  font-size: 12px;
  color: #64748b;
}
.omnipos-kpi-val {
  font-size: 22px;
  color: #0f172a;
}
.omnipos-kpi-sub {
  font-size: 11px;
  color: #64748b;
}
.omnipos-table-wrap {
  overflow-x: auto;
}
.omnipos-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.omnipos-table th, .omnipos-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
}
.omnipos-table th {
  background: #f8fafc;
  font-size: 11px;
  color: #64748b;
  text-transform: uppercase;
}
.omnipos-stk-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  width: 24px;
  height: 24px;
  cursor: pointer;
}
.omnipos-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}
.omnipos-modal {
  background: #ffffff;
  border-radius: 12px;
  width: 100%;
  max-width: 580px;
  padding: 22px;
}
.omnipos-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 12px;
  margin-bottom: 16px;
}
.omnipos-form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.omnipos-modal-foot {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}
