/* =========================================================
   ShopNest Client Store Panel - Stylesheet
   Simple, readable custom CSS on top of Bootstrap 5
   ========================================================= */

:root {
  --store-accent: #2f6fed;      /* main blue accent, matches reference screenshots */
  --store-accent-dark: #2559c7;
  --store-sidebar-bg: #ffffff;
  --store-body-bg: #f4f6fb;
  --store-border: #e9edf3;
  --store-text-dark: #222b3a;
  --store-text-muted: #8a94a6;
}

body {
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  background-color: var(--store-body-bg);
  color: var(--store-text-dark);
}

a {
  text-decoration: none;
}

/* =========================================================
   LOGIN PAGE
   ========================================================= */
.store-login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #eef3ff, #ffffff);
}

.store-login-card {
  background-color: #fff;
  border-radius: 8px;
  padding: 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--store-border);
}

/* =========================================================
   LAYOUT: SIDEBAR + MAIN CONTENT
   ========================================================= */
.store-wrapper {
  display: flex;
  min-height: 100vh;
}

.store-sidebar {
  width: 250px;
  background-color: var(--store-sidebar-bg);
  border-right: 1px solid var(--store-border);
  flex-shrink: 0;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  overflow-y: auto;
  z-index: 1000;
}

.store-sidebar .sidebar-logo {
  padding: 18px 20px;
  border-bottom: 1px solid var(--store-border);
}

.store-sidebar .sidebar-logo .logo-text {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--store-accent);
}

.store-sidebar .sidebar-logo .store-name {
  font-size: 0.85rem;
  color: var(--store-text-dark);
  font-weight: 600;
  margin-top: 6px;
}

.store-sidebar .sidebar-logo .store-email {
  font-size: 0.75rem;
  color: var(--store-text-muted);
}

.store-sidebar .nav-link {
  color: var(--store-text-dark);
  padding: 11px 20px;
  font-size: 0.9rem;
  border-left: 3px solid transparent;
  display: flex;
  align-items: center;
  gap: 10px;
}

.store-sidebar .nav-link i {
  width: 18px;
  color: var(--store-text-muted);
}

.store-sidebar .nav-link:hover {
  background-color: #f5f8ff;
}

.store-sidebar .nav-link.active {
  background-color: #f0f5ff;
  color: var(--store-accent);
  border-left-color: var(--store-accent);
  font-weight: 600;
}

.store-sidebar .nav-link.active i {
  color: var(--store-accent);
}

.store-sidebar .nav-link .badge {
  margin-left: auto;
}

.store-main {
  margin-left: 250px;
  flex-grow: 1;
  width: calc(100% - 250px);
}

.store-topbar {
  background-color: #fff;
  border-bottom: 1px solid var(--store-border);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 900;
}

.store-content {
  padding: 24px;
}

/* =========================================================
   STAT CARDS
   ========================================================= */
.store-stat-card {
  border-radius: 8px;
  padding: 20px;
  color: #fff;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.store-stat-card.bg-blue { background-color: var(--store-accent); }
.store-stat-card.bg-teal { background-color: #17a2b8; }
.store-stat-card.bg-green { background-color: #28a745; }

.store-stat-card .stat-icon {
  position: absolute;
  right: 16px;
  top: 16px;
  font-size: 2.2rem;
  opacity: 0.35;
}

.store-stat-card .stat-label {
  font-size: 0.85rem;
  opacity: 0.9;
  margin-bottom: 6px;
}

.store-stat-card .stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0;
}

.store-mini-card {
  background-color: #fff;
  border: 1px solid var(--store-border);
  border-radius: 8px;
  padding: 18px;
  height: 100%;
}

.store-mini-card .mini-label {
  font-size: 0.82rem;
  color: var(--store-text-muted);
}

.store-mini-card .mini-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--store-text-dark);
}

.store-mini-card .mini-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #eef3ff;
  color: var(--store-accent);
}

/* =========================================================
   CARD / PANEL
   ========================================================= */
.store-card {
  background-color: #fff;
  border: 1px solid var(--store-border);
  border-radius: 8px;
  padding: 20px;
}

.store-card .card-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

/* =========================================================
   TABLES
   ========================================================= */
.store-table thead {
  background-color: #fafbfd;
}

.store-table th {
  font-size: 0.76rem;
  text-transform: uppercase;
  color: var(--store-text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--store-border);
}

.store-table td {
  vertical-align: middle;
  font-size: 0.88rem;
}

.table-thumb {
  width: 42px;
  height: 42px;
  border-radius: 6px;
  object-fit: cover;
}

/* =========================================================
   STATUS PILLS
   ========================================================= */
.pill-status {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  color: #fff;
  display: inline-block;
}

.pill-unpicked { background-color: #e74c3c; }
.pill-picked { background-color: var(--store-accent); }
.pill-pending { background-color: #f0ad4e; }
.pill-ontheway { background-color: #8e44ad; }
.pill-delivered { background-color: #28a745; }
.pill-paid { background-color: #28a745; }
.pill-unpaid { background-color: #e74c3c; }

/* =========================================================
   PRODUCT STOREHOUSE (browse & import catalog products)
   ========================================================= */
.storehouse-card {
  border: 1px solid var(--store-border);
  border-radius: 8px;
  overflow: hidden;
  height: 100%;
  background-color: #fff;
  position: relative;
}

.storehouse-card .storehouse-img-wrap {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #fafbfd;
  overflow: hidden;
}

.storehouse-card .storehouse-img-wrap img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

.storehouse-card .storehouse-body {
  padding: 12px;
}

.storehouse-card .storehouse-title {
  font-size: 0.85rem;
  height: 38px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.btn-add-product {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background-color: var(--store-accent);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.btn-add-product:hover {
  background-color: var(--store-accent-dark);
}

.btn-add-product.added {
  background-color: #28a745;
}

/* Free product usage progress bar */
.free-limit-box {
  background-color: #fff;
  border: 1px solid var(--store-border);
  border-radius: 8px;
  padding: 16px 20px;
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn-store-primary {
  background-color: var(--store-accent);
  border-color: var(--store-accent);
  color: #fff;
}

.btn-store-primary:hover {
  background-color: var(--store-accent-dark);
  border-color: var(--store-accent-dark);
  color: #fff;
}

.btn-icon-sm {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  padding: 0;
}

/* Responsive: collapse sidebar on small screens */
@media (max-width: 991px) {
  .store-sidebar {
    left: -250px;
    transition: left 0.2s ease-in-out;
  }
  .store-sidebar.show {
    left: 0;
  }
  .store-main {
    margin-left: 0;
    width: 100%;
  }
}
