﻿/**
 * 爱点亮 - 分类页面样式 (aidian 暗金主题)
 * 匹配 PrestaShop 标准分类页 DOM 结构
 */

/* ============================================
   分类页整体背景
   ============================================ */
body#category {
  background-color: #1A1A1A;
}

#wrapper {
  background: #1A1A1A;
}

/* 分类页主内容区域宽度限制 */
.category-page-main {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
}

@media (max-width: 768px) {
  .category-page-main {
    padding: 0 16px;
  }
}

/* ============================================
   面包屑导航
   ============================================ */
.breadcrumb {
  background: transparent !important;
  padding: 12px 0;
  margin-bottom: 0;
}

.breadcrumb ol li,
.breadcrumb ol li a {
  color: rgba(255,255,255,0.5);
  font-size: 13px;
}

.breadcrumb ol li a:hover {
  color: #C9A962;
}

/* ============================================
   左侧分类导航栏
   ============================================ */
#left-column {
  background: transparent;
}

#left-column .block-categories {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 2px;
  padding: 20px;
}

#left-column .block-categories .h1,
#left-column .block-categories .h6 {
  color: #C9A962;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(201,169,98,0.2);
  padding-bottom: 12px;
  margin-bottom: 16px;
}

#left-column .category-sub-menu li > a {
  color: rgba(255,255,255,0.65);
  font-size: 13px;
  padding: 6px 0;
  display: block;
  transition: color 0.2s;
}

#left-column .category-sub-menu li > a:hover {
  color: #C9A962;
}

#left-column .category-sub-menu li[data-depth="0"] > a {
  color: rgba(255,255,255,0.8);
  font-weight: 600;
  font-size: 14px;
}

/* ============================================
   主内容区域
   ============================================ */
#content-wrapper {
  padding-top: 30px !important;
}

/* ============================================
   分类标题 Hero 区 - 强制覆盖 sexer 主题样式
   ============================================ */
#js-product-list-header {
  text-align: center;
  padding: 60px 0 40px;
  position: relative;
  margin-bottom: 30px;
}

#js-product-list-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200%;
  height: 100%;
  background: radial-gradient(ellipse 60% 70% at 50% 0%, rgba(201,169,98,0.08) 0%, transparent 60%);
  pointer-events: none;
}

/* 强制覆盖 sexer 的 .block-category h1 */
#js-product-list-header .block-category,
#js-product-list-header .block-category.card,
#js-product-list-header .block-category.card-block {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

#js-product-list-header .block-category h1,
#js-product-list-header .block-category .h1,
#js-product-list-header h1.h1,
body#category #js-product-list-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 700;
  color: #FFFFFF !important;
  letter-spacing: 0.05em;
  margin: 0 !important;
  position: relative;
  z-index: 1;
  line-height: 1.2 !important;
  text-transform: none !important;
}

#js-product-list-header .block-category-inner,
#js-product-list-header .text-muted,
#js-product-list-header #category-description {
  color: rgba(255,255,255,0.5) !important;
  font-size: 14px;
  margin-top: 12px;
  line-height: 1.6;
}

/* 分类标题下方的商品总数提示 */
#js-product-list-header .block-category-inner p {
  color: rgba(255,255,255,0.4);
  font-size: 13px;
  margin-top: 8px;
}

/* ============================================
   产品列表顶部（排序/计数）
   ============================================ */
#js-product-list-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 20px;
  margin-bottom: 24px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 6px;
}

#js-product-list-top p,
#js-product-list-top .total-products p {
  color: rgba(255,255,255,0.5);
  font-size: 13px;
  margin: 0;
}

/* 隐藏 collection-view 布局切换按钮（暗色主题下不需要） */
#js-product-list-top .collection-view,
#js-product-list-top .collection-view-wrap {
  display: none !important;
}

/* 排序下拉框 */
#js-product-list-top .sort-by-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

#js-product-list-top .sort-by {
  color: rgba(255,255,255,0.4);
  font-size: 13px;
  white-space: nowrap;
}

#js-product-list-top .btn-unstyle,
#js-product-list-top .dropdown-toggle,
#js-product-list-top .select-title {
  color: rgba(255,255,255,0.75);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 4px;
  padding: 8px 16px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

#js-product-list-top .btn-unstyle:hover,
#js-product-list-top .dropdown-toggle:hover,
#js-product-list-top .select-title:hover {
  color: #C9A962;
  border-color: rgba(201,169,98,0.35);
  background: rgba(201,169,98,0.08);
}

/* 下拉菜单 */
#js-product-list-top .dropdown-menu {
  background: #242424;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  padding: 6px 0;
  min-width: 160px;
}

#js-product-list-top .dropdown-menu .select-list {
  display: block;
  padding: 8px 16px;
  color: rgba(255,255,255,0.7);
  font-size: 13px;
  text-decoration: none;
  transition: all 0.15s;
}

