/* 重置和基礎樣式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft JhengHei', 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}


.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 導覽列樣式 */
.navbar {
    background: linear-gradient(135deg, #ff9a56 0%, #ff6a00 100%);
    padding: 1rem 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand h1 {
    color: white;
    font-size: 1.8rem;
    font-weight: bold;
}

.nav-menu ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 25px;
}

.nav-menu a:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
    transition: all 0.2s ease; /* 微動畫效果 */
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: white;
    margin: 3px 0;
    transition: 0.2s ease; /* 微動畫效果 */
}

/* 主要內容區塊 */
main {
    margin-top: 80px;
}

section {
    padding: 80px 0;
}

/* 首頁英雄區塊 */
.hero {
    background-image: url('425491234_776151811291157_5734102038783799925_n-1024x683.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 500px;
    display: flex;
    align-items: center;
    position: relative;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-content h2 {
    font-size: 3rem;
    color: white;
    margin-bottom: 1rem;
    font-weight: bold;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.8);
}

.hero-content p {
    font-size: 1.2rem;
    color: white;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.cta-button {
    background: linear-gradient(135deg, #ff9a56 0%, #ff6a00 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(255,106,0,0.3);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255,106,0,0.4);
}

.hero-image {
    text-align: center;
}

.egg-icon {
    font-size: 8rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

/* 關於我們區塊 */
.about {
    background: white;
    text-align: center;
}

.about h2 {
    font-size: 2.5rem;
    color: #ff6a00;
    margin-bottom: 3rem;
    font-weight: bold;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.about-card {
    background: #fff8e1;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.about-card.friendly-farming {
    background-image: url('7.png');
    background-size: cover;
    background-position: center;
    position: relative;
}

.about-card.friendly-farming .card-icon {
    display: none;
}

.about-card.friendly-farming h3,
.about-card.friendly-farming p {
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    position: relative;
    z-index: 1;
}

.about-card.fast-delivery {
    background-image: url('438271469_789283813147725_4849267785225195558_n-1024x675.jpg');
    background-size: cover;
    background-position: center;
    position: relative;
}

.about-card.fast-delivery .card-icon {
    display: none;
}

.about-card.fast-delivery h3,
.about-card.fast-delivery p {
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    position: relative;
    z-index: 1;
}

.about-card.labor-program {
    background-image: url('1.png');
    background-size: cover;
    background-position: center;
    position: relative;
}

.about-card.labor-program .card-icon {
    display: none;
}

.about-card.labor-program h3,
.about-card.labor-program p {
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    position: relative;
    z-index: 1;
}

.about-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.about-card h3 {
    color: #ff6a00;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

/* 產品介紹區塊 */
.products {
    background: #f8f9fa;
    text-align: center;
}

.products h2 {
    font-size: 2.5rem;
    color: #ff6a00;
    margin-bottom: 3rem;
    font-weight: bold;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.product-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.product-image {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.product-card h3 {
    color: #ff6a00;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.price {
    font-size: 1.3rem;
    font-weight: bold;
    color: #28a745;
    margin: 1rem 0;
}

.product-btn {
    background: linear-gradient(135deg, #ff9a56 0%, #ff6a00 100%);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.product-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255,106,0,0.3);
}

/* 聯絡我們區塊 */
.contact {
    background: white;
    text-align: center;
}

.contact h2 {
    font-size: 2.5rem;
    color: #ff6a00;
    margin-bottom: 3rem;
    font-weight: bold;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #ff6a00;
}

.submit-btn {
    background: linear-gradient(135deg, #ff9a56 0%, #ff6a00 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255,106,0,0.4);
}

/* 頁腳樣式 */
footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 2rem 0;
}

.social-links {
    margin-top: 1rem;
}

.social-links a {
    color: white;
    font-size: 1.5rem;
    margin: 0 1rem;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.social-links a:hover {
    transform: scale(1.2);
}

/* 購物車側邊欄 */
.cart-sidebar {
    position: fixed;
    right: -400px;
    top: 0;
    width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
    z-index: 1001;
}

.cart-sidebar.active {
    right: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, #ff9a56 0%, #ff6a00 100%);
    color: white;
}

.close-cart {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

.cart-items {
    padding: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
}

.cart-total {
    padding: 1.5rem;
    border-top: 1px solid #ddd;
    text-align: right;
}

.checkout-btn {
    width: 90%;
    margin: 1rem auto;
    display: block;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: bold;
    transition: all 0.3s ease;
}

.checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(40,167,69,0.3);
}

/* 訊息提示樣式 */
.toast {
    position: fixed;
    top: 100px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 1002;
}

.toast.show {
    transform: translateX(0);
}

/* 響應式設計 - 手機優先 */
/* 小於 375px (超小螢幕) */
@media (max-width: 374px) {
    .container {
        padding: 0 10px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.6rem;
    }
    
    .hero-content h2 {
        font-size: 1.5rem;
    }
    
    .nav-brand h1 {
        font-size: 1.2rem;
    }
    
    .cta-button,
    .submit-btn,
    .checkout-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}

/* 375px - 767px (手機) */
@media (min-width: 375px) and (max-width: 767px) {
    .nav-menu {
        display: none;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .about-grid,
    .product-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
    
    .cart-sidebar.active {
        right: 0;
    }
    
    section {
        padding: 60px 0;
    }
    
    .container {
        padding: 0 15px;
    }
}

/* 768px - 1199px (平板) */
@media (min-width: 768px) and (max-width: 1199px) {
    .container {
        padding: 0 30px;
        max-width: 960px;
    }
    
    .hero-content h2 {
        font-size: 2.5rem;
    }
    
    .about-grid,
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.8rem;
    }
    
    section {
        padding: 70px 0;
    }
    
    h1 {
        font-size: 2.8rem;
    }
    
    h2 {
        font-size: 2.4rem;
    }
}

/* 1200px 以上 (桌面) */
@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
        padding: 0 20px;
    }
    
    .hero-content h2 {
        font-size: 3rem;
    }
    
    .about-grid,
    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 2rem;
    }
    
    section {
        padding: 80px 0;
    }
    
    h1 {
        font-size: 3rem;
    }
    
    h2 {
        font-size: 2.8rem;
    }
}

/* 額外的大螢幕優化 */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .hero-content h2 {
        font-size: 3.2rem;
    }
}
