* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background: #f5f6fa;
  color: #222;
}

.hero {
  background: linear-gradient(135deg, #1877f2, #0f4fb8);
  color: white;
  padding-bottom: 50px;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 8%;
  flex-wrap: wrap;
  gap: 15px;
}

.logo {
  font-size: 30px;
  font-weight: bold;
}

.nav-links a {
  color: white;
  margin-left: 15px;
  text-decoration: none;
  font-weight: bold;
}

.hero-content {
  text-align: center;
  padding: 45px 20px 20px;
}

.hero-content h1 {
  font-size: 42px;
  margin-bottom: 15px;
}

.hero-content p {
  font-size: 18px;
  margin-bottom: 25px;
}

.search-box {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  max-width: 980px;
  margin: 0 auto;
}

.search-box input,
.search-box select {
  padding: 13px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  min-width: 0;
}

.search-box input {
  flex: 1.3;
}

.search-box select {
  flex: 1;
}

input,
select {
  padding: 13px;
  width: 260px;
  max-width: 90%;
  border: none;
  border-radius: 8px;
  font-size: 16px;
}

.section-title {
  text-align: center;
  padding: 35px 20px 10px;
}

.section-title h2 {
  font-size: 32px;
  margin-bottom: 8px;
}

.section-title p {
  color: #666;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 25px;
  padding: 25px 8%;
}

.category-section {
  margin-bottom: 35px;
}

.category-heading {
  padding: 20px 8% 0;
  font-size: 26px;
  color: #1877f2;
}

.product-card {
  background: white;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
  cursor: pointer;
  transition: 0.3s ease;
  position: relative;
}

.product-card:hover {
  transform: translateY(-5px);
}

.image-wrap {
  position: relative;
}

.product-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #111827;
  color: white;
  padding: 7px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: bold;
}

.out-badge {
  background: #dc2626;
  left: auto;
  right: 12px;
}

.product-info {
  padding: 18px;
}

.product-info h3 {
  margin-bottom: 10px;
  font-size: 21px;
}

.price {
  color: #118c37;
  font-weight: bold;
  font-size: 22px;
  margin-bottom: 8px;
}

.small-info {
  color: #555;
  font-size: 14px;
  margin-top: 4px;
}

.no-results {
  text-align: center;
  padding: 40px;
  font-size: 20px;
  color: #555;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  inset: 0;
  background: rgba(0,0,0,0.75);
  padding: 20px;
  overflow-y: auto;
}

.modal-content {
  background: white;
  max-width: 760px;
  margin: 40px auto;
  padding: 25px;
  border-radius: 16px;
  text-align: center;
  position: relative;
}

.close {
  position: absolute;
  right: 18px;
  top: 10px;
  font-size: 34px;
  cursor: pointer;
  z-index: 10;
}

.gallery-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.main-image-box {
  position: relative;
  width: 100%;
}

.modal-content img#modalImage {
  width: 100%;
  max-height: 430px;
  object-fit: contain;
  background: #f3f4f6;
  border-radius: 12px;
  margin-bottom: 12px;
}

.gallery-arrow {
  background: #111827;
  color: white;
  border: none;
  font-size: 34px;
  width: 45px;
  height: 55px;
  border-radius: 8px;
  cursor: pointer;
}

.gallery-arrow:hover {
  background: #333;
}

.image-counter {
  position: absolute;
  right: 15px;
  bottom: 22px;
  background: rgba(0,0,0,0.7);
  color: white;
  padding: 6px 10px;
  border-radius: 20px;
  font-size: 13px;
}

.thumbnail-container {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 0 18px;
}

.thumbnail {
  width: 70px;
  height: 55px;
  object-fit: cover;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  background: #f3f4f6;
}

.thumbnail.active {
  border-color: #1877f2;
}

.modal-badges {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 12px 0;
  flex-wrap: wrap;
}

.detail-badge {
  padding: 7px 12px;
  border-radius: 20px;
  color: white;
  font-size: 13px;
  font-weight: bold;
}

.badge-new {
  background: #118c37;
}

.badge-open-box {
  background: #f59e0b;
}

.badge-used {
  background: #2563eb;
}

.badge-refurbished {
  background: #7c3aed;
}

.badge-stock {
  background: #118c37;
}

.badge-out {
  background: #dc2626;
}

.modal-price {
  color: #118c37;
  font-size: 24px;
  font-weight: bold;
  margin: 10px 0;
}

.contact-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 22px;
}

.contact-btn {
  display: block;
  padding: 14px 18px;
  border-radius: 8px;
  font-weight: bold;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: white;
}