#js-product-list-top .dropdown-menu .select-list:hover {
  background: rgba(201,169,98,0.1);
  color: #C9A962;
}

#js-product-list-top .dropdown-menu .select-list.current {
  color: #C9A962;
  background: rgba(201,169,98,0.08);
  font-weight: 500;
}

/* 商品计数显示 */
#js-product-list-top .showing-text {
  color: rgba(255,255,255,0.4);
  font-size: 13px;
}

/* 筛选按钮 */
#js-product-list-top .filter-button button {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.7);
  border-radius: 4px;
  padding: 8px 16px;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

#js-product-list-top .filter-button button:hover {
  border-color: rgba(201,169,98,0.35);
  color: #C9A962;
}

/* 顶部三栏布局优化 */
#js-product-list-top .product-list-top-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  flex-wrap: wrap;
  gap: 12px;
}

#js-product-list-top .col-md-4,
#js-product-list-top .col-md-5,
#js-product-list-top .col-md-6,
#js-product-list-top .col-md-7,
#js-product-list-top .col-sm-6 {
  width: auto !important;
  flex: 0 0 auto !important;
  max-width: none !important;
  padding: 0 !important;
}

/* ============================================
   产品网格
   ============================================ */
#products {
  color: #FFFFFF;
}

#products .products {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 24px !important;
}

/* 覆盖 Bootstrap row 布局 */
#products .products.row {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  margin: 0 !important;
}

#products .products.row::before,
#products .products.row::after {
  display: none !important;
}

/* 覆盖 Bootstrap col 类 */
#products .products [class*="col-"] {
  width: 100% !important;
  max-width: 100% !important;
  flex: none !important;
  padding: 0 !important;
}

/* ============================================
   单个产品卡片
   ============================================ */
#products .products article,
#products .product-miniature {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(.25,.46,.45,.94);
  position: relative;
}

#products .products article:hover,
#products .product-miniature:hover {
  background: rgba(201,169,98,0.06);
  border-color: rgba(201,169,98,0.25);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.35);
}

/* 产品图片容器 */
#products .products article .thumbnail-container,
#products .products article .product-thumbnail,
#products .product-miniature .thumbnail-container,
#products .product-miniature .product-thumbnail {
  background: #222222;
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
}

/* 产品图片占位 - 无图时显示 */
#products .products article .thumbnail-container-image,
#products .product-miniature .thumbnail-container-image {
  background: linear-gradient(135deg, #252525 0%, #2d2d2d 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 无图片时的占位 - 显示一个相机/图片图标 */
#products .products article .thumbnail-container:empty::before,
#products .product-miniature .thumbnail-container:empty::before,
#products .products article .product-thumbnail:empty::before,
#products .product-miniature .product-thumbnail:empty::before {
  content: '';
  display: block;
  width: 40px;
  height: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.15)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2' ry='2'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpolyline points='21 15 16 10 5 21'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

/* 无图片时的占位图样式 */
#products .products article img[src*="no_picture"],
#products .product-miniature img[src*="no_picture"],
#products .products article img[src*="loading.svg"],
#products .product-miniature img[src*="loading.svg"] {
  opacity: 0.25;
  filter: grayscale(1);
}

/* 确保产品图片可见 */
#products .products article .thumbnail-container img,
#products .product-miniature .thumbnail-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(.25,.46,.45,.94);
}

#products .products article:hover .thumbnail-container img,
#products .product-miniature:hover .thumbnail-container img {
  transform: scale(1.05);
}

/* 产品信息区域 */
#products .products article .product-description,
#products .product-miniature .product-description {
  padding: 16px;
  background: transparent;
}

/* 产品标题 */
#products .products article h3,
#products .products article .product-title,
#products .products article .h3,
#products .product-miniature h3,
#products .product-miniature .product-title,
#products .product-miniature .h3 {
  margin: 0 0 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

#products .products article h3 a,
#products .products article .product-title a,
#products .product-miniature h3 a,
#products .product-miniature .product-title a {
  color: rgba(255,255,255,0.9);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  text-decoration: none;
  transition: color 0.2s;
}

#products .products article:hover h3 a,
#products .products article:hover .product-title a,
#products .product-miniature:hover h3 a,
#products .product-miniature:hover .product-title a {
  color: #C9A962;
}

/* 产品参考编号 / 副标题 */
#products .products article .product-reference,
#products .product-miniature .product-reference {
  color: rgba(255,255,255,0.35);
  font-size: 12px;
  margin-bottom: 10px;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 价格 */
#products .products article .product-price-and-shipping,
#products .product-miniature .product-price-and-shipping {
  margin: 0;
}

#products .products article .price,
#products .product-miniature .price {
  color: #C9A962;
  font-size: 15px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
}

