/* ========================================
   Main CSS - 歡田包子殿
   ======================================== */

/* CSS Variables */
:root {
    --primary-color: #027da9;
    --primary-dark: #025a7a;
    --primary-light: #03a5d6;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Base Styles */
body {
    font-family: 'Noto Sans TC', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: var(--bg-light);
    overflow-x: hidden;
}

/* ========================================
   Top Bar
   ======================================== */
.top-bar {
    background-color: #f8f9fa;
    padding: 10px 0;
    font-size: 14px;
    color: #666;
}

.top-bar a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
}

.top-bar a:hover {
    color: #027da9;
}

.top-bar .icon-phone::before {
    content: "📞 ";
}

.top-bar .icon-email::before {
    content: "✉ ";
}

/* ========================================
   導航欄樣式
   ======================================== */
.navbar {
    background: var(--white);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1030;
}

.navbar-brand .logo {
    height: 60px;
    width: auto;
    border-radius: 50%;
    margin-right: 10px;
}

.navbar-brand img {
    height: 60px;
    width: auto;
}

.navbar-nav {
    align-items: center;
}

.nav-link {
    color: #333 !important;
    font-weight: 500;
    padding: 10px 20px !important;
    transition: color 0.3s;
    position: relative;
}

.nav-link:hover {
    color: #027da9 !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: #027da9;
    transition: width 0.3s;
}

.nav-link:hover::after {
    width: 80%;
}

/* Dropdown 下拉選單 */
.nav-item.dropdown {
    position: relative;
}

.dropdown-menu {
    border: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 10px 0;
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    min-width: 10rem;
    margin: 0;
    background-color: white;
}

/* Hover 顯示下拉選單 */
.nav-item.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-item {
    padding: 10px 20px;
    color: #333;
    transition: all 0.3s;
    display: block;
    width: 100%;
    clear: both;
    font-weight: 400;
    text-align: inherit;
    white-space: nowrap;
    background-color: transparent;
    border: 0;
    text-decoration: none;
}

.dropdown-item:hover {
    background-color: #027da9;
    color: white;
}

/* ========================================
   按鈕樣式
   ======================================== */
/* 主要CTA按鈕 */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
    border-radius: 25px;
    padding: 10px 25px;
    font-weight: 500;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: var(--white);
    transform: translateY(-2px);
}

/* 次要按鈕 */
.btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
    border-radius: 25px;
    padding: 8px 20px;
    font-weight: 500;
    transition: var(--transition);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

/* ========================================
   Hero區塊
   ======================================== */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
    margin-bottom: 50px;
}

.hero-section .hero-row-content {
    margin-top: 0;
}

.hero-content h1 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 600px;
}

.hero-section .hero-btn {
    margin-top: 100px;
}

/* ========================================
   國際認證
   ======================================== */
.international-section {
    margin-bottom: 50px;
}

.international-section .international-desc {
    line-height: 1.5;
    text-align: left;
    padding-left: 60px;
}

/* ========================================
   產品卡片
   ======================================== */
.product-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    margin-bottom: 30px;
    height: 100%;
    border: none;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.product-card img {
    height: 250px;
    object-fit: cover;
}

.product-card .card-body {
    padding: 20px;
}

.product-card .card-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.product-card .price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.product-card-new .card-text {
    min-height: 80px;
    max-height: 80px;
    overflow-y: hidden;
}

/* ========================================
   特色區塊
   ======================================== */
.features-section {
    padding: 80px 0;
    background: linear-gradient(to right, rgba(199, 165, 152, 1), rgba(253, 216, 202, 0.8)), url('https://images.unsplash.com/photo-1614859275214-3f23aa1ea0e5?q=80&w=1200') center/cover no-repeat;
    margin: 60px 0;
    box-shadow: 0 15px 35px rgba(183, 134, 119, 0.25);
}

.feature-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 6px 15px rgba(213, 176, 162, 0.3);
    color: var(--main-color);
    font-size: 2rem;
}

.feature-item h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--dark-color-2);
}

/* ========================================
   最新消息
   ======================================== */
.news-section {
    padding: 80px 80px 80px 80px;
    background: linear-gradient(to right, rgba(199, 165, 152, 1), rgba(253, 216, 202, 0.8));
    margin: 0 0 60px 0;
    box-shadow: 0 15px 35px rgba(183, 134, 119, 0.25);
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    width: 80px;
    height: 3px;
    background-color: var(--main-color);
    transform: translateX(-50%);
}

.news-card {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    height: 100%;
    border: none;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.news-card .card-img-top {
    width: 100%;
    object-fit: cover;
}

.news-card .card-body {
    padding: 20px;
}

.news-date {
    font-size: 0.85rem;
    color: var(--main-color);
    margin-bottom: 10px;
    display: block;
}

/* ========================================
   關於我們
   ======================================== */
.about-section {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--light-color-2), var(--accent-color));
    margin: 0;
    box-shadow: 0 15px 35px rgba(183, 134, 119, 0.25);
}

.about-img {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.about-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-content h2 {
    font-weight: 700;
    margin-bottom: 25px;
    color: var(--dark-color-2);
}

.about-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 30px;
}

