/* ============================================================
   common.css - 全局重置 + 头部 + 页脚 + 通用组件
   ============================================================ */

/* ----- 全局重置 ----- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
}
body {
    background: #ffffff;
    font-family: 'Segoe UI', Roboto, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    padding-top: 0;
}

/* ----- 主容器 ----- */
.app-container {
    width: 100%;
    max-width: 1200px;
    background: #ffffff;
    margin: 0 auto;
    position: relative;
    box-shadow: none;
}

/* ============================================================
   ★ 头部 (HEADER)
   ============================================================ */
.navbar-primary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background: #ffffff;
    border-bottom: 1px solid #e8e5e2;
    flex-wrap: nowrap;
    gap: 12px;
}
.navbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.logo-img {
    height: 60px;
    width: auto;
    display: block;
    border-radius: 5px;
    object-fit: contain;
}
.lang-switch {
    display: flex;
    align-items: center;
    gap: 2px;
    background: #f2efec;
    padding: 3px 5px;
    border: 1px solid #ddd8d2;
    border-radius: 40px;
    flex-shrink: 0;
}
.lang-btn {
    background: transparent;
    border: none;
    padding: 5px 10px;
    font-size: 13px;
    font-weight: 500;
    color: #4a4a4a;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.2px;
    line-height: 1;
    border-radius: 30px;
}
.lang-btn.active {
    background: #c0392b;
    color: white;
}
.lang-btn:hover:not(.active) {
    background: #e0d8d2;
    color: #1a1a1a;
}
.hamburger-wrapper {
    display: none;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.hamburger-btn {
    background: transparent;
    border: none;
    font-size: 24px;
    color: #2d2d2d;
    cursor: pointer;
    padding: 4px 6px;
    transition: color 0.2s;
}
.hamburger-btn:hover {
    color: #c0392b;
}

/* 第二行导航 - 带 <a> 标签 */
.navbar-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-bottom: 1px solid #e8e5e2;
    padding: 0 24px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 2px;
}
.navbar-secondary::-webkit-scrollbar {
    display: none;
}
.nav-link {
    display: inline-block;
    padding: 12px 18px;
    font-size: 15px;
    font-weight: 500;
    color: #2d2d2d;
    border-bottom: 3px solid transparent;
    transition: color 0.2s, border-color 0.2s;
    letter-spacing: 0.4px;
    flex-shrink: 0;
}
.nav-link a {
    color: inherit;
    text-decoration: none;
    display: block;
}
.nav-link:hover {
    color: #c0392b;
    border-bottom-color: #c0392b;
}
.nav-link.active {
    color: #c0392b;
    border-bottom-color: #c0392b;
}

/* 移动端下拉 */
.mobile-dropdown {
    display: none;
    flex-direction: column;
    width: 100%;
    background: #ffffff;
    border-top: 1px solid #e8e5e2;
    padding: 6px 0 12px 0;
    z-index: 10;
}
.mobile-dropdown.open {
    display: flex;
}
.mobile-dropdown .nav-link {
    border-bottom: none;
    padding: 12px 24px;
    font-size: 15px;
    width: 100%;
    border-left: 4px solid transparent;
    transition: background 0.15s, border-color 0.15s;
}
.mobile-dropdown .nav-link a {
    color: inherit;
    text-decoration: none;
    display: block;
}
.mobile-dropdown .nav-link:hover {
    background: #f8f5f2;
    border-left-color: #c0392b;
}
.mobile-dropdown .nav-link.active {
    background: #f8f5f2;
    border-left-color: #c0392b;
    color: #c0392b;
}
.mobile-lang-switch {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 12px 24px 4px 24px;
    border-top: 1px solid #f0ece8;
    margin-top: 4px;
}
.mobile-lang-switch .lang-btn {
    background: transparent;
    border: none;
    padding: 6px 14px;
    font-size: 14px;
    font-weight: 500;
    color: #4a4a4a;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 30px;
}
.mobile-lang-switch .lang-btn.active {
    background: #c0392b;
    color: white;
}
.mobile-lang-switch .lang-btn:hover:not(.active) {
    background: #e0d8d2;
}

/* 头部响应式 */
@media (max-width: 860px) {
    .navbar-secondary { display: none; }
    .lang-switch { display: none; }
    .hamburger-wrapper { display: flex; }
    .navbar-primary { padding: 10px 16px; }
    .mobile-dropdown .nav-link { padding: 10px 20px; font-size: 14px; }
}
@media (max-width: 480px) {
    .navbar-primary { padding: 8px 12px; gap: 6px; }
    .logo-img { height: 45px; }
    .hamburger-btn { font-size: 20px; }
}
@media (min-width: 861px) {
    .hamburger-wrapper { display: none !important; }
    .lang-switch { display: flex !important; }
    .navbar-secondary { display: flex !important; }
    .mobile-dropdown { display: none !important; }
}
@media (min-width: 1200px) {
    .navbar-primary { padding: 16px 40px; }
    .navbar-secondary { padding: 0 40px; }
    .nav-link { padding: 14px 22px; font-size: 17px; }
}

