/* assets/css/pages/category_product.css */
.site-container-category-product{
  margin-top: 1.5rem;
}
/* Layout */
.category-product-layout {
  display: flex;
  gap: 24px;
}

/* Breadcrumb */
.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  color: rgba(13, 34, 64, 0.3);
  padding: 0 12px;
}

/* Sticky Sidebar */
.category-product-sidebar-wrapper {
  width: 210px;
  flex-shrink: 0;
  position: relative;
  align-self: stretch;
  overflow: visible;
  height: auto;
  max-height: none;
}

.category-product-sidebar {
  position: sticky;
  top: 120px;
  align-self: flex-start;
  height: auto;
  max-height: none;
  overflow: visible;
  overflow-y: visible;
}

.category-main-content {
  flex-grow: 1;
  min-width: 0;
}

/* Sidebar Cards */
.sidebar-card {
  border-radius: 4px;
}
.sidebar-card-title-group{
  border-bottom:1px solid #dee2e6;
}
.sidebar-card-title {
  letter-spacing: 0.1em;
  color: var(--second-color);
  font-size: 12px;
  margin: 0px 10px 10px 10px;
}
.sidebar-simple-links {
  margin-left: 0;
  padding-left: 0;
}
.sidebar-simple-link {
  font-size: 14px;
  color: var(--second-color);
  text-decoration: none;
  transition: color 0.2s ease;
}
.sidebar-simple-link:hover {
  color: var(--main-color);
  text-decoration: none;
}

/* Nav Links inside Sidebar */
.sidebar-card-title-group-brand{
  padding-top:16px;
}
.category-nav-list-group{
  padding: 15px;
}
.category-nav-list a, .sidebar-accordion-toggle {
  transition: all 0.3s ease;
  text-decoration: none;
}
.category-nav-list a:hover, .sidebar-accordion-toggle:hover {
  color: var(--main-color) !important;
}
.category-nav-list a:hover svg, .sidebar-accordion-toggle:hover svg {
  color: var(--main-color);
}
.sidebar-submenu a:hover {
  color: var(--second-color) !important;
  background-color: rgba(13,34,64,0.04);
}
.sidebar-submenu a.active-category {
  background-color: var(--second-color) !important;
  color: #ffffff !important;
}
.sidebar-submenu a.active-category:hover {
  color: #ffffff !important;
}

/* Sidebar Components */
.category-product-sidebar-container {
  border-radius: 4px;
  padding: 24px;
}
.product-filter-group-title {
  letter-spacing: 0.1em;
  color: var(--second-color);
  font-size: 12px;
}
.sidebar-accordion-toggle {
  font-size: 14px;
  box-shadow: none;
  border: none;
  background: transparent;
}
.accordion-icon {
  transition: transform 0.3s;
}
.accordion-icon.is-open {
  transform: rotate(180deg);
  opacity: 1;
}
.accordion-icon.is-collapsed {
  transform: rotate(0deg);
  opacity: 0.5;
}
.sidebar-submenu {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  visibility: hidden;
  transition: 
    grid-template-rows 300ms ease,
    opacity 200ms ease,
    visibility 0s linear 300ms;
}
.sidebar-submenu.is-open {
  grid-template-rows: 1fr;
  opacity: 1;
  visibility: visible;
  transition: 
  grid-template-rows 300ms ease,
  opacity 200ms ease,
  visibility 0s;
}
.sidebar-submenu.is-collapsed {
  grid-template-rows: 0fr;
  opacity: 0;
  visibility: hidden;
  transition: 
    grid-template-rows 300ms ease,
    opacity 200ms ease,
    visibility 0s linear 300ms;
}
.category-subnav {
  overflow: hidden;
  min-height: 0;
  border-left: 1px solid rgba(13,34,64,0.08);
  margin-left: 4px;
  padding-left: 6px;
}
.category-subnav-inner {
  padding-top: 8px;
  padding-bottom: 8px;
}
.category-subnav a {
  font-size: 13px;
  color: rgba(13, 34, 64, 0.7);
}
.support-banner-sidebar {
  border-radius: 4px;
  background-color: var(--second-color);
}
.support-banner-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px;
}
.support-banner-desc {
  font-size: 11px;
  color: rgba(255,255,255,0.8);
}
.btn-support-call {
  font-size: 12px;
  background: var(--main-color);
  color: white;
  border: none;
  padding: 12px;
}
.btn-support-call:hover{
  color: white;
  background: #9d051e;
}
.category-sidebar-direct-link {
  font-size: 14px;
  text-decoration: none;
}

.product-empty-state-icon {
  color: var(--second-color);
  opacity: 0.5;
}
.product-empty-state-title {
  color: var(--second-color);
  font-weight: bold;
}
.product-empty-state-description {
  color: rgba(13,34,64,0.7);
  font-size: 14px;
}

