* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #ffffff;
    color: #1a1a1a;
    line-height: 1.4;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

/* 导航栏 - 半透明磨砂，悬浮在轮播图上方 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(18, 20, 24, 0.7);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.15);
    z-index: 20;
    padding: 0;
}

.nav-container {
    width: 100%;
    margin: 0;
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: center;
    padding: 16px 0;
    position: relative;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-left: 24px;
}

.logo-bg {
    width: 48px;
    height: 48px;
    background: url('img/logo.png') no-repeat center center;
    background-size: contain;
    border-radius: 12px;
}

.shop-name {
    font-weight: 700;
    font-size: 1.6rem;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #F5E7D3, #D4AF7A);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav-links {
    margin-left: auto;
    display: flex;
    flex-wrap: nowrap;
    gap: 28px;
    white-space: nowrap;
    flex-shrink: 0;
    padding-right: 24px;
}

.nav-links a {
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    color: #f0f0f0;
    transition: color 0.2s;
    letter-spacing: 0.5px;
}

.nav-links a:hover {
    color: #D4AF7A;
}

/* 品牌激活高亮 */
.nav-links a.active {
    color: #D4AF7A;
    border-bottom: 2px solid #D4AF7A;
}

/* 汉堡按钮样式 (默认隐藏) */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    cursor: pointer;
    z-index: 25;
    background: transparent;
    border: none;
    padding: 0;
}

.hamburger span {
    width: 100%;
    height: 2px;
    background-color: #f0f0f0;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* ----- 轮播图区域 ----- */
.carousel-container {
    position: relative;
    width: 100%;
    height: 85vh;
    min-height: 560px;
    overflow: hidden;
    margin-top: 80px;
}

.carousel-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center 30%;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 10vh;
}

.carousel-slide.active {
    opacity: 1;
    z-index: 2;
}

.slide-caption {
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(8px);
    padding: 18px 32px;
    border-radius: 60px;
    color: white;
    text-align: center;
    font-weight: 500;
    font-size: 1.2rem;
    letter-spacing: 1px;
    border: 1px solid rgba(255,215,0,0.3);
    margin-bottom: 30px;
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 15;
    font-size: 2rem;
    font-weight: 300;
    transition: 0.2s;
    user-select: none;
}

.carousel-arrow:hover {
    background: rgba(212,175,85,0.8);
    color: #1e1e1e;
}

.arrow-left {
    left: 24px;
}

.arrow-right {
    right: 24px;
}

.carousel-dots {
    position: absolute;
    bottom: 24px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 14px;
    z-index: 15;
}

.dot {
    width: 10px;
    height: 10px;
    background: rgba(255,255,255,0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: 0.2s;
}

.dot.active {
    background: #D4AF7A;
    width: 28px;
    border-radius: 10px;
}

/* ----- 商品陈列区 ----- */
.product-section {
    padding: 64px 0 96px;
    background: #fafaf8;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    margin-bottom: 40px;
    border-bottom: 1px solid #e5e5e5;
    padding-bottom: 16px;
}

.section-header h2 {
    font-size: 1.7rem;
    font-weight: 600;
    color: #1f2937;
}

.section-header span {
    font-size: 0.85rem;
    color: #6b7280;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 32px 24px;
}

.product-card {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02), 0 1px 2px rgba(0, 0, 0, 0.03);
    border: 1px solid #efefef;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 30px -12px rgba(0, 0, 0, 0.12);
    border-color: #e2e2e2;
}

