/* ==========================================================================
   CATEGORY PAGE STYLES - CENTURIAN TRADING AND CONTRACTING
   Matches exact Qatar CCTV Security Category Design
   ========================================================================== */

/* --- Breadcrumb Bar --- */
.breadcrumb-bar {
  background-color: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 12px 0;
}

.breadcrumb-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
}

.breadcrumb-link {
  color: #0069bb;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.breadcrumb-link:hover {
  color: #004d8c;
  text-decoration: underline;
}

.breadcrumb-separator {
  color: #94a3b8;
  font-size: 0.75rem;
}

.breadcrumb-current {
  color: #64748b;
  font-weight: 500;
}

/* ==========================================================================
   CATEGORY HERO BANNER
   ========================================================================== */
.category-hero-banner {
  position: relative;
  width: 100%;
  min-height: 200px;
  background-size: cover;
  background-position: right center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #e2e8f0;
  background-color: #f1f6fb;
  overflow: hidden;
}

.category-hero-container {
  position: relative;
  z-index: 10;
  padding: 36px 24px;
}

.category-hero-text {
  max-width: 540px;
}

.category-hero-title {
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: 2.75rem;
  font-weight: 800;
  color: #0b1e38;
  line-height: 1.15;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.category-hero-subtitle {
  font-size: 1.05rem;
  color: #475569;
  line-height: 1.5;
  font-weight: 450;
}

@media (max-width: 768px) {
  .category-hero-banner {
    min-height: 160px;
    background-position: 80% center;
  }
  .category-hero-title {
    font-size: 2rem;
  }
  .category-hero-subtitle {
    font-size: 0.9375rem;
  }
}

/* ==========================================================================
   SUBCATEGORY QUICK-FILTER CARDS (4 Cards Grid)
   ========================================================================== */
.subcategories-section {
  padding: 24px 0 16px 0;
  background-color: #ffffff;
}

.subcategory-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.subcategory-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 14px 16px;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  cursor: pointer;
}

.subcategory-card:hover {
  border-color: #0069bb;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 105, 187, 0.08);
}

.subcategory-card.active {
  border-color: #0069bb;
  background-color: #f8fafc;
}

.subcat-img-box {
  width: 100%;
  height: 95px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.subcat-img-box img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  transition: transform 0.25s ease;
}

.subcategory-card:hover .subcat-img-box img {
  transform: scale(1.04);
}

.subcat-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 4px;
}

.subcat-title {
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: 0.9375rem;
  font-weight: 700;
  color: #0b1e38;
  letter-spacing: -0.01em;
}

.subcat-chevron {
  font-size: 0.75rem;
  color: #0069bb;
  transition: transform 0.2s ease;
}

.subcategory-card:hover .subcat-chevron {
  transform: translateX(3px);
}

@media (max-width: 991px) {
  .subcategory-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .subcategory-cards-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   CATALOG LAYOUT (Sidebar + Main Grid)
   ========================================================================== */
.catalog-section {
  padding: 16px 0 40px 0;
  background-color: #f8fafc;
}

.catalog-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  align-items: start;
}

/* --- SIDEBAR FILTERS --- */
.catalog-sidebar {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 20px 18px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.sidebar-header {
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid #e2e8f0;
}

.sidebar-title {
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: #0b1e38;
}

.filter-group {
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid #f1f5f9;
}

.filter-group:last-of-type {
  border-bottom: none;
  padding-bottom: 4px;
}

.filter-group-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: none;
  border: none;
  padding: 0 0 10px 0;
  cursor: pointer;
  text-align: left;
}

.filter-group-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: #0b1e38;
}

.group-toggle-icon {
  font-size: 0.75rem;
  color: #0069bb;
  transition: transform 0.2s ease;
}

.filter-group-header.collapsed .group-toggle-icon {
  transform: rotate(180deg);
}

.filter-group-body {
  display: flex;
  flex-direction: column;
  gap: 9px;
  transition: all 0.25s ease;
}

.filter-group-body.hidden {
  display: none;
}

