﻿/* MarCa single bundled stylesheet */
/* This file now inlines previous assets/css root styles. */
/* Keep @import lines first to preserve CSS parser rules. */

@import url('https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.css');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css');
@import url('https://unpkg.com/leaflet@1.9.4/dist/leaflet.css');
@import url('../../account/admin/assets/admin_panel.css');
@import url('../../account/customer/dashboard/css/dashboard.css');
@import url('../../account/customer/notifications/css/bell.css');
@import url('../../account/customer/wishlist/css/wishlist.css');
@import url('../../account/delivery/css/delivery.css');
@import url('../../account/merchant/barcode/css/barcode.css');
@import url('../../account/merchant/dashboard/css/dashboard.css');
@import url('../../account/merchant/dashboard/css/dashboard.panel.css');
@import url('../../account/merchant/faceted/faceteds/shared/facets.css');
@import url('../../account/merchant/manageproducts/css/barcode_scanner.css');
@import url('../../account/merchant/manageproducts/css/products_facets.css');
@import url('../../account/merchant/manageproducts/productview/css/productview.css');
@import url('../../account/merchant/manageproducts/variants/css/variants.css');
@import url('../../account/merchant/orders/css/orders.css');
@import url('../../account/merchant/pos/css/pos.css');
@import url('../../account/merchant/reports/css/reports.css');
@import url('../../account/merchant/staff/main_panel/css/main_panel.css');
@import url('../../account/merchant/supplier/css/supplier.css');
@import url('../../account/messages/css/messenger.css');
@import url('../../account/messages/dashboard/css/messenger2.css');
@import url('merchant/invoice-builder.css');
@import url('../../popup/popup.css');
@import url('../../products/assets/product.css');
@import url('../../search/css/search-categories.css');
@import url('../../search/css/search-products.css');

/* ===== BEGIN: assets/css/bootstrap.min.css ===== */
/* Bootstrap 5 shim (local path)
   This local file simply imports Bootstrap from the CDN so your existing paths keep working.
   Replace this file with the real bootstrap.min.css anytime.
*/
@import url('https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css');
/* ===== END: assets/css/bootstrap.min.css ===== */

/* ===== BEGIN: assets/css/marca.tokens.css ===== */
/* File: /MarCa/assets/css/marca.tokens.css */
:root {
  --marca-primary: #1D4ED8;
  --marca-accent: #F59E0B;
  --marca-success: #16A34A;
  --marca-danger: #DC2626;

  --marca-ink: #0F172A;
  --marca-muted: #64748B;

  --marca-nav: #0B1220;
  --marca-bg: #F8FAFC;
  --marca-card: #FFFFFF;
  --marca-border: #E2E8F0;

  --marca-radius: 12px;
  --marca-shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08);
  --marca-shadow-md: 0 6px 18px rgba(15, 23, 42, 0.10);

  --marca-space-1: 4px;
  --marca-space-2: 8px;
  --marca-space-3: 12px;
  --marca-space-4: 16px;
  --marca-space-5: 24px;

  --bs-primary: var(--marca-primary);
  --bs-warning: var(--marca-accent);
  --bs-success: var(--marca-success);
  --bs-danger: var(--marca-danger);
  --bs-dark: var(--marca-nav);
  --bs-body-bg: var(--marca-bg);
  --bs-body-color: var(--marca-ink);
  --bs-border-color: var(--marca-border);
}

html,
body {
  background: var(--marca-bg);
  color: var(--marca-ink);
}
/* ===== END: assets/css/marca.tokens.css ===== */

/* ===== BEGIN: assets/css/marca.components.css ===== */
/* File: /MarCa/assets/css/marca.components.css */
.marca-card {
  background: var(--marca-card);
  border: 1px solid var(--marca-border);
  border-radius: var(--marca-radius);
  box-shadow: var(--marca-shadow-sm);
}

.marca-card-hover:hover {
  box-shadow: var(--marca-shadow-md);
  transform: translateY(-1px);
}

.btn-marca-primary,
.btn-marca-primary:focus,
.btn-marca-primary:active {
  background: var(--marca-nav);
  border-color: var(--marca-nav);
  color: #E2E8F0;
  border-radius: var(--marca-radius);
}

.btn-marca-primary:hover {
  background: #1F2937;
  border-color: #1F2937;
  color: #fff;
}

.btn-marca-outline,
.btn-marca-outline:focus,
.btn-marca-outline:active {
  background: transparent;
  border: 1px solid var(--marca-nav);
  color: var(--marca-nav);
  border-radius: var(--marca-radius);
}

.btn-marca-outline:hover {
  background: var(--marca-nav);
  border-color: var(--marca-nav);
  color: #E2E8F0;
}

.btn-marca-ghost,
.btn-marca-ghost:focus,
.btn-marca-ghost:active {
  background: transparent;
  border: 1px solid transparent;
  color: var(--marca-nav);
  border-radius: var(--marca-radius);
}

.btn-marca-ghost:hover {
  background: #E2E8F0;
}

.badge-marca {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  font-weight: 600;
  padding: 4px 10px;
  font-size: 12px;
  line-height: 1;
}