/* ============================================================
   ★ 页脚 (FOOTER)
   ============================================================ */
.footer-wrapper {
    width: 100vw;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    background: #5b4747;
    padding: 40px 0 30px 0;
    margin-top: 0px !important;
}
.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1.2fr 2fr 1fr 1.2fr;
    gap: 30px;
    color: #e8ddd8;
}
.footer-content .col h4 {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 14px;
    letter-spacing: 0.5px;
    border-bottom: 2px solid rgba(255,255,255,0.10);
    padding-bottom: 8px;
}
.footer-content .col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-content .col ul li a {
    font-size: 14px;
    line-height: 2;
    color: #d5c8c0;
    cursor: default;
    transition: color 0.2s;
}
.footer-content .col ul li a:hover {
    color: #ffffff;
}
.footer-content .about-text p {
    font-size: 14px;
    line-height: 1.8;
    color: #d5c8c0;
    margin-bottom: 10px;
}
.footer-content .payment-icons {
    display: flex;
    gap: 14px;
    margin-top: 8px;
    flex-wrap: wrap;
}
.footer-content .payment-icons span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.08);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 13px;
    color: #e8ddd8;
    border: 1px solid rgba(255,255,255,0.06);
}
.footer-content .payment-icons span i {
    font-size: 18px;
    color: #f0e6e0;
}
.footer-content .contact-info p {
    font-size: 14px;
    line-height: 2;
    color: #d5c8c0;
}
.footer-content .contact-info p i {
    width: 24px;
    color: #e8ddd8;
}

/* 页脚响应式 */
@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 30px 20px;
    }
    .footer-wrapper {
        padding: 30px 0 20px 0;
        margin-top: 20px;
    }
}
@media (max-width: 480px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .footer-wrapper {
        padding: 24px 0 16px 0;
        margin-top: 15px;
    }
    .footer-content .col h4 {
        font-size: 15px;
    }
}
@media (min-width: 1200px) {
    .footer-content { padding: 0 40px; }
    .footer-wrapper {
        padding: 50px 0 35px 0;
        margin-top: 40px;
    }
}

/* ============================================================
   ★ 通用组件
   ============================================================ */
.gallery-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 28px;
    width: 100%;
}
.gallery-header .line {
    flex: 1;
    height: 2px;
    background: #1a1a1a;
}
.gallery-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: 2px;
    white-space: nowrap;
    padding: 0 8px;
}
@media (max-width: 640px) {
    .gallery-header h2 {
        font-size: 20px;
        padding: 0 4px;
    }
    .gallery-header {
        gap: 12px;
    }
}
@media (min-width: 1200px) {
    .gallery-header h2 {
        font-size: 28px;
    }
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}
.product-item {
    background: #f8f6f4;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: default;
}
.product-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}
.product-item .image {
    width: 100%;
    aspect-ratio: 4 / 3;
    background-size: cover;
    background-position: top;
    background-color: #e8e3dc;
}
.product-item .title {
    padding: 14px 16px 16px 16px;
    font-size: 15px;
    font-weight: 500;
    color: #1a1a1a;
    text-align: center;
    letter-spacing: 0.3px;
    background: #ffffff;
    border-top: 1px solid #f0ece8;
}
@media (max-width: 640px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .product-item .title {
        font-size: 13px;
        padding: 10px 12px 12px 12px;
    }
}
@media (max-width: 420px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}
.pagination button {
    background: transparent;
    border: 1px solid #d0ccc8;
    color: #2d2d2d;
    padding: 6px 16px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 44px;
    text-align: center;
}
.pagination button:hover:not(.active) {
    background: #f0ece8;
    border-color: #b0a8a0;
}
.pagination button.active {
    background: #1a1a1a;
    color: white;
    border-color: #1a1a1a;
    cursor: default;
}
.pagination button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}
.pagination .page-btn {
    min-width: 40px;
    padding: 6px 4px;
}
.page-numbers {
    display: flex;
    gap: 4px;
}
@media (max-width: 640px) {
    .pagination button {
        font-size: 13px;
        padding: 4px 12px;
        min-width: 36px;
    }
}

.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 5;
    background: rgba(0,0,0,0.25);
    backdrop-filter: blur(4px);
    padding: 6px 18px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 40px;
}
.indicator-dot {
    width: 10px;
    height: 10px;
    border-radius: 20px;
    background: rgba(255,255,255,0.5);
    transition: all 0.3s ease;
    cursor: pointer;
}
.indicator-dot.active {
    background: white;
    width: 26px;
}
.indicator-dot:hover {
    background: rgba(255,255,255,0.9);
    transform: scale(1.1);
}
@media (max-width: 640px) {
    .carousel-indicators {
        gap: 8px;
        padding: 4px 12px;
        bottom: 14px;
    }
    .indicator-dot {
        width: 8px;
        height: 8px;
    }
    .indicator-dot.active {
        width: 20px;
    }
}