/* ============================================
   麥研私室 (Malt & Mill Studio) 
   品牌色彩系統 & 全站樣式
   ============================================ */

/* 品牌色彩定義 */
:root {
    --color-primary: #5D4037;        /* 大地棕 */
    --color-secondary: #DDBB99;      /* 暖麥黃 */
    --color-accent: #C9A961;         /* 淡金 */
    --color-light: #FAF9F6;          /* 麵粉白 */
    --color-dark: #3E2723;           /* 深棕 */
    --color-success: #66BB6A;        /* 綠色 */
    --color-warning: #FFA726;        /* 橙色 */
    --color-danger: #EF5350;         /* 紅色 */
    --color-text: #333333;           /* 正文色 */
    --color-text-light: #666666;     /* 淺文字 */
    --color-border: #E0D7D3;         /* 邊框色 */
}

/* ============================================
   基礎排版
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+TC:wght@400;500;600;700;900&family=Noto+Sans+TC:wght@400;500;700&display=swap');

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans TC', sans-serif;
    color: var(--color-text);
    background-color: var(--color-light);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Noto Serif TC', serif;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

h1 { font-size: 3rem; font-weight: 900; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    color: var(--color-text-light);
    margin-bottom: 1rem;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--color-accent);
}

/* ============================================
   導航欄
   ============================================ */

.navbar {
    background-color: var(--color-primary) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
}

.navbar-brand {
    font-family: 'Noto Serif TC', serif;
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--color-secondary) !important;
    letter-spacing: 1px;
}

.navbar-nav .nav-link {
    color: #ffffff !important;
    margin: 0 0.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--color-secondary) !important;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-secondary);
    transition: width 0.3s ease;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 100%;
}

/* ============================================
   按鈕樣式
   ============================================ */

.btn {
    font-weight: 600;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    border: none;
    font-family: 'Noto Sans TC', sans-serif;
}

.btn-primary {
    background-color: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--color-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(93, 64, 55, 0.3);
}

.btn-secondary {
    background-color: var(--color-secondary);
    color: var(--color-primary);
}

.btn-secondary:hover {
    background-color: var(--color-accent);
    color: white;
    transform: translateY(-2px);
}

.btn-accent {
    background-color: var(--color-accent);
    color: white;
}

.btn-accent:hover {
    background-color: #B89A52;
    color: white;
    transform: translateY(-2px);
}

.btn-outline-primary {
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
}

.btn-outline-primary:hover {
    background-color: var(--color-primary);
    color: white;
}

/* ============================================
   卡片與容器
   ============================================ */

.card {
    border: 1px solid var(--color-border);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: var(--color-light);
    border-bottom: 2px solid var(--color-secondary);
    padding: 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    color: var(--color-primary);
    font-weight: 700;
}

/* ============================================
   Hero 區塊
   ============================================ */

.hero-section {
    position: relative;
    height: 600px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(93, 64, 55, 0.5);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: white;
    text-align: center;
    max-width: 800px;
    animation: fadeInUp 1s ease-out;
}

.hero-content h1 {
    color: white;
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.3rem;
    margin-bottom: 2rem;
}

/* ============================================
   跑馬燈
   ============================================ */

.ticker {
    background-color: var(--color-primary);
    color: white;
    padding: 0.75rem;
    overflow: hidden;
    position: relative;
    font-weight: 600;
}

.ticker-content {
    display: flex;
    animation: scroll-left 15s linear infinite;
}

.ticker-item {
    white-space: nowrap;
    padding: 0 3rem;
    display: flex;
    align-items: center;
}

.ticker-item::before {
    content: '🔥';
    margin-right: 0.5rem;
}

@keyframes scroll-left {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* ============================================
   動畫效果
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.fade-in { animation: fadeIn 0.6s ease-out; }
.slide-in-left { animation: slideInLeft 0.6s ease-out; }
.slide-in-right { animation: slideInRight 0.6s ease-out; }
.pulse { animation: pulse 2s ease-in-out infinite; }

/* ============================================
   表單樣式
   ============================================ */

.form-control {
    border: 2px solid var(--color-border);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-family: 'Noto Sans TC', sans-serif;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 0.2rem rgba(221, 187, 153, 0.25);
}

.form-label {
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

/* ============================================
   頁尾
   ============================================ */

footer {
    background-color: var(--color-primary);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

footer h5 {
    color: var(--color-secondary);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

footer a {
    color: rgba(255, 255, 255, 0.8);
}

footer a:hover {
    color: var(--color-secondary);
}

.footer-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 2rem;
    padding-top: 2rem;
}

/* ============================================
   響應式設計
   ============================================ */

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    
    .hero-section {
        height: 400px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .navbar-brand {
        font-size: 1.5rem;
    }
}

/* ============================================
   工具類
   ============================================ */

.section-title {
    position: relative;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(to right, var(--color-secondary), var(--color-accent));
    border-radius: 2px;
}

.text-primary { color: var(--color-primary) !important; }
.text-secondary { color: var(--color-secondary) !important; }
.text-accent { color: var(--color-accent) !important; }

.bg-primary { background-color: var(--color-primary) !important; }
.bg-secondary { background-color: var(--color-secondary) !important; }
.bg-light { background-color: var(--color-light) !important; }

.border-secondary { border-color: var(--color-secondary) !important; }
.border-accent { border-color: var(--color-accent) !important; }

.shadow-sm { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); }
.shadow-md { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12); }
.shadow-lg { box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15); }

.rounded-lg { border-radius: 12px; }
.rounded-xl { border-radius: 16px; }

.transition-all { transition: all 0.3s ease; }

/* ============================================
   特殊組件
   ============================================ */

.badge-status {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-fresh {
    background-color: var(--color-success);
    color: white;
}

.badge-coming {
    background-color: var(--color-warning);
    color: white;
}

.badge-sold {
    background-color: var(--color-danger);
    color: white;
}

.rating {
    color: #FFD700;
    font-size: 1.2rem;
}

.divider {
    height: 1px;
    background: linear-gradient(to right, transparent, var(--color-border), transparent);
    margin: 2rem 0;
}

/* ============================================
   加載動畫
   ============================================ */

.spinner {
    border: 4px solid var(--color-border);
    border-top: 4px solid var(--color-secondary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