.badge-marca-primary { background: #DBEAFE; color: #1E40AF; }
.badge-marca-accent { background: #FEF3C7; color: #92400E; }
.badge-marca-success { background: #DCFCE7; color: #166534; }
.badge-marca-live { background: #E2E8F0; color: #334155; }

.marca-input,
.form-control.marca-input,
.form-select.marca-input {
  border-radius: var(--marca-radius);
  border: 1px solid var(--marca-border);
}

.marca-input:focus,
.form-control.marca-input:focus,
.form-select.marca-input:focus {
  border-color: #93C5FD;
  box-shadow: 0 0 0 0.2rem rgba(29, 78, 216, 0.15);
}

.marca-section-title {
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 700;
  color: var(--marca-ink);
  margin: 0;
}

.marca-section-subtitle {
  font-size: 15px;
  color: var(--marca-muted);
  margin-top: 8px;
}

.marca-navbar.navbar-dark {
  background: linear-gradient(90deg, #20262d 0%, #242b33 100%) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  top: 0 !important;
  z-index: 1200 !important;
}

body .marca-navbar {
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  top: 0 !important;
  z-index: 1200 !important;
}

body.has-marca-navbar {
  padding-top: var(--marca-navbar-h, 64px) !important;
}

/* Ensure all Bootstrap modals render above fixed MarCa navbar (z-index:1200). */
:root {
  --bs-backdrop-zindex: 1990;
  --bs-modal-zindex: 2000;
}

.modal-backdrop {
  z-index: var(--bs-backdrop-zindex) !important;
}

.modal {
  z-index: var(--bs-modal-zindex) !important;
}

.marca-navbar .navbar-brand,
.marca-navbar .nav-link {
  color: #CBD5E1 !important;
}

.marca-brand-logo {
  height: 32px;
}

.marca-brand-name {
  display: inline-block;
  line-height: 1;
}

.marca-store-logo {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border: 1px solid var(--marca-border);
}

.marca-stores-scroll-x {
  display: block;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 4px;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
}

.marca-stores-scroll-x.is-dragging {
  cursor: grabbing;
}

.marca-stores-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 250px;
  gap: 12px;
  width: max-content;
  min-width: 100%;
  justify-content: center;
}

.marca-stores-scroll-x::-webkit-scrollbar {
  display: none;
  height: 0;
}

.marca-store-tile {
  width: 250px;
  background: var(--marca-card);
  border: 1px solid var(--marca-border);
  border-radius: var(--marca-radius);
  padding: 10px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  box-shadow: var(--marca-shadow-sm);
  position: relative;
  overflow: hidden;
}

.marca-store-tile:hover {
  box-shadow: var(--marca-shadow-md);
}

.marca-store-tile--bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--store-cover);
  background-size: cover;
  background-position: center top;
  opacity: .42;
  pointer-events: none;
}

.marca-store-tile--bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.20) 0%, rgba(255,255,255,.58) 44%, rgba(255,255,255,.86) 100%);
  pointer-events: none;
}

.marca-store-tile > * {
  position: relative;
  z-index: 1;
}

.marca-navbar .nav-link:hover,
.marca-navbar .nav-link:focus,
.marca-navbar .nav-link.active {
  color: #fff !important;
}

.marca-nav-scroll {
  width: 100%;
}

@media (min-width: 992px) {
  .marca-navbar .marca-nav-scroll {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
  }

  .marca-navbar .marca-nav-scroll .navbar-nav {
    flex-direction: row;
  }
}