.facebook-btn {
  background: #1877f2;
}

.whatsapp-btn {
  background: #25d366;
}

.email-btn {
  background: #6b7280;
}

.copy-btn {
  background: #111827;
}

.contact-btn:hover {
  opacity: 0.9;
}

footer {
  text-align: center;
  background: #111827;
  color: white;
  padding: 22px;
  margin-top: 30px;
}

@media (max-width: 600px) {
  .hero-content h1 {
    font-size: 32px;
  }

  .navbar {
    justify-content: center;
    text-align: center;
  }

  .nav-links a {
    display: inline-block;
    margin: 8px;
  }

  .product-grid {
    padding: 20px;
  }

  .gallery-arrow {
    width: 38px;
    height: 48px;
    font-size: 28px;
  }

  .modal-content {
    padding: 20px 15px;
  }
}
.status-badge {
  position: absolute;
  bottom: 12px;
  left: 12px;
  color: white;
  padding: 7px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: bold;
}

.status-available {
  background: #118c37;
}

.status-pending {
  background: #f59e0b;
}

.status-sold {
  background: #dc2626;
}

.badge-pending {
  background: #f59e0b;
}

.badge-sold {
  background: #dc2626;
}

.notify-box {
  display: none;
  margin-top: 25px;
  padding: 18px;
  background: #f9fafb;
  border-radius: 12px;
  border: 1px solid #ddd;
}

.notify-box h3 {
  margin-bottom: 12px;
}

.notify-box input,
.notify-box textarea {
  width: 100%;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
}

.notify-box textarea {
  min-height: 90px;
}

.notify-btn {
  width: 100%;
  margin-top: 12px;
  padding: 13px;
  background: #1877f2;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
}
.dash-card {
  cursor: pointer;
  transition: 0.2s;
}

.dash-card:hover {
  transform: translateY(-3px);
  background: #eaf2ff;
}

#activeFilterLabel {
  font-weight: bold;
  margin-bottom: 20px;
  color: #1877f2;
}
.description-box {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid #ddd;
}

.description-box h3 {
  margin-bottom: 10px;
}

#descriptionLink {
  display: inline-block;
  margin-top: 10px;
  font-weight: bold;
  color: #1877f2;
  text-decoration: none;
}
.category-browser-box {
  margin-top: 20px;
  text-align: center;
}

.category-browser-box button {
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  background: white;
  color: #1877f2;
  font-weight: bold;
  cursor: pointer;
}

.category-browser {
  max-width: 700px;
  margin: 15px auto 0;
  background: white;
  color: #222;
  border-radius: 12px;
  padding: 15px;
  text-align: left;
}

.category-tree-item {
  padding: 8px;
  cursor: pointer;
  font-weight: bold;
}

.category-tree-sub {
  padding-left: 25px;
  color: #1877f2;
  cursor: pointer;
}

.category-tree-subsub {
  padding-left: 45px;
  color: #555;
  cursor: pointer;
}
.card.red{
  background:#dc3545;
  color:white;
}
.nav-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

.nav-buttons button {
  background: #1877f2;
}
body {
  font-family: Arial, sans-serif;
  background: #f5f6fa;
  margin: 0;
  color: #222;
}

header {
  background: #1877f2;
  color: white;
  padding: 25px;
  text-align: center;
}

header h1 {
  margin: 0;
  font-size: 42px;
}

header p {
  margin-top: 10px;
  margin-bottom: 15px;
}

header a {
  color: white;
  font-weight: bold;
  margin: 0 10px;
  text-decoration: underline;
}

.box {
  max-width: 900px;
  margin: 30px auto;
  background: white;
  padding: 25px;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
}

.section {
  border: 1px solid #ddd;
  padding: 18px;
  margin-bottom: 20px;
  border-radius: 10px;
  background: #fafafa;
}

input,
select,
button {
  width: 100%;
  padding: 12px;
  margin-top: 6px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 15px;
  box-sizing: border-box;
}

button {
  background: #1877f2;
  color: white;
  border: none;
  font-weight: bold;
  cursor: pointer;
}

button:hover {
  background: #0f5fd3;
}

.delete {
  background: #dc2626;
}

.delete:hover {
  background: #b91c1c;
}

.item {
  background: #f3f4f6;
  padding: 12px;
  margin-top: 10px;
  border-radius: 8px;
}
.category-row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 15px;
}

.view-all-btn {
  background: #1877f2;
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: bold;
  white-space: nowrap;
}

.view-all-btn:hover {
  background: #0f5fd3;
}