/* Checkbox item */
.filter-checkbox-item {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.filter-checkbox-item input[type="checkbox"] {
  display: none;
}

.custom-checkbox {
  width: 17px;
  height: 17px;
  border: 1.5px solid #cbd5e1;
  border-radius: 3px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.filter-checkbox-item input[type="checkbox"]:checked + .custom-checkbox {
  background-color: #0069bb;
  border-color: #0069bb;
}

.filter-checkbox-item input[type="checkbox"]:checked + .custom-checkbox::after {
  content: "✔";
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.checkbox-label {
  font-size: 0.8125rem;
  color: #334155;
  font-weight: 450;
  transition: color 0.15s ease;
}

.filter-checkbox-item:hover .checkbox-label {
  color: #0069bb;
}

/* Brand Search Box */
.brand-search-box {
  position: relative;
  width: 100%;
}

.brand-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 0.8125rem;
}

.brand-search-box input {
  width: 100%;
  padding: 8px 12px 8px 32px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.8125rem;
  color: #1e293b;
  outline: none;
  transition: border-color 0.2s ease;
}

.brand-search-box input:focus {
  border-color: #0069bb;
  box-shadow: 0 0 0 2px rgba(0, 105, 187, 0.12);
}

/* Reset Filters Button */
.btn-reset-filters {
  width: 100%;
  margin-top: 16px;
  padding: 9px 14px;
  background: #ffffff;
  border: 1.5px solid #0069bb;
  border-radius: 6px;
  color: #0069bb;
  font-weight: 600;
  font-size: 0.8125rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-reset-filters:hover {
  background: #f0f7ff;
  border-color: #00569c;
  color: #00569c;
}

/* ==========================================================================
   CATALOG MAIN AREA & TOOLBAR
   ========================================================================== */
.catalog-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Toolbar */
.catalog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  flex-wrap: wrap;
  gap: 12px;
}

.products-count-text {
  font-size: 0.875rem;
  color: #475569;
}

.products-count-text strong {
  color: #0b1e38;
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Sort Dropdown */
.sort-select {
  padding: 6px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.8125rem;
  color: #334155;
  background-color: #ffffff;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.sort-select:focus {
  border-color: #0069bb;
}

/* Grid / List View Toggles */
.view-toggles {
  display: flex;
  align-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  overflow: hidden;
}

.view-btn {
  width: 32px;
  height: 30px;
  background: #ffffff;
  border: none;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.8125rem;
  transition: all 0.2s ease;
}

.view-btn:hover {
  background: #f1f5f9;
  color: #0069bb;
}

.view-btn.active {
  background: #0069bb;
  color: #ffffff;
}

/* Active Category Pill / Chip */
.active-filter-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f0f7ff;
  border: 1px solid #bae0fd;
  color: #0069bb;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
}

.btn-remove-chip {
  background: none;
  border: none;
  color: #0069bb;
  font-size: 0.8125rem;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.15s ease;
}

.btn-remove-chip:hover {
  opacity: 0.7;
}

/* ==========================================================================
   PRODUCT GRID (3x3 = 9 Products)
   ========================================================================== */
.category-products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* Product Card */
.category-product-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.category-product-card:hover {
  border-color: #cbd5e1;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

/* Product Image Box */
.cat-prod-img-box {
  width: 100%;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  position: relative;
}

.cat-prod-img-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.25s ease;
}

.category-product-card:hover .cat-prod-img-box img {
  transform: scale(1.04);
}

/* Title and Wishlist Row */
.cat-prod-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}

.cat-prod-title {
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: 0.9375rem;
  font-weight: 700;
  color: #0b1e38;
  line-height: 1.3;
  margin: 0;
  letter-spacing: -0.01em;
}

.cat-wishlist-btn {
  background: none;
  border: none;
  color: #ef4444;
  font-size: 1.05rem;
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
  flex-shrink: 0;
}

.cat-wishlist-btn:hover {
  transform: scale(1.18);
}

/* Card Action Area */
.cat-prod-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-add-enquiry {
  width: 100%;
  background-color: #0069bb;
  color: #ffffff;
  border: 1px solid #0069bb;
  border-radius: 6px;
  padding: 9px 14px;
  font-weight: 600;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 105, 187, 0.2);
}

