@charset "utf-8";
/* =========================================================
 * product.css — 产品详情页（product.html）专属样式
 * 引入顺序：layout.css → product.css
 * ========================================================= */

/* ---------- 详情主区 ---------- */
.product-detail {
    /* padding: 0 8% 40px; */
    /* max-width: 1200px; */
    /* margin: 0 auto; */
}

/* 顶行：左图 + 右购买信息（来自原 product.html 内联结构） */
.product-top-row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 50px;
    align-items: start;
    margin-bottom: 40px;
}

/* ---------- 图库 ---------- */
.product-gallery {
    position: sticky;
    top: 20px;
}
.main-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px;
    background-color: #fff;
    margin-bottom: 12px;
}
.thumbnail-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
.thumbnail {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s;
    background-color: #fff;
}
.thumbnail:hover,
.thumbnail.active { border-color: var(--color-orange); }

/* ---------- 购买信息 ---------- */
.product-info h1 {
    font-size: 32px;
    color: var(--color-dark-green);
    margin-bottom: 8px;
    font-weight: 700;
}
.product-sku {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}
.product-price {
    font-size: 28px;
    font-weight: bold;
    color: var(--color-orange);
    margin-bottom: 25px;
}
.product-price span {
    font-size: 14px;
    color: #666;
    font-weight: normal;
}

.product-desc {
    font-size: 15px;
    color: #444;
    margin-bottom: 20px;
    line-height: 1.8;
}
.product-features {
    list-style: none;
    margin-bottom: 10px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px 30px;
}
.product-features li {
    font-size: 14px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.product-features li::before {
    content: "✓";
    color: var(--color-dark-green);
    font-weight: bold;
    width: 20px;
    height: 20px;
    border: 1.5px solid var(--color-dark-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    flex-shrink: 0;
}

/* ---------- 定制选项 ---------- */
.options-group {margin-top: 20px;margin-bottom: 20px;}
.options-group label {
    display: block;
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 8px;
    color: #333;
}
.color-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.color-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #ddd;
    transition: border-color 0.2s;
}
.color-dot:hover,
.color-dot.active { border-color: var(--color-dark-green); }

.quantity-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
}
.quantity-btn {
    width: 36px;
    height: 36px;
    border: 2px solid var(--color-dark-green);
    background: #fff;
    color: var(--color-dark-green);
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}
.quantity-btn:hover {
    background: var(--color-dark-green);
    color: #fff;
}
.quantity-input {
    width: 80px;
    height: 36px;
    text-align: center;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
}

.btn-inquiry {
    width: 100%;
    background-color: var(--color-orange);
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.2s;
    margin-bottom: 15px;
}
.btn-inquiry:hover { opacity: 0.9; }

.btn-secondary {
    width: 100%;
    background: transparent;
    color: var(--color-dark-green);
    border: 2px solid var(--color-dark-green);
    padding: 12px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-secondary:hover {
    background: var(--color-dark-green);
    color: #fff;
}

/* ---------- Tab 切换 ---------- */
.product-tab-section {
    border-top: 2px solid rgba(45, 74, 51, 0.1);
    padding-top: 0;
}
.tab-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    margin-top: -2px;
}
.tab-btn {
    background: transparent;
    border: 2px solid transparent;
    border-bottom: none;
    color: var(--color-dark-green);
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 4px 4px 0 0;
    transition: all 0.2s;
    margin-top: -2px;
}
.tab-btn:hover { color: var(--color-orange); }
.tab-btn.active {
    border-color: rgba(45, 74, 51, 0.1);
    border-top: 3px solid var(--color-orange);
    background-color: var(--color-beige);
    color: var(--color-orange);
}
.tab-pane {
    display: none;
    animation: fadeIn 0.3s ease;
}
.tab-pane.active { display: block; }

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

/* ---------- 规格参数表 ---------- */
.specs-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    border-radius: 6px;
    overflow: hidden;
}
.specs-table th,
.specs-table td {
    padding: 14px 20px;
    text-align: left;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}
.specs-table th {
    background-color: var(--color-dark-green);
    color: #fff;
    font-weight: 600;
    width: 30%;
}
.specs-table tr:last-child th,
.specs-table tr:last-child td { border-bottom: none; }

/* ---------- 相关产品 ---------- */
.related-section {
    padding: 20px 8% 50px;
    max-width: 1200px;
    margin: 0 auto;
    border-top: 1px solid rgba(45, 74, 51, 0.1);
    padding-top: 40px;
}
.related-section h2 {
    font-size: 22px;
    color: var(--color-dark-green);
    margin-bottom: 25px;
    font-weight: 700;
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.product-card-info { padding: 10px 12px; }
.product-card-name {
    text-align: center;
    font-size: 14px;
    font-weight: bold;
    color: var(--color-dark-green);
    margin-bottom: 3px;
}
.product-card-price {
    font-size: 13px;
    color: var(--color-orange);
    font-weight: 600;
}

/* =========================================================
 * 响应式（产品详情专属）
 * ========================================================= */
@media (max-width: 992px) {
    .product-top-row {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .product-gallery {
        position: static;
        max-width: 500px;
        margin: 0 auto;
    }
    .related-grid { grid-template-columns: repeat(2, 1fr); }
    .product-features { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .product-info h1 { font-size: 26px; }
    .tab-btn {
        padding: 10px 16px;
        font-size: 14px;
        flex: 1;
        text-align: center;
    }
    .tab-nav { gap: 5px; }
}

@media (max-width: 600px) {
    .related-grid {
        grid-template-columns: 1fr;
        max-width: 280px;
        margin: 0 auto;
    }
    .thumbnail-list { gap: 8px; }
    .specs-table th,
    .specs-table td {
        padding: 10px 12px;
        font-size: 13px;
    }
}