.slider-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.product-slider-row {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 8px 4px 18px;
  flex: 1;
}

.product-slider-row .product-card {
  min-width: 240px;
  max-width: 240px;
  flex: 0 0 240px;
}

.slider-arrow {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 50%;
  border: none;
  background: #1877f2;
  color: white;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
}

.slider-arrow:hover {
  background: #0f5fd3;
}

@media (max-width: 700px) {
  .slider-arrow {
    display: none;
  }

  .product-slider-row .product-card {
    min-width: 210px;
    max-width: 210px;
    flex: 0 0 210px;
  }

  .category-row-header {
    align-items: flex-start;
    flex-direction: column;
  }
}
.view-all-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.view-all-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.view-all-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 24px;
}

.view-all-grid .product-card {
  width: 100%;
  max-width: 260px;
}

/* Homepage category polish - v1.8.1 */
.category-section {
  max-width: 1200px;
  margin: 0 auto 26px;
  padding: 0 20px;
}

.category-row-header {
  background: white;
  border-radius: 14px;
  padding: 14px 18px;
  margin: 0 0 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.category-heading {
  padding: 0;
  margin: 0;
  font-size: 24px;
  color: #1877f2;
}

.category-count {
  font-size: 15px;
  color: #666;
  font-weight: normal;
}

.view-all-btn {
  padding: 9px 15px;
}

.slider-wrapper {
  background: transparent;
  align-items: center;
}

.product-slider-row {
  padding: 8px 4px 12px;
}

.no-slider-arrows {
  justify-content: flex-start;
}

.no-slider-arrows-row {
  flex: 0 1 auto;
  overflow-x: visible;
  flex-wrap: wrap;
}

@media (max-width: 700px) {
  .category-section {
    padding: 0 12px;
    margin-bottom: 22px;
  }

  .category-row-header {
    padding: 12px 14px;
    gap: 10px;
  }

  .category-heading {
    font-size: 20px;
  }

  .no-slider-arrows-row {
    overflow-x: auto;
    flex-wrap: nowrap;
  }
}


/* v1.9 customer card cleanup */
.product-card .image-wrap {
  background: #f3f4f6;
}
.product-card .simple-card-info {
  padding: 10px 12px 12px;
  text-align: center;
}
.product-card .simple-card-info .price {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}
.product-slider-row .product-card {
  min-width: 220px;
  max-width: 220px;
  flex: 0 0 220px;
}
@media (max-width: 700px) {
  .product-slider-row .product-card {
    min-width: 190px;
    max-width: 190px;
    flex: 0 0 190px;
  }
  .product-card img {
    height: 190px;
  }
}


@media(max-width: 760px) {
  .search-box {
    flex-wrap: wrap;
  }

  .search-box input,
  .search-box select {
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
  }
}


/* v1.11 compact customer homepage: more categories, less writing */
.hero {
  padding-bottom: 18px;
}
.navbar {
  padding: 12px 6%;
}
.logo {
  font-size: 24px;
}
.nav-links a {
  font-size: 14px;
  margin-left: 10px;
}
.compact-hero-content {
  padding: 18px 14px 8px;
}
.compact-hero-content h1 {
  font-size: 30px;
  margin-bottom: 5px;
}
.compact-hero-content p {
  font-size: 14px;
  margin-bottom: 12px;
  opacity: 0.95;
}
.compact-search-box {
  max-width: 1050px;
  gap: 8px;
}
.compact-search-box input,
.compact-search-box select {
  padding: 10px 12px;
  font-size: 14px;
  border-radius: 10px;
}
.quick-category-chips {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  max-width: 1120px;
  margin: 12px auto 0;
}
.category-chip {
  width: auto;
  margin: 0;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.55);
  background: rgba(255,255,255,0.16);
  color: white;
  font-size: 13px;
  font-weight: bold;
  white-space: nowrap;
}
.category-chip:hover,
.category-chip.active {
  background: white;
  color: #1877f2;
}
.compact-category-browser-box {
  margin-top: 10px;
}
.compact-category-browser-box button {
  width: auto;
  margin: 0;
  padding: 7px 12px;
  font-size: 13px;
}
.compact-section-title {
  padding: 18px 20px 4px;
}
.compact-section-title h2 {
  font-size: 24px;
  margin: 0;
}
.compact-section-title p {
  display: none;
}
.category-section {
  margin-bottom: 18px;
}
.category-row-header {
  padding: 9px 13px;
  margin-bottom: 8px;
  border-radius: 12px;
}
.category-heading {
  font-size: 19px;
}
.category-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 22px;
  padding: 0 7px;
  margin-left: 6px;
  border-radius: 999px;
  background: #eef4ff;
  color: #1877f2;
  font-size: 13px;
  font-weight: bold;
}
.view-all-btn {
  width: auto;
  margin: 0;
  padding: 7px 12px;
  font-size: 13px;
}
.product-slider-row {
  gap: 12px;
  padding: 4px 2px 10px;
}
.product-slider-row .product-card {
  min-width: 170px;
  max-width: 170px;
  flex: 0 0 170px;
}
.product-card {
  border-radius: 12px;
}
.product-card:hover {
  transform: translateY(-2px);
}
.product-card img {
  height: 150px;
}
.product-card .simple-card-info {
  padding: 8px 9px 9px;
  text-align: left;
}
.product-card .simple-card-info h3 {
  font-size: 14px;
  line-height: 1.2;
  margin: 0 0 5px;
  height: 34px;
  overflow: hidden;
}
.product-card .simple-card-info .price {
  font-size: 18px;
  margin: 0;
}
.compact-condition {
  font-size: 11px;
  color: #666;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.view-all-section {
  padding: 12px 20px;
}
.view-all-header {
  margin-bottom: 12px;
}
.view-all-header h2 {
  font-size: 24px;
}
.view-all-grid {
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: 14px;
}
.view-all-grid .product-card {
  max-width: none;
}

