/* 基础样式设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

/* 容器样式 */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 头部样式 */
header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
    text-decoration: none;
}

/* 导航菜单 */
nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 25px;
}

nav ul li a {
    text-decoration: none;
    color: #2c3e50;
    font-weight: 500;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #8e44ad;
}

/* 语言选择器 */
.language-selector {
    display: flex;
    gap: 10px;
}

.language-btn {
    background: none;
    border: 1px solid #ddd;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
}

.language-btn.active {
    background-color: #8e44ad;
    color: white;
    border-color: #8e44ad;
}

/* 促销横幅 */
.promo-banner {
    background-color: #8e44ad;
    color: white;
    text-align: center;
    padding: 12px 0;
    margin-bottom: 30px;
}

.ramadan-banner {
    background-color: #d35400;
    color: white;
    text-align: center;
    padding: 15px 0;
    margin: 20px 0;
    cursor: pointer;
    transition: background-color 0.3s;
}

.ramadan-banner:hover {
    background-color: #e67e22;
}

/* 产品分类 */
.categories {
    display: flex;
    justify-content: center;
    margin: 30px 0;
    flex-wrap: wrap;
    gap: 15px;
}

.category-btn {
    background-color: white;
    border: 1px solid #ddd;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.category-btn:hover, .category-btn.active {
    background-color: #8e44ad;
    color: white;
    border-color: #8e44ad;
}

/* 产品展示区 */
.product-section {
    margin: 40px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
}

/* 产品卡片 */
.product-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.new-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #e74c3c;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.product-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.product-info {
    padding: 15px;
}

.product-name {
    /* 确保标题只显示一行 */
    white-space: nowrap;
    /* 隐藏超出容器的内容 */
    overflow: hidden;
    /* 用省略号表示被隐藏的内容 */
    text-overflow: ellipsis;
    /* 可选：设置固定宽度限制（根据布局调整） */
    max-width: 100%;
}

.product-price {
    font-weight: bold;
    color: #8e44ad;
    margin-bottom: 10px;
}

/* 产品详情页 */
.product-detail-container {
    display: flex;
    gap: 30px;
    margin: 40px 0;
}

.product-gallery {
    flex: 1;
}

