/* index.css — 首頁專用樣式（從 index.html 抽離） */
/* --- 基礎設定 --- */
body { margin: 0; padding: 0; background-color: #f4f4f4; font-family: "Microsoft JhengHei", "PingFang TC", sans-serif; overflow-x: hidden; }

/* --- 導覽列 --- */
.brand-nav { background: #d2b48c; padding: 10px 20px; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 1000; height: 65px; box-sizing: border-box; }
.logo-wrap { display: flex; align-items: center; text-decoration: none; color: #000; }
.brand-nav h1.logo-text { margin: 0; font-weight: bold; font-size: 1.5rem; font-family: "Kaiti", serif; }
.nav-right { display: flex; align-items: center; gap: 15px; }
#admin-portal { background: #8b4513; color: white; padding: 6px 12px; border-radius: 4px; font-size: 0.85rem; text-decoration: none; font-weight: bold; }
.hidden { display: none !important; }

/* --- 側邊欄 --- */
.sidebar { height: 100%; width: 280px; position: fixed; z-index: 2001; top: 0; left: -280px; background-color: #C5B496; transition: 0.4s; overflow-y: auto; box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3); }
.sidebar.active { left: 0; }
.sidebar-search { background-color: #8C7A5B; padding: 15px; display: flex; align-items: center; gap: 8px; }
.sidebar-search input { flex: 1; background: #D9CEB2; border: none; padding: 8px 10px; border-radius: 4px; outline: none; }
.sidebar-user-links { list-style: none; padding: 10px 0; margin: 0; }
.sidebar-user-links li a { display: flex; align-items: center; padding: 15px 20px; color: #4A3C2C; text-decoration: none; font-weight: bold; }
.sidebar-nav-links { list-style: none; padding: 0; margin: 0; border-top: 1px dashed #8C7A5B; }
.sidebar-nav-links li a { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; color: #4A3C2C; text-decoration: none; border-bottom: 1px solid rgba(140, 122, 91, 0.1); font-weight: bold; }

/* --- 商品展示 --- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; padding: 20px 0; }
.card { background: #fff; border-radius: 12px; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); overflow: hidden; display: flex; flex-direction: column; height: 100%; transition: 0.3s; }
.card:hover { transform: translateY(-5px); }
.card img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: #eee; }
.card h3 { font-size: 1.1rem; margin: 15px; color: #333; line-height: 1.4; min-height: 2.8em; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .price { font-size: 1.2rem; color: #c0392b; font-weight: bold; padding: 0 15px; margin-bottom: 15px; }
.card .view-btn { margin: auto 15px 20px 15px; background: #000; color: #fff; text-align: center; padding: 10px; text-decoration: none; border-radius: 6px; font-weight: bold; }

/* --- 元件樣式 --- */
.hero-banner { width: 100%; height: 400px; background-color: #3a2a18; background-size: cover; background-position: center; background-repeat: no-repeat; }
.category-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 20px auto; max-width: 1000px; }
.tab-item { background: #fff; padding: 12px; text-align: center; border-bottom: 4px solid #8b4513; cursor: pointer; font-weight: bold; }
.tab-item.active { background: #eee; border-bottom-color: #5d2e0d; }
.seo-footer-text { margin-top: 50px; padding: 20px; color: #666; font-size: 0.9rem; line-height: 1.6; border-top: 1px solid #ddd; }
.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.8); z-index: 3000; justify-content: center; align-items: center; }
.modal-content { background: #C5B496; padding: 25px; border-radius: 12px; width: 90%; max-width: 450px; position: relative; }
.query-input { width: 100%; padding: 10px; margin: 10px 0; border-radius: 5px; border: 1px solid #8C7A5B; box-sizing: border-box; }
.query-btn { width: 100%; padding: 10px; background: #8b4513; color: white; border: none; border-radius: 5px; font-weight: bold; cursor: pointer; }
.menu-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.5); z-index: 2000; }
.menu-overlay.active { display: block; }