/* 数量选择器 - 在列表页隐藏 */
#products .products article .product-quantity,
#products .product-miniature .product-quantity {
  display: none;
}

#products .products article .qty,
#products .product-miniature .qty {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: #FFFFFF;
  border-radius: 2px;
  width: 50px;
  text-align: center;
  padding: 4px;
  font-size: 13px;
}

/* 加入购物车按钮 - 在列表页缩小显示 */
#products .products article .add-to-cart,
#products .products article .ajax_add_to_cart_button,
#products .product-miniature .add-to-cart,
#products .product-miniature .ajax_add_to_cart_button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: transparent;
  color: #C9A962;
  border: 1px solid rgba(201,169,98,0.4);
  border-radius: 4px;
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.25s;
  text-decoration: none;
  margin-top: 10px;
}

#products .products article .add-to-cart:hover,
#products .products article .ajax_add_to_cart_button:hover,
#products .product-miniature .add-to-cart:hover,
#products .product-miniature .ajax_add_to_cart_button:hover {
  background: #C9A962;
  color: #1A1A1A;
  border-color: #C9A962;
}

/* ============================================
   分页
   ============================================ */
.pagination {
  margin-top: 50px;
  padding: 20px 0;
  text-align: center;
}

.pagination .page-list {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  padding: 0;
  list-style: none;
}

.pagination .page-list li a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  color: rgba(255,255,255,0.55);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 2px;
  transition: all 0.2s;
}

.pagination .page-list li a:hover {
  color: #C9A962;
  border-color: rgba(201,169,98,0.3);
  background: rgba(201,169,98,0.08);
}

.pagination .page-list li.current a {
  color: #1A1A1A;
  background: #C9A962;
  border-color: #C9A962;
  font-weight: 700;
}

.pagination .previous a,
.pagination .next a {
  color: rgba(255,255,255,0.6) !important;
}

/* ============================================
   Wishlist 图标
   ============================================ */
#products .products article .wishlist-button,
#products .product-miniature .wishlist-button {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
}

#products .products article .wishlist-button i,
#products .product-miniature .wishlist-button i {
  color: rgba(255,255,255,0.4);
  font-size: 18px;
  transition: color 0.2s;
}

#products .products article .wishlist-button:hover i,
#products .product-miniature .wishlist-button:hover i {
  color: #C9A962;
}

/* ============================================
   响应式
   ============================================ */
@media (max-width: 1200px) {
  #products .products {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 992px) {
  #products .products {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  #left-column {
    display: none;
  }

  #content-wrapper {
    padding-top: 15px !important;
  }

  #js-product-list-header {
    padding: 30px 0 20px;
  }

  #js-product-list-header h1 {
    font-size: 28px;
  }

  /* 移动端顶部筛选栏优化 */
  #js-product-list-top {
    padding: 12px 14px;
    gap: 10px;
    margin-bottom: 16px;
  }

  #js-product-list-top .sort-by {
    font-size: 12px;
  }

  #js-product-list-top .select-title,
  #js-product-list-top .btn-unstyle {
    padding: 6px 12px;
    font-size: 12px;
  }

  #js-product-list-top .showing-text {
    font-size: 12px;
    width: 100%;
    text-align: center;
  }

  #products .products {
    gap: 12px;
  }

  #products .products article .product-description,
  #products .product-miniature .product-description {
    padding: 12px 10px;
  }

  #products .products article .add-to-cart,
  #products .products article .ajax_add_to_cart_button,
  #products .product-miniature .add-to-cart,
  #products .product-miniature .ajax_add_to_cart_button {
    padding: 5px 10px;
    font-size: 10px;
  }
}

@media (max-width: 480px) {
  #products .products {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  
  #products .products article h3 a,
  #products .product-miniature h3 a {
    font-size: 12px;
  }
  
  #products .products article .price,
  #products .product-miniature .price {
    font-size: 14px;
  }
  
  #products .products article .add-to-cart,
  #products .products article .ajax_add_to_cart_button,
  #products .product-miniature .add-to-cart,
  #products .product-miniature .ajax_add_to_cart_button {
    padding: 6px 12px;
    font-size: 11px;
  }
}

/* 产品网格布局修复（2026-05-29） */
#js-product-list .products {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
  gap: 24px !important;
  padding: 20px 0;
}

#js-product-list .product-miniature {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}

#js-product-list .product-miniature:hover {
  border-color: rgba(201,169,98,0.3);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

#js-product-list .product-thumbnail {
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

#js-product-list .product-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

#js-product-list .product-miniature:hover .product-thumbnail img {
  transform: scale(1.05);
}

#js-product-list .product-description {
  padding: 16px;
}

#js-product-list .product-title a {
  color: rgba(255,255,255,0.85) !important;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

#js-product-list .product-title a:hover {
  color: #C9A962 !important;
}
