/* 全局樣式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 基本樣式 - 使用相對單位 */
body {
    font-family: 'Microsoft JhengHei', 'PingFang TC', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
    font-size: 16px; /* 基準字體大小 */
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1em; /* 改用em */
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: #333;
    transition: color 0.3s ease;
}

a:hover {
    color: #ff6b6b;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
}

.section-title {
    text-align: center;
    margin-bottom: 2.5em; /* 改用em */
    font-size: 2.2em; /* 改用em */
    color: #333;
    position: relative;
    padding-bottom: 0.9em; /* 改用em */
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 5em; /* 改用em */
    height: 0.2em; /* 改用em */
    background-color: #4caf50;
}

/* 按鈕樣式 - 使用相對單位 */
.btn {
    display: inline-block;
    padding: 0.75em 1.5em; /* 改用em */
    border-radius: 2em; /* 改用em */
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 1em; /* 改用em */
}

.btn-primary {
    background-color: #4caf50;
    color: white;
}

.btn-primary:hover {
    background-color: #3d8b40;
    color: white;
}

.btn-secondary {
    background-color: #ff6b6b;
    color: white;
}

.btn-secondary:hover {
    background-color: #ff5252;
    color: white;
}

.btn-accent {
    background-color: #ffb74d;
    color: #333;
}

.btn-accent:hover {
    background-color: #ffa726;
    color: #333;
}

.btn-outline {
    background-color: transparent;
    border: 0.125em solid #4caf50; /* 改用em */
    color: #4caf50;
}

.btn-outline:hover {
    background-color: #4caf50;
    color: white;
}

/* 導航欄 - 使用相對單位 */
header {
    background-color: #fff;
    box-shadow: 0 0.125em 0.625em rgba(0, 0, 0, 0.1); /* 改用em */
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1em 0; /* 改用em */
}

/* 主容器布局 - 使用 flex 實現三區塊排列 */
header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative; /* 為絕對定位的子元素提供參考 */
}

/* 左側 Logo 區域 */
.logo-container {
    flex: 1;
    display: flex;
    align-items: center;
    margin-right: auto; /* 確保右側有足夠空間 */
    max-width: fit-content; /* 根據內容自動調整寬度 */
}

.logo-image {
    height: 3.75em; /* 改用em */
    width: auto; /* 避免 HTML width/height 屬性讓瀏覽器把寬度鎖死在原始像素值，導致圖片被拉伸變形 */
    margin-right: 1em; /* 改用em */
}

/* 添加或修改 .logo 樣式 */
.logo {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.logo h1 {
    font-size: 1.8em;
    color: #4caf50;
    margin-bottom: 0.25em;
    transition: font-size 0.3s ease; /* 添加過渡效果 */
    transform-origin: left center; /* 從左側開始縮放 */
}

.logo p {
    font-size: 0.9em;
    color: #777;
    margin: 0;
    transition: font-size 0.3s ease; /* 添加過渡效果 */
    transform-origin: left center; /* 從左側開始縮放 */
}

/* 右側元素區域 - 新添加的區域 */
.header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 auto; /* 不縮放 */
    margin-left: 20px; /* 與logo區域保持距離 */
}

/* 桌面版隱藏手機專用元素 */
.menu-close-container,
.menu-overlay,
.mobile-actions,
.user-profile-mobile {
    display: none;
}

/* 中間導航區域 */
nav {
    flex: 2;
    display: flex;
    justify-content: center;
    min-width: 0; /* 允許縮小 */
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
}

nav ul li {
    margin: 0 1em; /* 改用em */
}

nav ul li a {
    font-weight: 600;
    font-size: 1.1em; /* 改用em */
    position: relative;
    text-decoration: none;
    color: #333;
    transition: color 0.3s ease;
}

nav ul li a.active, 
nav ul li a:hover {
    color: #4caf50;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -0.3em; /* 改用em */
    left: 0;
    width: 0;
    height: 0.125em; /* 改用em */
    background-color: #4caf50;
    transition: width 0.3s ease;
}

nav ul li a.active::after,
nav ul li a:hover::after {
    width: 100%;
}

/* 購物車圖標樣式 */
.cart-icon-container {
    position: relative;
    display: inline-flex; /* 改為 inline-flex 更好控制 */
    align-items: center;
    margin-right: 0.625em; /* 改用em，減少右邊距 */
}

.cart-icon {
    color: #333;
    font-size: 1.5em; /* 改用em，稍微縮小圖標 */
    transition: color 0.3s ease;
    display: flex; /* 確保圖標垂直居中 */
    align-items: center;
    padding: 0.375em 0.5em; /* 改用em，添加內邊距，讓圖標有更多"呼吸空間" */
    border-radius: 0.25em; /* 改用em，添加圓角，與按鈕風格一致 */
}

.cart-icon:hover {
    color: #4caf50;
    background-color: rgba(76, 175, 80, 0.05); /* 懸停時添加淡綠色背景 */
}

.cart-count {
    position: absolute;
    top: -0.375em; /* 改用em，調整位置 */
    right: -0.375em; /* 改用em */
    background-color: #4caf50;
    color: white;
    font-size: 0.7em; /* 改用em，稍微縮小數字 */
    font-weight: bold;
    height: 1.5em; /* 改用em，稍微縮小圓圈 */
    width: 1.5em; /* 改用em */
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease;
}

.cart-count.update {
    transform: scale(1.5);
}

/* 會員系統 - 未登入狀態 */
.user-actions {
    display: flex;
    align-items: center;
}

.user-actions a {
    margin-left: 1em; /* 改用em */
    color: #333;
    text-decoration: none;
    font-size: 0.9em; /* 改用em */
    transition: color 0.3s ease;
}

.user-actions a:hover {
    color: #4caf50;
}

.user-actions .btn-login {
    padding: 0.5em 1em; /* 改用em */
    background-color: transparent;
    border: 0.0625em solid #4caf50; /* 改用em */
    border-radius: 0.25em; /* 改用em */
    color: #4caf50;
}

.user-actions .btn-register {
    padding: 0.5em 1em; /* 改用em */
    background-color: #4caf50;
    border: 0.0625em solid #4caf50; /* 改用em */
    border-radius: 0.25em; /* 改用em */
    color: white;
}

.user-actions .btn-login:hover {
    background-color: #f5f5f5;
}

.user-actions .btn-register:hover {
    background-color: #3d8b40;
    color: white;
}

/* 會員系統 - 已登入狀態 */
.user-profile {
    display: none; /* 預設隱藏 */
    position: relative;
}

.user-profile .user-name {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0.5em 1em; /* 改用em */
    border-radius: 0.25em; /* 改用em */
    transition: background-color 0.3s ease;
}

.user-profile .user-name:hover {
    background-color: #f5f5f5;
}

.user-profile .user-name i {
    margin-right: 0.3em; /* 改用em */
    font-size: 1.2em; /* 改用em */
}

.user-menu {
    display: none;
    position: absolute;
    top: 2.5em; /* 改用em */
    right: 0;
    background-color: white;
    min-width: 10em; /* 改用em */
    box-shadow: 0 0.5em 1em rgba(0, 0, 0, 0.2); /* 改用em */
    z-index: 1;
    border-radius: 0.25em; /* 改用em */
    overflow: hidden;
}

.user-menu a {
    color: #333;
    padding: 0.75em 1em; /* 改用em */
    text-decoration: none;
    display: block;
    transition: background-color 0.3s ease;
}

.user-menu a:hover {
    background-color: #f5f5f5;
}

.user-menu a i {
    margin-right: 0.625em; /* 改用em */
    width: 1em; /* 改用em */
    text-align: center;
}

/* 漢堡選單按鈕 */
.menu-toggle {
    display: none; /* 在桌面版隱藏 */
    background: none;
    border: none;
    font-size: 1.5em; /* 改用em */
    cursor: pointer;
    color: #4caf50;
}

/* 手機版頂部購物車樣式 */
.mobile-header-actions {
    display: none; /* 默認隱藏在所有視圖中 */
}

/* 首頁英雄區域 - 更新為背景圖片並淡化處理 */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('../images/garden-hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* 視差滾動效果 */
    color: white;
    padding: 5em 0; /* 原本 7.5em 太高，下方又要加布告欄，縮小一點 */
    text-align: center;
    margin-bottom: 3.75em; /* 改用em */
    position: relative;
}

/* 添加額外的覆蓋層來確保文字清晰度 */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3); /* 額外的淡化層 */
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2; /* 確保內容在覆蓋層之上 */
}

