/* ============================================
   統一公共樣式表
   ============================================ */

/* 全域重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 基礎樣式 */
body {
    font-family: 'Noto Sans SC', Arial, 'Noto Sans TC', 'Segoe UI', sans-serif;
    background: #F3F5F6;
    color: #212121;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

/* 頂部橫幅 */
.top-banner {
    background: #1E2973;
    border-bottom: 1px solid white;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1000;
}

.top-banner-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    max-width: 1480px;
    width: 100%;
    padding: 0 20px;
}

.promo-text,
.banner-text {
    color: white;
    font-size: 16px;
    font-weight: 900;
    text-align: center;
}

.promo-btn,
.banner-btn,
.latest-promo-btn {
    background: #F4C228;
    color: white;
    padding: 11px 20px;
    border-radius: 2px;
    font-size: 15px;
    font-weight: 900;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0px 1px 0px #F4C228;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

.promo-btn:hover,
.banner-btn:hover,
.latest-promo-btn:hover {
    background: #c4cf00;
}

.promo-btn img,
.banner-btn img,
.latest-promo-btn img {
    width: 20px;
    height: 17px;
}

.promo-btn span,
.banner-btn span,
.latest-promo-btn span {
    color: white;
    font-size: 15px;
    font-weight: 900;
}

/* 頭部區域 */
.header {
    background: #1E2973;
    padding: 20px 0;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* header-content 居中布局 */
.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 0 40px;
    max-width: 1400px;
    margin: 0 auto;
}

/* 兼容旧的 flex 布局 */
.header-container {
    display: flex;
}

.logo {
    width: 300px;
    height: 67px;
    display: block;
    text-decoration: none;
}

.logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 搜索容器 */
.search-container,
.search-bar {
    flex: 1;
    max-width: 793px;
    margin: 0 auto;
    display: flex;
    gap: 10px;
}

.search-bar {
    background: white;
    border-radius: 3px;
    overflow: hidden;
    margin: 0;
}

.search-input {
    flex: 1;
    padding: 12px 20px;
    border: 1px solid #E1E3E4;
    border-radius: 3px;
    font-size: 14px;
    outline: none;
}

.search-bar .search-input {
    border: none;
    border-radius: 0;
}

.search-btn {
    background: #F4C228;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 3px;
    cursor: pointer;
    font-weight: 700;
    transition: background 0.3s;
}

.search-bar .search-btn {
    width: 50px;
    padding: 12px;
    border-radius: 0 3px 3px 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn:hover {
    background: #c4cf00;
}

/* 用戶操作區 */
.header-actions,
.user-actions {
    display: flex;
    gap: 20px;
    align-items: center;
}

.account-link,
.user-account {
    color: white;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
}

.account-link .login-text,
.account-label {
    color: rgba(255, 255, 255, 0.75);
    font-size: 14px;
    display: block;
}

.account-link .account-text,
.account-name {
    font-size: 15px;
    font-weight: 700;
}

.account-text {
    display: flex;
    flex-direction: column;
}

.cart-link {
    color: white;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    position: relative;
}

.cart-badge {
    background: #DC3545;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

.cart-icon-wrapper {
    position: relative;
}

.cart-text {
    font-size: 15px;
    font-weight: 700;
}

/* 主導航 */
.main-nav,
.nav-menu {
    background: white;
    border-bottom: 1px solid #E1E3E4;
}

.nav-container,
.nav-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 35px;
    height: 62px;
    align-items: center;
}

.nav-menu .nav-content {
    height: auto;
    padding: 0 40px;
}

.nav-item {
    color: #212121;
    font-size: 14px;
    font-weight: 500;
    padding: 20px 0;
    cursor: pointer;
    transition: color 0.3s;
    text-decoration: none;
    position: relative;
}

.nav-menu .nav-item {
    padding: 17px 0;
    font-size: 15px;
}

.nav-item:hover {
    color: #1E2973;
}

.nav-item.active {
    color: #1E2973;
    border-bottom: 2px solid #1E2973;
}

.nav-item.dropdown::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 8px;
    margin-left: 8px;
    background-image: url('assets/CodeBubbyAssets/14_1311/19.svg');
    background-size: contain;
    background-repeat: no-repeat;
}

/* 麵包屑導航 */
.breadcrumb {
    max-width: 1400px;
    margin: 20px auto 0;
    padding: 0 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.breadcrumb a {
    color: #212121;
    text-decoration: none;
}

.breadcrumb a:hover {
    color: #1E2973;
}

.breadcrumb img {
    width: 6px;
    height: 8px;
}

.breadcrumb span {
    color: #212121;
}

/* Cookie 橫幅 */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    box-shadow: 0px 1px 4px 1px rgba(0, 0, 0, 0.10);
    border-radius: 3px;
    padding: 20px 25px;
    max-width: 960px;
    width: 90%;
    display: none;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
}

.cookie-banner.show {
    display: flex;
}

.cookie-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
}

