/* ============================================================
 * DIRSEC 静态站交互补丁层样式
 * 颜色跟随 Barcelona 主题变量，缺省回退为米白/深棕
 * ============================================================ */

:root {
  --dc-ink: #3f2a20;
  --dc-paper: #faf7f2;
  --dc-line: #e8e0d5;
  --dc-accent: #8a6f52;
}

/* ---------- 购物车抽屉内容 ---------- */
.dc-cart-items { display: flex; flex-direction: column; gap: 4px; padding: 0 18px; overflow-y: auto; }
.dc-cart-empty { text-align: center; padding: 48px 16px; color: var(--dc-ink, #3f2a20); }
.dc-cart-empty p { margin: 0 0 18px; font-size: 15px; }

.dc-cart-item { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--dc-line, #e8e0d5); }
.dc-cart-img { flex: 0 0 84px; height: 104px; border-radius: 8px; overflow: hidden; background: var(--dc-paper, #faf7f2); display: block; }
.dc-cart-img img { width: 100%; height: 100%; object-fit: cover; }
.dc-cart-info { flex: 1; min-width: 0; }
.dc-cart-name { color: inherit; font-weight: 600; font-size: 14px; text-decoration: none; display: block; }
.dc-cart-variant { color: #8a7d6f; font-size: 12.5px; margin-top: 3px; }
.dc-cart-row { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.dc-cart-price { font-weight: 650; font-size: 14px; margin-left: auto; }
.dc-remove { background: none; border: none; color: #9a8c7d; font-size: 12px; cursor: pointer; text-decoration: underline; padding: 0; }
.dc-remove:hover { color: #b0453a; }

.dc-qty { display: inline-flex; align-items: center; border: 1px solid var(--dc-line, #e8e0d5); border-radius: 999px; }
.dc-qty-btn { background: none; border: none; width: 30px; height: 30px; font-size: 16px; cursor: pointer; color: var(--dc-ink, #3f2a20); line-height: 1; }
.dc-qty-n { min-width: 26px; text-align: center; font-size: 13.5px; }

.dc-drawer-overlay { position: fixed; inset: 0; background: rgba(20, 12, 6, 0.45); opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 98; }
.dc-drawer-overlay.show { opacity: 1; pointer-events: auto; }

.dc-cart-foot-inner { padding: 14px 18px 20px; border-top: 1px solid var(--dc-line, #e8e0d5); }
.dc-shipbar { height: 7px; border-radius: 99px; background: var(--dc-line, #e8e0d5); overflow: hidden; }
.dc-shipbar-fill { height: 100%; background: linear-gradient(90deg, #b9a07c, var(--dc-accent, #8a6f52)); border-radius: 99px; transition: width .3s; }
.dc-shipnote { font-size: 12.5px; color: #6f6357; margin: 8px 0 12px; }
.dc-subtotal { display: flex; justify-content: space-between; align-items: center; font-size: 15px; margin: 6px 0 12px; }
.dc-checkout { width: 100%; justify-content: center; }
.dc-mini { font-size: 11.5px; color: #9a8c7d; text-align: center; margin: 8px 0 0; }

/* ---------- 购物车页 ---------- */
.dc-cartpage-root { max-width: 1100px; margin: 0 auto; padding: 40px 20px 80px; }
.dc-cartpage-empty { text-align: center; padding: 60px 0; }
.dc-cartpage-empty h1 { margin-bottom: 8px; }
.dc-cartpage-empty p { color: #8a7d6f; margin-bottom: 24px; }
.dc-cartpage h1 { margin: 0 0 18px; }
.dc-cartpage-table { width: 100%; border-collapse: collapse; margin: 18px 0; }
.dc-cartpage-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: #8a7d6f; padding: 10px 8px; border-bottom: 1px solid var(--dc-line, #e8e0d5); }
.dc-cartpage-table td { padding: 16px 8px; border-bottom: 1px solid var(--dc-line, #e8e0d5); vertical-align: middle; font-size: 14px; }
.dc-cartpage-media { display: block; width: 88px; height: 108px; border-radius: 8px; overflow: hidden; background: var(--dc-paper, #faf7f2); }
.dc-cartpage-media img { width: 100%; height: 100%; object-fit: cover; }
.dc-cartpage-name { font-weight: 600; color: inherit; text-decoration: none; }
.dc-cartpage-name:hover { text-decoration: underline; }
.dc-cartpage-total { font-weight: 650; }
.dc-cartpage-summary { max-width: 360px; margin-left: auto; text-align: right; }
.dc-cartpage-summary .dc-subtotal { font-size: 17px; }
.dc-cartpage-summary .dc-checkout { margin-top: 12px; }
.dc-continue { display: inline-block; margin-top: 12px; font-size: 13px; color: #6f6357; }
.dc-muted { color: #8a7d6f; }

/* ---------- 搜索联想 ---------- */
.dc-suggest-head { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: #9a8c7d; margin: 12px 0 6px; }
.dc-suggest-item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 8px; color: inherit; text-decoration: none; }
.dc-suggest-item:hover { background: var(--dc-paper, #faf7f2); }
.dc-suggest-item img { width: 46px; height: 56px; object-fit: cover; border-radius: 6px; }
.dc-thumb-ph { width: 46px; height: 56px; border-radius: 6px; background: var(--dc-paper, #faf7f2); display: inline-block; }
.dc-suggest-name { flex: 1; font-size: 13.5px; }
.dc-suggest-price { font-size: 13px; color: #6f6357; }
.dc-suggest-empty { padding: 14px 10px; }

/* ---------- 商品卡 / 推荐位 / 搜索页 ---------- */
.dc-recs { padding: 26px 0 8px; }
.dc-recs-title { font-size: 20px; margin: 0 0 18px; letter-spacing: .02em; }
.dc-recs-grid, .dc-search-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 989px) { .dc-recs-grid, .dc-search-grid { grid-template-columns: repeat(2, 1fr); } }
.dc-card { display: block; text-decoration: none; color: inherit; }
.dc-card-media { position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 5; background: var(--dc-paper, #faf7f2); }
.dc-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; display: block; }
.dc-card:hover .dc-card-media img { transform: scale(1.04); }
.dc-card-ph { width: 100%; height: 100%; }
.dc-badge-sale { position: absolute; top: 10px; left: 10px; background: #b0453a; color: #fff; font-size: 11px; padding: 3px 9px; border-radius: 99px; letter-spacing: .04em; }
.dc-card-info { padding: 10px 2px 0; }
.dc-card-title { font-size: 13.5px; font-weight: 600; margin: 0 0 4px; line-height: 1.4; }
.dc-card-price { font-size: 13.5px; color: var(--dc-ink, #3f2a20); display: flex; gap: 8px; align-items: baseline; }
.dc-card-price s { color: #9a8c7d; font-size: 12.5px; }
.dc-price-sale { color: #b0453a; }
.dc-search-empty { grid-column: 1 / -1; color: #8a7d6f; padding: 30px 0; }

/* ---------- 搜索页 ---------- */
.dc-search-root { max-width: 1100px; margin: 0 auto; padding: 40px 20px 80px; }
.dc-search-form { display: flex; gap: 10px; max-width: 560px; margin-bottom: 12px; }
.dc-search-input { flex: 1; padding: 12px 16px; border: 1px solid var(--dc-line, #e8e0d5); border-radius: 999px; font-size: 14px; outline: none; background: #fff; }
.dc-search-input:focus { border-color: var(--dc-accent, #8a6f52); }
.dc-search-head { color: #6f6357; font-size: 13.5px; margin-bottom: 22px; }

/* ---------- 顾客账号 ---------- */
.dc-auth-box { max-width: 460px; margin: 48px auto 80px; padding: 0 20px; }
.dc-auth-card { background: #fff; border: 1px solid var(--dc-line, #e8e0d5); border-radius: 14px; padding: 28px 26px; }
.dc-auth-wide { max-width: 720px; margin: 0 auto; }
.dc-auth-card h1 { margin: 0 0 18px; font-size: 22px; }
.dc-field { margin-bottom: 14px; }
.dc-field label { display: block; font-size: 12.5px; color: #6f6357; margin-bottom: 5px; }
.dc-field input { width: 100%; padding: 11px 13px; border: 1px solid var(--dc-line, #e8e0d5); border-radius: 10px; font-size: 14px; outline: none; }
.dc-field input:focus { border-color: var(--dc-accent, #8a6f52); }
.dc-auth-err { color: #b0453a; font-size: 13px; min-height: 18px; margin: 4px 0; }
.dc-auth-btn { width: 100%; justify-content: center; margin-top: 6px; }
.dc-auth-alt { text-align: center; font-size: 13px; color: #6f6357; margin: 14px 0 0; }
.dc-auth-top { display: flex; align-items: center; justify-content: space-between; }
.dc-logout { background: none; border: none; color: #8a7d6f; text-decoration: underline; cursor: pointer; font-size: 13px; }
.dc-h2 { font-size: 16px; margin: 22px 0 10px; }
.dc-orders { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.dc-orders th, .dc-orders td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--dc-line, #e8e0d5); }