.hero-content {
    max-width: 43.75em; /* 改用em */
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero h2 {
    font-size: 2.2em; /* 原本 3em 比例太大，縮小一點 */
    margin-bottom: 0.6em; /* 改用em */
    text-shadow: 0.0625em 0.0625em 0.1875em rgba(0, 0, 0, 0.7); /* 增強文字陰影 */
    font-weight: 700;
}

.hero p {
    font-size: 1.1em; /* 原本 1.3em，跟著標題一起縮小 */
    margin-bottom: 1.2em; /* 改用em */
    text-shadow: 0.0625em 0.0625em 0.1875em rgba(0, 0, 0, 0.7); /* 增強文字陰影 */
    line-height: 1.6;
}

/* Hero 特色亮點區塊 */
.hero-highlight {
    background: rgba(255, 255, 255, 0.1); /* 半透明白色背景 */
    backdrop-filter: blur(10px); /* 毛玻璃效果 */
    border-radius: 1em;
    padding: 1.2em;
    margin: 1.5em 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 0.5em 1.5em rgba(0, 0, 0, 0.2);
}

.hero-highlight p {
    margin-bottom: 0.8em;
    font-size: 1em;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
}

.hero-highlight p:last-child {
    margin-bottom: 0;
}

.hero-highlight i {
    margin-right: 0.8em;
    color: #4caf50;
    font-size: 1.2em;
    text-shadow: 0 0.1em 0.2em rgba(0, 0, 0, 0.5);
}

/* 布告欄：1 則置中單卡，2 則並排格線，手機一律單欄 */
.bulletin-board {
    padding: 3.75em 0;
    background-color: #fff;
    margin-bottom: 3.75em;
}

.bulletin-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.75em;
    max-width: 45em;
    margin: 0 auto;
}

.bulletin-grid.bulletin-grid-2 {
    max-width: 67.5em;
    grid-template-columns: 1fr 1fr;
}

.bulletin-card {
    background: #fff;
    border-radius: 1em;
    box-shadow: 0 0.625em 2.1875em rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid #f0f0f0;
}

.bulletin-card .bulletin-body {
    padding: 2.25em 2.5em;
}

.bulletin-card .bulletin-body i.bulletin-icon {
    font-size: 1.3em;
    color: #4caf50;
    display: block;
    margin-bottom: 0.9em;
}

.bulletin-card .bulletin-text {
    font-size: 1.15em;
    line-height: 1.9;
    color: #444;
    white-space: pre-line;
}

.bulletin-card .bulletin-image {
    width: 100%;
    line-height: 0;
}

.bulletin-card .bulletin-image img {
    /* 不裁切，依原始比例縮放，避免把公告圖片重要內容切掉 */
    width: 100%;
    height: auto;
    display: block;
}

.bulletin-empty {
    text-align: center;
    color: #999;
    padding: 2em;
}

/* 頁面橫幅樣式 */
.page-banner {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../images/banner-bg.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 5em 0; /* 改用em */
    text-align: center;
    margin-bottom: 3.75em; /* 改用em */
}

.page-banner h1 {
    font-size: 2.8em; /* 改用em */
    margin-bottom: 0.5em; /* 改用em */
    text-shadow: 0.0625em 0.0625em 0.1875em rgba(0, 0, 0, 0.5); /* 改用em */
}

.page-banner p {
    font-size: 1.2em; /* 改用em */
    max-width: 43.75em; /* 改用em */
    margin: 0 auto;
    text-shadow: 0.0625em 0.0625em 0.1875em rgba(0, 0, 0, 0.5); /* 改用em */
}

/* 關於我們頁面樣式 */
.about-banner {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../images/about-banner.jpg');
}

.about-intro {
    padding: 3.75em 0; /* 改用em */
    background-color: #fff;
    margin-bottom: 3.75em; /* 改用em */
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5em; /* 改用em */
    align-items: center;
}

.about-image {
    border-radius: 0.625em; /* 改用em */
    overflow: hidden;
    box-shadow: 0 0.625em 1.875em rgba(0, 0, 0, 0.2); /* 改用em */
}

.about-text h2 {
    font-size: 2em; /* 改用em */
    margin-bottom: 0.625em; /* 改用em */
    color: #4caf50;
}

.about-text p {
    margin-bottom: 0.9375em; /* 改用em */
    font-size: 1.1em; /* 改用em */
    color: #555;
}

/* 園藝專業區域特殊樣式 */
.specialty-note {
    background: rgba(255, 193, 7, 0.1);
    border-left: 0.25em solid #ffc107;
    padding: 1em;
    margin: 1.5em 0;
    border-radius: 0.25em;
    font-size: 0.95em;
}

.specialty-note p {
    margin: 0;
    color: #856404;
}

/* 聯絡我們頁面樣式 */
.contact-banner {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../images/contact-banner.jpg');
}

.contact-info {
    padding: 3.75em 0; /* 改用em */
    background-color: #fff;
    margin-bottom: 3.75em; /* 改用em */
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 2.5em; /* 改用em */
}

.contact-details {
    padding: 1.875em; /* 改用em */
    background-color: #f9f9f9;
    border-radius: 0.625em; /* 改用em */
    box-shadow: 0 0.3125em 0.9375em rgba(0, 0, 0, 0.1); /* 改用em */
}

.contact-details h2 {
    font-size: 1.8em; /* 改用em */
    margin-bottom: 1.6em; /* 改用em */
    color: #4caf50;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5625em; /* 改用em */
}

.contact-icon {
    font-size: 1.5em; /* 改用em */
    color: #4caf50;
    margin-right: 0.9375em; /* 改用em */
    min-width: 2.5em; /* 改用em */
    text-align: center;
}

.contact-text h3 {
    font-size: 1.2em; /* 改用em */
    margin-bottom: 0.3125em; /* 改用em */
}

.contact-text p {
    color: #555;
}

.social-contact {
    margin-top: 1.875em; /* 改用em */
}

.social-contact h3 {
    font-size: 1.2em; /* 改用em */
    margin-bottom: 0.9375em; /* 改用em */
}

/* 精選產品區域 */
.featured-products {
    padding: 3.75em 0; /* 改用em */
    background-color: #fff;
    margin-bottom: 3.75em; /* 改用em */
}