@media (max-width: 991.98px) {
  .marca-navbar .navbar-brand {
    margin-right: .2rem;
    padding-right: 0;
    min-width: 0;
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .marca-navbar .marca-brand-logo {
    height: 24px;
    width: 24px;
    object-fit: contain;
    margin-right: .4rem !important;
  }

  .marca-navbar .marca-brand-name {
    font-size: .86rem;
    font-weight: 600;
    letter-spacing: .01em;
  }

  .marca-navbar .container-fluid {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: .45rem;
  }

  .marca-navbar .navbar-toggler {
    display: none !important;
  }

  .marca-navbar .marca-nav-scroll {
    display: flex !important;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0;
  }

  .marca-navbar .marca-nav-scroll::-webkit-scrollbar {
    display: none;
  }

  .marca-navbar .marca-nav-scroll .navbar-nav {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: .35rem;
    width: max-content;
    margin: 0;
    padding: 0;
  }

  .marca-navbar .marca-nav-scroll .navbar-nav + .navbar-nav {
    margin-left: .45rem;
  }

  .marca-navbar .marca-nav-scroll .navbar-nav .nav-link {
    white-space: nowrap;
    padding: .38rem .54rem !important;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 10px;
    background: rgba(255, 255, 255, .02);
    line-height: 1.1;
  }

  .marca-navbar .marca-nav-scroll .navbar-nav .dropdown {
    position: static;
  }

  .marca-navbar .marca-nav-scroll .navbar-nav .dropdown-menu {
    position: fixed !important;
    top: calc(var(--marca-navbar-h, 64px) - 4px) !important;
    right: 10px !important;
    left: auto !important;
    transform: none !important;
    z-index: 1300 !important;
    max-width: min(92vw, 320px);
  }
}

.marca-navbar .btn-success,
.marca-navbar .btn.btn-success {
  background: #1F2937;
  color: #E2E8F0;
  border: 1px solid rgba(226, 232, 240, 0.35);
  border-radius: var(--marca-radius);
}

.marca-navbar .btn-success:hover,
.marca-navbar .btn.btn-success:hover {
  background: #111827;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
}

/* Guest auth controls in header (style only) */
.marca-navbar form .form-control.marca-input {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(203, 213, 225, 0.35);
  color: #f8fafc;
  height: 34px;
}

.marca-navbar form .form-control.marca-input::placeholder {
  color: #cbd5e1;
}

.marca-navbar form .form-control.marca-input:focus {
  background: rgba(255, 255, 255, 0.14);
  border-color: #93c5fd;
  box-shadow: 0 0 0 0.18rem rgba(147, 197, 253, 0.2);
  color: #fff;
}

.marca-navbar form .btn-marca-primary {
  background: #f8fafc;
  border-color: #f8fafc;
  color: #0f172a;
  border-radius: 10px;
  font-weight: 600;
  height: 34px;
  padding: 0 .9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.marca-navbar form .btn-marca-primary:hover {
  background: #ffffff;
  border-color: #ffffff;
  color: #020617;
}

.marca-navbar form .btn-marca-outline {
  background: #f8fafc;
  border-color: #f8fafc;
  color: #0f172a;
  border-radius: 10px;
  font-weight: 600;
  height: 34px;
  padding: 0 .9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  text-decoration: none;
}

.marca-navbar form .btn-marca-outline:hover {
  background: #ffffff;
  border-color: #ffffff;
  color: #020617;
}

.marca-navbar .marca-nav-btn {
  border-radius: 999px;
  border: 1px solid rgba(203, 213, 225, 0.35);
  font-weight: 600;
  letter-spacing: .01em;
  transition: all .2s ease;
  white-space: nowrap;
  line-height: 1;
  padding: .45rem .9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.marca-navbar .marca-nav-btn-login {
  background: #e2e8f0;
  color: #111827;
  border-color: #e2e8f0;
}

.marca-navbar .marca-nav-btn-login:hover {
  background: #fff;
  color: #111827;
  border-color: #fff;
}

.marca-navbar .marca-nav-btn-register {
  background: #e2e8f0;
  color: #111827;
  border-color: #e2e8f0;
}

.marca-navbar .marca-nav-btn-register:hover {
  background: #fff;
  color: #111827;
  border-color: #fff;
}

/* Mobile account button: icon-only to match notification/messages button size */
@media (max-width: 767.98px) {
  .marca-navbar #userDropdown.marca-user-toggle {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    padding: .25rem;
    border-radius: 999px;
    justify-content: center;
    gap: 0;
  }

  .marca-navbar #userDropdown.marca-user-toggle .marca-user-text,
  .marca-navbar #userDropdown.marca-user-toggle .marca-user-role {
    display: none !important;
  }

  .marca-navbar #userDropdown.marca-user-toggle .marca-user-icon {
    margin-right: 0 !important;
    font-size: 1.25rem;
    line-height: 1;
  }

  .marca-navbar #userDropdown.marca-user-toggle.dropdown-toggle::after {
    display: none !important;
  }
}

.marca-hero {
  background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
  border: 1px solid var(--marca-border);
  border-radius: 16px;
  padding: 24px;
}

.marca-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.marca-chip {
  border: 1px solid var(--marca-border);
  background: #fff;
  color: var(--marca-ink);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
}

.marca-chip:hover {
  background: #EFF6FF;
  border-color: #BFDBFE;
  color: var(--marca-primary);
}

.marca-trust-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 768px) {
  .marca-trust-row {
    grid-template-columns: 1fr;
  }
}

.marca-trust-item {
  border: 1px dashed #CBD5E1;
  border-radius: var(--marca-radius);
  background: #fff;
  padding: 12px 14px;
  color: #334155;
  font-size: 14px;
}

.marca-footer {
  background: var(--marca-nav);
  color: #CBD5E1;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.marca-footer a {
  color: #E2E8F0;
  text-decoration: none;
}

.marca-footer a:hover {
  color: #fff;
  text-decoration: underline;
}
/* ===== END: assets/css/marca.components.css ===== */

/* ===== BEGIN: assets/css/marca-theme.css ===== */
/* File: /MarCa/assets/css/marca-theme.css */
/* Legacy bridge theme kept for backward compatibility. */

:root {
  /* New canonical palette */
  --marca-primary: #1D4ED8;
  --marca-accent: #F59E0B;
  --marca-success: #16A34A;
  --marca-danger: #DC2626;
  --marca-ink: #0F172A;
  --marca-muted: #64748B;
  --marca-nav: #0B1220;
  --marca-bg: #F8FAFC;
  --marca-card: #FFFFFF;
  --marca-border: #E2E8F0;

  /* Legacy aliases used across old templates */
  --marca-blue: var(--marca-primary);
  --marca-orange: var(--marca-accent);
  --marca-green: var(--marca-success);
  --marca-dark: var(--marca-nav);
  --marca-dark-2: #1F2937;
  --marca-text: var(--marca-ink);
  --marca-text-2: var(--marca-muted);
  --marca-muted-bg: #F3F4F6;

  --bs-primary: var(--marca-primary);
  --bs-warning: var(--marca-accent);
  --bs-success: var(--marca-success);
  --bs-danger: var(--marca-danger);
  --bs-dark: var(--marca-nav);
  --bs-body-bg: var(--marca-bg);
  --bs-body-color: var(--marca-ink);
  --bs-border-color: var(--marca-border);
}