/* Hero Banner */
.category-hero-banner {
  border-radius: 4px;
  background-color: var(--second-color);
  background-image: 
    repeating-linear-gradient(
      45deg,
      rgba(255, 255, 255, 0.06) 0,
      rgba(255, 255, 255, 0.06) 1px,
      transparent 1px,
      transparent 24px
    ),
    radial-gradient(circle at top right, rgba(200, 16, 46, 0.05) 0%, transparent 60%),
    linear-gradient(90deg, #0a1b33 0%, var(--second-color) 100%);
}
.category-hero-content {
  padding: 48px 40px;
  color: #ffffff;
  z-index: 2;
}
.category-hero-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 40px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: #ffffff;
  font-weight: 900;
  margin-bottom: 16px;
}
.category-hero-description-wrap {
  color: rgba(255,255,255,0.8);
  font-size: 14px;
  line-height: 1.6;
  max-width: 100%;
}
.category-hero-description {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2; /* Adjust clamp as needed */
  overflow: hidden;
  transition: all 0.3s ease;
  font-size:15px;
}
.category-hero-description-wrap.is-expanded .category-hero-description {
  -webkit-line-clamp: unset;
}
.category-hero-description-toggle {
  font-size: 14px;
  padding: 8px 16px;
  border: 1px solid rgba(255,255,255,0.25);
  background: transparent;
  color: white;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
}
.category-hero-description-toggle:hover {
  background: white;
  color: var(--second-color);
}
.category-hero-toggle-icon {
  margin-left: 8px;
  transition: transform 0.3s;
}
.category-hero-description-wrap.is-expanded ~ .category-hero-description-toggle .category-hero-toggle-icon {
  transform: rotate(180deg);
}

.filter-dropdown-container {
  position: relative;
}
.category-filter-row {
  gap: 12px;
  position: relative;
  z-index: 10;
}
.filter-group-wrap {
  gap: 12px;
}
.filter-toggle-btn {
  gap: 6px;
  padding: 6px 12px;
  font-size: 13px;
  color: var(--second-color);
  transition: all 0.2s ease;
}
.btn-clear-filters {
  color: var(--main-color);
  font-size: 13px;
  white-space: nowrap;
  padding: 6px 12px;
  border: none;
  background: transparent;
}
.toolbar-row {
  gap: 16px;
}
.product-count-text {
  font-size: 16px;
  color: var(--second-color);
}
.product-count-sub {
  color: rgba(13,34,64,0.7);
}
.toolbar-actions-wrap {
  gap: 16px;
}
.toolbar-btn-group {
  height: 38px;
  border-radius: 4px;
}
.btn-toolbar-active {
  font-size: 14px;
  padding: 0 16px;
  border: none;
  background-color: var(--second-color);
  color: white;
}
.btn-toolbar-inactive {
  font-size: 14px;
  padding: 0 16px;
  color: rgba(13,34,64,0.5);
  border-left: 1px solid rgba(13,34,64,0.1) !important;
}
.btn-view-toggle {
  width: 38px;
  border: none;
}
.btn-view-toggle.border-left {
  border-left: 1px solid rgba(13,34,64,0.1) !important;
}
.filter-toggle-btn:hover, .filter-toggle-btn.active {
  border-color: var(--second-color) !important;
}
.filter-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 8px;
  background: white;
  border: 1px solid rgba(13,34,64,0.08);
  border-radius: 4px;
  box-shadow: 0 4px 20px rgba(13,34,64,0.08);
  padding: 8px 0;
  min-width: 180px;
  z-index: 1000;
  display: none; /* Hidden by default */
}
.filter-dropdown-menu.show {
  display: block;
}
.filter-option {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  margin: 0;
  cursor: pointer;
  font-size: 13px;
  color: var(--second-color);
  transition: background 0.2s;
}
.filter-option:hover {
  background: rgba(13,34,64,0.04);
}
.filter-option input[type="checkbox"] {
  margin-right: 8px;
  cursor: pointer;
}
/* Filter Badge Styles */
.filter-count, .filter-count-all {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: bold;
}

/* Selected state for filter button */
.filter-toggle-btn.has-selection {
  background: var(--second-color) !important;
  color: white !important;
  border-color: var(--second-color) !important;
}
.filter-toggle-btn.has-selection .filter-count {
  background: #ffffff !important;
  color: var(--second-color) !important;
}

/* Tất cả bộ lọc Active State */
.filter-toggle-all-btn.has-selection {
  background: var(--main-color) !important;
  color: white !important;
  border-color: var(--main-color) !important;
}
.filter-toggle-all-btn.has-selection .filter-count-all {
  background: #ffffff !important;
  color: var(--main-color) !important;
}