/* 商品網格布局 - 固定列數版本 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.875em; 
    margin-bottom: 2.5em; 
}

/* 大螢幕4列 */
@media (min-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 平板3列 */
@media (min-width: 768px) and (max-width: 1199px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 手機2列 */
@media (max-width: 767px) {
    .product-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}

/* 商品卡片容器 - 垂直佈局版本 */
.product-card {
    background-color: #fff;
    border-radius: 0.625em;
    overflow: hidden;
    box-shadow: 0 0.1875em 0.625em rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    height: 100%; /* 確保所有卡片等高 */
    cursor: pointer; /* 整張卡片可點擊，開啟商品詳細介紹彈跳視窗 */
}

.product-card:hover {
    transform: translateY(-0.3em); 
    box-shadow: 0 0.6em 1.2em rgba(0, 0, 0, 0.15); 
}

/* 商品圖片區域 - 保持原樣 */
.product-image {
    height: 12.5em; 
    position: relative;
    overflow: hidden;
    background-color: #f8f8f8;
    flex-shrink: 0; /* 圖片區域不縮放 */
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

/* 商品標籤 */
.product-tag {
    position: absolute;
    top: 0.625em;
    right: 0.625em;
    padding: 0.3125em 0.625em;
    background-color: #ff6b6b;
    color: white;
    font-size: 0.75em;
    font-weight: 600;
    border-radius: 1.875em;
    z-index: 2;
}

/* 已下架商品：整張卡片降低透明度、圖片灰階，讓顧客知道曾經有這項商品，
   但不會誤以為現在還能買。跟 .product-tag 分開放在左上角，避免兩個標籤疊在一起 */
.product-card.unavailable {
    opacity: 0.55;
}

.product-card.unavailable .product-image img {
    filter: grayscale(70%);
}

.unavailable-badge {
    position: absolute;
    top: 0.625em;
    left: 0.625em;
    padding: 0.25em 0.625em;
    background-color: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-size: 0.75em;
    border-radius: 0.25em;
    z-index: 2;
}

/* 商品信息區域 - 全部靠左對齊版本 */
.product-info {
    padding: 0.5em 0.5em 1.2em 1em; /* 左邊距調整為 0.8em，增加一些美觀的間距 */
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* 填滿剩餘空間 */
    justify-content: space-between; /* 內容分散對齊 */
    text-align: left !important; /* 強制靠左對齊 */
    align-items: flex-start !important; /* 強制子元素靠左 */
}

/* 商品內容區域 */
.product-content {
    flex-grow: 1;
    margin-bottom: 1em;
    text-align: left !important; /* 強制靠左對齊 */
    width: 100%; /* 佔滿寬度 */
    display: flex;
    flex-direction: column;
    align-items: flex-start !important; /* 強制子元素靠左 */
}

/* 商品名稱 */
.product-info h3 {
    font-size: 1.2em; 
    margin-bottom: 0.6em; 
    color: #333;
    font-weight: 700;
    line-height: 1.4;
    text-align: left !important; /* 強制靠左對齊 */
    margin-left: 0; /* 移除負值，自然靠左 */
    width: 100%; /* 佔滿寬度 */
    display: block; /* 確保是塊級元素 */
}

/* 商品描述 - 卡片上只顯示 2 行，完整內容點卡片後在彈跳視窗看 */
.product-desc {
    color: #666;
    margin-bottom: 0.4em;
    font-size: 0.9em;
    line-height: 1.4;
    text-align: left !important; /* 強制靠左對齊 */
    margin-left: 0; /* 移除負值，自然靠左 */
    width: 100%; /* 佔滿寬度 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 「查看詳細介紹」提示 - 讓外人一眼就看得出卡片可以點進去看更多 */
.product-detail-hint {
    color: #4caf50;
    font-size: 0.8em;
    font-weight: 600;
    margin: 0 0 0.8em;
    display: flex;
    align-items: center;
    gap: 0.3em;
}

.product-detail-hint i {
    font-size: 0.85em;
}

/* 商品價格 */
.product-price {
    font-size: 1.4em; 
    font-weight: 700;
    color: #ff6b6b;
    margin-bottom: 0.4em;
    text-align: left !important; /* 強制靠左對齊 */
    margin-left: 0; /* 移除負值，自然靠左 */
    width: 100%; /* 佔滿寬度 */
    display: block; /* 確保是塊級元素 */
}

.view-more {
    text-align: center;
}

/* 庫存顯示樣式 - 靠左對齊版本 */
.stock-info {
    font-size: 0.8em;
    color: #777;
    margin-bottom: 1.2em;
    font-weight: 500;
    text-align: left; /* 靠左對齊 */
    margin-left: 0; /* 移除負值，自然靠左 */
}

.low-stock {
    color: #ff6b6b;
    font-weight: 600;
    text-align: left; /* 靠左對齊 */
    margin-left: 0; /* 移除負值，自然靠左 */
}

/* 按鈕區域 - 同一行水平排列 */
.product-actions {
    display: flex;
    justify-content: space-between; /* 改回兩端對齊確保同一行 */
    align-items: center;
    gap: 0.5em; /* 減少間距 */
    margin-top: auto; /* 推到最底部 */
    margin-left: 0; /* 確保貼齊左側 */
    width: 100%; /* 確保佔滿寬度 */
}

/* 加入購物車按鈕 - 佔據左側空間 */
.add-to-cart-btn {
    flex: 1; /* 改回自動拉伸，但限制最大寬度 */
    max-width: calc(100% - 3.5em); /* 預留愛心按鈕空間 */
    background-color: #fff;
    color: #4caf50;
    border: 1.5px solid #4caf50; 
    border-radius: 0.4em; 
    padding: 0.8em 1em; 
    font-weight: 600;
    font-size: 0.9em;
    transition: all 0.3s ease;
    cursor: pointer;
    outline: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-transform: none;
    letter-spacing: 0.5px;
    text-align: center;
    position: relative; /* 為偽元素定位 */
    min-width: 100px; /* 減少最小寬度 */
}

.add-to-cart-btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(76, 175, 80, 0.1);
    transition: all 0.3s ease;
    z-index: -1; /* 確保在按鈕文字下方 */
}

.add-to-cart-btn:hover {
    background-color: #4caf50;
    color: white;
    /* 這顆按鈕本身不再額外位移：卡片整張已經有 hover 上浮效果了，
       按鈕自己再疊加一次位移，滑鼠停在按鈕邊緣時視覺上的按鈕位置會跟著跳開，
       導致滑鼠時而在按鈕內、時而在外，hover 狀態一直閃爍、按鈕跟著亂跳 */
    box-shadow: 0 0.2em 0.4em rgba(76, 175, 80, 0.3);
}

.add-to-cart-btn:hover:before {
    left: 100%;
}

.add-to-cart-btn:active {
    transform: translateY(0);
    box-shadow: 0 0.1em 0.2em rgba(0, 0, 0, 0.1); 
}

/* 禁用狀態 */
.add-to-cart-btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #f5f5f5;
    color: #999;
    border-color: #ddd;
}

.add-to-cart-btn[disabled]:hover {
    background-color: #f5f5f5;
    color: #999;
    transform: none;
    box-shadow: none;
}

/* 愛心按鈕 - 固定在右側 */
.wish-btn {
    width: 3em;
    height: 3em;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: #fff;
    border: 1.5px solid #e0e0e0;
    color: #999;
    transition: all 0.3s ease;
    cursor: pointer;
    flex-shrink: 0; /* 防止被壓縮 */
    position: relative; /* 確保獨立的懸停效果 */
}

.wish-btn:hover {
    border-color: #ff6b6b;
    color: #ff6b6b;
    background-color: #fff5f5;
    transform: scale(1.05);
}

.wish-btn.active {
    background-color: #ff6b6b;
    border-color: #ff6b6b;
    color: white;
}

.wish-btn .fa-heart {
    transition: transform 0.3s ease, color 0.3s ease;
    font-size: 1.1em;
}

.wish-btn:hover .fa-heart {
    transform: scale(1.1);
}

.wish-btn.active .fa-heart {
    transform: scale(1);
}

/* ========== 商品詳細介紹彈跳視窗 ========== */
body.modal-open-noscroll {
    overflow: hidden;
}

.product-detail-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 3000;
    align-items: center;
    justify-content: center;
    padding: 1.5em;
}

.product-detail-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.product-detail-panel {
    position: relative;
    background: #fff;
    border-radius: 1em;
    max-width: 50em;
    width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    box-shadow: 0 1.5em 3em rgba(0, 0, 0, 0.25);
    animation: productDetailPopIn 0.25s ease;
}

@keyframes productDetailPopIn {
    from { opacity: 0; transform: translateY(0.8em) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.product-detail-close {
    position: absolute;
    top: 0.8em;
    right: 0.8em;
    width: 2.2em;
    height: 2.2em;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    font-size: 1em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0.125em 0.5em rgba(0, 0, 0, 0.15);
    z-index: 2;
    transition: all 0.2s ease;
}

.product-detail-close:hover {
    background: #ff6b6b;
    color: #fff;
    transform: rotate(90deg);
}

.product-detail-body {
    display: flex;
    flex-direction: column;
}

.product-detail-image {
    position: relative;
    height: 16em;
    flex-shrink: 0;
    background-color: #f8f8f8;
    border-radius: 1em 1em 0 0;
    overflow: hidden;
}

.product-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* 詳細介紹要看清楚完整商品照，不能像卡片縮圖一樣裁切掉邊緣 */
}

.product-detail-info {
    padding: 1.5em;
}

.product-detail-info h2 {
    font-size: 1.5em;
    color: #333;
    margin-bottom: 0.5em;
    line-height: 1.4;
}

.product-detail-price {
    font-size: 1.6em;
    font-weight: 700;
    color: #ff6b6b;
    margin-bottom: 0.3em;
}

.product-detail-stock {
    font-size: 0.9em;
    color: #777;
    font-weight: 500;
    margin-bottom: 1em;
}

.product-detail-section-label {
    font-size: 0.85em;
    font-weight: 700;
    color: #4caf50;
    margin: 1.2em 0 0.4em;
}

.product-detail-section-label:first-of-type {
    margin-top: 0;
}

.product-detail-desc-text {
    color: #555;
    font-size: 0.95em;
    line-height: 1.7;
    white-space: pre-wrap;
}

.product-detail-actions {
    display: flex;
    align-items: center;
    gap: 0.8em;
    margin-top: 1.5em;
    padding-top: 1.2em;
    border-top: 1px solid #f0f0f0;
}

.product-detail-actions .add-to-cart-btn {
    max-width: none;
}

@media (min-width: 700px) {
    .product-detail-body {
        flex-direction: row;
    }

    .product-detail-image {
        height: auto;
        width: 45%;
        border-radius: 1em 0 0 1em;
    }

    .product-detail-info {
        width: 55%;
        overflow-y: auto;
    }
}

/* 加入購物車按鈕動畫 */
@keyframes btnAdded {
    0% { 
        transform: scale(1); 
        background-color: #fff; 
        color: #4caf50; 
    }
    50% { 
        transform: scale(1.05); 
        background-color: #4caf50; 
        color: white; 
    }
    100% { 
        transform: scale(1); 
        background-color: #4caf50; 
        color: white; 
    }
}

.btn-added {
    animation: btnAdded 0.5s forwards;
    background-color: #4caf50 !important;
    color: white !important;
    box-shadow: 0 0.125em 0.5em rgba(76, 175, 80, 0.4); 
}

/* 加入購物車成功提示 */
@keyframes success-icon {
    from { opacity: 0; transform: scale(0.5); }
    to { opacity: 1; transform: scale(1); }
}

.add-to-cart-btn.success:after {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    right: 0.625em; /* 改用em */
    animation: success-icon 0.3s forwards;
}

/* 加入購物車按鈕動畫 */
.add-to-cart-btn.added {
    background-color: #4caf50;
    color: white;
}

/* 特別優惠區域 */
.special-offer {
    padding: 3.75em 0; /* 改用em */
    background-color: #f1f8e9;
    margin-bottom: 3.75em; /* 改用em */
}

.special-offer .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5em; /* 改用em */
    align-items: center;
}

.offer-content h2 {
    font-size: 2.5em; /* 改用em */
    color: #4caf50;
    margin-bottom: 0.3em; /* 改用em */
}

.offer-content h3 {
    font-size: 1.8em; /* 改用em */
    margin-bottom: 0.5em; /* 改用em */
}

.offer-content p {
    font-size: 1.1em; /* 改用em */
    margin-bottom: 1em; /* 改用em */
    color: #555;
}

.offer-price {
    font-size: 1.5em !important; /* 改用em */
    font-weight: 700;
    color: #ff6b6b !important;
    margin-bottom: 1em !important; /* 改用em */
}

.offer-image {
    border-radius: 0.625em;
    overflow: hidden;
    box-shadow: 0 0.625em 1.875em rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
}

.offer-image img {
    width: 80%;
    height: 80%;
    object-fit: cover;
    display: block;
}

/* 優勢區域 */
.benefits {
    padding: 3.75em 0; /* 改用em */
    background-color: #fff;
    margin-bottom: 3.75em; /* 改用em */
}

.benefit-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(18.75em, 1fr)); /* 改用em */
    gap: 1.875em; /* 改用em */
}