html,
body {
  background: var(--bs-body-bg);
  color: var(--bs-body-color);
}

.navbar.bg-dark,
.navbar.navbar-dark {
  background-color: var(--marca-nav) !important;
}

.card {
  background: var(--marca-card);
  border: 1px solid var(--marca-border);
}

.badge.bg-primary { background-color: var(--marca-primary) !important; }
.badge.bg-warning { background-color: var(--marca-accent) !important; color: #111827; }
.badge.bg-success { background-color: var(--marca-success) !important; }
.badge.bg-secondary { background-color: #1F2937 !important; }

.bg-marca { background-color: var(--marca-primary) !important; }
.bg-concrete { background-color: var(--marca-muted-bg) !important; }
.text-marca { color: var(--marca-primary) !important; }
.text-slate { color: #1F2937 !important; }
.text-muted-2 { color: var(--marca-muted) !important; }
.border-marca { border-color: var(--marca-primary) !important; }

.footer-lite {
  background: var(--marca-muted-bg);
  color: var(--marca-muted);
  border-top: 1px solid var(--marca-border);
}
/* ===== END: assets/css/marca-theme.css ===== */

/* ===== BEGIN: assets/css/marca-products-table.css ===== */
/* /MarCa/assets/css/marca-products-table.css */

/* =========================
   Table header style (shared)
   ========================= */
.table thead th,
.table thead th a {
  color: #212529 !important;
  font-weight: 600;
  text-decoration: none !important;
  background: #f7f7fc;
  vertical-align: middle;
  font-size: 1.04rem;
  letter-spacing: .01em;
  border-bottom: 2px solid #e2e6ea !important;
  text-align: center;
}

/* Sticky header: scope to our tables so it wins vs Bootstrap */
.table-responsive #productsTable thead.table-light th,
.table-responsive #inventoryTable thead.table-light th {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #f7f7fc !important;
}

/* Zebra and hover */
.table-hover > tbody > tr:nth-of-type(odd) { background-color: #fcfcfe; }
.table-hover > tbody > tr:hover            { background-color: #f3f6fc; }

/* =========================
   Alignment & spacing
   ========================= */
.table td, .table th {
  padding-top: .7rem;
  padding-bottom: .7rem;
  vertical-align: middle;
}

/* Default: center everything for our two tables */
#productsTable th, #productsTable td,
#inventoryTable th, #inventoryTable td {
  text-align: center;
  vertical-align: middle;
}

/* Products: column 4 (Product Name) = left */
#productsTable th:nth-child(4),
#productsTable td:nth-child(4) { text-align: left !important; }

/* Inventory: column 3 (Product) = left */
#inventoryTable th:nth-child(3),
#inventoryTable td:nth-child(3) { text-align: left !important; }

/* Utility alignments still respected when explicitly used */
.table td.text-end,   .table th.text-end   { text-align: right !important; }
.table td.text-center,.table th.text-center{ text-align: center !important; }
.table td.text-start, .table th.text-start { text-align: left !important; }

/* =========================
   Sortable headers
   ========================= */
.sortable-th { cursor: pointer; position: relative; }
.sortable-th > a.sort-link {
  display: flex; align-items: center; gap: .35rem;
  width: 100%; padding: .15rem 0; color: inherit; text-decoration: none;
}
.sortable-th .sort-indicator { font-size: .8em; color: #6c757d; min-width: 1.2em; }

/* =========================
   STATUS BADGE (3rd-to-last column)
   Works for BOTH tables
   ========================= */
#inventoryTable td:nth-last-child(3) .status-badge,
#inventoryTable td:nth-last-child(3) .badge,
#inventoryTable td:nth-last-child(3) [data-status],
#productsTable  td:nth-last-child(3) .status-badge,
#productsTable  td:nth-last-child(3) .badge,
#productsTable  td:nth-last-child(3) [data-status] {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .35rem .6rem;
  border-radius: 50rem;
  font-size: .75rem;
  line-height: 1;
  text-transform: lowercase;
  border: 1px solid var(--_sb-border, rgba(108,117,125,.25));
  color: var(--_sb-color, #41464b);
  background-color: var(--_sb-bg, rgba(108,117,125,.1));
  white-space: nowrap;
  font-weight: 600;
  letter-spacing: .02em;
}
#inventoryTable td:nth-last-child(3) .status-badge::before,
#inventoryTable td:nth-last-child(3) .badge::before,
#inventoryTable td:nth-last-child(3) [data-status]::before,
#productsTable  td:nth-last-child(3) .status-badge::before,
#productsTable  td:nth-last-child(3) .badge::before,
#productsTable  td:nth-last-child(3) [data-status]::before {
  content: "";
  width: .5rem; height: .5rem; border-radius: 50%;
  background: var(--_sb-dot, #6c757d);
  display: inline-block;
}
/* ACTIVE */
#inventoryTable td:nth-last-child(3) .badge.bg-success,
#inventoryTable td:nth-last-child(3) .badge.text-bg-success,
#inventoryTable td:nth-last-child(3) .status-badge.active,
#inventoryTable td:nth-last-child(3) [data-status="active"],
#inventoryTable td:nth-last-child(3) [data-status="1"],
#inventoryTable td:nth-last-child(3) [data-status="true"],
#productsTable  td:nth-last-child(3) .badge.bg-success,
#productsTable  td:nth-last-child(3) .badge.text-bg-success,
#productsTable  td:nth-last-child(3) .status-badge.active,
#productsTable  td:nth-last-child(3) [data-status="active"],
#productsTable  td:nth-last-child(3) [data-status="1"],
#productsTable  td:nth-last-child(3) [data-status="true"] {
  --_sb-border: rgba(25,135,84,.25);
  --_sb-color:  #0f5132;
  --_sb-bg:     rgba(25,135,84,.10);
  --_sb-dot:    #198754;
}
/* INACTIVE */
#inventoryTable td:nth-last-child(3) .badge.bg-secondary,
#inventoryTable td:nth-last-child(3) .badge.text-bg-secondary,
#inventoryTable td:nth-last-child(3) .status-badge.inactive,
#inventoryTable td:nth-last-child(3) [data-status="inactive"],
#inventoryTable td:nth-last-child(3) [data-status="0"],
#inventoryTable td:nth-last-child(3) [data-status="false"],
#productsTable  td:nth-last-child(3) .badge.bg-secondary,
#productsTable  td:nth-last-child(3) .badge.text-bg-secondary,
#productsTable  td:nth-last-child(3) .status-badge.inactive,
#productsTable  td:nth-last-child(3) [data-status="inactive"],
#productsTable  td:nth-last-child(3) [data-status="0"],
#productsTable  td:nth-last-child(3) [data-status="false"] {
  --_sb-border: rgba(108,117,125,.25);
  --_sb-color:  #41464b;
  --_sb-bg:     rgba(108,117,125,.1);
  --_sb-dot:    #6c757d;
}

/* =========================
   ACTION BUTTONS (last column)
   ========================= */
#inventoryTable td:last-child .btn,
#inventoryTable td:last-child .btn-action,
#inventoryTable td:last-child .act-edit.btn,
#inventoryTable td:last-child .act-del.btn,
#productsTable  td:last-child .btn,
#productsTable  td:last-child .btn-action,
#productsTable  td:last-child .act-edit.btn,
#productsTable  td:last-child .act-del.btn {
  --_sz: 34px;
  width: var(--_sz);
  height: var(--_sz);
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: .6rem;
  border: 1px solid var(--bs-border-color, #dee2e6);
  background-color: var(--bs-body-bg, #fff);
  color: var(--bs-secondary-color, #6c757d);
  transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s;
  font-size: 1rem;
}
#inventoryTable td:last-child .btn i,
#inventoryTable td:last-child .btn-action i,
#productsTable  td:last-child .btn i,
#productsTable  td:last-child .btn-action i {
  font-size: 1rem; line-height: 1;
}

/* Hover */
#inventoryTable td:last-child .btn:hover,
#inventoryTable td:last-child .btn-action:hover,
#productsTable  td:last-child .btn:hover,
#productsTable  td:last-child .btn-action:hover {
  background-color: var(--bs-light-bg-subtle, rgba(0,0,0,.03));
  color: var(--bs-body-color, #212529);
  border-color: var(--bs-tertiary-color, #cfd4da);
}
/* Edit (primary) */
#inventoryTable td:last-child .act-edit,
#inventoryTable td:last-child .btn-outline-primary,
#productsTable  td:last-child .act-edit,
#productsTable  td:last-child .btn-outline-primary {
  border-color: rgba(var(--bs-primary-rgb,13,110,253), .25);
  color: var(--bs-primary, #0d6efd);
  background-color: rgba(var(--bs-primary-rgb,13,110,253), .05);
}
#inventoryTable td:last-child .act-edit:hover,
#inventoryTable td:last-child .btn-outline-primary:hover,
#productsTable  td:last-child .act-edit:hover,
#productsTable  td:last-child .btn-outline-primary:hover {
  background-color: rgba(var(--bs-primary-rgb,13,110,253), .1);
  border-color: rgba(var(--bs-primary-rgb,13,110,253), .35);
}
/* Delete (danger) */
#inventoryTable td:last-child .act-del,
#inventoryTable td:last-child .btn-outline-danger,
#productsTable  td:last-child .act-del,
#productsTable  td:last-child .btn-outline-danger {
  border-color: rgba(var(--bs-danger-rgb,220,53,69), .25);
  color: var(--bs-danger, #dc3545);
  background-color: rgba(var(--bs-danger-rgb,220,53,69), .05);
}
#inventoryTable td:last-child .act-del:hover,
#inventoryTable td:last-child .btn-outline-danger:hover,
#productsTable  td:last-child .act-del:hover,
#productsTable  td:last-child .btn-outline-danger:hover {
  background-color: rgba(var(--bs-danger-rgb,220,53,69), .1);
  border-color: rgba(var(--bs-danger-rgb,220,53,69), .35);
}

/* Spacing between multiple action buttons */
#inventoryTable td:last-child .btn + .btn,
#inventoryTable td:last-child .btn-action + .btn-action,
#productsTable  td:last-child .btn + .btn,
#productsTable  td:last-child .btn-action + .btn-action { margin-left: .25rem; }

/* Responsive container */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
/* ===== END: assets/css/marca-products-table.css ===== */

/* ===== BEGIN: assets/css/home.css ===== */
/* Home page tweaks and Popular Stores sidebar enhancements */

/* Consistent, round, cropped logos/avatars */
#popular-stores .ps-logo,
#popular-stores img,
#popular-stores .rounded-circle,
aside.aside-popular .rounded-circle {
  width: 38px !important;
  height: 38px !important;
  object-fit: cover !important;
  border-radius: 50% !important;
  border: 1.5px solid #F59E0B;
  background: #FFFFFF;
  box-shadow: 0 1px 4px rgba(0,0,0,.07);
  display: block;
}

/* Card width and centering for Popular Stores sidebar */
aside.aside-popular .card {
  width: 285px !important;
  min-width: 260px !important;
  max-width: 100% !important;
  margin-left: auto;
  margin-right: auto;
}

/* Store name styling */
#popular-stores .fw-semibold,
.popular-store-item .fw-semibold {
  font-size: 1.09rem;
  font-weight: 600;
  color: #1F2937;
  letter-spacing: 0;
}

/* Badge size and look */
#popular-stores .badge,
.popular-store-item .badge {
  font-size: 0.93em;
  letter-spacing: 0.01em;
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
}

/* Stars */
#popular-stores .bi-star-fill,
#popular-stores .bi-star-half,
#popular-stores .bi-star,
.popular-store-item .bi-star,
.popular-store-item .bi-star-fill,
.popular-store-item .bi-star-half {
  font-size: 1.09em;
  vertical-align: -0.1em;
  margin-right: 2px;
}

/* Stars always on one line */
#popular-stores .text-warning.fs-6,
.popular-store-item .text-warning.fs-6 {
  min-width: 105px;
  text-align: left;
}

/* List item padding for a clean look */
#popular-stores .list-group-item,
.popular-store-item.list-group-item {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
  border: none;
}

/* Hover effect for merchant friendliness */
.popular-store-item:hover,
#popular-stores .list-group-item:hover {
  background: #F8FAFC !important;
  transition: background 0.18s;
}

/* Responsive tweak: let the sidebar grow a bit on very large screens */
@media (min-width: 1200px) {
  aside.aside-popular .card {
    width: 285px;
  }
}

/* Home mobile: horizontal draggable products strip with 3 rows */
#home-browse-products .home-products-scroll-wrap {
  position: relative;
}

