/* Product List Page Styles */

/* Slider Section */
.slider-section {
  margin-bottom: 2rem;
}

.slider-image {
  height: 400px;
  object-fit: cover;
}

.carousel-caption {
  background: rgba(0, 0, 0, 0.5);
  border-radius: 8px;
  padding: 1rem;
}

/* Categories Section */
.categories-section {
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
}

.categories-nav {
  padding: 1rem 0;
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.category-tab {
  background: #fff;
  color: #6c757d;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  border: 2px solid #e9ecef;
  font-weight: 500;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.category-tab:hover {
  color: #007bff;
  border-color: #007bff;
  background: rgba(0, 123, 255, 0.1);
  text-decoration: none;
}

.category-tab.active {
  background: #007bff;
  color: white;
  border-color: #007bff;
}

/* Products Grid */
.products-grid {
  margin-bottom: 2rem;
}

/* Product List Container - Enhanced Grid Layout */
.product_list {
  display: -webkit-box;
  display: -ms-flexbox;
  display: -webkit-flex;
  display: flex;
  flex-wrap: wrap;
  -ms-flex-wrap: wrap;
  margin-bottom: 18px;
  gap: 30px;
}

.product_list li {
  width: calc(33.33% - 20px);
  margin: 0;
  list-style: none;
}

.product_list li:nth-child(3n) {
  margin-right: 0;
}

.product_list li a {
  display: block;
  border-radius: 0.83vw;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}

.product_list li a:hover .imgbox img {
  -webkit-transform: scale(1.05);
  -ms-transform: scale(1.05);
  -o-transform: scale(1.05);
  transform: scale(1.05);
}

.product_list li a:hover .art {
  background: #13943f;
}

.product_list li a:hover .art h3 {
  color: #fff;
}

.product_list li a:hover .art .line {
  background: rgba(255, 255, 255, 0.1);
}

.product_list li a:hover .art .info .p1 .s1,
.product_list li a:hover .art .info .p1 .s2 {
  color: #fff;
}

.product_list li a .imgbox {
  width: 100%;
  height: 377px;
  background: #ececec;
  display: -webkit-box;
  display: -ms-flexbox;
  display: -webkit-flex;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  -webkit-align-items: center;
  align-items: center;
  overflow: hidden;
}

.product_list li a .imgbox img {
  -webkit-transition: all 0.5s;
  -o-transition: all 0.5s;
  transition: all 0.5s;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product_list li a .art {
  padding: 1.56vw;
  background: #f5f5f5;
  -webkit-transition: all 0.5s;
  -o-transition: all 0.5s;
  transition: all 0.5s;
}

.product_list li a .art h3 {
  font-size: 24px;
  color: #282828;
  font-family: "op_bo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  -webkit-transition: all 0.5s;
  -o-transition: all 0.5s;
  transition: all 0.5s;
  margin: 0 0 15px 0;
}

@media (max-width: 1680px) {
  .product_list li a .art h3 {
    font-size: 21px;
  }
}

@media (max-width: 1440px) {
  .product_list li a .art h3 {
    font-size: 18px;
  }
}

@media (max-width: 1280px) {
  .product_list li a .art h3 {
    font-size: 16px;
  }
}

@media (max-width: 1024px) {
  .product_list li a .art h3 {
    font-size: 12.8px;
  }
}

.product_list li a .art .line {
  width: 100%;
  height: 1px;
  background: rgba(40, 40, 40, 0.1);
  margin: 20px 0 15px;
  -webkit-transition: all 0.5s;
  -o-transition: all 0.5s;
  transition: all 0.5s;
}

.product_list li a .art .info {
  font-size: 16px;
  line-height: 30px;
}

@media (max-width: 1680px) {
  .product_list li a .art .info {
    font-size: 14px;
  }
}

@media (max-width: 1440px) {
  .product_list li a .art .info {
    font-size: 12px;
  }
}

@media (max-width: 1280px) {
  .product_list li a .art .info {
    font-size: 10.66666667px;
  }
}

@media (max-width: 1024px) {
  .product_list li a .art .info {
    font-size: 8.53333333px;
  }
}

.product_list li a .art .info .p1 {
  display: -webkit-box;
  display: -ms-flexbox;
  display: -webkit-flex;
  display: flex;
  margin-bottom: 10px;
}

.product_list li a .art .info .p1:last-child {
  margin-bottom: 0;
}

.product_list li a .art .info .p1 .s1 {
  width: 120px;
  color: #686868;
  -webkit-transition: all 0.5s;
  -o-transition: all 0.5s;
  transition: all 0.5s;
  flex-shrink: 0;
}

.product_list li a .art .info .p1 .s2 {
  width: calc(100% - 120px);
  color: #000000;
  font-weight: 600;
  -webkit-transition: all 0.5s;
  -o-transition: all 0.5s;
  transition: all 0.5s;
}

@media (max-width: 1440px) {
  .product_list li {
    width: calc(33.33% - 13.33px);
  }

  .product_list li a .art .line {
    margin: 15px 0 10px;
  }

  .product_list li a .art .info {
    line-height: 26px;
  }

  .product_list li a .art .info .p1 .s1 {
    width: 100px;
  }

  .product_list li a .art .info .p1 .s2 {
    width: calc(100% - 100px);
  }
}

@media (max-width: 1400px) {
  .product_list li a .imgbox {
    height: 26.9vw;
  }
}

@media (max-width: 768px) {
  .product_list {
    margin-bottom: 10px;
    gap: 15px;
  }

  .product_list li {
    width: 100%;
    margin: 0;
  }

  .product_list li a {
    border-radius: 5px;
  }

  .product_list li a .imgbox {
    height: 315px;
  }

  .product_list li a .art {
    padding: 15px;
  }

  .product_list li a .art h3 {
    font-size: 18px;
    margin-bottom: 12px;
  }

  .product_list li a .art .line {
    margin: 10px 0;
  }

  .product_list li a .art .info .p1 {
    flex-wrap: wrap;
    -ms-flex-wrap: wrap;
  }

  .product_list li a .art .info .p1 .s1 {
    width: 100%;
    margin-bottom: 5px;
  }

  .product_list li a .art .info .p1 .s2 {
    width: 100%;
  }
}

/* CSS Variables for consistent theming - Product List specific */
:root {
  --spacing-20: 20px;
  --spacing-30: 30px;
  --spacing-60: 60px;
  --font14: 14px;
  --font16: 16px;
  --font24: 24px;
  --text-primary: #222222;
  --text-secondary: #999999;
}

.product-category-banner {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 100%;
  margin-bottom: 2rem;
}

.product-category-banner img {
  width: 100%;
  height: 100%;
  object-fit: fill;
}

.product-card {
  width: 100%;
  height: auto;
  border-radius: 10px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.35s ease;
  position: relative;
  display: block;
  animation: fadeInUp 0.6s ease-out;
  animation-fill-mode: both;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.product-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
  border-color: rgba(42, 50, 103, 0.2);
}

.product-card a {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 1;
  display: block;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}

.product-card a:hover {
  text-decoration: none;
  color: inherit;
}

/* Hot/New Badge */
.product-card .product-badge {
  width: auto;
  height: auto;
  position: absolute;
  left: 15px;
  top: 15px;
  padding: 5px 1em;
  border-radius: 5px;
  background: var(--primary-color);
  font-size: 12px;
  color: #ffffff;
  line-height: 1.2;
  z-index: 2;
}

.product-image {
  width: 100%;
  height: auto;
  position: relative;
  overflow: hidden;
  padding: 10px;
  background: linear-gradient(135deg, #f5f5f5 0%, #ececec 100%);
}

.product-image .pb {
  padding-bottom: 60%;
  position: relative;
}

.product-image .ab {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
}

.product-image img[src] {
  opacity: 1;
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

.product-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  background: #f8f9fa;
  color: #6c757d;
  font-size: 2rem;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
}

.product-info {
  width: 100%;
  height: auto;
  text-align: center;
  padding: var(--spacing-20) var(--spacing-30);
  overflow: hidden;
  background: #f5f5f5;
  transition: all 0.35s ease;
}

/* Hover 效果：整个 product-info 区域变为绿色 */
.product-card:hover .product-info {
  background: var(--primary-color);
}

.product-title {
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
  min-height: auto;
}

.product-title a {
  width: 100%;
  height: auto;
  max-height: calc(2em * 1.25);
  font-weight: 500;
  font-size: var(--font24);
  color: var(--text-primary);
  line-height: 1.25;
  transition: all 0.35s ease;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-decoration: none;
}

/* Hover 时标题变为白色 */
.product-card:hover .product-title a {
  color: #ffffff;
}

.product-desc {
  width: 100%;
  height: auto;
  max-height: calc(2em * 1.625);
  font-size: var(--font14);
  color: var(--text-secondary);
  line-height: 1.625;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin-bottom: 0.75rem;
  transition: all 0.35s ease;
}

/* Hover 时描述文本变为白色 */
.product-card:hover .product-desc {
  color: #ffffff;
}

.product-serial {
  color: var(--text-secondary);
  font-size: var(--font14);
  margin-top: 1rem;
  margin-bottom: 1rem;
  transition: all 0.35s ease;
  font-weight: 500;
}

/* Hover 时型号文本变为白色 */
.product-card:hover .product-serial {
  color: var(--text-primary);
}

.product-actions {
  width: 100%;
  height: auto;
  margin-top: var(--spacing-20);
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 15px;
  border-top: 1px solid rgba(40, 40, 40, 0.1);
  transition: all 0.35s ease;
}

.product-card:hover .product-actions {
  border-top-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.product-actions .btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0.75rem 1.5rem;
  font-size: var(--font16);
  color: var(--text-primary);
  background: transparent;
  border: none;
  text-decoration: none;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 500;
  position: relative;
}

.product-actions .btn::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: all 0.35s ease;
  transform: translateX(-50%);
}

.product-actions .btn:hover {
  color: var(--primary-color);
  text-decoration: none;
}

.product-actions .btn:hover::after {
  width: 100%;
}

.product-actions .btn-icon {
  width: 7px;
  height: 10px;
  font-size: 0;
  color: inherit;
  transition: all 0.35s ease;
}

.product-actions .btn-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

/* Hover 时按钮文本变为白色 */
.product-card:hover .product-actions .btn,
.product-card:hover .product-actions .btn-icon {
  color: #ffffff;
}

/* Pagination */
.pagination {
  margin-top: 3rem;
}

.page-link {
  color: #007bff;
  border-color: #dee2e6;
  padding: 0.75rem 1rem;
}

.page-link:hover {
  color: #0056b3;
  background-color: #e9ecef;
  border-color: #dee2e6;
}

.page-item.active .page-link {
  background-color: #007bff;
  border-color: #007bff;
}

.page-item.disabled .page-link {
  color: #6c757d;
  background-color: #fff;
  border-color: #dee2e6;
}

/* No Products */
.no-products {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 3rem 2rem;
  margin: 2rem 0;
}

.no-products i {
  color: #6c757d;
}

/* Error Message */
.error-message {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 3rem 2rem;
}

.error-message i {
  color: #dc3545;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .product_list li {
    width: calc(50% - 15px);
  }

  .product_list li:nth-child(3n) {
    margin-right: 30px;
  }

  .product_list li:nth-child(2n) {
    margin-right: 0;
  }
}

@media (max-width: 992px) {
  .slider-image {
    height: 300px;
  }

  .category-tabs {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 0.5rem;
  }

  .category-tab {
    flex-shrink: 0;
  }

  .product_list li {
    width: calc(50% - 15px);
  }

  .product_list li:nth-child(2n) {
    margin-right: 0;
  }

  :root {
    --font24: 20px;
    --font16: 15px;
    --font14: 13px;
    --spacing-30: 25px;
    --spacing-60: 50px;
  }
}

@media (max-width: 768px) {
  .slider-image {
    height: 250px;
  }

  .carousel-caption {
    padding: 0.5rem;
  }

  .carousel-caption h5 {
    font-size: 1rem;
  }

  .carousel-caption p {
    font-size: 0.85rem;
    margin-bottom: 0;
  }

  .category-tab {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }

  .product-info {
    padding: 0 20px;
  }

  .product-image .pb {
    padding-bottom: 65%;
  }

  .product_list {
    gap: 15px;
  }

  .product_list li {
    width: 100%;
    margin: 0;
  }

  .product_list li:nth-child(3n),
  .product_list li:nth-child(2n) {
    margin-right: 0;
  }

  :root {
    --font24: 18px;
    --font16: 14px;
    --font14: 12px;
    --spacing-30: 20px;
    --spacing-60: 40px;
  }
}

@media (max-width: 576px) {
  .slider-image {
    height: 200px;
  }

  .categories-nav {
    padding: 0.5rem 0;
  }

  .category-tabs {
    gap: 0.5rem;
  }

  .category-tab {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
  }

  .product-image .pb {
    padding-bottom: 70%;
  }

  .product-info {
    padding: 0 15px;
  }

  .product-actions .btn {
    padding: 0.5rem 1rem;
    font-size: 14px;
  }

  .product-card .product-badge {
    left: 10px;
    top: 10px;
    padding: 4px 8px;
    font-size: 11px;
  }

  .product_list li a .art h3 {
    font-size: 16px;
  }

  .product_list li a .art .info {
    font-size: 12px;
    line-height: 24px;
  }

  :root {
    --font24: 16px;
    --font16: 13px;
    --font14: 11px;
    --spacing-20: 15px;
    --spacing-30: 15px;
    --spacing-60: 30px;
  }
}

/* Staggered animation for product cards */
.product-card:nth-child(1) {
  animation-delay: 0.1s;
}
.product-card:nth-child(2) {
  animation-delay: 0.2s;
}
.product-card:nth-child(3) {
  animation-delay: 0.3s;
}
.product-card:nth-child(4) {
  animation-delay: 0.4s;
}
.product-card:nth-child(5) {
  animation-delay: 0.5s;
}
.product-card:nth-child(6) {
  animation-delay: 0.6s;
}
.product-card:nth-child(n + 7) {
  animation-delay: 0.7s;
}

/* Staggered animation for product list items */
.product_list li:nth-child(1) {
  animation: fadeInUp 0.6s ease-out 0.1s both;
}
.product_list li:nth-child(2) {
  animation: fadeInUp 0.6s ease-out 0.2s both;
}
.product_list li:nth-child(3) {
  animation: fadeInUp 0.6s ease-out 0.3s both;
}
.product_list li:nth-child(4) {
  animation: fadeInUp 0.6s ease-out 0.4s both;
}
.product_list li:nth-child(5) {
  animation: fadeInUp 0.6s ease-out 0.5s both;
}
.product_list li:nth-child(6) {
  animation: fadeInUp 0.6s ease-out 0.6s both;
}
.product_list li:nth-child(n + 7) {
  animation: fadeInUp 0.6s ease-out 0.7s both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Badge animation */
.product-badge {
  animation: badgePulse 2s ease-in-out infinite;
  box-shadow: 0 4px 12px rgba(42, 50, 103, 0.3);
}

@keyframes badgePulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 4px 12px rgba(42, 50, 103, 0.3);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(42, 50, 103, 0.4);
  }
}

/* Smooth loading for images */
.product-image img {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.product-image img[src] {
  opacity: 1;
}

.product-card:hover .product-badge {
  width: auto;
  height: auto;
  position: absolute;
  left: 15px;
  top: 15px;
  padding: 5px 1em;
  border-radius: 5px;
  background: #2a3267;
  font-size: 12px;
  color: #ffffff;
  line-height: 1.2;
  animation-play-state: paused;
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(42, 50, 103, 0.4);
}

/* Carousel Custom Styles */
.carousel-control-prev,
.carousel-control-next {
  width: 5%;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
  background: rgba(0, 0, 0, 0.5);
}

.carousel-indicators button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin: 0 4px;
}

.carousel-indicators .active {
  background: #007bff;
}

/* Sidebar Components Styles */
.sidebar {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sidebar-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #007bff;
  color: #333;
}

.sidebar-category-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  margin-bottom: 8px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  text-decoration: none;
  color: #495057;
  transition: all 0.3s ease;
}

.sidebar-category-item:hover {
  background: #e9ecef;
  color: #007bff;
  text-decoration: none;
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.15);
}

.category-action-btn {
  background: #007bff;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 12px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.category-action-btn:hover {
  background: #0056b3;
  transform: scale(1.1);
}

.sidebar-category-item:hover .category-action-btn {
  background: #28a745;
}

.sidebar-article-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  margin-bottom: 8px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  text-decoration: none;
  color: #495057;
  transition: all 0.3s ease;
}

.sidebar-article-item:hover {
  background: #e9ecef;
  color: #007bff;
  text-decoration: none;
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.15);
}

.article-title {
  flex: 1;
  font-size: 14px;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-right: 12px;
}

.article-action-btn {
  background: #007bff;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 12px;
  transition: all 0.3s ease;
  cursor: pointer;
  flex-shrink: 0;
}

.article-action-btn:hover {
  background: #0056b3;
  transform: scale(1.1);
}

.sidebar-article-item:hover .article-action-btn {
  background: #28a745;
}

.contact-info {
  padding: 0;
}