@media (max-width: 760px) {
  .navbar {
    padding: 10px 12px;
    gap: 8px;
  }
  .logo {
    font-size: 22px;
  }
  .compact-hero-content h1 {
    font-size: 24px;
  }
  .compact-hero-content p {
    font-size: 13px;
    margin-bottom: 10px;
  }
  .compact-search-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
  }
  .compact-search-box input {
    grid-column: 1 / -1;
  }
  .compact-search-box input,
  .compact-search-box select {
    width: 100%;
    max-width: 100%;
    padding: 9px 10px;
    font-size: 13px;
  }
  .quick-category-chips {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 0 2px 6px;
  }
  .category-chip {
    flex: 0 0 auto;
    padding: 7px 10px;
    font-size: 12px;
  }
  .compact-section-title {
    padding: 14px 12px 2px;
    text-align: left;
  }
  .compact-section-title h2 {
    font-size: 20px;
  }
  .category-section {
    padding: 0 10px;
    margin-bottom: 16px;
  }
  .category-row-header {
    flex-direction: row;
    align-items: center;
    padding: 8px 10px;
  }
  .category-heading {
    font-size: 17px;
  }
  .product-slider-row .product-card {
    min-width: 145px;
    max-width: 145px;
    flex: 0 0 145px;
  }
  .product-card img {
    height: 130px;
  }
  .product-card .simple-card-info h3 {
    font-size: 13px;
    height: 31px;
  }
  .product-card .simple-card-info .price {
    font-size: 16px;
  }
  .view-all-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}

/* Customer category sidebar - v3.1 */
.customer-category-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.customer-category-layout.no-sidebar {
  display: block;
}
.customer-subcategory-sidebar {
  position: sticky;
  top: 12px;
  background: #ffffff;
  border: 1px solid #e3e7ef;
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}
.customer-subcategory-title {
  font-weight: bold;
  color: #222;
  margin-bottom: 10px;
  font-size: 16px;
}
.customer-subcategory-item {
  width: 100%;
  border: 1px solid #e3e7ef;
  background: #f8fafc;
  color: #222;
  border-radius: 10px;
  padding: 10px 10px;
  margin-bottom: 8px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  text-align: left;
  font-size: 14px;
}
.customer-subcategory-item:hover,
.customer-subcategory-item.active {
  background: #1877f2;
  color: #ffffff;
  border-color: #1877f2;
}
.customer-subcategory-item strong {
  background: rgba(0,0,0,0.08);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
}
.customer-subcategory-item.active strong,
.customer-subcategory-item:hover strong {
  background: rgba(255,255,255,0.22);
}
.customer-subcategory-item.sub-sub {
  width: calc(100% - 12px);
  margin-left: 12px;
  font-size: 13px;
  padding: 8px 9px;
}

@media (max-width: 760px) {
  .customer-category-layout {
    display: block;
  }
  .customer-subcategory-sidebar {
    position: static;
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding: 10px;
    margin-bottom: 14px;
  }
  .customer-subcategory-title {
    display: none;
  }
  .customer-subcategory-item,
  .customer-subcategory-item.sub-sub {
    flex: 0 0 auto;
    width: auto;
    margin: 0;
    white-space: nowrap;
  }
}