/* Product Grid */
.category-product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

/* View Toggle Buttons */
.view-toggle-button {
  background-color: white;
  color: rgba(13,34,64,0.5);
  transition: all 0.2s ease;
}
.view-toggle-button[aria-pressed="true"] {
  background-color: var(--second-color) !important;
  color: white !important;
}
.view-toggle-button[aria-pressed="false"] {
  background-color: white !important;
  color: rgba(13,34,64,0.5) !important;
}
.view-toggle-button:focus {
  outline: none;
}
.view-toggle-button:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(13,34,64,0.5);
}

/* Card hover effect */
.product-category-card {
  transition: all 0.3s ease;
  border-color: rgba(13,34,64,0.08) !important;
  overflow: hidden;
}
.product-category-card:hover {
  box-shadow: 0 4px 20px rgba(13, 34, 64, 0.08);
  transform: translateY(-2px);
}

/* Card Image Box */
.category-product-card-image {
  padding: 0 !important;
  background: rgba(13, 34, 64, 0.04);
  position: relative;
  overflow: hidden;
}
.category-product-card-image img {
  display: block;
  transition: transform 350ms cubic-bezier(0.4, 0, 0.2, 1);
}
.icon_star_featured{
  margin-right:5px;
}
.product-card-badge-popular {
  top: 12px;
  left: 12px;
  font-size: 10px;
  background: var(--second-color);
  color: white;
  padding: 4px 8px;
  border-radius: 2px;
}
.product-card-category-label {
  font-size: 10px;
  letter-spacing: 0.12em;
  font-family: 'Barlow Condensed', sans-serif;
  color: rgba(13,34,64,0.7);
}
.product-card-title {
  font-size: 17px;
  font-family: 'Barlow Condensed', sans-serif;
  color: var(--second-color);
}
.product-card-description {
  font-size: 13px;
  line-height: 1.6;
  color: rgba(13,34,64,0.7);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-specs-box {
  background: rgba(13, 34, 64, 0.02);
  border-color: rgba(13,34,64,0.08) !important;
}
.card-spec-label {
  font-size: 10px;
  font-family: 'Barlow Condensed', sans-serif;
  color: rgba(13,34,64,0.7);
}
.card-spec-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--second-color);
}
.page-category-product .card-action-wrap {
  border-top: 1px solid rgba(13,34,64,0.08);
}
.product-card-version-count {
  font-weight: bold;
  font-size: 14px;
  color: var(--second-color);
}
.product-card-version-label {
  font-weight: normal;
  color: rgba(13,34,64,0.5);
  font-size: 12px;
}
.page-category-product .product-code-link {
  color: var(--main-color);
  font-size: 13px;
}
.product-card-list-version-count {
  font-weight: 900;
  margin-bottom: 0;
  font-size: 32px;
  font-family: 'Barlow Condensed', sans-serif;
  color: var(--second-color);
  line-height: 1;
}
.product-card-list-version-label {
  color: #6c757d;
  margin-bottom: 1rem;
  font-size: 12px;
}
.product-card-list-code-button {
  background-color: var(--main-color);
  color: white;
  font-size: 12px;
  padding: 10px;
  font-family: 'Barlow Condensed', sans-serif;
  letter-spacing: 0.04em;
}
.product-card-list-code-button:hover{
  color: white;
  background:#a11a30;
}
.product-card-list-catalog-button {
  font-size: 13px;
  padding: 10px;
  color: var(--second-color);
  background: white;
}

/* Hover Image Zoom */
.product-category-card:hover .category-product-card-image img {
  transform: scale(1.04);
}

/* Permanent Product Code Bar (List View) */
.product-card-list-image-code {
  display: none;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--main-color);
  color: #ffffff;
  text-align: center;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: bold;
  font-size: 12px;
  padding: 6px 12px;
  z-index: 2;
  pointer-events: none;
  text-transform: uppercase;
}
.category-product-grid.list-view .product-card-list-image-code {
  display: block;
}

/* Animated Red Line (Grid View - Bottom) */
.category-product-card-image::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--main-color);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 350ms cubic-bezier(0.4, 0, 0.2, 1);
}
.product-category-card:hover .category-product-card-image::after {
  transform: scaleX(1);
}

.btn-support {
  transition: all 0.3s ease;
}
.btn-support:hover {
  filter: brightness(0.92);
}

