/* 
  HD-INOX Products Page Specific Styles (san-pham.css)
*/

.products-layout {
  display: flex;
  gap: 30px;
  padding: 30px 0;
}

/* SIDEBAR */
.sidebar {
  width: 280px;
  flex-shrink: 0;
}
.sidebar-heading-main {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 25px;
  text-transform: uppercase;
}

.sidebar-box {
  margin-bottom: 25px;
  border-radius: 4px;
  overflow: hidden;
  background: #f7fbff;
}
.sidebar-box-header {
  background: #e8f1ff;
  padding: 12px 15px;
  font-weight: 800;
  color: var(--blue-main-one);
  font-size: 14px;
  text-transform: uppercase;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: background 0.2s;
}
.sidebar-box-header:hover {
  background: #deebff;
}
.sidebar-box-header i {
  transition: transform 0.3s ease;
}
.sidebar-box.active .sidebar-box-header i {
  transform: rotate(180deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition:
    max-height 0.3s ease-out,
    padding 0.3s ease;
  padding-top: 0;
  padding-bottom: 0;
}
.sidebar-box.active .accordion-content {
  max-height: 500px; /* Large enough to hold content */
  padding-top: 10px;
  padding-bottom: 10px;
}

.cat-list-deep {
  /* padding: 10px 0; Removed as it's handled by accordion-content */
}
.cat-item-deep {
  text-decoration: none;
  padding: 8px 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #444;
  font-weight: 600;
  transition: 0.2s;
}
.cat-item-deep i {
  color: var(--blue-primary);
  font-size: 14px;
}
.cat-item-deep:hover {
  color: var(--blue-primary);
}

/* BANNER */
.category-banner-wrap {
  position: relative;
  width: 100%;
  margin-bottom: 40px;
}
.category-banner {
  width: 100%;
  height: 400px;
  background: #999;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.banner-text {
  color: var(--white);
  text-align: center;
}
.banner-text h1 {
  font-size: 64px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 10px;
}
.banner-text p {
  font-size: 82px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -2px;
}

.banner-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 15px;
}
.dot {
  width: 25px;
  height: 5px;
  background: #ddd;
  border-radius: 5px;
  cursor: pointer;
}
.dot.active {
  background: #333;
  width: 35px;
}

/* PRODUCT GRID */
.main-content {
  flex: 1;
}
.main-results-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-light);
}
.product-grid-refined {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

/* PRODUCT CARD */
.p-card-refined {
  /* border: 1px solid var(--blue-bright); */
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.card-visual-block {
  /* border: 1px solid var(--blue-bright); */
  border-radius: 2px;
  overflow: hidden;
  background: var(--white);
  position: relative;
}
.card-top-head {
  background: var(--blue-bright);
  color: var(--white);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 6px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  position: relative;
}
.discount-tag {
  position: absolute;
  right: 0;
  top: 0;
  background: #dc3545;
  color: #fff;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 800;
}
.card-img-area {
  /* height: 220px; */
  display: flex;
  align-items: center;
  justify-content: center;
  /* padding: 20px; */
}
.card-img-area img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.card-specs-overlay {
  padding: 10px 15px;
  font-size: 12px;
  color: #333;
  line-height: 1.4;
}
.spec-line {
  display: flex;
  gap: 5px;
  font-size: 11px;
}
.spec-line b {
  color: #f21d1d;
}
/* 
.card-text-block {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0 5px;
  min-height: 140px;
}
.card-title-p {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-main);
  line-height: 1.4;
  display: block;
  max-width: 100%; 
  width: 350px;
  display: -webkit-box;
  -webkit-line-clamp: 2; 
  -webkit-box-orient: vertical;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
} */

.p-card-actions {
  margin-top: 12px;
}

.btn-buy-now-list {
  width: 100%;
  background: var(--blue-main-one);
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-buy-now-list:hover {
  background: var(--blue-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 50, 147, 0.2);
}

.btn-buy-now-list i {
  font-size: 14px;
}
.card-price-footer {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.price-tag-big {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  margin-right: 5px;
}
.price-tag-old {
  font-size: 14px;
  color: #999;
  text-decoration: line-through;
}
.btn-cart-icon {
  font-size: 18px;
  color: var(--blue-primary);
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 5px;
  border-radius: 50%;
}
.btn-cart-icon:hover {
  background: rgba(0, 50, 147, 0.1);
  transform: scale(1.1);
}
.btn-cart-icon.fa-spinner {
  color: #999;
}

/* PAGINATION */
.pg-refined {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 50px;
}
.pg-node {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--blue-primary);
  cursor: pointer;
  border-radius: 4px;
  border: 1px solid #eee;
  text-decoration: none;
}
.pg-node.active {
  background: var(--blue-primary);
  color: var(--white);
  border-color: var(--blue-primary);
}

/* RESPONSIVE */
@media (max-width: 991px) {
  .products-layout {
    flex-direction: column;
    gap: 20px;
  }
  .sidebar {
    width: 100%;
    order: 2;
  } /* Sidebar stacks below products on tablet */
  .main-content {
    order: 1;
  }

  .category-banner {
    height: 300px;
  }
  .banner-text h1 {
    font-size: 44px;
  }
  .banner-text p {
    font-size: 58px;
  }

  .product-grid-refined {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
}

@media (max-width: 576px) {
  .category-banner {
    height: 200px;
  }
  .banner-text {
    padding: 0 15px;
  }
  .banner-text h1 {
    font-size: 32px;
  }
  .banner-text p {
    font-size: 38px;
  }

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

  .card-img-area {
    height: 180px;
  }
  .card-title-p {
    font-size: 13px;
    height: 36px;
  }

  .pg-refined {
    gap: 6px;
    flex-wrap: wrap;
  }
  .pg-node {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }
}