.benefit {
    text-align: center;
    padding: 1.875em; /* 改用em */
    border-radius: 0.625em; /* 改用em */
    background-color: #f9f9f9;
    transition: transform 0.3s ease;
}

.benefit:hover {
    transform: translateY(-0.625em); /* 改用em */
    box-shadow: 0 0.625em 1.25em rgba(0, 0, 0, 0.1); /* 改用em */
}

.benefit-icon {
    font-size: 2.5em; /* 改用em */
    color: #4caf50;
    margin-bottom: 0.8em; /* 改用em */
}

.benefit h3 {
    font-size: 1.5em; /* 改用em */
    margin-bottom: 0.625em; /* 改用em */
}

.benefit p {
    color: #666;
}

/* 果園展示區域 - 接續第一部分 */
.farm-showcase {
    padding: 3.75em 0;
    background-color: #f1f8e9;
    margin-bottom: 3.75em;
}

.farm-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5em;
    align-items: center;
}

.farm-image {
    border-radius: 0.625em;
    overflow: hidden;
    box-shadow: 0 0.625em 1.875em rgba(0, 0, 0, 0.2);
}

.farm-text h3 {
    font-size: 1.8em;
    margin-bottom: 0.7em;
    color: #4caf50;
}

.farm-text p {
    margin-bottom: 1.5625em;
    font-size: 1.1em;
    color: #555;
}

/* 核心價值區域 */
.core-values {
    padding: 3.75em 0;
    background-color: #f1f8e9;
    margin-bottom: 3.75em;
}

.values-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15.625em, 1fr));
    gap: 1.875em;
}

.value-card {
    background-color: #fff;
    border-radius: 0.625em;
    padding: 1.875em;
    text-align: center;
    box-shadow: 0 0.3125em 0.9375em rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.value-card:hover {
    transform: translateY(-0.625em);
}

.value-icon {
    font-size: 2.5em;
    color: #4caf50;
    margin-bottom: 0.8em;
}

.value-card h3 {
    font-size: 1.5em;
    margin-bottom: 0.625em;
}

.value-card p {
    color: #666;
}

/* 關於農場 */
.about-farms {
    background-color: #fff;
}

.farms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(18.75em, 1fr));
    gap: 1.875em;
}

.farm-card {
    border-radius: 0.625em;
    overflow: hidden;
    box-shadow: 0 0.3125em 0.9375em rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.farm-card:hover {
    transform: translateY(-0.625em);
}

.farm-card .farm-image {
    height: 12.5em;
    overflow: hidden;
}

.farm-card .farm-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.farm-card:hover .farm-image img {
    transform: scale(1.1);
}

.farm-info {
    padding: 1.25em;
    background-color: #fff;
}

.farm-info h3 {
    font-size: 1.5em;
    margin-bottom: 0.625em;
    color: #4caf50;
}

.farm-info p {
    color: #555;
}

/* 團隊成員 */
.team {
    padding: 3.75em 0;
    background-color: #f1f8e9;
    margin-bottom: 3.75em;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(17.5em, 1fr));
    gap: 1.875em;
}

.team-member {
    background-color: #fff;
    border-radius: 0.625em;
    overflow: hidden;
    box-shadow: 0 0.3125em 0.9375em rgba(0, 0, 0, 0.1);
}

.member-image {
    height: 18.75em;
    overflow: hidden;
}

.member-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-info {
    padding: 1.25em;
}

.member-info h3 {
    font-size: 1.5em;
    margin-bottom: 0.3125em;
}

.member-title {
    font-size: 1em;
    color: #4caf50;
    margin-bottom: 0.9375em;
}

.member-desc {
    color: #555;
}

.about-testimonials {
    background-color: #f1f8e9;
}

/* 顧客評價區域 */
.testimonials {
    padding: 3.75em 0;
    background-color: #fff;
    margin-bottom: 3.75em;
}

.testimonial-slider {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(18.75em, 1fr));
    gap: 1.875em;
    animation: slide 20s infinite;
}

.testimonial {
    padding: 1.875em;
    background-color: #f9f9f9;
    border-radius: 0.625em;
    box-shadow: 0 0.3125em 0.9375em rgba(0, 0, 0, 0.1);
}

.testimonial-content {
    margin-bottom: 1.25em;
    font-style: italic;
    font-size: 1.1em;
}

.testimonial-author {
    text-align: right;
    font-weight: 600;
    color: #4caf50;
}

@keyframes slide {
    0% {
        opacity: 0.7;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        opacity: 0.7;
    }
}

/* 產品頁面樣式 */
.product-filters {
    padding: 1.875em 0;
    background-color: #f9f9f9;
    margin-bottom: 2.5em;
}

.filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25em;
    margin-bottom: 1.25em;
}

.filter-group {
    display: flex;
    align-items: center;
}

.filter-group label {
    margin-right: 0.625em;
    font-weight: 600;
}

.filter-group select {
    padding: 0.5em 0.9375em;
    border: 0.0625em solid #ddd;
    border-radius: 0.3125em;
    font-size: 1em;
}

.search-container {
    display: flex;
    max-width: 25em;
}

.search-container input {
    flex: 1;
    padding: 0.625em 0.9375em;
    border: 0.0625em solid #ddd;
    border-radius: 0.3125em 0 0 0.3125em;
    font-size: 1em;
}

.search-container button {
    padding: 0 0.9375em;
    background-color: #4caf50;
    color: white;
    border: none;
    border-radius: 0 0.3125em 0.3125em 0;
    cursor: pointer;
}

.products-display {
    padding: 2.5em 0;
    background-color: #fff;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 2.5em;
}

