/* ============================================
   Product Detail Page Styles
   ============================================ */

.product-detail {
    padding-top: var(--nav-height);
    min-height: 100vh;
    background: var(--color-bg);
}

/* --- Breadcrumb --- */
.detail-breadcrumb {
    padding: 16px var(--page-padding);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.detail-breadcrumb a {
    color: var(--color-text-light);
    transition: color 0.3s;
}

.detail-breadcrumb a:hover {
    color: var(--color-primary);
}

.breadcrumb-sep {
    color: rgba(0, 0, 0, 0.2);
}

.breadcrumb-current {
    color: var(--color-primary);
    font-weight: 500;
}

.detail-layout {
    display: flex;
    height: calc(100vh - var(--nav-height));
}

/* --- Image Gallery (Swiper Style) --- */
.detail-gallery {
    width: 55%;
    display: flex;
    flex-direction: column;
    padding-left: var(--page-padding);
}

.gallery-swiper {
    position: relative;
    overflow: hidden;
    flex: 1;
    cursor: grab;
    -webkit-user-select: none;
    user-select: none;
}

.gallery-swiper:active {
    cursor: grabbing;
}

.swiper-track {
    display: flex;
    height: 100%;
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.swiper-track.dragging {
    transition: none;
}

.swiper-slide {
    flex: 0 0 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.swiper-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    cursor: zoom-in;
    pointer-events: none;
}

.swiper-nav {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 24px;
    z-index: 2;
}

.swiper-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: var(--color-bg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    transition: background 0.2s, border-color 0.2s;
}

.swiper-btn:hover {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.2);
}

.swiper-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.swiper-counter {
    font-size: 13px;
    color: var(--color-text-light);
    min-width: 48px;
    text-align: center;
}

/* --- Product Info --- */
.detail-info {
    width: 45%;
    padding: 60px var(--page-padding);
    display: flex;
    flex-direction: column;
}

.detail-info-inner {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow-y: auto;
    scrollbar-width: none;          /* Firefox */
    -ms-overflow-style: none;      /* IE/Edge */
}

.detail-info-inner::-webkit-scrollbar {
    display: none;                  /* Chrome/Safari */
}

.detail-name {
    font-family: var(--font-heading);
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 600;
    line-height: 1.1;
    color: var(--color-primary);
    margin-bottom: 24px;
}

.detail-specs {
    /* 与 Color 标签保持和规格行一致的行距 */
    margin-bottom: 10px;
}

.spec-row {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.spec-label {
    width: 140px;
    flex-shrink: 0;
    font-size: 14px;
    color: var(--color-text-light);
}

.spec-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-primary);
}

.detail-colors {
    display: flex;
    align-items: flex-start;
    margin-bottom: 24px;
}

.color-label {
    width: 140px;
    flex-shrink: 0;
    font-size: 14px;
    color: var(--color-text-light);
}

.color-thumbs {
    flex: 1;
    min-width: 0;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.color-thumb {
    position: relative;
    display: block;
    width: 76px;
    height: 76px;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: var(--color-bg-light);
    transition: border-color 0.2s;
}

.color-thumb:hover {
    border-color: rgba(0, 0, 0, 0.35);
}

.color-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.color-thumb.active {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 1px var(--color-primary);
    cursor: default;
}

.detail-description {
    margin-bottom: 32px;
    flex: 1;
}

.desc-title {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--color-primary);
    margin-bottom: 12px;
}

.detail-description p {
    font-size: 15px;
    line-height: 1.8;
    color: var(--color-text-light);
    white-space: pre-line;
}

.inquire-btn {
    display: inline-block;
    width: 100%;
    padding: 16px 24px;
    background: var(--color-primary);
    color: var(--color-white);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 2px;
    text-align: center;
    text-transform: uppercase;
    transition: all 0.3s var(--ease-smooth);
    margin-bottom: 28px;
}

.inquire-btn:hover {
    background: var(--color-secondary);
    transform: translateY(-2px);
}

.detail-help {
    padding: 24px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 8px;
}

.detail-help p {
    font-size: 15px;
    line-height: 1.6;
    color: var(--color-primary);
    font-weight: 500;
}

.help-desc {
    font-size: 14px !important;
    color: var(--color-text-light) !important;
    font-weight: 400 !important;
    margin: 8px 0 12px;
}

.help-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: opacity 0.3s;
}

.help-link:hover {
    opacity: 0.7;
}

/* --- History Section --- */
.detail-history {
    padding: 60px var(--page-padding) 80px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.history-title {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--color-text-light);
    margin-bottom: 24px;
}

.history-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
}

.history-item {
    display: block;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s var(--ease-out);
}

.history-item:hover {
    transform: translateY(-4px);
}

.history-img {
    aspect-ratio: 1/1;
    overflow: hidden;
    background: var(--color-bg-light);
}

.history-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease-out);
}

.history-item:hover .history-img img {
    transform: scale(1.05);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .detail-gallery {
        width: 50%;
    }

    .detail-info {
        width: 50%;
        padding: 40px var(--page-padding);
    }

    .history-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (max-width: 768px) {
    .detail-layout {
        flex-direction: column;
        height: auto;
    }

    .detail-gallery {
        width: 100%;
        padding-left: 0;
    }

    .gallery-swiper {
        flex: none;
        aspect-ratio: 3 / 4;
    }

    .detail-info {
        width: 100%;
        padding: 24px var(--page-padding);
        display: block;
    }

    .detail-info-inner {
        display: block;
    }

    .detail-description {
        flex: none;
    }

    .detail-name {
        font-size: 36px;
    }

    .spec-label {
        width: 110px;
    }

    .color-label {
        width: 110px;
    }

    .history-grid {
        display: flex;
        gap: 10px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding-bottom: 4px;
        margin: 0 calc(-1 * var(--page-padding));
        padding-left: var(--page-padding);
        padding-right: var(--page-padding);
    }

    .history-grid::-webkit-scrollbar {
        display: none;
    }

    .history-item {
        flex: 0 0 40%;
        max-width: 40%;
    }
}