.btn-add-enquiry:hover {
  background-color: #00569c;
  border-color: #00569c;
  box-shadow: 0 4px 12px rgba(0, 105, 187, 0.3);
}

.btn-request-pricing {
  background: none;
  border: none;
  color: #0069bb;
  font-weight: 600;
  font-size: 0.8125rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  padding: 2px 0;
  transition: color 0.15s ease;
  text-decoration: none;
}

.btn-request-pricing:hover {
  color: #004d8c;
  text-decoration: underline;
}

.btn-request-pricing i {
  font-size: 0.75rem;
  transition: transform 0.2s ease;
}

.btn-request-pricing:hover i {
  transform: translateX(3px);
}

/* LIST VIEW MODE */
.category-products-grid.list-view {
  grid-template-columns: 1fr;
}

.category-products-grid.list-view .category-product-card {
  flex-direction: row;
  align-items: center;
  gap: 20px;
}

.category-products-grid.list-view .cat-prod-img-box {
  width: 150px;
  height: 120px;
  margin-bottom: 0;
  flex-shrink: 0;
}

.category-products-grid.list-view .cat-prod-header-row {
  flex: 1;
  margin-bottom: 0;
}

.category-products-grid.list-view .cat-prod-actions {
  width: 220px;
  margin-top: 0;
  flex-shrink: 0;
}

/* ==========================================================================
   PAGINATION
   ========================================================================== */
.catalog-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.page-num-btn,
.page-nav-btn {
  width: 36px;
  height: 36px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  color: #334155;
  font-weight: 600;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.page-num-btn:hover,
.page-nav-btn:hover:not(:disabled) {
  border-color: #0069bb;
  color: #0069bb;
  background: #f8fafc;
}

.page-num-btn.active {
  background: #0069bb;
  color: #ffffff;
  border-color: #0069bb;
}

.page-nav-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ==========================================================================
   NEED HELP CHOOSING A CCTV SOLUTION BANNER (CTA)
   ========================================================================== */
.cctv-cta-section {
  padding: 16px 0 40px 0;
  background-color: #f8fafc;
}

.cctv-cta-banner {
  background-color: #081a30;
  background-size: cover;
  background-position: right center;
  background-repeat: no-repeat;
  border-radius: 10px;
  padding: 32px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(8, 26, 48, 0.16);
}

.cctv-cta-content {
  max-width: 650px;
  position: relative;
  z-index: 5;
}

.cctv-cta-title {
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: 1.65rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.cctv-cta-desc {
  font-size: 0.9375rem;
  color: #cbd5e1;
  line-height: 1.5;
}

.cctv-cta-action {
  position: relative;
  z-index: 5;
  flex-shrink: 0;
}

.btn-cta-team {
  background-color: #0069bb;
  color: #ffffff;
  border: 1.5px solid #0080e5;
  border-radius: 8px;
  padding: 12px 24px;
  font-weight: 600;
  font-size: 0.9375rem;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.22s ease;
  box-shadow: 0 4px 14px rgba(0, 105, 187, 0.35);
}

.btn-cta-team:hover {
  background-color: #00569c;
  border-color: #0069bb;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 105, 187, 0.45);
}

/* ==========================================================================
   MOBILE & RESPONSIVE TWEAKS
   ========================================================================== */
@media (max-width: 991px) {
  .catalog-layout {
    grid-template-columns: 1fr;
  }

  .catalog-sidebar {
    display: none; /* toggleable on mobile */
  }

  .catalog-sidebar.mobile-open {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 290px;
    height: 100vh;
    z-index: 1050;
    overflow-y: auto;
    border-radius: 0;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.25);
  }

  .category-products-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cctv-cta-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
  }
}

@media (max-width: 600px) {
  .category-products-grid {
    grid-template-columns: 1fr;
  }
}