.pagination-btn {
    width: 2.5em;
    height: 2.5em;
    margin: 0 0.3125em;
    border: 0.0625em solid #ddd;
    background-color: #f9f9f9;
    border-radius: 0.3125em;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination-btn.active,
.pagination-btn:hover {
    background-color: #4caf50;
    color: white;
    border-color: #4caf50;
}

.pagination-btn.next {
    width: auto;
    padding: 0 0.9375em;
}

.product-info-banner {
    padding: 3.75em 0;
    background-color: #f1f8e9;
    margin-bottom: 3.75em;
}

.info-content {
    max-width: 50em;
    margin: 0 auto;
    text-align: center;
}

.info-content h2 {
    font-size: 2em;
    margin-bottom: 1.5em;
    color: #4caf50;
}

.info-content ul {
    list-style: none;
    margin-bottom: 1.875em;
}

.info-content ul li {
    font-size: 1.1em;
    margin-bottom: 0.9375em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-content ul li i {
    color: #4caf50;
    margin-right: 0.625em;
}

/* 聯絡表單 */
.contact-form-container {
    padding: 1.875em;
    background-color: #fff;
    border-radius: 0.625em;
    box-shadow: 0 0.3125em 0.9375em rgba(0, 0, 0, 0.1);
}

.contact-form-container h2 {
    font-size: 1.8em;
    margin-bottom: 1.5em;
    color: #4caf50;
}

.contact-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25em;
}

.form-group {
    margin-bottom: 1.25em;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    display: block;
    margin-bottom: 0.5em;
    font-weight: 600;
}

.form-group .required {
    color: #ff6b6b;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75em;
    border: 0.0625em solid #ddd;
    border-radius: 0.3125em;
    font-size: 1em;
}

.form-group textarea {
    resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #4caf50;
    outline: none;
    box-shadow: 0 0 0.3125em rgba(76, 175, 80, 0.3);
}

/* 縣市／鄉鎮市區下拉選單：關掉瀏覽器原生外觀（手機上開深色模式常會跑出
   跟頁面不搭的黑框），自己畫下拉箭頭 */
.form-group select {
    -webkit-appearance: none;
    appearance: none;
    background-color: #fff;
    color: #333;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%23666' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.875em center;
    background-size: 0.6875em;
    padding-right: 2.125em;
}

.form-group select:disabled {
    background-color: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

/* 地圖區域 */
.map-section {
    padding: 3.75em 0;
    background-color: #f1f8e9;
    margin-bottom: 3.75em;
}

.map-container {
    height: 25em;
    border-radius: 0.625em;
    overflow: hidden;
    box-shadow: 0 0.3125em 0.9375em rgba(0, 0, 0, 0.1);
}

.map-placeholder {
    width: 100%;
    height: 100%;
    background-color: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* FAQ 區域 */
.faq-section {
    padding: 3.75em 0;
    background-color: #fff;
    margin-bottom: 3.75em;
}

.faq-container {
    max-width: 50em;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 0.9375em;
    border: 0.0625em solid #ddd;
    border-radius: 0.3125em;
    overflow: hidden;
}

.faq-question {
    padding: 0.9375em 1.25em;
    background-color: #f9f9f9;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question h3 {
    font-size: 1.2em;
    margin: 0;
}

.faq-toggle {
    color: #4caf50;
}

.faq-answer {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    padding: 0.9375em 1.25em;
}

.faq-answer p {
    color: #555;
}

/* CTA 區域 */
.cta-section {
    padding: 3.75em 0;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../images/cta-bg.jpg');
    background-size: cover;
    background-position: center;
    text-align: center;
    color: white;
    margin-bottom: 3.75em;
}

.cta-content {
    max-width: 43.75em;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: 2.5em;
    margin-bottom: 0.5em;
}

.cta-content p {
    font-size: 1.2em;
    margin-bottom: 1.5em;
}

/* 頁腳區域 */
footer {
    background-color: #333;
    color: #fff;
    padding: 3.75em 0 1.25em;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15.625em, 1fr));
    gap: 2.5em;
    margin-bottom: 2.5em;
}

.footer-section h3 {
    font-size: 1.5em;
    margin-bottom: 1em;
    color: #4caf50;
}

.footer-section p {
    margin-bottom: 0.625em;
    color: #bbb;
}

.social-links {
    display: flex;
    margin-top: 1.25em;
}

.social-links a {
    display: inline-block;
    width: 2.5em;
    height: 2.5em;
    background-color: #444;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.625em;
    transition: background-color 0.3s ease;
}

.social-links a:hover {
    background-color: #4caf50;
}

.copyright {
    text-align: center;
    padding-top: 1.25em;
    border-top: 0.0625em solid #444;
    color: #888;
}

.disclaimer {
    font-style: italic;
    color: #ffc107 !important;
    margin-top: 0.5em;
}

/* 彈出登入/註冊表單樣式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 1.875em;
    border-radius: 0.625em;
    max-width: 25em;
    box-shadow: 0 0.3125em 0.9375em rgba(0, 0, 0, 0.2);
    position: relative;
}

.close-btn {
    position: absolute;
    top: 0.9375em;
    right: 0.9375em;
    font-size: 1.5em;
    cursor: pointer;
    color: #777;
}

.close-btn:hover {
    color: #333;
}

.form-footer {
    margin-top: 1.25em;
    text-align: center;
}

.form-footer p {
    margin-top: 0.9375em;
    font-size: 0.9em;
}

.form-footer a {
    color: #4caf50;
    text-decoration: none;
}

.form-footer a:hover {
    text-decoration: underline;
}

/* 回到頂部按鈕 */
.scroll-to-top {
    position: fixed;
    bottom: 1.875em;
    right: 1.875em;
    width: 3.125em;
    height: 3.125em;
    background-color: #4caf50;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.2em;
    cursor: pointer;
    box-shadow: 0 0.1875em 0.625em rgba(0, 0, 0, 0.2);
    z-index: 999;
    display: none;
    transition: background-color 0.3s ease;
}

.scroll-to-top:hover {
    background-color: #3d8b40;
}

/* 提示訊息 */
.toast {
    position: fixed;
    bottom: 1.875em;
    left: 50%;
    transform: translateX(-50%) translateY(6.25em);
    background-color: #4caf50;
    color: white;
    padding: 0.9375em 1.875em;
    border-radius: 0.3125em;
    box-shadow: 0 0.1875em 0.625em rgba(0, 0, 0, 0.2);
    z-index: 9999;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* 產品圖片懸停效果 */
.product-image.hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

/* 動畫效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(1.25em);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* 自定義滾動條 */
::-webkit-scrollbar {
    width: 0.625em;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #4caf50;
    border-radius: 0.3125em;
}

::-webkit-scrollbar-thumb:hover {
    background: #3d8b40;
}

/* 提示訊息樣式 */
.toast-message {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s;
}

.toast-message.show {
    opacity: 1;
}

/* 載入指示器樣式 */
.loading-indicator {
    width: 100%;
    text-align: center;
    padding: 30px;
    color: #666;
    font-style: italic;
}

.no-products {
    width: 100%;
    text-align: center;
    padding: 30px;
    color: #666;
    font-style: italic;
}

/* 購物車更新動畫 */
.cart-count.update {
    animation: pulse 0.3s ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.5); }
    100% { transform: scale(1); }
}

/* 響應式設計 */
@media (max-width: 1200px) {
    html {
        font-size: 95%; /* 縮小基準字體大小 */
    }
}

@media (max-width: 992px) {
    html {
        font-size: 90%; /* 進一步縮小基準字體大小 */
    }
    
    .logo p {
        font-size: 0.8em;
    }
    
    /* 確保導航項目可以縮小 */
    nav ul li {
        margin: 0 0.5em;
    }
    
    .hero h2 {
        font-size: 2.5em;
    }
    
    .special-offer .container,
    .farm-content {
        grid-template-columns: 1fr;
    }
    
    .offer-content,
    .farm-text {
        order: 1;
    }
    
    .offer-image,
    .farm-image {
        order: 0;
    }
    
    .checkout-container {
        flex-direction: column;
    }
    
    .checkout-summary {
        position: static;
        order: -1;
        margin-bottom: 1.875em;
    }
    
    nav ul li {
        margin: 0 0.625em;
    }
    
    .user-actions .btn-login,
    .user-actions .btn-register {
        padding: 0.375em 0.75em;
        font-size: 0.9em;
    }
}

