.business-header {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1200px;
  margin: auto;
  padding: 14px 20px;

  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  color: #111827;
  text-decoration: none;
  font-size: 20px;
  font-weight: 800;
  white-space: nowrap;
}

.brand span {
  margin-left: 5px;
}

.business-nav {
  display: flex;
  gap: 18px;
  flex: 1;
  overflow-x: auto;
}

.business-nav a {
  color: #4b5563;
  text-decoration: none;
  font-size: 14px;
  white-space: nowrap;
}

.business-nav a:hover,
.business-nav a.active {
  color: #2563eb;
}

.business-nav a.active {
  font-weight: 700;
}

.logout-btn {
  border: 0;
  background: #111827;
  color: #fff;
  padding: 9px 15px;
  border-radius: 7px;
  cursor: pointer;
}


.products-page {
  max-width: 1100px;
  margin: auto;
  padding: 40px 20px 80px;
}


.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;

  gap: 20px;
  margin-bottom: 25px;
}

.eyebrow {
  color: #2563eb;
  font-size: 13px;
  font-weight: 700;
}

.page-heading h1 {
  margin: 5px 0;
  font-size: 32px;
  color: #111827;
}

.page-heading p {
  margin: 0;
  color: #6b7280;
}


.primary-btn {
  border: 0;
  background: #2563eb;
  color: #fff;

  padding: 11px 18px;
  border-radius: 8px;

  font-weight: 700;
  cursor: pointer;
}

.primary-btn:hover {
  background: #1d4ed8;
}

.primary-btn:disabled {
  opacity: .6;
  cursor: not-allowed;
}


.secondary-btn {
  border: 0;
  background: #f3f4f6;
  color: #374151;

  padding: 11px 18px;
  border-radius: 8px;

  font-weight: 700;
  cursor: pointer;
}


.message {
  padding: 13px 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
}

.message.hidden {
  display: none;
}

.message.success {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.message.error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}


.product-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;

  margin-bottom: 20px;
}

.stat-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 20px;
}

.stat-card span {
  display: block;
  color: #6b7280;
  font-size: 13px;
  margin-bottom: 7px;
}

.stat-card strong {
  font-size: 26px;
  color: #111827;
}


.products-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
}

.card-header {
  padding: 22px;
  border-bottom: 1px solid #eef0f3;

  display: flex;
  justify-content: space-between;
  align-items: center;

  gap: 20px;
}

.card-header h2 {
  margin: 0 0 5px;
  font-size: 20px;
  color: #111827;
}

.card-header p {
  margin: 0;
  color: #6b7280;
  font-size: 14px;
}

.product-search input {
  width: 230px;
  padding: 10px 12px;

  border: 1px solid #d1d5db;
  border-radius: 8px;

  outline: none;
}

.product-search input:focus {
  border-color: #2563eb;
}


.filter-bar {
  padding: 14px 22px;

  background: #f9fafb;
  border-bottom: 1px solid #eef0f3;

  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-bar label {
  color: #4b5563;
  font-size: 13px;
  font-weight: 600;
}

.filter-bar select {
  padding: 8px 10px;

  border: 1px solid #d1d5db;
  border-radius: 7px;

  background: #fff;
}


.loading {
  padding: 40px;
  text-align: center;
  color: #6b7280;
}


.products-list {
  display: grid;
}


.product-item {
  padding: 20px 22px;

  border-bottom: 1px solid #eef0f3;

  display: flex;
  align-items: center;

  gap: 18px;
}

.product-item:last-child {
  border-bottom: 0;
}


.product-image {
  width: 80px;
  height: 80px;

  flex: 0 0 80px;

  border-radius: 9px;

  overflow: hidden;

  background: #f3f4f6;

  display: flex;
  align-items: center;
  justify-content: center;
}

.product-image img {
  width: 100%;
  height: 100%;

  object-fit: cover;
}

.product-placeholder {
  font-size: 30px;
}


.product-main {
  flex: 1;
  min-width: 0;
}

.product-title {
  margin: 0 0 5px;

  color: #111827;
  font-size: 17px;
}

.product-category {
  color: #2563eb;
  font-size: 13px;
  font-weight: 600;

  margin-bottom: 7px;
}

.product-description {
  margin: 0;

  color: #6b7280;

  font-size: 14px;
  line-height: 1.5;
}


.product-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;

  gap: 10px;

  margin-top: 10px;
}