.cookie-text {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
    margin-right: 20px;
}

.cookie-actions {
    display: flex;
    gap: 10px;
}

.cookie-btn {
    padding: 10px 24px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    border: 1px solid #E1E3E4;
    transition: all 0.3s;
}

.cookie-accept,
.cookie-btn.accept {
    background: #1E2973;
    color: white;
    border-color: #1E2973;
}

.cookie-reject,
.cookie-btn.reject,
.cookie-btn.decline {
    background: white;
    color: #212121;
}

.cookie-btn.reject {
    background: #4B69AF;
    color: white;
}

.cookie-btn:hover {
    transform: translateY(-2px);
}

/* 頁腳 */
.footer {
    background: #F3F5F6;
    border-top: 1px solid #E1E3E4;
    padding: 10px 0 20px;
}

.footer-container,
.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-columns {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column h3,
.footer-column h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #212121;
}

.footer-column h3 {
    color: #1E2D7D;
    font-size: 14px;
}

.footer-column ul,
.footer-links {
    list-style: none;
}

.footer-column ul li,
.footer-links li {
    margin-bottom: 10px;
}

.footer-column ul li a,
.footer-links a {
    color: #666;
    font-size: 14px;
    transition: color 0.3s;
    text-decoration: none;
}

.footer-links a {
    color: #677279;
}

.footer-column ul li a:hover,
.footer-links a:hover {
    color: #1E2973;
}

.footer-bottom {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 20px;
}

.footer-logo {
    width: 252px;
    height: 52px;
    background: #E1E3E4;
    border-radius: 3px;
}

.copyright {
    color: #677279;
    font-size: 14px;
}

.social-links,
.social-icons {
    display: flex;
    gap: 15px;
}

.social-icon {
    width: 28px;
    height: 28px;
    background: #E1E3E4;
    border-radius: 3px;
    cursor: pointer;
    transition: transform 0.3s;
    opacity: 0.4;
}

.social-icons img {
    width: 28px;
    height: 28px;
    opacity: 0.4;
    cursor: pointer;
    transition: opacity 0.3s;
}

.social-icon:hover,
.social-icons img:hover {
    transform: scale(1.1);
    opacity: 1;
}

.payment-icons,
.payment-methods {
    display: flex;
    gap: 10px;
}

.payment-icon {
    width: 38px;
    height: 24px;
    background: #E1E3E4;
    border-radius: 3px;
}

.payment-methods img {
    width: 38px;
    height: 24px;
}

/* 響應式設計 */
@media (max-width: 1024px) {
    .header-container,
    .header-content {
        grid-template-columns: 1fr;
        padding: 0 20px;
    }

    .logo {
        margin: 0 auto;
    }

    .user-actions {
        justify-content: center;
    }

    .search-container,
    .search-bar {
        order: 3;
        width: 100%;
        max-width: 100%;
        margin: 20px 0 0 0;
    }

    .nav-container,
    .nav-content {
        overflow-x: auto;
        gap: 20px;
    }

    .footer-columns {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .promo-text,
    .banner-text {
        font-size: 12px;
    }

    .top-banner {
        height: auto;
        padding: 10px;
    }

    .top-banner-content {
        flex-direction: column;
        gap: 10px;
    }

    .logo {
        width: 200px;
        height: 45px;
    }

    .header-content {
        grid-template-columns: 1fr;
        display: grid;
        gap: 15px;
        padding: 0 20px;
    }

    .search-container,
    .search-bar {
        width: 100%;
        margin: 0;
    }

    .user-actions,
    .header-actions {
        width: 100%;
        justify-content: space-around;
    }

    .nav-content {
        flex-wrap: wrap;
        gap: 15px;
        padding: 0 20px;
    }

    .footer-columns {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 20px;
    }

    .cookie-banner {
        flex-direction: column;
        gap: 15px;
    }

    .cookie-text {
        margin-right: 0;
    }

    .cookie-content {
        flex-direction: column;
    }
}

