/*--------------------------------------------------------------
# product Posts Section
--------------------------------------------------------------*/
.product-posts article {
  background-color: var(--surface-color);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  padding: 20px;
  height: 100%;
}

.product-posts .post-img {
  max-height: 400px;
  margin: -20px -20px 0 -20px;
  overflow: hidden;
}

.product-posts .title {
  font-size: 20px;
  font-weight: 700;
  padding: 0;
  margin: 15px 0;
  /* 1. 超出容器部分隐藏 */
  overflow: hidden;
  /* 2. 核心：限制显示的行数（webkit内核私有属性） */
  -webkit-line-clamp: 2;
  /* 数字=需要限制的行数，比如2行就写2 */
  /* 3. 配合line-clamp，必须设置为box */
  display: -webkit-box;
  /* 4. 文本方向（默认垂直排列，需设为垂直） */
  -webkit-box-orient: vertical;
  /* 可选：设置容器宽度/高度（必须有尺寸限制） */
  /* width: 300px; */
  /* 可选：设置行高，控制每行高度 */
  line-height: 1.5;
  height: 60px;
}

.product-posts .title a {
  color: var(--heading-color);
  transition: 0.3s;
}

.product-posts .title a:hover {
  color: var(--accent-color);
}

.product-posts .meta-top {
  margin-top: 20px;
  color: color-mix(in srgb, var(--default-color), transparent 40%);
}

.product-posts .meta-top ul {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  align-items: center;
  padding: 0;
  margin: 0;
}

.product-posts .meta-top ul li+li {
  padding-left: 20px;
}

.product-posts .meta-top i {
  font-size: 16px;
  margin-right: 8px;
  line-height: 0;
  color: color-mix(in srgb, var(--default-color), transparent 20%);
}

.product-posts .meta-top a {
  color: color-mix(in srgb, var(--default-color), transparent 40%);
  font-size: 14px;
  display: inline-block;
  line-height: 1;
}

.product-posts .content {
  margin-top: 20px;
}

.product-posts .content .read-more {
  text-align: center;
}

.product-posts .content .read-more a {
  background: var(--accent-color);
  color: var(--contrast-color);
  display: inline-block;
  padding: 8px 30px;
  transition: 0.3s;
  font-size: 14px;
  border-radius: 4px;
}

.product-posts .content .read-more a:hover {
  background: color-mix(in srgb, var(--accent-color), transparent 20%);
}

/*--------------------------------------------------------------
# product Pagination Section
--------------------------------------------------------------*/
.product-pagination {
  padding-top: 0;
  color: color-mix(in srgb, var(--default-color), transparent 40%);
}

.product-pagination ul {
  display: flex;
  padding: 0;
  margin: 0;
  list-style: none;
}

.product-pagination li {
  margin: 0 5px;
  transition: 0.3s;
}