#home-browse-products .home-products-scroll-btn {
  display: none;
}

@media (max-width: 767.98px) {
  #home-browse-products #resultsGrid,
  #home-browse-products #resultsGrid.grid-mode,
  #home-browse-products #resultsGrid.list-view {
    display: block !important;
    overflow: visible;
    padding: 0;
  }

  #home-browse-products .home-products-rows {
    display: grid;
    grid-template-rows: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 2px 2px 8px;
  }

  #home-browse-products .home-products-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(140px, 44vw);
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    cursor: grab;
  }

  #home-browse-products .home-products-row.is-dragging {
    cursor: grabbing;
    scroll-behavior: auto;
  }

  #home-browse-products .home-products-row::-webkit-scrollbar {
    display: none;
  }

  #home-browse-products .card.search-card {
    min-height: 178px;
    scroll-snap-align: start;
  }

  #home-browse-products .card.search-card .card-img-box {
    height: 92px;
  }

  #home-browse-products .card.search-card .card-body {
    padding: 6px 7px;
    gap: 2px;
  }

  #home-browse-products .card.search-card .product-title {
    font-size: 12.5px;
    font-weight: 600;
    min-height: 18px;
    line-height: 1.2;
    -webkit-line-clamp: 1;
    line-clamp: 1;
  }

  #home-browse-products .card.search-card .meta-line {
    display: block;
  }

  #home-browse-products .card.search-card .meta-line .vsep,
  #home-browse-products .card.search-card .meta-line .stock {
    display: none;
  }

  #home-browse-products .card.search-card .price {
    font-size: 12.5px;
    font-weight: 700;
  }

  #home-browse-products .card.search-card .brand-line {
    display: block;
    font-size: 11.5px;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #home-browse-products .home-products-scroll-btn {
    display: none !important;
  }
}
/* ===== END: assets/css/home.css ===== */

