/* Product sidebar expandable tree */
.product-tree {
  list-style: none;
  padding: 0;
  margin: 0;
}

.product-tree__category {
  border-bottom: 1px solid #e8e8e8;
}

.product-tree__cat-link {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  transition: background-color 0.2s;
}

.product-tree__cat-link:hover {
  background-color: #f5f5f5;
  color: #333;
  text-decoration: none;
}

.product-tree__cat-link i:first-child {
  margin-right: 10px;
  font-size: 18px;
  width: 24px;
  text-align: center;
}

.product-tree__cat-link span {
  flex: 1;
}

.product-tree__toggle {
  flex: 0 0 auto !important;
  font-size: 10px;
  color: #999;
  transition: transform 0.3s;
}

.product-tree__category.open .product-tree__toggle {
  transform: rotate(180deg);
  color: #3565B4;
}

.product-tree__category.open > .product-tree__cat-link {
  color: #3565B4;
  font-weight: 600;
}

.product-tree__products {
  display: none;
  list-style: none;
  padding: 0;
  margin: 0;
  background-color: #fafafa;
}

.product-tree__category.open .product-tree__products {
  display: block;
}

.product-tree__products li {
  border-top: 1px solid #eee;
}

.product-tree__products li a {
  display: block;
  padding: 8px 15px 8px 49px;
  color: #666;
  font-size: 13px;
  text-decoration: none;
  transition: all 0.2s;
}

.product-tree__products li a:hover {
  background-color: #fef0f0;
  color: #3565B4;
  text-decoration: none;
}

.product-tree__products li a.active {
  color: #3565B4;
  font-weight: 600;
  background-color: #fef0f0;
  border-left: 3px solid #3565B4;
  padding-left: 46px;
}

/* Download button in sidebar */
.download-dark {
  background-color: #333;
  color: #fff;
  padding: 15px;
  margin-top: 10px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
}

.download-dark:hover {
  background-color: #3565B4;
}

.download-dark i {
  font-size: 18px;
}

/* Product detail page styles */
.product .headimage {
  padding-left: 0;
}

.product .headimage img {
  width: 100%;
  height: auto;
}

.product .headimage h1 {
  margin: 20px 0;
  font-size: 28px;
  color: #333;
}

.product .headimage h1 i {
  margin-right: 10px;
  color: #3565B4;
}

/* Carousel */
#carousel-product .carousel-inner .item img {
  width: 100%;
  height: auto;
}

#carousel-product .carousel-control {
  background: none;
  color: #3565B4;
  font-size: 24px;
  width: 5%;
}

/* Product tabs */
#product_tabs {
  border-bottom: 1px solid #e8e8e8;
  margin-bottom: 20px;
  padding: 10px 0;
}

#product_tabs .nav-tabs {
  border: none;
}

#product_tabs .nav-tabs a {
  color: #3565B4;
  text-decoration: none;
  font-weight: 600;
}

/* Breadcrumb */
.product .breadcrumb {
  background: transparent;
  padding: 0;
  margin: 0;
  font-size: 13px;
}

.product .breadcrumb a {
  color: #999;
}

.product .breadcrumb .active {
  color: #333;
}

/* Photo gallery carousel */
.gallery.dark {
  background-color: #333;
  padding: 60px 0;
  margin-top: 30px;
}

#carousel-gallery {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

#carousel-gallery .carousel-inner .item img {
  width: 100%;
  height: auto;
  max-height: 550px;
  object-fit: contain;
}

#carousel-gallery .carousel-control {
  background: none !important;
  width: 50px;
  opacity: 0.7;
  top: 50%;
  transform: translateY(-50%);
  height: 50px;
  margin-top: 0;
}

#carousel-gallery .carousel-control:hover {
  opacity: 1;
}

#carousel-gallery .carousel-control .glyphicon {
  font-size: 30px;
  top: 50%;
  transform: translateY(-50%);
}

#carousel-gallery .carousel-indicators {
  bottom: -40px;
}

#carousel-gallery .carousel-indicators li {
  border-color: #999;
  background-color: transparent;
  width: 12px;
  height: 12px;
  margin: 0 4px;
}

#carousel-gallery .carousel-indicators .active {
  background-color: #3565B4;
  border-color: #3565B4;
  width: 12px;
  height: 12px;
  margin: 0 4px;
}

/* Download modal */
#downloadModal .modal-header {
  background-color: #333;
  color: #fff;
}

#downloadModal .modal-body a {
  color: #333;
  display: block;
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}

#downloadModal .modal-body a:hover {
  color: #3565B4;
  text-decoration: none;
}

#downloadModal .modal-footer {
  text-align: center;
}

#downloadModal .modal-footer .btn {
  background: transparent;
  border: none;
  font-size: 20px;
}

/* Product listing card styles */
.panel-product {
  margin-bottom: 20px;
  border: 1px solid #e8e8e8;
  transition: box-shadow 0.2s;
}

.panel-product:hover {
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.panel-product .panel-header img {
  width: 100%;
  height: auto;
}

.panel-product .panel-body {
  padding: 15px;
}

.panel-product .panel-body h4 {
  margin: 0 0 10px 0;
  font-size: 16px;
}

.panel-product .panel-body h4 a {
  color: #333;
}

.panel-product .panel-body .truncate {
  color: #666;
  font-size: 13px;
  line-height: 1.5;
  max-height: 60px;
  overflow: hidden;
}

.panel-product .panel-footer {
  padding: 10px 15px;
  border-top: 1px solid #eee;
  background: transparent;
}

.panel-product .read-more a {
  color: #3565B4;
  font-size: 13px;
  text-decoration: none;
}

.panel-product .read-more .icon-read-more {
  vertical-align: middle;
}

/* Mobile responsive */
@media (max-width: 991px) {
  .product-tree {
    display: none;
  }
  .product-tree.show-mobile {
    display: block;
  }
  .products-menu {
    margin-bottom: 20px;
  }
}
