/* 产品系统样式 - 优化版 */
.mps-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
}

.mps-page-title {
    text-align: center;
    margin-bottom: 40px;
    color: #2c3e50;
    font-size: 2.2em;
    font-weight: 700;
    position: relative;
    padding-bottom: 15px;
}

.mps-page-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: #ff5d00;
}

/* 产品网格布局 - 一行5个产品 */
.mps-product-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}

/* 产品项样式 */
.mps-product-item {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.mps-product-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

/* 产品图片样式 */
.mps-product-item .mps-product-image {
    position: relative;
    overflow: hidden;
    padding-top: 75%; /* 4:3 比例 */
}

.mps-product-item .mps-product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.mps-product-item:hover .mps-product-image img {
    transform: scale(1.05);
}

/* 产品信息容器 */
.mps-product-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* 产品标题样式 - 三行截断 */
.mps-product-title {
    margin: 0 0 12px 0;
    padding:0 5px;
    font-size: 1.1em;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 4.2em; /* 3行 x 1.4行高 */
}

.mps-product-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.mps-product-link:hover .mps-product-title {
    color: #ff5d00;
}

/* 价格和销量样式 */
.mps-product-price {
    padding:0 10px;
    color: #e74c3c;
    font-size: 1.3em;
    font-weight: 700;
    margin: 8px 0;
}

.mps-product-sales {
    padding:0 10px;
    color: #7f8c8d;
    font-size: 0.9em;
    margin: 5px 0;
    display: flex;
    align-items: center;
}

.mps-product-sales:before {
    content: "✓";
    margin-right: 5px;
    color: #27ae60;
}

/* 产品描述样式 */
.mps-product-excerpt {
    margin-top: 12px;
    color: #666;
    font-size: 0.95em;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-grow: 1;
}

/* 购买按钮样式 */
.mps-product-external-link {
    margin-top: 15px;
}

.mps-buy-button {
    display: block;
    width: 100%;
    padding: 12px;
    background: #ff5d00;
    color: white;
    text-decoration: none !important;
    border-radius: 6px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.mps-buy-button:hover {
    background: #fd7e14;
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
}

.mps-pagination .page-numbers.current {
    background: #ff5d00;
    color: white;
}

.mps-pagination .page-numbers:hover {
    background: #ff5d00;
    color: white;
    transform: translateY(-2px);
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .mps-product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .mps-product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .mps-product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .mps-container {
        padding: 20px 15px;
    }
}

@media (max-width: 480px) {
    .mps-product-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .mps-page-title {
        font-size: 1.8em;
        margin-bottom: 30px;
    }
}

/* 分类页面标题样式 */
.mps-page-header {
    margin-bottom: 40px;
    text-align: center;
}

.mps-term-description {
    font-size: 1.1em;
    color: #666;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

/* 无产品提示 */
.mps-product-grid > p {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
    font-size: 1.1em;
}


/* 后台样式 */
.mps-product-meta-fields {
    padding: 15px;
    background: #f5f5f5;
    border: 1px solid #ddd;
}

.mps-product-meta-fields label {
    display: inline-block;
    width: 120px;
    font-weight: 600;
}

.mps-product-meta-fields input {
    width: 70%;
    padding: 8px;
    margin-bottom: 10px;
}


/* 分页样式 */
.mps-pagination {
    grid-column: 1 / -1;
    margin-top: 50px;
    text-align: center;
}

.mps-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    margin: 0 4px;
    border-radius: 8px;
    background: #fff;
    color: #ff5d00;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid #e9ecef;
    min-width: 45px;
    height: 45px;
}


.mps-pagination ul {
    display: flex !important;
    border:0 none !important;
}
.mps-pagination ul:hover{
    display: flex !important;
    border:0 none !important;
    background:#FFF !important;
    transform: 0 !important;
    box-shadow: 0 0 0 #FFF !important;
}

.mps-pagination .page-numbers.current {
    background: #ff5d00;
    color: white;
    border-color: #ff5d00;
    transform: scale(1.05);
}

.mps-pagination .page-numbers.dots {
    background: transparent;
    border: none;
    color: #ff5d00;
}

.mps-pagination .page-numbers:hover:not(.current):not(.dots) {
    background: #ff5d00;
    color: white;
    border-color: #ff5d00;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.mps-pagination .page-numbers.prev,
.mps-pagination .page-numbers.next {
    font-weight: bold;
    padding: 10px 20px;
}

.mps-pagination .page-numbers.prev:hover,
.mps-pagination .page-numbers.next:hover {
    background: #fd7e14;
    border-color: #fd7e14;
}

/* 确保分页列表布局正确 */
.mps-pagination ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.mps-pagination ul li {
    display: inline-block;
}

/* 响应式分页 */
@media (max-width: 768px) {
    .mps-pagination .page-numbers {
        padding: 8px 12px;
        min-width: 40px;
        height: 40px;
        font-size: 0.9em;
        margin: 0 2px;
    }
    
    .mps-pagination .page-numbers.prev,
    .mps-pagination .page-numbers.next {
        padding: 8px 15px;
    }
    
    .mps-pagination ul {
        gap: 5px;
    }
}

@media (max-width: 480px) {
    .mps-pagination .page-numbers {
        padding: 6px 10px;
        min-width: 35px;
        height: 35px;
        font-size: 0.85em;
    }
    
    .mps-pagination ul {
        gap: 3px;
    }
}

/* 产品详情页主布局 */
.mps-product-single {
  max-width: 1200px;
  margin: 0 auto;
}

.mps-product-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  margin-bottom: 80px;
  align-items: start;
}

.mps-product-gallery img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.mps-product-summary {
  padding-top: 20px;
}

.mps-info-product-title {
  font-size: 2.2em;
  color: #2c3e50;
  margin-bottom: 20px;
  line-height: 1.2;
}

.mps-product-meta {
  margin-bottom: 25px;
}

.mps-info-product-sales {
    padding:0 10px;
    color: #7f8c8d;
    font-size: 2em;
    margin: 5px 0;
    display: flex;
    align-items: center;
}

.mps-info-product-sales:before {
    content: "✓";
    margin-right: 5px;
    color: #27ae60;
}

.mps-info-product-price {
  color: #e74c3c;
  font-size: 2em;
  font-weight: bold;
  margin-right: 20px;
}

.mps-product-content {
  line-height: 1.8;
  color: #34495e;
  margin-bottom: 30px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .mps-product-main {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

/* 相关产品区域 */
.mps-related-products {
  border-top: 1px solid #ecf0f1;
  padding-top: 60px;
}

.mps-related-title {
  position: relative;
  text-align: center;
  font-size: 1.8em;
  color: #2c3e50;
  margin-bottom: 40px;
}

.mps-related-title:after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: #ff5d00;
}

.mps-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 25px;
  margin-bottom: 40px;
}

.mps-related-item {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.mps-related-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.12);
}

.mps-related-item a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.mps-related-item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.mps-related-item h3 {
  padding: 15px 15px 5px;
  font-size: 1.1em;
  margin: 0;
  line-height: 1.4;
  color: #2c3e50;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 3em;
}

.mps-related-price {
  padding: 0 15px 15px;
  color: #e74c3c;
  font-weight: bold;
  margin: 0;
}

.mps-related-more {
  text-align: center;
}

.mps-more-button {
  display: inline-block;
  padding: 12px 30px;
  background: #ff5d00;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.mps-more-button:hover {
  background: #fd7e14;;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}