/* ========================================
   側邊選單 (手機版)
   ======================================== */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-sidebar {
    position: fixed;
    top: 0;
    left: -90%;
    width: 90%;
    height: 100%;
    background-color: #fff;
    z-index: 1050;
    overflow-y: auto;
    transition: left 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.mobile-sidebar.active {
    left: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: #027da9;
    color: white;
}

.mobile-menu-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
}

.mobile-menu-close {
    background: none;
    border: none;
    color: white;
    font-size: 36px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.mobile-menu-close:hover {
    transform: rotate(90deg);
}

.mobile-menu-content {
    padding: 0;
}

.mobile-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-item {
    border-bottom: 1px solid #eee;
}

.mobile-nav-link,
.mobile-nav-link-single {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    color: #333;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.mobile-nav-link:hover,
.mobile-nav-link-single:hover {
    background-color: #f0f8fb;
    color: #027da9;
    border-left-color: #027da9;
}

.mobile-nav-item.active .mobile-nav-link {
    background-color: #f0f8fb;
    color: #027da9;
    border-left-color: #027da9;
}

.mobile-arrow {
    transition: transform 0.3s;
    font-size: 14px;
    color: #027da9;
    font-weight: bold;
}

.mobile-nav-item.active .mobile-arrow {
    transform: rotate(90deg);
}

.mobile-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    background-color: #f8f9fa;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-nav-item.active .mobile-submenu {
    max-height: 500px;
}

.mobile-submenu li {
    border-bottom: 1px solid #e0e0e0;
}

.mobile-submenu li:last-child {
    border-bottom: none;
}

.mobile-submenu a {
    display: block;
    padding: 15px 20px 15px 40px;
    color: #666;
    text-decoration: none;
    font-size: 15px;
    transition: all 0.2s;
}

.mobile-submenu a:hover {
    background-color: #fff;
    color: #027da9;
    padding-left: 45px;
}

/* 防止選單開啟時背景滾動 */
body.menu-open {
    overflow: hidden;
}

/* ========================================
   購物車按鈕
   ======================================== */
.cart-btn {
    position: relative;
    color: #333;
    font-size: 20px;
    transition: all 0.3s;
}

.cart-btn:hover {
    color: #027da9;
    transform: scale(1.1);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #027da9;
    color: white;
    font-size: 0.7rem;
    min-width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    padding: 0 5px;
}

/* 頁腳 */
footer {
    background: var(--primary-color);
    color: var(--white);
    padding: 3rem 0 1rem;
}

.footer-title {
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--white);
}

.social-icons a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    margin-right: 0.5rem;
    transition: var(--transition);
}

.social-icons a:hover {
    background: rgba(255, 255, 255, 0.2);
}

.copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 40px;
    padding-top: 20px;
    text-align: center;
    font-size: 0.9rem;
}

/* ========================================
   響應式調整
   ======================================== */
@media (max-width: 992px) {
    .top-bar .col-md-6 {
        text-align: center !important;
        margin-bottom: 10px;
    }
}

@media (max-width: 768px) {
    .top-bar {
        font-size: 12px;
    }
}

/* 手機版隱藏桌面選單 */
@media (max-width: 991px) {
    .navbar-collapse {
        background-color: var(--text-light);
        padding: 20px;
        border-radius: 10px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        margin-top: 10px;
        display: none !important;
    }

    .navbar-toggler {
        display: block;
        border: 2px solid #027da9;
        padding: 8px;
        border-radius: 5px;
        transition: all 0.3s;
    }

    .navbar-toggler:hover {
        background-color: #027da9;
        border-color: #027da9;
    }

    .navbar-toggler:hover .navbar-toggler-icon {
        filter: brightness(0) invert(1);
    }

    .navbar-toggler:focus {
        box-shadow: 0 0 0 0.2rem rgba(2, 125, 169, 0.25);
    }

    .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23027da9' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    }

    .hero-section {
        padding: 80px 0;
    }

    .hero-content h1 {
        font-size: 1.8rem;
    }

    .hero-section .hero-row-content {
        margin-top: 20px;
    }

    .hero-section .hero-btn {
        margin-top: 30px;
        margin-bottom: 30px;
    }
}

/* 桌面版顯示選單 */
@media (min-width: 992px) {
    .navbar-toggler {
        display: none;
    }

    .navbar-collapse {
        display: flex !important;
    }
}

@media (max-width: 767px) {
    .about-img {
        margin-bottom: 30px;
    }

    .feature-item {
        margin-bottom: 40px;
    }

    .hero-section {
        padding: 0 0;
        text-align: center;
    }

    .hero-content p {
        margin: 0 auto 30px;
        font-weight: 300;
    }

    .product-card-new .card-text {
        min-height: auto;
        max-height: auto;
        overflow-y: auto;
    }

    /* 國際認證 */
    .international-section {
        margin-bottom: 0;
    }

    .international-section .international-desc {
        line-height: 1.5;
        text-align: left;
        padding-left: 8px;
    }

    /* 最新消息 */
    .news-section {
        padding: 50px 10px 20px 10px;
    }
}