/* ===== BEGIN: assets/css/customer-refunds.css ===== */
/* File: assets/css/customer-refunds.css */
.refund-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: .75rem;
}
.refund-kpi {
  border: 1px solid #e5e7eb;
  border-radius: .75rem;
  padding: .75rem;
  background: #fff;
}
.refund-kpi .label { font-size: .78rem; color: #6b7280; text-transform: uppercase; letter-spacing: .03em; }
.refund-kpi .value { font-weight: 600; font-size: .95rem; color: #111827; }
.refund-detail-card {
  border: 1px solid #dbe1ea;
  border-radius: .9rem;
  padding: 1rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}
.refund-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}
.refund-timeline li {
  position: relative;
  padding-left: 1rem;
  margin-bottom: .4rem;
  font-size: .9rem;
}
.refund-timeline li::before {
  content: '';
  width: .45rem;
  height: .45rem;
  border-radius: 999px;
  background: #2563eb;
  position: absolute;
  left: 0;
  top: .45rem;
}
.refund-inline-list { margin: 0; padding-left: 1rem; }
.refund-inline-list li { font-size: .9rem; margin-bottom: .2rem; }
/* ===== END: assets/css/customer-refunds.css ===== */

/* ===== BEGIN: assets/css/offline-temp.css ===== */
/* Temporary fallback styles when CDN CSS fails */
html.marca-offline-css body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, sans-serif;
  background: #f3f6fb;
  color: #1f2937;
}