.card-img {
    background: #f3f4f6;
    aspect-ratio: 1 / 0.9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover .card-img img {
    transform: scale(1.02);
}

.card-info {
    padding: 18px 16px 22px;
}

.brand-tag {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #b48c48;
    margin-bottom: 8px;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: #111;
}

.product-sub {
    font-size: 0.8rem;
    color: #6b7280;
    margin-bottom: 12px;
}

.price {
    font-weight: 700;
    font-size: 1rem;
    color: #2c2c2c;
    margin-top: 8px;
}

.btn-mimic {
    margin-top: 14px;
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 500;
    color: #b48c48;
    border: 1px solid #e5d9cf;
    padding: 6px 14px;
    border-radius: 40px;
    transition: 0.2s;
    text-decoration: none;
    cursor: pointer;
}

.btn-mimic:hover {
    background: #b48c48;
    color: white;
    border-color: #b48c48;
}

.pagination {
    margin-top: 60px;
    text-align: center;
}

.pagination span {
    display: inline-block;
    margin: 0 6px;
    width: 36px;
    height: 36px;
    line-height: 36px;
    border-radius: 40px;
    background: white;
    border: 1px solid #e2e2e2;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.pagination span.active {
    background: #b48c48;
    color: white;
    border: none;
}

.pagination span:hover:not(.active) {
    background: #f5f0ea;
    border-color: #d4af7a;
}

.pagination .ellipsis {
    pointer-events: none;
    background: transparent;
    border: none;
    width: auto;
    padding: 0 4px;
}

/* 日本代购板块样式 */
/* ========== 日本代购区块 - 全新精致设计 ========== */
.japan-daigou {
    background: linear-gradient(120deg, #fef8f0 0%, #fff5e8 100%);
    padding: 80px 0;
    border-top: 1px solid #f0e4d4;
    border-bottom: 1px solid #f0e4d4;
}

.daigou-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.daigou-header {
    text-align: center;
    margin-bottom: 56px;
}

.daigou-subtitle {
    font-size: 0.85rem;
    letter-spacing: 2px;
    color: #b48c48;
    text-transform: uppercase;
    background: rgba(180, 140, 72, 0.1);
    padding: 4px 12px;
    border-radius: 30px;
    display: inline-block;
}

.daigou-title {
    font-size: 2.5rem;
    font-weight: 600;
    margin: 20px 0 16px;
    color: #2c2a24;
    letter-spacing: -0.5px;
}

.daigou-divider {
    width: 60px;
    height: 2px;
    background: #b48c48;
    margin: 0 auto 20px;
}

.daigou-desc {
    color: #6b6a66;
    font-size: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

.daigou-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 48px;
}

.daigou-left {
    flex: 1.2;
    min-width: 260px;
}

.daigou-image-wrapper {
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 20px 35px -12px rgba(0,0,0,0.15);
    margin-bottom: 24px;
}

.daigou-main-img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s;
}

.daigou-image-wrapper:hover .daigou-main-img {
    transform: scale(1.02);
}

.daigou-badge {
    position: absolute;
    bottom: 16px;
    left: 16px;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(6px);
    padding: 6px 16px;
    border-radius: 40px;
    color: white;
    font-size: 0.8rem;
    font-weight: 500;
}

.daigou-trust {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    background: white;
    padding: 20px;
    border-radius: 24px;
    box-shadow: 0 6px 14px rgba(0,0,0,0.03);
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #3a3a38;
}

.trust-icon {
    background: #b48c48;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.daigou-right {
    flex: 2;
    min-width: 300px;
}

.daigou-feature-list {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 40px;
}

.feature-card {
    flex: 1;
    background: white;
    border-radius: 24px;
    padding: 24px 20px;
    text-align: center;
    transition: all 0.25s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    border: 1px solid #f0e4d4;
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 30px -12px rgba(0,0,0,0.1);
    border-color: #e2d0b8;
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

.feature-card h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #2c2a24;
}

.feature-card p {
    font-size: 0.85rem;
    color: #6b6a66;
    line-height: 1.5;
}

.daigou-steps {
    background: rgba(180,140,72,0.05);
    border-radius: 32px;
    padding: 24px 28px;
    margin-bottom: 32px;
}

.daigou-steps h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #b48c48;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.steps-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.step {
    background: white;
    padding: 8px 20px;
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #4a4a48;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    white-space: nowrap;
}

.step-arrow {
    color: #b48c48;
    font-weight: 500;
}

.daigou-contact-card {
    background: white;
    border-radius: 28px;
    padding: 28px;
    box-shadow: 0 12px 28px rgba(0,0,0,0.06);
    border: 1px solid #f0e4d4;
}

.contact-line {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px dashed #f0e0ce;
}