.main-image {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

.thumbnail-images {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    cursor: pointer;
    border-radius: 4px;
    border: 2px solid transparent;
}

.thumbnail.active {
    border-color: #8e44ad;
}

.product-details {
    flex: 1;
}

.product-title {
    font-size: 24px;
    margin-bottom: 15px;
    color: #2c3e50;
}

.product-price-detail {
    font-size: 22px;
    font-weight: bold;
    color: #8e44ad;
    margin-bottom: 20px;
}

.product-description {
    margin-bottom: 20px;
    line-height: 1.8;
}

/* 颜色选择器 */
.color-options {
    margin: 20px 0;
}

.color-options h4 {
    margin-bottom: 10px;
}

.colors {
    display: flex;
    gap: 10px;
}

.color {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
}

.color.selected {
    border-color: #333;
}

/* 尺寸选择器 */
.size-options {
    margin: 20px 0;
}

.size-options h4 {
    margin-bottom: 10px;
}

.sizes {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.size {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    cursor: pointer;
    transition: all 0.3s;
}

.size.selected {
    background-color: #8e44ad;
    color: white;
    border-color: #8e44ad;
}

/* 数量选择器 */
.quantity-selector {
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.quantity-input {
    width: 50px;
    height: 30px;
    text-align: center;
    border: 1px solid #ddd;
}

/* 按钮样式 */
.whatsapp-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: #25d366;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 20px;
}

.whatsapp-btn:hover {
    background-color: #20b955;
}

/* 评价部分 */
.reviews-section {
    margin: 50px 0;
}

.review-filters {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.review {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.review-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.reviewer-name {
    font-weight: bold;
}

.review-date {
    color: #777;
    font-size: 14px;
}

.review-images {
    display: flex;
    gap: 10px;
    margin: 10px 0;
}

.review-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.review-actions {
    margin-top: 10px;
}

.delete-review {
    color: #e74c3c;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.page-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.page-btn.active {
    background-color: #8e44ad;
    color: white;
    border-color: #8e44ad;
}

/* 社媒图标 */
.social-media {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 40px 0;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    text-decoration: none;
    transition: transform 0.3s;
}

.social-icon:hover {
    transform: scale(1.1);
}

.facebook {
    background-color: #3b5998;
}

.instagram {
    background: linear-gradient(45deg, #405de6, #5851db, #833ab4, #c13584, #e1306c, #fd1d1d);
}

.twitter {
    background-color: #1da1f2;
}

.pinterest {
    background-color: #bd081c;
}

.youtube {
    background-color: #ff0000;
}

.tiktok {
    background-color: #000000;
}

/* 物流查询 */
.tracking-section {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin: 40px 0;
    text-align: center;
}

.tracking-form {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    gap: 10px;
}

.tracking-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.tracking-btn {
    background-color: #8e44ad;
    color: white;
    border: none;
    padding: 0 20px;
    border-radius: 4px;
    cursor: pointer;
}

/* 关于我们页面 */
.about-section {
    margin: 40px 0;
}

.license-container {
    text-align: center;
    margin: 30px 0;
}

.license-image {
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 4px;
}

/* 页脚 */
footer {
    background-color: #2c3e50;
    color: white;
    padding: 40px 0 20px;
    margin-top: 50px;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

.footer-column h3 {
    margin-bottom: 20px;
    font-size: 18px;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul li a {
    color: #ddd;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-column ul li a:hover {
    color: white;
}

.contact-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
    font-size: 14px;
    color: #aaa;
}

/* 页脚联系方式图标样式 */
.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.contact-icon {
    width: 16px;
    text-align: center;
    margin-right: 10px;
    color: #ddd;
    font-size: 14px;
}

.rtl .contact-icon {
    margin-right: 0;
    margin-left: 10px;
}

.contact-item a {
    color: #ddd;
    text-decoration: none;
    transition: color 0.3s;
    flex: 1;
}

.contact-item a:hover {
    color: white;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(6, 1fr);
    }
    
    .footer-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .product-detail-container {
        flex-direction: column;
    }
    
    .main-image {
        height: 350px;
    }
}

@media (max-width: 576px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr); /* 手机一行2个产品 */
    }
    
    nav ul {
        display: none; /* 在手机上隐藏导航，可改为汉堡菜单 */
    }
    
    .header-container {
        flex-wrap: wrap;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
    }
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

.btn {
    background-color: #8e44ad;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #7d3c98;
}

/* 政策页面样式 */
.policy-page {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin: 40px 0;
}

.policy-page h1 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.policy-page h2 {
    margin: 20px 0 10px;
    color: #2c3e50;
}

.policy-page p {
    margin-bottom: 15px;
    line-height: 1.8;
}

/* 评价提交表单 */
.review-form {
    background-color: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 40px;
}

.review-form h3 {
    margin-bottom: 20px;
}

.image-upload {
    border: 2px dashed #ddd;
    padding: 30px;
    text-align: center;
    margin-bottom: 20px;
    cursor: pointer;
}

.image-upload input {
    display: none;
}

/* 统一联系方式链接颜色 */
.contact-link {
    color: #1a56db; /* 可以替换为你需要的颜色值 */
    text-decoration: none; /* 可选：去除下划线 */
}

/* 可选：添加 hover 效果 */
.contact-link:hover {
    color: #0d3ba6; /*  hover 时的颜色，比主色稍深 */
    text-decoration: underline; /* 可选：hover 时显示下划线 */
}

.footer-column .contact-item a {
  color: white; /* 设置为白色 */
  text-decoration: none; /* 可选：去除下划线 */
}