html.marca-offline-css .container,
html.marca-offline-css .container-fluid {
  width: min(1200px, 94vw);
  margin: 0 auto;
}

html.marca-offline-css .navbar,
html.marca-offline-css .topbar,
html.marca-offline-css nav {
  background: linear-gradient(90deg, #0b1e35, #1f3148);
  color: #fff;
  padding: 0.6rem 1rem;
  position: sticky;
  top: 0;
  z-index: 1030;
}

html.marca-offline-css a {
  color: #0b5ed7;
}

html.marca-offline-css .card,
html.marca-offline-css .cardish,
html.marca-offline-css .panel {
  background: #fff;
  border: 1px solid #d8e1eb;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

html.marca-offline-css .card-header {
  font-weight: 600;
  border-bottom: 1px solid #e5eaf0;
  background: #f8fafc;
  padding: 0.7rem 0.9rem;
}

html.marca-offline-css .card-body {
  padding: 0.9rem;
}

html.marca-offline-css .btn {
  border: 1px solid #c5d2e2;
  border-radius: 8px;
  padding: 0.45rem 0.7rem;
  background: #fff;
  color: #1f2937;
  cursor: pointer;
}

html.marca-offline-css .btn-primary {
  background: #0d6efd;
  border-color: #0d6efd;
  color: #fff;
}

html.marca-offline-css .btn-outline-secondary {
  background: #fff;
  color: #374151;
}

html.marca-offline-css .form-control,
html.marca-offline-css .form-select,
html.marca-offline-css textarea,
html.marca-offline-css input,
html.marca-offline-css select {
  width: 100%;
  border: 1px solid #c8d3e1;
  border-radius: 8px;
  padding: 0.45rem 0.55rem;
  background: #fff;
  color: #111827;
}

html.marca-offline-css .alert {
  border-radius: 10px;
  padding: 0.6rem 0.8rem;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
}

html.marca-offline-css .alert-danger { background: #fff1f2; border-color: #fecdd3; }
html.marca-offline-css .alert-success { background: #ecfdf5; border-color: #bbf7d0; }

html.marca-offline-css .table {
  width: 100%;
  border-collapse: collapse;
}

html.marca-offline-css .table th,
html.marca-offline-css .table td {
  border: 1px solid #e2e8f0;
  padding: 0.45rem 0.55rem;
}

html.marca-offline-css .row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

html.marca-offline-css [class*="col-"] {
  flex: 1 1 260px;
  min-width: 240px;
}
/* ===== END: assets/css/offline-temp.css ===== */

/* ===== BEGIN: assets/css/test.css ===== */
/* ===========================
   MarCa Products UI Styles
   Scope carefully to avoid bleeding into other pages.
   =========================== */

:root {
  --marca-text: #203357;
  --marca-muted: #6b7a99;
  --marca-border: #e6e9f3;
  --marca-bg: #f7f7fc;
  --marca-bg-2: #ffffff;
  --marca-accent: #2563eb;   /* links / accents */
  --marca-success: #16a34a;
  --marca-danger: #dc2626;
  --marca-warning: #f59e0b;
  --marca-chip: #eef2ff;
}

/* Containers */
.marca-products-card {
  background: var(--marca-bg-2);
  border: 1px solid var(--marca-border);
  border-radius: 1rem;
  box-shadow: 0 6px 28px rgba(0,0,0,0.06);
}

/* Header row above table (filters, search, actions) */
.marca-products-toolbar {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--marca-border);
  background: linear-gradient(180deg, #fafafe, #fff);
}

/* ===========================
   Table
   =========================== */
#productsTable {
  width: 100%;
  border-collapse: separate !important;
  border-spacing: 0;
  background: transparent;
}

#productsTable thead tr {
  background: var(--marca-bg);
}

#productsTable th {
  background: var(--marca-bg);
  color: var(--marca-text);
  font-size: 1.05rem;
  font-weight: 700;
  padding: 0.9rem 0.5rem;
  border-bottom: 2px solid var(--marca-border) !important;
  vertical-align: middle;
  text-align: center;
  position: relative;
  user-select: none;
}

#productsTable th.text-start,
#productsTable td.text-start { text-align: left !important; }

#productsTable td {
  padding: .75rem .5rem;
  border-bottom: 1px solid var(--marca-border) !important;
  vertical-align: middle;
  background: transparent;
  color: #243048;
}

/* Hover row */
#productsTable tbody tr:hover {
  background: #fbfbff;
}

/* First/last cell padding tweaks */
#productsTable th:first-child,
#productsTable td:first-child { padding-left: .75rem; }

#productsTable th:last-child,
#productsTable td:last-child { padding-right: .75rem; }