.contact-label {
    font-weight: 600;
    color: #2c2a24;
    min-width: 90px;
}

.contact-line a, .contact-line span {
    color: #b48c48;
    font-weight: 500;
    text-decoration: none;
}

.contact-note {
    font-size: 0.75rem;
    color: #999;
    font-weight: normal;
}

.contact-qr-hint {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
    background: #fef6ed;
    padding: 12px 16px;
    border-radius: 20px;
}

.qr-preview {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
    cursor: pointer;
    transition: 0.2s;
}

.qr-preview:hover {
    transform: scale(1.05);
}

/* 响应式 */
@media (max-width: 900px) {
    .daigou-grid {
        flex-direction: column;
    }
    .steps-wrapper {
        flex-direction: column;
        align-items: flex-start;
    }
    .step-arrow {
        transform: rotate(90deg);
        display: inline-block;
    }
    .daigou-title {
        font-size: 2rem;
    }
}

@media (max-width: 640px) {
    .daigou-feature-list {
        flex-direction: column;
    }
    .contact-line {
        flex-direction: column;
        gap: 4px;
    }
    .contact-qr-hint {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}
/* 二维码放大 */
.qr-preview {
    cursor: pointer;
    transition: transform 0.2s;
}
.qr-preview:hover {
    transform: scale(1.02);
}

footer {
    background: #111;
    color: #9ca3af;
    padding: 48px 0;
    text-align: center;
    font-size: 0.8rem;
    border-top: 1px solid #2a2a2a;
}

.footer {
    background-color: #0f0f10;
    color: #eaeaea;
    padding: 50px 20px;
    font-family: "Helvetica Neue", Arial, sans-serif;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
}

.footer h2 {
    font-size: 20px;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.footer h3 {
    font-size: 14px;
    letter-spacing: 1px;
    margin-bottom: 10px;
    color: #aaa;
}

/* 修复：删除错误的 flex 属性 */
.footer p {
    color: #888;
    font-size: 12px;
    /* 不再有 display:flex 等错误 */
}

.footer-brand p {
    color: #888;
    font-size: 12px;
}

.footer div:hover {
    transform: translateY(-2px);
    transition: 0.3s ease;
}

.map-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 18px;
    border: 1px solid #888;
    color: #eee;
    text-decoration: none;
    font-size: 12px;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.map-btn:hover {
    background-color: #fff;
    color: #000;
    border-color: #fff;
}

/* ===== 响应式布局 ===== */
@media (max-width: 1024px) {
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(18, 20, 24, 0.95);
        backdrop-filter: blur(16px);
        flex-direction: column;
        align-items: center;
        gap: 20px;
        padding: 24px 16px;
        border-top: 1px solid rgba(255,255,255,0.1);
        border-bottom: 1px solid rgba(255,255,255,0.1);
        transform: translateY(-120%);
        opacity: 0;
        transition: transform 0.3s ease, opacity 0.3s ease;
        z-index: 20;
        pointer-events: none;
        flex-wrap: wrap;
    }
    .nav-links.show {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }
    .hamburger {
        display: flex;
    }
    .navbar {
        padding: 0 20px;
    }
    .carousel-container {
        height: 75vh;
    }
    .nav-container {
        flex-wrap: wrap;
        justify-content: space-between;
    }
}

@media (max-width: 768px) {
    .nav-container {
        flex-wrap: wrap;
        justify-content: space-between;
    }
    .logo-area {
        margin-bottom: 0;
    }
    .carousel-container {
        height: 60vh;
        min-height: 420px;
    }
    .slide-caption {
        font-size: 0.85rem;
        padding: 10px 16px;
        border-radius: 30px;
    }
    .daigou-container {
        flex-direction: column;
        text-align: center;
    }
    .daigou-features {
        justify-content: center;
    }
    .daigou-contact {
        text-align: left;
    }
    .footer-container {
        flex-direction: column;
        text-align: center;
        gap: 28px;
    }
    .footer h2 {
        font-size: 16px;
    }
    .footer h3 {
        font-size: 12px;
    }
    .footer p {
        font-size: 12px;
    }
    .map-btn {
        width: 100%;
        max-width: 220px;
        margin: 12px auto 0;
        display: block;
    }
}

@media (max-width: 480px) {
    .nav-links a {
        font-size: 0.9rem;
    }
    .carousel-container {
        height: 55vh;
    }
    .slide-caption {
        font-size: 0.75rem;
    }
    .daigou-content h3 {
        font-size: 1.5rem;
    }
}

/* ========== 模态框样式 ========== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.85);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    padding: 20px;
}
.modal.show {
    display: flex;
}
.modal-content {
    background: #fff;
    max-width: 1000px;
    width: 90%;
    border-radius: 24px;
    position: relative;
    overflow: hidden;
    animation: modalFadeIn 0.3s ease;
}
@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
.modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 32px;
    font-weight: 300;
    color: #333;
    cursor: pointer;
    z-index: 10;
    background: rgba(255,255,255,0.8);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}
.modal-close:hover {
    background: #b48c48;
    color: white;
}
.modal-body {
    display: flex;
    flex-wrap: wrap;
}
.modal-gallery {
    flex: 1.5;
    padding: 24px;
    background: #fafafa;
}
.modal-info {
    flex: 1;
    padding: 24px;
    border-left: 1px solid #eee;
}
.main-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: contain;
    background: #f0f0f0;
    border-radius: 12px;
    margin-bottom: 16px;
}
.thumbnails {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 12px;
}
.thumb {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: 0.2s;
}
.thumb.active {
    border-color: #b48c48;
    transform: scale(1.02);
}
.modal-info h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 8px;
}
.modal-brand {
    font-size: 0.8rem;
    color: #b48c48;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}
.modal-price {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 16px 0;
    color: #2c2c2c;
}
.modal-desc {
    color: #6b7280;
    line-height: 1.5;
    margin-bottom: 20px;
}
.modal-detail {
    margin-top: 20px;
    border-top: 1px solid #eee;
    padding-top: 16px;
}
.modal-detail h4 {
    font-size: 1rem;
    font-weight: 600;
    margin: 12px 0 8px;
    color: #333;
}
.modal-detail p {
    color: #4b5563;
    line-height: 1.5;
}
.modal-detail ul {
    padding-left: 20px;
    color: #4b5563;
}
.modal-actions {
    margin-top: 24px;
    text-align: center;
}
.btn-buy {
    background: #b48c48;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 40px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: 0.2s;
}
.btn-buy:hover {
    background: #9a763a;
}

/* 移动端缩略图优化 */
@media (max-width: 768px) {
    .modal-body {
        flex-direction: column;
    }
    .modal-info {
        border-left: none;
        border-top: 1px solid #eee;
    }
    .thumb {
        width: 55px;
        height: 55px;
    }
    .thumbnails {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 8px;
    }
    .thumb {
        flex-shrink: 0;
    }
}

/* ========== 镜片价格专区 ========== */
.lens-price-section {
    padding: 64px 0 80px;
    background: #ffffff;
    border-top: 1px solid #f0e4d4;
}

.lens-price-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 32px 24px;
    margin-top: 40px;
}

