/* cart.css — 購物車頁專用樣式（從 cart.html 抽離） */
body { margin: 0; padding: 0; background-color: #f4f4f4; font-family: "Microsoft JhengHei", sans-serif; }

/* 導覽列 RWD */
.brand-nav { background: #d2b48c; padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 1000; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.brand-nav a { text-decoration: none; color: #000; font-weight: bold; font-size: 1.1rem; font-family: "Kaiti", serif; }

/* 容器 RWD */
.cart-container { max-width: 600px; margin: 20px auto; background: white; padding: 20px; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); box-sizing: border-box; }

/* 購物車項目 RWD */
.cart-item { display: flex; justify-content: space-between; align-items: center; padding: 15px 0; border-bottom: 1px solid #eee; gap: 10px; }
.cart-item b { font-size: 1rem; color: #333; display: block; }
.cart-item small { color: #666; font-size: 0.85rem; }
.item-price-area { text-align: right; min-width: 100px; }

input, textarea { width: 100%; margin-bottom: 15px; padding: 14px; border: 1px solid #ddd; border-radius: 8px; box-sizing: border-box; font-family: inherit; font-size: 16px; /* 防止 iOS 輸入框自動放大 */ }
label { display: block; margin-bottom: 6px; font-weight: bold; color: #8b4513; font-size: 0.95rem; }

.checkout-btn { background: #8b4513; color: white; border: none; width: 100%; padding: 16px; font-weight: bold; border-radius: 8px; cursor: pointer; font-size: 1.1rem; transition: 0.3s; }
.checkout-btn:hover { background: #5d2e0d; }
.checkout-btn:disabled { background: #ccc; cursor: not-allowed; }

.del-btn { background: #ff4d4d; color: white; border: none; padding: 6px 10px; border-radius: 6px; cursor: pointer; font-size: 0.85rem; margin-left: 10px; }

.store-info-box { background: #fdf5e6; padding: 15px; border-radius: 8px; border: 1px solid #d2b48c; margin-bottom: 15px; }
.emap-link { color: #8b4513; text-decoration: underline; font-weight: bold; }

/* 針對小螢幕(手機)的額外微調 */
@media (max-width: 480px) {
    .cart-container { margin: 10px; padding: 15px; border-radius: 8px; }
    .brand-nav { padding: 12px 15px; }
    .brand-nav a { font-size: 1rem; }
    .cart-item { padding: 12px 0; }
    .cart-item b { font-size: 0.95rem; }
    #total-amount { font-size: 1.2rem; }
}

/* 門市選擇區（手填改良版） */
.store-title { font-size: 1rem; color: #5d2e0d; margin: 0 0 4px; }
.store-hint { font-size: 0.85rem; color: #6b5b43; line-height: 1.6; margin: 0 0 10px; }
.emap-btn {
  display: block; width: 100%; box-sizing: border-box; text-align: center;
  padding: 12px; margin: 0 0 16px; border-radius: 8px; font-weight: bold;
  text-decoration: none; border: 2px solid #8b4513; color: #8b4513; background: #fff;
  transition: background .2s ease, color .2s ease;
}
.emap-btn:hover { background: #8b4513; color: #fff; }
.store-field { margin-bottom: 10px; }
.store-field label { margin-bottom: 4px; font-size: 0.85rem; }
.store-field input { margin-bottom: 0; }
.store-note { display: block; color: #8b4513; font-size: 0.75rem; margin-top: 4px; }

/* 與首頁一致的導覽列：側邊選單、後台按鈕、購物車徽章（結構樣式，配色由 theme.css 接手） */
.logo-wrap { display: flex; align-items: center; text-decoration: none; color: #000; }
.nav-right { display: flex; align-items: center; gap: 15px; }
#admin-portal { background: #8b4513; color: #fff; padding: 6px 12px; border-radius: 4px; font-size: 0.85rem; text-decoration: none; font-weight: bold; }
.hidden { display: none !important; }
.cart-count-badge { background: #ff4d4d; color: #fff; border-radius: 50%; padding: 1px 7px; font-size: 0.8rem; margin-left: 2px; }
.sidebar { height: 100%; width: 280px; position: fixed; z-index: 2001; top: 0; left: -280px; background-color: #C5B496; transition: left 0.35s ease; 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-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; }
.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; }

/* 購物車下方：推薦商品 */
.reco-section { max-width: 1000px; margin: 10px auto 50px; padding: 0 20px; box-sizing: border-box; }
.reco-title { font-family: var(--font-disp, "Noto Serif TC", serif); color: var(--leather-deep, #45230c); border-left: 5px solid var(--gold-deep, #9a7a2c); padding-left: 12px; font-size: 1.3rem; margin: 0 0 18px; letter-spacing: .5px; }
.reco-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.reco-card { background: var(--surface, #fbf5e7); border: 1px solid rgba(107,52,16,.18); border-radius: 12px; overflow: hidden; text-decoration: none; display: flex; flex-direction: column; box-shadow: 0 4px 12px rgba(74,39,16,.10); transition: transform .2s ease, box-shadow .2s ease; }
.reco-card:hover { transform: translateY(-4px); box-shadow: 0 10px 22px rgba(74,39,16,.16); }
.reco-card img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: #eee; transition: transform .4s ease; }
.reco-card:hover img { transform: scale(1.05); }
.reco-name { padding: 10px 12px 4px; color: #2c2114; font-weight: 700; font-size: .95rem; line-height: 1.4; min-height: 2.6em; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.reco-price { padding: 0 12px 14px; color: var(--leather, #6b3410); font-weight: 700; font-family: var(--font-disp, serif); }