/* 手機版響應式設計 - 修正頂部布局 */
@media (max-width: 768px) {
    html {
        font-size: 85%; /* 更進一步縮小基準字體大小 */
    }
    
    /* 頁面頂部布局 - 新增手機版布局修正 */
    header .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        height: 60px; /* 固定高度 */
        padding: 0 15px; /* 左右內邊距 */
        position: relative;
    }
    
    /* 漢堡選單按鈕 */
    .menu-toggle {
        display: block !important;
        position: absolute;
        left: 15px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1002;
        font-size: 22px;
        background: none;
        border: none;
        color: #4caf50;
        cursor: pointer;
    }
    
    /* Logo容器設為flex，確保圖標和文字並排 */
    .logo-container {
        display: flex;
        align-items: center;
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%); /* 居中 */
        margin: 0;
        max-width: 60%; /* 限制寬度避免重疊 */
    }
    
    /* 調整Logo圖片大小 */
    .logo-image {
        height: 40px; /* 使用固定像素值 */
        margin-right: 8px;
    }
    
    /* 確保Logo文字部分保持垂直排列 */
    .logo {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    .logo h1 {
        font-size: 16px; /* 使用固定像素值 */
        margin-bottom: 0;
        white-space: nowrap; /* 防止文字換行 */
    }
    
    .logo p {
        font-size: 10px; /* 使用固定像素值 */
        margin: 0;
        white-space: nowrap; /* 防止文字換行 */
    }
    
    /* 購物車位置調整 - 絕對定位在右側 */
    .mobile-header-actions {
        display: flex !important;
        position: absolute !important;
        right: 15px !important;
        top: 0 !important; /* 改為頂部對齊 */
        height: 100% !important; /* 與容器同高 */
        align-items: center !important; /* 垂直居中 */
        justify-content: center !important;
        margin: 0 !important;
        padding: 0 !important;
        z-index: 1001 !important;
    }
    
    /* 購物車圖標樣式 */
    .mobile-header-actions .cart-icon {
        font-size: 22px;
        color: #333;
        padding: 5px;
    }
    
    /* 購物車計數器樣式 */
    .mobile-header-actions .cart-count {
        position: absolute;
        top: -8px;
        right: -8px;
        background-color: #4caf50;
        color: white;
        border-radius: 50%;
        width: 18px;
        height: 18px;
        font-size: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* 隱藏桌面版右側元素 */
    .header-right {
        display: none !important;
    }
    
    /* 導航選單樣式 */
    nav {
        width: 100%;
        margin: 0;
    }
    
    /* 重要：正確定義選單狀態 */
    nav ul {
        display: none;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        width: 80%;
        height: 100vh;
        background-color: white;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        z-index: 1001;
        padding: 60px 0 20px;
        transition: transform 0.3s ease;
        transform: translateX(-100%);
        overflow-y: auto;
    }
    
    /* 當nav有active類時顯示ul */
    nav.active ul {
        display: flex !important;
        transform: translateX(0) !important;
    }
    
    /* 選單項目樣式 */
    nav ul li {
        margin: 5px 20px;
        width: calc(100% - 40px);
    }
    
    nav ul li a {
        display: block;
        padding: 12px 15px;
        border-bottom: 1px solid #eee;
    }
    
    /* 顯示移動版按鈕 */
    .mobile-actions {
        display: block !important;
        margin-top: 10px;
        width: 100%;
        padding: 0 20px;
    }

    /* 手機版選單：已登入狀態的會員資訊卡片。原本會員資料/訂單記錄/
       我的訊息是預設的行內連結排版，擠成一團不好按也不好讀，改成
       淺灰底卡片＋直向清單，每個連結有 icon 間距、點擊會反白 */
    .user-profile-mobile {
        background-color: #f9f9f9;
        border-radius: 0.5em;
        padding: 0.75em 0.9em;
        margin-top: 0.625em;
    }

    .user-profile-mobile .user-info {
        display: flex;
        align-items: center;
        gap: 0.625em;
        padding-bottom: 0.75em;
        margin-bottom: 0.5em;
        border-bottom: 1px solid #e0e0e0;
        font-weight: 600;
        color: #333;
    }

    .user-profile-mobile .user-info i {
        font-size: 1.4em;
        color: #4caf50;
    }

    .user-profile-mobile .user-links {
        display: flex;
        flex-direction: column;
        gap: 0.25em;
    }

    .user-profile-mobile .user-links a {
        display: flex;
        align-items: center;
        gap: 0.625em;
        padding: 0.625em 0.5em;
        color: #333;
        text-decoration: none;
        border-radius: 0.375em;
        transition: background-color 0.2s ease;
    }

    .user-profile-mobile .user-links a:hover,
    .user-profile-mobile .user-links a:active {
        background-color: #eee;
    }

    .user-profile-mobile .user-links a i {
        width: 1.2em;
        text-align: center;
        color: #666;
    }

    /* 遮罩層樣式 */
    .menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }
    
    .menu-overlay.active {
        display: block;
    }
    
    /* 當body有menu-open類時防止滾動 */
    body.menu-open {
        overflow: hidden;
    }
    
    /* 手機版頁面內容調整 */
    .hero {
        padding: 5em 0;
        /* 保持背景圖片效果 */
        background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('../images/garden-hero-bg.jpg');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        background-attachment: fixed; /* 保持視差效果 */
        color: white;
        text-align: center;
        margin-bottom: 3.75em;
        position: relative;
        /* 確保在手機版有最小高度以顯示完整背景 */
        min-height: 60vh;
        display: flex;
        align-items: center;
    }
    
    /* 確保覆蓋層在手機版也正確顯示 */
    .hero::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.3);
        z-index: 1;
    }
    
    .hero .container {
        position: relative;
        z-index: 2;
        width: 100%;
    }
    
    .hero-content {
        max-width: 90%;
        margin: 0 auto;
        position: relative;
        z-index: 2;
    }
    
    .hero h2 {
        font-size: 2em;
        margin-bottom: 0.6em;
        text-shadow: 0.0625em 0.0625em 0.1875em rgba(0, 0, 0, 0.7);
        font-weight: 700;
    }
    
    .hero p {
        font-size: 1.1em;
        margin-bottom: 1.5em;
        text-shadow: 0.0625em 0.0625em 0.1875em rgba(0, 0, 0, 0.7);
        line-height: 1.6;
    }
    
    .hero-highlight {
        padding: 1.2em;
        margin: 1.5em 0;
        background: rgba(255, 255, 255, 0.15);
        backdrop-filter: blur(10px);
        border-radius: 1em;
        border: 1px solid rgba(255, 255, 255, 0.2);
        box-shadow: 0 0.5em 1.5em rgba(0, 0, 0, 0.2);
    }
    
    .hero-highlight p {
        font-size: 1em;
        margin-bottom: 0.8em;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        text-align: left;
    }
    
    .hero-highlight p:last-child {
        margin-bottom: 0;
    }
    
    .hero-highlight i {
        margin-right: 0.8em;
        color: #4caf50;
        font-size: 1.2em;
        text-shadow: 0 0.1em 0.2em rgba(0, 0, 0, 0.5);
        min-width: 1.5em;
    }
    
    .section-title {
        font-size: 1.8em;
    }

    .bulletin-grid.bulletin-grid-2 {
        grid-template-columns: 1fr;
    }

    .bulletin-card .bulletin-body {
        padding: 1.5em 1.25em;
    }

    .bulletin-card .bulletin-text {
        font-size: 1em;
        line-height: 1.7;
    }

    /* 手機版商品卡片調整 - 垂直佈局版本 */
.product-grid {
    grid-template-columns: repeat(1, 1fr);
    gap: 1em;
}
    
    .product-image {
        height: 10em;
    }
    
    .product-info {
        padding: 1em 1em 1.2em;
    }
    
    .product-info h3 {
        font-size: 1.1em;
        margin-bottom: 0.5em;
    }
    
    .product-desc {
        font-size: 0.85em;
        margin-bottom: 0.7em;
    }
    
    .product-price {
        font-size: 1.2em;
        margin-bottom: 0.3em;
    }
    
    .stock-info {
        font-size: 0.75em;
        margin-bottom: 1em;
    }
    
    .add-to-cart-btn {
        padding: 0.7em 0.8em;
        font-size: 0.85em;
    }
    
    .wish-btn {
        width: 2.8em;
        height: 2.8em;
    }
    
    /* 響應式表單調整 */
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .checkout-progress {
        display: none;
    }
    
    /* 響應式網格調整 */
    .benefit-container,
    .testimonial-slider {
        grid-template-columns: 1fr;
    }
    
    .contact-grid,
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .filter-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    /* 彈窗調整 */
    .modal-content {
        margin: 20% auto;
        width: 90%;
    }
}

