/* 
   workoutpartner 品牌設計系統 (Design Advisor Optimized)
   風格：極簡現代、柔和灰調 (#EAEFEF)、高級感間距
*/

:root {
    /* 顏色配置 (Color System) */
    --primary: #EAEFEF;            /* 使用者指定主色 */
    --primary-hover: #d8dfdf;      /* 稍深一點用於 hover */
    --primary-dark: #b8c2c2;       /* 深色版用於 active 或邊框 */
    
    --bg-main: #fcfdfd;            /* 極淺背景色 */
    --bg-card: #ffffff;            /* 純白卡片 */
    
    --text-primary: #1a1c1c;       /* 核心文字 */
    --text-secondary: #5a6262;     /* 輔助文字 */
    --text-light: #8e9a9a;         /* 說明小字 */
    
    --status-success: #4ade80;     /* 成功綠 */
    --status-error: #f87171;       /* 錯誤紅 */
    --status-warning: #fbbf24;     /* 警告黃 */
    
    /* 圓角與間距 (Visual Consistency) */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --padding-base: 1.5rem;
    
    /* 其他 */
    --transition: 0.2s ease;
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.03);
    --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.08);
}

/* 全域設定 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans TC', sans-serif; /* 優先使用 Noto Sans TC */
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.7; /* 優化間距：1.6~1.8 */
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: 'Outfit', 'Noto Sans TC', sans-serif;
    font-weight: 800;
    line-height: 1.2;
}

code, pre {
    font-family: 'JetBrains Mono', monospace;
}

/* 導航欄 (Navigation) */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.2rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 1px solid var(--primary);
    transition: var(--transition);
}

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-primary);
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo::before {
    content: "\f44b"; /* Font Awesome Dumbbell */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: var(--text-primary);
}

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

/* 隱藏手機端選單 (預設) */
@media (max-width: 768px) {
    .nav-links { display: none; }
}

.nav-links a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 1rem;
    transition: var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-dark);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

/* 下拉選單 (Dropdown) */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-card);
    min-width: 180px;
    box-shadow: var(--shadow-hover);
    border-radius: var(--radius-md);
    padding: 1rem 0;
    margin-top: 1rem;
    border: 1px solid var(--primary);
    z-index: 1001;
    animation: slideIn 0.3s ease;
}

.dropdown-content a {
    padding: 0.8rem 1.5rem;
    display: block;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.dropdown-content a::after { display: none; }

.dropdown-content a:hover {
    background: var(--bg-main);
    color: var(--text-primary);
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* 購物車圖示 */
.cart-icon {
    position: relative;
    cursor: pointer;
    font-size: 1.3rem;
    padding: 8px;
    background: var(--primary);
    border-radius: 50%;
    transition: var(--transition);
}

.cart-icon:hover {
    background: var(--primary-hover);
    transform: scale(1.05);
}

#cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--text-primary);
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* 英雄區塊 (Hero Section) */
.hero {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 10%;
    background: radial-gradient(circle at center, rgba(234, 239, 239, 0.4), transparent),
                url('https://images.unsplash.com/photo-1534438327276-14e5300c3a48?q=80&w=2070&auto=format&fit=crop') center/cover;
    background-attachment: fixed;
    margin-top: 60px;
}

.hero h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem); /* 響應式字級 */
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    letter-spacing: -2px;
}

.btn-primary {
    background: var(--text-primary);
    color: #fff;
    padding: 1.2rem 3rem;
    border-radius: var(--radius-lg);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
}

.btn-primary:hover {
    transform: translateY(-3px);
    background: var(--text-secondary);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* 內容區塊通用 */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 4rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
}

/* 關於我們 (About Section) */
.about-section {
    padding: 8rem 5%;
    background: #fff;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.about-item {
    text-align: left;
    padding: 3rem;
    background: var(--bg-main);
    border-radius: var(--radius-lg);
    transition: var(--transition);
    border: 1px solid var(--primary);
}

.about-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.about-item i {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 2rem;
    background: var(--primary);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.about-item h3 {
    margin-bottom: 1.2rem;
    font-size: 1.5rem;
}

.about-item p {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

/* 產品列表 (Product Section) */
.products-section {
    padding: 8rem 5%;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.product-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--primary);
    box-shadow: var(--shadow-soft);
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-dark);
}

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

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

.product-info {
    padding: 2rem;
}

.product-info h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
}

.product-info .price {
    font-size: 1.4rem;
    color: var(--text-primary);
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.add-to-cart {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--primary);
    background: transparent;
    color: var(--text-primary);
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.add-to-cart::before {
    content: "\f067"; /* Font Awesome Plus */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
}

.add-to-cart:hover {
    background: var(--primary);
    border-color: var(--primary);
}

/* 購物車側欄 (Cart Drawer) */
.cart-modal {
    position: fixed;
    top: 0;
    right: -450px;
    width: 450px;
    height: 100vh;
    background: var(--bg-card);
    box-shadow: -15px 0 50px rgba(0,0,0,0.1);
    z-index: 2000;
    padding: 3rem;
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

@media (max-width: 480px) {
    .cart-modal { width: 100%; right: -100%; }
}

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

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.close-cart {
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-light);
    transition: var(--transition);
}

.close-cart:hover {
    color: var(--text-primary);
    transform: rotate(90deg);
}

#cart-items {
    flex-grow: 1;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--primary);
}

.cart-total {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--text-primary);
}

.total-price {
    font-size: 1.8rem;
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.checkout-btn {
    width: 100%;
    padding: 1.5rem;
    background: var(--text-primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
}

.checkout-btn:hover {
    background: var(--text-secondary);
}

/* 頁尾 (Footer) */
footer {
    padding: 6rem 5%;
    text-align: center;
    background: var(--bg-main);
    border-top: 1px solid var(--primary);
}

.footer-content .slogan {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.footer-content p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

/* 響應式優化 (Responsive) */
@media (max-width: 1200px) {
    .section-title { font-size: 2.2rem; }
}

@media (max-width: 768px) {
    nav { padding: 1rem 5%; }
    .hero { min-height: 60vh; }
    .hero h1 { font-size: 2.8rem; }
    .about-section, .products-section { padding: 5rem 5%; }
    .about-grid { gap: 2rem; }
}

/* 微動畫 (Animations) */
@keyframes slideIn {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