/* Product image cell */
#productsTable td img.img-thumbnail {
  border-radius: .5rem;
  border: 1px solid var(--marca-border);
  background: #fff;
}

/* Monospace SKU */
#productsTable .font-monospace {
  font-size: 0.95rem;
}

/* ===========================
   Sort indicators
   =========================== */
.sortable-th { cursor: pointer; }
.sortable-th a { color: inherit; text-decoration: none; }
.sortable-th a:hover { color: var(--marca-accent); }

.sort-indicator {
  display: inline-block;
  width: 1ch;
  margin-left: .25rem;
  color: var(--marca-muted);
  font-size: .9rem;
}

/* ===========================
   Status badges
   =========================== */
.status-badge {
  display: inline-block;
  padding: .25rem .5rem;
  border-radius: 999px;
  border: 1px solid var(--marca-border);
  background: #fafafa;
  color: var(--marca-text);
  font-size: .775rem;
  line-height: 1;
  text-transform: lowercase;
}

.status-badge.active {
  background: #ecfdf5;
  border-color: #bbf7d0;
  color: var(--marca-success);
  font-weight: 700;
}

.status-badge.inactive {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #9a3412;
  font-weight: 600;
}

/* ===========================
   Action buttons in table
   =========================== */
.btn-action {
  --size: 36px;
  width: var(--size);
  height: var(--size);
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--marca-border);
  background: #fff;
  color: var(--marca-text);
  border-radius: .6rem;
  transition: transform .06s ease, background .2s ease, color .2s ease, border-color .2s ease;
}

.btn-action:hover {
  transform: translateY(-1px);
  background: #f8fafc;
  border-color: #dbe2ef;
  color: var(--marca-accent);
}

/* ===========================
   Pagination bar
   =========================== */
.pagination-bar, #paginationBar, .pagination-bar-marca {
  display: flex;
  gap: .5rem;
  align-items: center;
  justify-content: space-between;
  padding: .5rem .75rem;
  border: 1px solid var(--marca-border);
  border-radius: .75rem;
  background: #fff;
}

.marca-pagination-meta {
  color: var(--marca-muted);
  font-size: .9rem;
}

.pagination-bar .form-select.form-select-sm {
  min-width: 92px;
}

/* Prev/Next */
#btnPrev, #btnNext {
  min-width: 80px;
}

/* ===========================
   Chips & badges for filters
   =========================== */
.marca-chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .25rem .5rem;
  border-radius: 999px;
  background: var(--marca-chip);
  border: 1px solid #dfe3ff;
  color: #3b47a1;
  font-size: .8rem;
}

/* ===========================
   Importer preview table
   =========================== */
.importer-table {
  width: 100%;
  border-collapse: collapse;
}

.importer-table th,
.importer-table td {
  border: 1px solid var(--marca-border);
  padding: .5rem .6rem;
  font-size: .9rem;
}

.tr-ok       { background: #f0fdf4; }
.tr-warning  { background: #fffbeb; }
.tr-error    { background: #fef2f2; }

.badge-note {
  display: inline-block;
  background: #f8fafc;
  border: 1px solid var(--marca-border);
  border-radius: .5rem;
  padding: .15rem .45rem;
  font-size: .75rem;
  color: #374151;
}

/* ===========================
   Responsive tweaks
   =========================== */
@media (max-width: 992px) {
  #productsTable th:nth-child(2),
  #productsTable td:nth-child(2) { /* image column */
    width: 56px;
  }

  .pagination-bar, #paginationBar, .pagination-bar-marca {
    flex-wrap: wrap;
    gap: .75rem;
  }
}

@media (max-width: 576px) {
  #productsTable th:nth-child(6),
  #productsTable td:nth-child(6) { /* unit col */
    display: none;
  }
}


/* ===== END: assets/css/test.css ===== */

/* ===== BEGIN: assets/css/variants.css ===== */
/* /MarCa/assets/css/variants.css */
.variant-matrix input.form-control-sm {
  min-width: 120px;
}
.variant-generator .form-check-inline {
  margin-right: 0.5rem;
}
.variant-generator .form-check-label {
  font-size: 0.85rem;
}
/* ===== END: assets/css/variants.css ===== */

/* Global stacking order guard (must stay after all imports and base styles). */
:root {
  --marca-z-navbar: 1200;
  --marca-z-nav-dropdown: 1300;
  --marca-z-modal-backdrop: 2000;
  --marca-z-modal: 2010;
}

.marca-navbar {
  z-index: var(--marca-z-navbar) !important;
}

.marca-navbar .dropdown-menu {
  z-index: var(--marca-z-nav-dropdown) !important;
}

/* Bootstrap defines modal z-index vars on .modal/.modal-backdrop. */
.modal-backdrop {
  --bs-backdrop-zindex: var(--marca-z-modal-backdrop) !important;
  z-index: var(--marca-z-modal-backdrop) !important;
}

.modal {
  --bs-modal-zindex: var(--marca-z-modal) !important;
  z-index: var(--marca-z-modal) !important;
}

/* Keep shared scanner modal and its tagged backdrop above other modals. */
#marcaScanModal.modal {
  z-index: var(--bs-modal-zindex) !important;
}

.modal-backdrop[data-marca-scan-backdrop="1"] {
  z-index: var(--bs-backdrop-zindex) !important;
}