.price-card {
    background: #ffffff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid #f0e4d4;
    cursor: pointer;
}

.price-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 30px -12px rgba(0, 0, 0, 0.15);
    border-color: #d4af7a;
}

.price-card img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.price-card:hover img {
    transform: scale(1.02);
}

.price-card-label {
    text-align: center;
    padding: 14px 12px;
    font-weight: 500;
    font-size: 0.9rem;
    color: #b48c48;
    background: #fefaf5;
    letter-spacing: 0.5px;
    border-top: 1px solid #f0e4d4;
}

.price-note {
    text-align: center;
    margin-top: 48px;
    font-size: 0.8rem;
    color: #8a8a86;
    background: #fefaf5;
    padding: 16px 24px;
    border-radius: 60px;
    display: inline-block;
    width: auto;
    left: 50%;
    position: relative;
    transform: translateX(-50%);
    border: 1px solid #f0e4d4;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .lens-price-grid {
        gap: 20px;
    }
    .price-card-label {
        font-size: 0.8rem;
        padding: 10px;
    }
    .price-note {
        width: 90%;
        font-size: 0.7rem;
        padding: 12px 16px;
    }
}
/* 镜片价格卡片链接样式 */
.price-card-link {
    text-decoration: none;
    display: block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.price-card-link:hover {
    transform: translateY(-6px);
}

.price-card-link:hover .price-card {
    border-color: #d4af7a;
    box-shadow: 0 20px 30px -12px rgba(0, 0, 0, 0.15);
}

.price-card-link:hover .price-card img {
    transform: scale(1.02);
}

/* 保留原有 .price-card 样式，但移除 hover 上的 transform 避免重复 */
.price-card {
    background: #ffffff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid #f0e4d4;
    cursor: pointer;
}

/* 图片缩放移到外层链接的 hover 上，卡片内部不需要单独 hover 缩放 */
.price-card img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

/* 缩略图容器改为 flex 垂直排列，每个项包含图片和文字 */
.thumbnails {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.thumb-item {
    width: 80px;
    text-align: center;
    cursor: pointer;
}

.thumb {
    width: 100%;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid transparent;
    transition: 0.2s;
}

.thumb.active {
    border-color: #b48c48;
}

.thumb-caption {
    font-size: 0.7rem;
    color: #6b6a66;
    margin-top: 6px;
    line-height: 1.3;
    word-break: break-word;
}

/* 移动端缩略图区域可横向滚动 */
@media (max-width: 768px) {
    .thumbnails {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 8px;
        gap: 12px;
    }
    .thumb-item {
        width: 70px;
        flex-shrink: 0;
    }
    .thumb {
        height: 60px;
    }
    .thumb-caption {
        font-size: 0.65rem;
    }
}
.centered-main-img {
    display: block;
    margin-left: auto;
    margin-right: auto;
}
/* 完整显示商品卡片图片（不裁剪） */
.card-img .card-img-full {
    object-fit: contain;   /* 完整显示，可能留白 */
    width: 100%;
    height: 100%;
    background-color: #f3f4f6; /* 可选：留白区域背景色 */
}
.card-img .card-img-full {
    object-fit: contain;
    object-position: center;
}
/* 库存标识 */
.modal-stock {
    margin: 12px 0;
}
.stock-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 500;
}
.in-stock {
    background-color: #e6f7e6;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}
.out-stock {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}
.unknown {
    background-color: #fff3e0;
    color: #e65100;
    border: 1px solid #ffcc80;
}
@media (max-width: 768px) {
    .steps-wrapper {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    .step-arrow {
        transform: rotate(90deg);
        margin: 0;
    }
    .step {
        text-align: center;
        width: auto;
        min-width: 160px;
    }
}
/* 移动端模态框优化 */
@media (max-width: 768px) {
    .modal {
        align-items: flex-start;  /* 让模态框从顶部开始，方便滚动 */
        padding: 16px;
    }
    .modal-content {
        width: 95%;
        max-height: 90vh;         /* 限制最大高度 */
        overflow-y: auto;         /* 内容过多时可滚动 */
        border-radius: 20px;
    }
    .modal-body {
        flex-direction: column;
        max-height: none;
    }
    /* 图片区域 */
    .modal-gallery {
        padding: 16px;
    }
    .main-img {
        width: 100%;
        height: auto;
        max-height: 40vh;         /* 限制图片高度，防止过大 */
        object-fit: contain;      /* 确保图片完整显示 */
    }
    .thumbnails {
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 12px;
        padding-bottom: 8px;
    }
    .thumb-item {
        width: 70px;
        flex-shrink: 0;
    }
    /* 关闭按钮 - 固定在右上角，不随滚动移动 */
    .modal-close {
        position: sticky;
        top: 12px;
        right: 12px;
        float: right;
        background: rgba(0,0,0,0.6);
        color: white;
        width: 36px;
        height: 36px;
        font-size: 24px;
        z-index: 20;
        margin: 0;
    }
    /* 信息区域 */
    .modal-info {
        padding: 20px;
        border-left: none;
        border-top: 1px solid #eee;
    }
}
</style>
</head>
<body>