/* 更小屏幕的優化 */
@media (max-width: 480px) {
    /* 進一步縮小Logo容器寬度 */
    .logo-container {
        max-width: 50%;
    }
    
    /* 調整Logo文字大小 */
    .logo h1 {
        font-size: 14px;
    }
    
    .logo p {
        font-size: 9px;
    }
    
    /* 調整Logo圖片大小 */
    .logo-image {
        height: 35px;
    }
    
    .hero {
        padding: 4em 0;
        min-height: 50vh;
        background-size: cover;
        background-position: center;
    }
    
    .hero h2 {
        font-size: 1.8em;
    }
    
    .hero p {
        font-size: 1em;
    }
    
    .hero-highlight {
        padding: 1em;
        margin: 1.2em 0;
    }
    
    .hero-highlight p {
        font-size: 0.95em;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .hero-highlight i {
        margin-bottom: 0.3em;
        margin-right: 0;
    }
}

/* 極小屏幕的優化 */
@media (max-width: 375px) {
    .hero {
        padding: 3.5em 0;
        min-height: 45vh;
    }
    
    .hero h2 {
        font-size: 1.6em;
        margin-bottom: 0.5em;
    }
    
    .hero p {
        font-size: 0.95em;
        margin-bottom: 1.2em;
    }
    
    .hero-highlight {
        padding: 0.8em;
        margin: 1em 0;
    }
    
    .hero-highlight p {
        font-size: 0.9em;
        margin-bottom: 0.6em;
    }
    /* 最大限度縮小標題區域 */
    .logo-container {
        max-width: 45%;
    }
    
    /* 更小的Logo圖片 */
    .logo-image {
        height: 30px;
        margin-right: 5px;
    }
    
    /* 更小的標題文字 */
    .logo h1 {
        font-size: 12px;
    }
    
    /* 極小屏幕上隱藏副標題以節省空間 */
    .logo p {
        display: none;
    }
    
    .product-grid {
    grid-template-columns: repeat(1, 1fr);
    gap: 0.8em;
}
    
    .product-image {
        height: 8em;
    }
    
    .product-info {
        padding: 0.8em 0.8em 1em;
    }
    
    .product-info h3 {
        font-size: 1em;
        margin-bottom: 0.4em;
    }
    
    .product-desc {
        font-size: 0.8em;
        margin-bottom: 0.6em;
    }
    
    .product-price {
        font-size: 1.1em;
        margin-bottom: 0.3em;
    }
    
    .stock-info {
        font-size: 0.7em;
        margin-bottom: 0.8em;
    }
    
    .add-to-cart-btn {
        padding: 0.6em 0.7em;
        font-size: 0.8em;
    }
    
    .wish-btn {
        width: 2.5em;
        height: 2.5em;
    }
    
    /* 模態對話框調整 */
    .modal-content {
        margin: 25% auto;
        padding: 1.25em;
    }
    
    .close-btn {
        top: 0.625em;
        right: 0.625em;
        font-size: 1.3em;
    }
}

/* 管理員按鈕樣式 */
.admin-link {
    color: #ffffff !important;
    background-color: #e53935 !important;
    border-radius: 4px;
    padding: 5px 10px !important;
    margin: 5px 0;
    transition: background-color 0.3s ease;
}

.admin-link:hover {
    background-color: #c62828 !important;
}

.admin-link i {
    margin-right: 5px;
}

/* 確保手機版也有相同樣式。
   注意：display 沒有覆蓋成 flex——js/member.js 顯示這顆按鈕時是用
   adminBtnMobile.style.display = 'block'（inline style），永遠會蓋掉
   這裡的 CSS，所以維持預設的 block 排版，icon 用 margin-right 保留間距
   （不能改用 .user-links 其他項目那種 gap 對齊，block 底下 gap 不會生效）*/
.user-profile-mobile .admin-link {
    text-align: left;
    margin: 4px 0 0;
}

/* 使管理按鈕在選單中更突出 */
#user-menu .admin-link {
    margin-top: 8px;
    margin-bottom: 8px;
}

/* 管理仪表盘样式 */

/* 管理员面板基础样式 */
.admin-container {
    max-width: 75em;
    margin: 3.125em auto;
    padding: 1.875em;
    background-color: #fcfcfc;
    box-shadow: 0 0.125em 1.5em rgba(0, 0, 0, 0.08);
    border-radius: 0.75em;
}

.admin-title {
    color: #2c3e50;
    margin-bottom: 1.875em;
    font-size: 1.8em;
    position: relative;
    padding-bottom: 0.5em;
}

.admin-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 3em;
    height: 0.2em;
    background-color: #4caf50;
    border-radius: 0.1em;
}

/* 仪表盘统计卡片 */
.admin-dashboard {
    margin-bottom: 2.5em;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15em, 1fr));
    gap: 1.25em;
}

.stat-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 0.75em;
    box-shadow: 0 0.3em 1em rgba(0, 0, 0, 0.08), 
                inset 0 0.2em 0.2em rgba(255, 255, 255, 0.8), 
                inset 0 -0.1em 0.1em rgba(0, 0, 0, 0.05);
    padding: 1.5em;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    border-left: 0.3em solid;
}

.stat-card:nth-child(1) {
    border-left-color: #4caf50;
}

.stat-card:nth-child(2) {
    border-left-color: #3498db;
}

.stat-card:nth-child(3) {
    border-left-color: #f39c12;
}

.stat-card:nth-child(4) {
    border-left-color: #9b59b6;
}

.stat-card:hover {
    transform: translateY(-0.3125em);
    box-shadow: 0 0.5em 1.5em rgba(0, 0, 0, 0.12), 
                inset 0 0.2em 0.2em rgba(255, 255, 255, 0.8), 
                inset 0 -0.1em 0.1em rgba(0, 0, 0, 0.05);
}

.stat-icon {
    width: 3.75em;
    height: 3.75em;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1.25em;
    box-shadow: 0 0.2em 0.6em rgba(0, 0, 0, 0.1), 
                inset 0 0.1em 0.2em rgba(255, 255, 255, 0.6), 
                inset 0 -0.1em 0.1em rgba(0, 0, 0, 0.05);
}