/* List View Styles */
.category-product-grid.list-view {
  grid-template-columns: 1fr;
}
.category-product-grid.list-view .product-category-card {
  flex-direction: row !important;
}
.category-product-grid.list-view .category-product-card-image {
  width: 280px;
  height: auto;
  min-height: 240px;
  flex-shrink: 0;
}
/* Animated Red Line (List View - Right Side) */
.category-product-grid.list-view .category-product-card-image::after {
  display: none !important;
}
.category-product-grid.list-view .card-body {
  flex-direction: row !important;
  align-items: stretch;
  padding: 32px !important;
  gap: 32px;
}
.category-product-grid.list-view .card-info-wrap {
  padding-right: 0;
}
.category-product-grid.list-view .card-specs-box {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin-bottom: 0 !important;
  display: flex !important;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  margin-top: 16px;
}
.category-product-grid.list-view .card-specs-box > div {
  margin-bottom: 0 !important;
  gap: 8px;
}
.category-product-grid.list-view .card-specs-box .text-uppercase {
  text-transform: none !important;
  font-family: inherit !important;
  font-size: 13px !important;
  font-weight: normal !important;
  color: rgba(13,34,64,0.7) !important;
  letter-spacing: normal !important;
}
.category-product-grid.list-view .card-specs-box .font-weight-bold {
  font-family: inherit !important;
  font-size: 13px !important;
  color: var(--second-color) !important;
}
.category-product-grid.list-view .card-action-wrap {
  width: 200px;
  flex-shrink: 0;
  border-top: none !important;
  border-left: 1px solid rgba(13,34,64,0.08);
  padding-top: 0 !important;
  padding-left: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.category-product-grid.list-view .grid-action-view {
  display: none !important;
}
.category-product-grid.list-view .list-action-view {
  display: flex !important;
}

/* Responsive */
@media (max-width: 1199.98px) {
  .category-product-layout {
    gap: 16px;
  }
  .category-main-content {
    width: calc(100% - 224px);
  }
}

@media (max-width: 991.98px) {
  .category-product-layout {
    flex-direction: column;
  }
  .category-product-sidebar {
    position: static;
  }
  .category-product-sidebar-wrapper {
    width: 100%;
    margin-bottom: 24px;
    align-self: auto;
  }
  .category-main-content {
    width: 100%;
  }
  .category-support-banner {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 16px;
  }
}

@media (max-width: 767.98px) {
  .category-product-grid {
    grid-template-columns: 1fr;
  }
  .category-product-grid.list-view .product-category-card {
    flex-direction: column !important;
  }
  .category-product-grid.list-view .card-image-box {
    width: 100%;
    height: 240px;
    min-height: auto;
  }
  .category-product-grid.list-view .image-bottom-line {
    width: 100% !important;
    height: 4px !important;
    top: auto;
    bottom: 0;
    left: 0 !important;
  }
  .category-product-grid.list-view .card-body {
    flex-direction: column !important;
    padding: 16px !important;
    gap: 16px;
  }
  .category-product-grid.list-view .card-action-wrap {
    width: 100%;
    border-left: none !important;
    border-top: 1px solid rgba(13,34,64,0.08) !important;
    padding-left: 0 !important;
    padding-top: 16px !important;
  }
  .category-product-grid.list-view .list-action-view {
    flex-direction: row !important;
    justify-content: space-between;
    align-items: center;
    display: block !important;
  }
  .category-product-grid.list-view .list-action-view > .font-weight-black {
    font-size: 24px !important;
  }
  .category-product-grid.list-view .list-action-view .btn-block {
    display: inline-block;
    width: auto;
  }
}

/* Technical Support Banner */
.category-support-banner {
  background: white;
  position: relative;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(13, 34, 64, 0.04);
}
.page-category-product .category-support-banner::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--main-color);
  border-radius: 4px 0 0 4px;
}
.category-support-banner-content {
  max-width: 512px;
  padding-left: 16px;
}
.category-support-banner-eyebrow {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--main-color);
}
.category-support-banner-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 24px;
  color: var(--second-color);
}
.category-support-banner-description {
  font-size: 13px;
  color: rgba(13,34,64,0.7);
  line-height: 1.6;
}
.category-support-banner-actions {
  gap: 12px;
}
.category-support-banner-download {
  font-size: 14px;
  padding: 8px 16px;
  border-color: rgba(13,34,64,0.2);
}
.category-support-banner-contact {
  background-color: var(--main-color);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 14px;
  padding: 8px 24px;
  letter-spacing: 0.04em;
  color: white;
}
.category-support-banner-contact:hover{
  color:#fff;
  background:#a11a30;
}

@media screen and (max-width: 991px){
  .category-product-grid.list-view .category-product-card-image {
      width: 100%;
      height: auto;
      min-height: 240px;
      flex-shrink: 0;
      margin: 0 auto;
  }
  .category-product-grid.list-view .list-action-view .product-card-list-catalog-button{
    margin-top: 0px;
  }
}