.product-price {
  color: #111827;
  font-weight: 700;
}

.product-sku {
  color: #6b7280;
  font-size: 12px;
}

.product-status {
  display: inline-flex;

  padding: 4px 9px;

  border-radius: 20px;

  font-size: 12px;
  font-weight: 700;
}

.product-status.active {
  background: #ecfdf5;
  color: #047857;
}

.product-status.inactive {
  background: #f3f4f6;
  color: #6b7280;
}


.product-actions {
  display: flex;
  gap: 8px;
}

.action-btn {
  border: 1px solid #d1d5db;

  background: #fff;
  color: #374151;

  padding: 8px 12px;

  border-radius: 7px;

  cursor: pointer;

  font-size: 13px;
}

.action-btn:hover {
  background: #f9fafb;
}

.action-btn.delete {
  color: #b91c1c;
  border-color: #fecaca;
}


.empty-state {
  text-align: center;
  padding: 60px 25px;
}

.empty-state.hidden {
  display: none;
}

.empty-icon {
  font-size: 45px;
  margin-bottom: 10px;
}

.empty-state h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.empty-state p {
  max-width: 500px;
  margin: 0 auto 20px;

  color: #6b7280;
  line-height: 1.6;
}


/* Modal */

.modal {
  position: fixed;
  inset: 0;

  z-index: 1000;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 20px;
}

.modal.hidden {
  display: none;
}

.modal-overlay {
  position: absolute;
  inset: 0;

  background: rgba(0, 0, 0, .45);
}

.modal-box {
  position: relative;
  z-index: 2;

  width: 100%;
  max-width: 620px;

  max-height: 90vh;
  overflow-y: auto;

  background: #fff;

  border-radius: 12px;

  box-shadow: 0 20px 50px rgba(0, 0, 0, .2);
}

.modal-header {
  padding: 20px;

  border-bottom: 1px solid #e5e7eb;

  display: flex;
  justify-content: space-between;

  gap: 20px;
}

.modal-header h2 {
  margin: 0 0 5px;
}

.modal-header p {
  margin: 0;

  color: #6b7280;
  font-size: 13px;
}

.close-btn {
  border: 0;
  background: transparent;

  font-size: 28px;

  color: #6b7280;

  cursor: pointer;
}


#productForm {
  padding: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;

  gap: 7px;
  margin-bottom: 18px;
}

.form-group label {
  color: #374151;

  font-size: 14px;
  font-weight: 600;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  box-sizing: border-box;

  padding: 11px 12px;

  border: 1px solid #d1d5db;

  border-radius: 8px;

  font-size: 14px;

  outline: none;

  background: #fff;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: #2563eb;
}

.form-group textarea {
  resize: vertical;
}

.form-group small {
  color: #6b7280;
  font-size: 12px;
}

.form-group small span {
  font-weight: 600;
}

.form-row {
  display: grid;

  grid-template-columns: 1fr 1fr;

  gap: 15px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;

  gap: 10px;

  padding-top: 5px;
}


.business-footer {
  text-align: center;

  padding: 30px 20px;

  color: #6b7280;

  border-top: 1px solid #e5e7eb;
}


@media (max-width: 800px) {

  .header-inner {
    flex-wrap: wrap;
  }

  .business-nav {
    order: 3;
    width: 100%;
  }

  .page-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .product-stats {
    grid-template-columns: 1fr;
  }

  .card-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .product-search {
    width: 100%;
  }

  .product-search input {
    width: 100%;
    box-sizing: border-box;
  }

  .product-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .product-actions {
    width: 100%;
  }
}


@media (max-width: 550px) {

  .products-page {
    padding: 25px 12px 60px;
  }

  .page-heading h1 {
    font-size: 27px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .modal {
    padding: 10px;
  }

  .product-actions {
    flex-wrap: wrap;
  }

  .product-image {
    width: 70px;
    height: 70px;
    flex-basis: 70px;
  }
}