.stat-card:nth-child(1) .stat-icon {
    background: linear-gradient(135deg, #4caf50 0%, #66bb6a 100%);
}

.stat-card:nth-child(2) .stat-icon {
    background: linear-gradient(135deg, #3498db 0%, #5dade2 100%);
}

.stat-card:nth-child(3) .stat-icon {
    background: linear-gradient(135deg, #f39c12 0%, #f5b041 100%);
}

.stat-card:nth-child(4) .stat-icon {
    background: linear-gradient(135deg, #9b59b6 0%, #bb8fce 100%);
}

.stat-icon i {
    font-size: 1.5em;
    color: white;
    text-shadow: 0 0.05em 0.1em rgba(0, 0, 0, 0.2);
}

.stat-info h3 {
    font-size: 0.95em;
    color: #7f8c8d;
    margin-bottom: 0.5em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-number {
    font-size: 1.8em;
    font-weight: 700;
    color: #2c3e50;
}

/* 管理功能导航 */
.admin-navigation {
    margin-bottom: 2.5em;
}

.admin-navigation h2 {
    margin-bottom: 1.25em;
    font-size: 1.4em;
    color: #2c3e50;
    position: relative;
    padding-bottom: 0.5em;
}

.admin-navigation h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 2.5em;
    height: 0.15em;
    background-color: #4caf50;
    border-radius: 0.1em;
}

.admin-nav-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25em;
}

.admin-nav-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 0.75em;
    box-shadow: 0 0.3em 1em rgba(0, 0, 0, 0.08), 
                inset 0 0.2em 0.2em rgba(255, 255, 255, 0.8), 
                inset 0 -0.1em 0.1em rgba(0, 0, 0, 0.05);
    padding: 1.875em;
    text-align: center;
    transition: all 0.3s ease;
    color: #2c3e50;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

.admin-nav-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0.3em;
    background-color: #e9e9e9;
    transition: background-color 0.3s ease;
}

.admin-nav-card:nth-child(1)::before {
    background-color: #4caf50;
}

.admin-nav-card:nth-child(2)::before {
    background-color: #3498db;
}

.admin-nav-card:nth-child(3)::before {
    background-color: #f39c12;
}

.admin-nav-card:nth-child(4)::before {
    background-color: #9b59b6;
}

.admin-nav-card:hover {
    transform: translateY(-0.3125em);
    box-shadow: 0 0.5em 1.5em rgba(0, 0, 0, 0.12), 
                inset 0 0.2em 0.2em rgba(255, 255, 255, 0.8), 
                inset 0 -0.1em 0.1em rgba(0, 0, 0, 0.05);
}

.nav-card-icon {
    width: 4em;
    height: 4em;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25em;
    box-shadow: 0 0.2em 0.6em rgba(0, 0, 0, 0.1), 
                inset 0 0.1em 0.2em rgba(255, 255, 255, 0.6), 
                inset 0 -0.1em 0.1em rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.admin-nav-card:hover .nav-card-icon {
    transform: scale(1.05);
}

.admin-nav-card:nth-child(1) .nav-card-icon {
    background: linear-gradient(135deg, #4caf50 0%, #66bb6a 100%);
}

.admin-nav-card:nth-child(2) .nav-card-icon {
    background: linear-gradient(135deg, #3498db 0%, #5dade2 100%);
}

.admin-nav-card:nth-child(3) .nav-card-icon {
    background: linear-gradient(135deg, #f39c12 0%, #f5b041 100%);
}

.admin-nav-card:nth-child(4) .nav-card-icon {
    background: linear-gradient(135deg, #9b59b6 0%, #bb8fce 100%);
}

.nav-card-icon i {
    font-size: 1.8em;
    color: white;
    text-shadow: 0 0.05em 0.1em rgba(0, 0, 0, 0.2);
}

.admin-nav-card h3 {
    font-size: 1.25em;
    margin-bottom: 0.625em;
    color: #2c3e50;
    transition: color 0.3s ease;
}

.admin-nav-card p {
    color: #7f8c8d;
    font-size: 0.95em;
}

/* 最近订单 */
.recent-orders {
    margin-bottom: 2.5em;
}

.recent-orders h2 {
    margin-bottom: 1.25em;
    font-size: 1.4em;
    color: #2c3e50;
    position: relative;
    padding-bottom: 0.5em;
}

.recent-orders h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 2.5em;
    height: 0.15em;
    background-color: #4caf50;
    border-radius: 0.1em;
}

.table-responsive {
    overflow-x: auto;
    margin-bottom: 1.25em;
    border-radius: 0.5em;
    box-shadow: 0 0.3em 1em rgba(0, 0, 0, 0.08);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 0.5em;
    overflow: hidden;
}

.admin-table th, 
.admin-table td {
    padding: 1em 1.25em;
    text-align: left;
    border-bottom: 0.0625em solid #ecf0f1;
}

.admin-table th {
    background: linear-gradient(to bottom, #f5f7f8 0%, #ebf0f1 100%);
    font-weight: 600;
    color: #34495e;
    text-transform: uppercase;
    font-size: 0.85em;
    letter-spacing: 0.05em;
    border-bottom: 0.15em solid #4caf50;
}

.admin-table tr {
    background-color: #ffffff;
    transition: background-color 0.3s ease;
}

.admin-table tr:hover {
    background-color: #f8f9fa;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.placeholder-row td {
    text-align: center;
    color: #95a5a6;
    padding: 1.875em;
    font-style: italic;
}

.status-badge {
    display: inline-block;
    padding: 0.4em 0.8em;
    border-radius: 1.25em;
    font-size: 0.85em;
    font-weight: 600;
    text-align: center;
    min-width: 6em;
    box-shadow: 0 0.1em 0.3em rgba(0, 0, 0, 0.1);
}

.status-badge.pending {
    background: linear-gradient(to bottom, #fff7e6 0%, #ffe9cc 100%);
    color: #b7791f;
    border: 0.0625em solid #ffefd8;
}

.status-badge.confirmed {
    background: linear-gradient(to bottom, #ebf8ff 0%, #d1ecff 100%);
    color: #2b6cb0;
    border: 0.0625em solid #e2f2ff;
}

.status-badge.shipped {
    background: linear-gradient(to bottom, #e6fffa 0%, #ccffef 100%);
    color: #2c7a7b;
    border: 0.0625em solid #d8ffee;
}

.status-badge.completed {
    background: linear-gradient(to bottom, #f0fff4 0%, #dcfce7 100%);
    color: #276749;
    border: 0.0625em solid #e1ffea;
}

.status-badge.cancelled {
    background: linear-gradient(to bottom, #fff5f5 0%, #ffebed 100%);
    color: #c53030;
    border: 0.0625em solid #ffecee;
}

.action-btn {
    background: linear-gradient(to bottom, #ffffff 0%, #f5f5f5 100%);
    border: 0.0625em solid #e0e0e0;
    color: #505050;
    font-size: 1em;
    cursor: pointer;
    margin-right: 0.625em;
    transition: all 0.3s ease;
    width: 2.5em;
    height: 2.5em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 0.1em 0.3em rgba(0, 0, 0, 0.1), 
                inset 0 0.1em 0.1em rgba(255, 255, 255, 0.7);
}

.action-btn:hover {
    transform: translateY(-0.15em);
    box-shadow: 0 0.2em 0.5em rgba(0, 0, 0, 0.15), 
                inset 0 0.1em 0.1em rgba(255, 255, 255, 0.7);
}

.action-btn.view-btn:hover {
    background: linear-gradient(to bottom, #4caf50 0%, #43a047 100%);
    border-color: #388e3c;
    color: white;
}

.action-btn.edit-btn:hover {
    background: linear-gradient(to bottom, #3498db 0%, #2980b9 100%);
    border-color: #2471a3;
    color: white;
}

.action-btn.delete-btn:hover {
    background: linear-gradient(to bottom, #e74c3c 0%, #c0392b 100%);
    border-color: #a93226;
    color: white;
}

.view-all {
    text-align: center;
    margin-top: 1.5em;
}

.view-all .btn-primary {
    background: linear-gradient(to bottom, #4caf50 0%, #43a047 100%);
    color: white;
    padding: 0.7em 1.5em;
    border-radius: 2em;
    font-weight: 600;
    font-size: 0.9em;
    transition: all 0.3s ease;
    box-shadow: 0 0.2em 0.5em rgba(76, 175, 80, 0.3), 
                inset 0 0.1em 0.1em rgba(255, 255, 255, 0.3);
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.view-all .btn-primary:hover {
    background: linear-gradient(to bottom, #43a047 0%, #388e3c 100%);
    transform: translateY(-0.15em);
    box-shadow: 0 0.3em 0.7em rgba(76, 175, 80, 0.4), 
                inset 0 0.1em 0.1em rgba(255, 255, 255, 0.3);
}

/* 管理页脚 */
.admin-footer {
    color: #95a5a6;
    font-size: 0.9em;
    text-align: center;
    margin-top: 2em;
}

/* 管理後台響應式設計調整 */
@media (max-width: 992px) {
    .admin-nav-cards {
        grid-template-columns: repeat(1, 1fr);
    }
}

@media (max-width: 768px) {
    .admin-stats {
        grid-template-columns: repeat(auto-fit, minmax(12.5em, 1fr));
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .stat-icon {
        margin-right: 0;
        margin-bottom: 0.9375em;
    }
    
    .admin-nav-cards {
        grid-template-columns: 1fr;
    }
    
    .admin-title {
        font-size: 1.5em;
    }
    
    .recent-orders h2,
    .admin-navigation h2 {
        font-size: 1.25em;
    }
}

@media (max-width: 480px) {
    .admin-container {
        padding: 1.25em 0.9375em;
    }
    
    .admin-stats {
        grid-template-columns: 1fr;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 0.625em;
    }
    
    .stat-number {
        font-size: 1.3em;
    }
}

.admin-notes-form {
    margin-top: 25px;
    padding: 15px;
    background-color: #e8f4f8;
    border-radius: 6px;
    border-left: 4px solid #2196f3;
}

.admin-notes-form h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
    font-size: 16px;
}

.admin-notes-form textarea {
    width: 100%;
    min-height: 100px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
    font-family: inherit;
    resize: vertical;
}

.admin-notes-form button {
    background-color: #2196f3;
    border-color: #2196f3;
}

.admin-notes-form button:hover {
    background-color: #0b7dda;
    border-color: #0b7dda;
}

/* iOS Safari背景圖片修復 */
@supports (-webkit-touch-callout: none) {
    .hero {
        background-attachment: scroll !important;
        background-size: cover;
        background-position: center center;
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
    }
}

/* 橫屏模式調整 */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        min-height: 80vh;
        padding: 3em 0;
    }
    
    .hero h2 {
        font-size: 1.8em;
    }
    
    .hero p {
        font-size: 1em;
    }
    
    .hero-highlight {
        padding: 1em;
    }
    
    .hero-highlight p {
        flex-direction: row;
        text-align: left;
    }
    
    .hero-highlight i {
        margin-right: 0.6em;
        margin-bottom: 0;
    }
}