.product-pagination li a {
  color: color-mix(in srgb, var(--default-color), transparent 40%);
  padding: 7px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-pagination li a.active,
.product-pagination li a:hover {
  background: var(--accent-color);
  color: var(--contrast-color);
}

.product-pagination li a.active a,
.product-pagination li a:hover a {
  color: var(--contrast-color);
}

/*--------------------------------------------------------------
# product Details Section
--------------------------------------------------------------*/
.product-details {
  padding-bottom: 30px;
}

.product-details .article {
  background-color: var(--surface-color);
  padding: 30px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.product-details .post-img {
  margin: -30px -30px 20px -30px;
  overflow: hidden;
}

.product-details .title {
  color: var(--heading-color);
  font-size: 28px;
  font-weight: 700;
  padding: 0;
}

.product-details .content {
  margin-top: 20px;
}

.product-details .content h3 {
  font-size: 22px;
  margin-top: 30px;
  font-weight: bold;
}

.product-details .content blockquote {
  overflow: hidden;
  background-color: color-mix(in srgb, var(--default-color), transparent 95%);
  padding: 60px;
  position: relative;
  text-align: center;
  margin: 20px 0;
}

.product-details .content blockquote p {
  color: var(--default-color);
  line-height: 1.6;
  margin-bottom: 0;
  font-style: italic;
  font-weight: 500;
  font-size: 22px;
}

.product-details .content blockquote:after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background-color: var(--accent-color);
  margin-top: 20px;
  margin-bottom: 20px;
}

.product-details .meta-top {
  margin-top: 20px;
  color: color-mix(in srgb, var(--default-color), transparent 40%);
}

.product-details .meta-top ul {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  align-items: center;
  padding: 0;
  margin: 0;
}

.product-details .meta-top ul li+li {
  padding-left: 20px;
}

.product-details .meta-top i {
  font-size: 16px;
  margin-right: 8px;
  line-height: 0;
  color: color-mix(in srgb, var(--default-color), transparent 40%);
}

.product-details .meta-top a {
  color: color-mix(in srgb, var(--default-color), transparent 40%);
  font-size: 14px;
  display: inline-block;
  line-height: 1;
}

.product-details .meta-bottom {
  padding-top: 10px;
  border-top: 1px solid color-mix(in srgb, var(--default-color), transparent 90%);
}

.product-details .meta-bottom i {
  color: color-mix(in srgb, var(--default-color), transparent 40%);
  display: inline;
}

.product-details .meta-bottom a {
  color: color-mix(in srgb, var(--default-color), transparent 40%);
  transition: 0.3s;
}

.product-details .meta-bottom a:hover {
  color: var(--accent-color);
}

.product-details .meta-bottom .cats {
  list-style: none;
  display: inline;
  padding: 0 20px 0 0;
  font-size: 14px;
}

.product-details .meta-bottom .cats li {
  display: inline-block;
}

.product-details .meta-bottom .tags {
  list-style: none;
  display: inline;
  padding: 0;
  font-size: 14px;
}

.product-details .meta-bottom .tags li {
  display: inline-block;
}

.product-details .meta-bottom .tags li+li::before {
  padding-right: 6px;
  color: var(--default-color);
  content: ",";
}

.product-details .meta-bottom .share {
  font-size: 16px;
}

.product-details .meta-bottom .share i {
  padding-left: 5px;
}

/*--------------------------------------------------------------
# product Author Section
--------------------------------------------------------------*/
.product-author {
  padding: 10px 0 40px 0;
}

.product-author .author-container {
  background-color: var(--surface-color);
  padding: 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.product-author img {
  max-width: 120px;
  margin-right: 20px;
}

.product-author h4 {
  font-weight: 600;
  font-size: 20px;
  margin-bottom: 0px;
  padding: 0;
  color: color-mix(in srgb, var(--default-color), transparent 20%);
}

.product-author .social-links {
  margin: 0 10px 10px 0;
}

.product-author .social-links a {
  color: color-mix(in srgb, var(--default-color), transparent 60%);
  margin-right: 5px;
}

.product-author p {
  font-style: italic;
  color: color-mix(in srgb, var(--default-color), transparent 30%);
  margin-bottom: 0;
}

/*--------------------------------------------------------------
# product Comments Section
--------------------------------------------------------------*/
.product-comments {
  padding: 10px 0;
}

.product-comments .comments-count {
  font-weight: bold;
}

.product-comments .comment {
  margin-top: 30px;
  position: relative;
}

.product-comments .comment .comment-img {
  margin-right: 14px;
}

.product-comments .comment .comment-img img {
  width: 60px;
}

.product-comments .comment h5 {
  font-size: 16px;
  margin-bottom: 2px;
}

.product-comments .comment h5 a {
  font-weight: bold;
  color: var(--default-color);
  transition: 0.3s;
}

.product-comments .comment h5 a:hover {
  color: var(--accent-color);
}

.product-comments .comment h5 .reply {
  padding-left: 10px;
  color: color-mix(in srgb, var(--default-color), transparent 20%);
}

.product-comments .comment h5 .reply i {
  font-size: 20px;
}

.product-comments .comment time {
  display: block;
  font-size: 14px;
  color: color-mix(in srgb, var(--default-color), transparent 40%);
  margin-bottom: 5px;
}

.product-comments .comment.comment-reply {
  padding-left: 40px;
}

/*侧边栏*/
/*--------------------------------------------------------------
# Widgets
--------------------------------------------------------------*/
.widgets-container {
  background-color: var(--surface-color);
  padding: 30px;
  margin: 60px 0 30px 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.widget-title {
  color: var(--heading-color);
  font-size: 20px;
  font-weight: 700;
  padding: 0;
  margin: 0 0 20px 0;
}

.widget-item {
  margin-bottom: 40px;
}

.widget-item:last-child {
  margin-bottom: 0;
}

.search-widget form {
  background: var(--background-color);
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 70%);
  padding: 3px 10px;
  position: relative;
  transition: 0.3s;
}

.search-widget form input[type=text] {
  border: 0;
  padding: 4px;
  border-radius: 4px;
  width: calc(100% - 40px);
  background-color: var(--background-color);
  color: var(--default-color);
}

.search-widget form input[type=text]:focus {
  outline: none;
}

.search-widget form button {
  background: var(--accent-color);
  color: var(--contrast-color);
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  border: 0;
  font-size: 16px;
  padding: 0 15px;
  margin: -1px;
  transition: 0.3s;
  border-radius: 0 4px 4px 0;
  line-height: 0;
}

.search-widget form button i {
  line-height: 0;
}

.search-widget form button:hover {
  background: color-mix(in srgb, var(--accent-color), transparent 20%);
}

.search-widget form:is(:focus-within) {
  border-color: var(--accent-color);
}


/*--------------------------------------------------------------
# 产品分类侧边栏
--------------------------------------------------------------*/
.product-categories-sidebar {
  font-family: inherit;
}

.product-category-all {
  margin-bottom: 0;
}

.product-category-all .product-category-link {
  display: block;
  padding: 12px 15px;
  color: #333;
  text-decoration: none;
  background-color: #fff;
  border-bottom: 1px solid #eee;
  transition: all 0.3s ease;
  font-weight: 500;
}

.product-category-all .product-category-link:hover,
.product-category-all .product-category-link.active {
  background-color: #e0004e;
  color: #fff;
}

.product-category-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.product-category-item {
  border-bottom: 1px solid #eee;
  margin: 0;
}

.product-category-item:last-child {
  border-bottom: none;
}

.product-category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

/* 一级分类链接样式 */
.product-category-link {
  flex: 1;
  display: block;
  padding: 12px 15px;
  color: #333;
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 500;
}

/* 一级分类链接hover效果 */
.product-category-link:hover {
  background-color: #e0004e;
  color: #fff;
}

/* 一级分类链接激活状态 */
.product-category-link.active {
  background-color: #e0004e;
  color: #fff;
}

/* 当一级分类项激活时，链接也要激活 */
.product-category-item.active .product-category-link {
  background-color: #e0004e;
  color: #fff;
}

.category-toggle {
  position: absolute;
  right: 15px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
}

.category-toggle i {
  font-size: 14px;
  color: #666;
  transition: transform 0.3s ease, color 0.3s ease;
}

/* 激活状态下箭头颜色变为白色 */
.product-category-item.active .category-toggle i,
.product-category-link:hover~.category-toggle i,
.product-category-link.active~.category-toggle i {
  color: #fff;
}

.product-category-item.show-children .category-toggle i {
  transform: rotate(180deg);
}

/* 二级分类样式 */
.product-subcategory-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background-color: #f9f9f9;
}

.product-subcategory-list.show {
  max-height: 500px;
}

.product-subcategory-item {
  border-bottom: 1px solid #eee;
}

.product-subcategory-item:last-child {
  border-bottom: none;
}

.product-subcategory-link {
  display: block;
  padding: 10px 15px 10px 30px;
  color: #666;
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 14px;
}

/* 二级分类链接hover效果 */
.product-subcategory-link:hover {
  background-color: #e0004e;
  color: #fff;
  padding-left: 35px;
}

/* 二级分类链接激活状态 */
.product-subcategory-item.active .product-subcategory-link {
  background-color: #e0004e;
  color: #fff;
  padding-left: 35px;
}

.no-categories {
  color: #666;
  text-align: center;
  padding: 20px;
  margin: 0;
  font-size: 14px;
}

/*产品详情页轮播图*/
/* 轮播图区域样式 */
.product-carousel {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background-color: #f8f8f8;
  padding: 15px;
}

/* 大图展示区域 */
.main-carousel {
  position: relative;
  width: 100%;
  margin-bottom: 15px;
  overflow: hidden;
  cursor: zoom-in;
  border-radius: 6px;
  background-color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.main-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.main-image:hover {
  transform: scale(1.02);
}

/* 缩略图区域 */
.thumbnail-carousel {
  display: flex;
  gap: 10px;
  padding: 10px 5px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.thumbnail-carousel::-webkit-scrollbar {
  height: 4px;
}

.thumbnail-carousel::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 2px;
}

.thumbnail-item {
  flex: 0 0 auto;
  width: 80px;
  height: 80px;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  background-color: #fff;
}

.thumbnail-item.active {
  border-color: var(--accent-color, #e0004e);
  box-shadow: 0 0 8px rgba(224, 0, 78, 0.3);
}

.thumbnail-item:hover {
  border-color: var(--accent-color, #e0004e);
}

.thumbnail-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 图片预览模态框 */
.image-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 10000;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.image-modal.show {
  display: flex;
  opacity: 1;
}

.modal-content {
  max-width: 90%;
  max-height: 90%;
  position: relative;
  animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal-image {
  width: 100%;
  height: auto;
  max-height: 80vh;
  object-fit: contain;
}

.close-modal {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
  z-index: 10001;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-modal:hover {
  color: #ccc;
  transform: rotate(90deg);
}

.modal-nav {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  padding: 0 20px;
  z-index: 10001;
}

.nav-btn {
  background-color: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 24px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  transition: 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-btn:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

.nav-btn.prev-btn i {
  margin-right: 2px;
}

.nav-btn.next-btn i {
  margin-left: 2px;
}

/* 产品信息表格样式优化 */
.product-attributes .list-group {
  margin-bottom: 8px;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid #dee2e6;
}

.product-attributes .list-group-item {
  border: none;
  border-radius: 0;
  padding: 12px 15px;
  font-size: 14px;
}

/* 标签样式（用于customization和delivery method） */
.option-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.option-tag {
  background-color: #e9ecef;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 12px;
  color: #495057;
  white-space: nowrap;
}

/* 产品操作按钮 */
.product-actions {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.action-btn {
  margin-right: 10px;
  min-width: 150px;
}

/* 相关产品 */
.related-products {
  margin-top: 50px;
  padding-top: 30px;
  border-top: 1px solid #eee;
}

.related-title {
  margin-bottom: 30px;
  font-size: 1.5rem;
  color: var(--heading-color);
  position: relative;
  padding-bottom: 10px;
}

.related-title:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--accent-color, #e0004e);
}

.related-item {
  margin-bottom: 30px;
  transition: transform 0.3s ease;
}

.related-item:hover {
  transform: translateY(-5px);
}

.related-img-container {
  min-height: 200px;
  overflow: hidden;
  border-radius: 6px;
  margin-bottom: 15px;
}

.related-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.related-item:hover .related-img {
  transform: scale(1.05);
}

.related-name {
  display: block;
  font-size: 1rem;
  color: var(--heading-color);
  text-decoration: none;
  transition: color 0.3s ease;
  font-weight: 500;
}

.related-name:hover {
  color: var(--accent-color, #e0004e);
  text-decoration: none;
}

.no-related {
  text-align: center;
  padding: 30px;
  color: #666;
}

/* 响应式调整 */
@media (max-width: 992px) {
  .main-carousel {
    height: 350px;
  }

  .product-actions .btn {
    width: 100%;
    margin-bottom: 10px;
    margin-right: 0;
  }
}

@media (max-width: 768px) {
  .main-carousel {
    height: 300px;
  }

  .thumbnail-item {
    width: 70px;
    height: 70px;
  }

  .related-img-container {
    height: 150px;
  }
}

/*产品详情页*/
.product-details .product-description img{
  width: 100%!important;
}