/* css/style.css - 台中手機館 (1101.com.tw) 精準版視覺樣式 */

:root {
  --brand-yellow: #f8d34c;          /* 1101 招牌暖金黃 */
  --brand-yellow-hover: #eab308;
  --brand-yellow-light: #fffbeb;
  --brand-yellow-border: #facc15;
  --brand-black: #111111;           /* 1101 官方深黑 */
  --brand-charcoal: #1e293b;
  --text-primary: #1f2937;
  --text-secondary: #4b5563;
  --text-muted: #9ca3af;
  --bg-page: #fdfdfd;
  --bg-card: #ffffff;
  --border-light: #e5e7eb;
  --border-subtle: #f3f4f6;
  --line-green: #06c755;
  --line-green-hover: #05a847;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

/* 全站強制套用 1101 官方微軟正黑體字型 */
body, input, button, select, textarea, table, h1, h2, h3, h4, h5, h6, a, span, p, div {
  font-family: "Microsoft JhengHei", "微軟正黑體", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

body {
  background-color: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ==================== 1101.com.tw 官方頂部 Header ==================== */
.top-yellow-bar {
  height: 4px;
  background: var(--brand-yellow);
  width: 100%;
}

.site-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* 官方 [台][中][手][機][館] 彩條方框招牌 LOGO */
.brand-logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-logo-img {
  height: 38px;
  width: auto;
  display: block;
  object-fit: contain;
  transition: opacity .15s;
}

.brand-logo-img:hover {
  opacity: 0.9;
}

/* 1101 主選單導航條 (微軟正黑體 16px 粗體，符合官網標準) */
.main-nav-menu {
  display: flex;
  align-items: center;
  gap: 22px;
}

@media (max-width: 900px) {
  .main-nav-menu {
    display: none;
  }
}

.nav-item {
  font-size: 16px;
  font-weight: 700;
  color: #111111;
  padding: 6px 2px;
  transition: all 0.15s;
  position: relative;
}

.nav-item:hover {
  color: #b45309;
}

.nav-item.active {
  color: #111111;
  font-weight: 900;
}

.nav-item.active::after {
  content: "";
  position: absolute;
  bottom: -15px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--brand-yellow);
}

/* ==================== 1101 官方大型 Hero 橫幅 (保留) ==================== */
.hero-1101-banner {
  background: linear-gradient(180deg, #fafafa 0%, #f4f4f4 100%);
  border-bottom: 1px solid var(--border-light);
  padding: 44px 20px;
  text-align: center;
  position: relative;
}

.hero-content {
  max-width: 900px;
  margin: 0 auto;
}

.hero-main-title {
  font-size: 32px;
  font-weight: 900;
  color: var(--brand-black);
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.hero-main-title span {
  background: linear-gradient(180deg, transparent 65%, var(--brand-yellow) 65%);
  padding: 0 4px;
}

.hero-en-subtitle {
  font-size: 14.5px;
  color: #64748b;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 18px;
}

.hero-cta-pill {
  display: inline-block;
  background: var(--brand-black);
  color: var(--brand-yellow);
  font-size: 14px;
  font-weight: 800;
  padding: 7px 22px;
  border-radius: 30px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* ==================== 兩欄式核心佈局 (完全對標 1101 官方) ==================== */
.content-layout-container {
  max-width: 1240px;
  margin: 28px auto 50px;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  align-items: start;
}

@media (max-width: 860px) {
  .content-layout-container {
    grid-template-columns: 1fr;
    padding: 0 12px;
    gap: 16px;
  }
}

/* ==================== 左側：1101 官方圓弧品牌分類側欄 (#my_categories) ==================== */
.sidebar-box-1101 {
  background-color: #F8F8F8;
  padding: 30px 0;
  border-radius: 0 40px 40px 0;
  position: relative;
  z-index: 50;
}

.sidebar-box-1101 .cat-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-box-1101 .cat-item {
  position: relative;
  color: #000000;
  padding: 13px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-size: 17px;
  font-weight: 700;
  transition: all 0.15s;
  border-bottom: 1px solid #eeeeee;
}

.sidebar-box-1101 .cat-item:hover,
.sidebar-box-1101 .cat-item.active {
  background-color: #F8D34C !important;
  color: #000000 !important;
}

.sidebar-box-1101 .cat-arrow {
  font-size: 18px;
  font-weight: 900;
  color: #000000;
}

/* 點選廠牌後才動態彈出的型號系列選單容器 (非寫死、點選後才由 JS 插入與定位) */
.dynamic-series-panel {
  position: absolute;
  left: 100%;
  top: 30px;
  width: 220px;
  background-color: #F8F8F8;
  box-shadow: 4px 6px 20px rgba(0,0,0,0.15);
  border: 1px solid #e2e8f0;
  border-left: 3px solid #F8D34C;
  border-radius: 0 8px 8px 0;
  padding: 8px 0;
  z-index: 100;
  animation: fadeInSeries 0.18s ease-out;
}

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

.dynamic-series-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.dynamic-series-list li {
  list-style: none;
}

.dynamic-series-list li a {
  display: block;
  padding: 10px 18px;
  font-size: 15px;
  font-weight: 600;
  color: #222222;
  text-decoration: none;
  transition: all 0.15s;
  border-bottom: 1px solid #f1f5f9;
  white-space: nowrap;
}

.dynamic-series-list li a:before {
  content: '－';
  color: #555555;
  margin-right: 4px;
}

.dynamic-series-list li a:hover,
.dynamic-series-list li.active a {
  background-color: #F8D34C;
  color: #000000;
  font-weight: 700;
  padding-left: 22px;
}

/* ==================== 右側：主內容區 ==================== */
.main-content-panel {
  background: #ffffff;
  min-height: 560px;
}

/* 麵包屑導航 (對標 1101) */
.breadcrumb-bar {
  font-size: 14px;
  color: #757575;
  margin-bottom: 16px;
  font-weight: 500;
}

.breadcrumb-bar a {
  color: #757575;
  text-decoration: none;
}

.breadcrumb-bar a:hover {
  color: #000000;
  text-decoration: underline;
}

/* ==================== 1101 招牌黃色商品表格 (.ren.custom_product_wrap) ==================== */
.ren.custom_product_wrap {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.ren .category_div {
  display: flex;
  width: 100%;
  align-items: center;
  margin-bottom: 1.5em;
  background-color: #F8D34C;
  height: 48px;
  padding: 0 16px;
  box-sizing: border-box;
}

.ren .category_name {
  width: 26%;
  display: flex;
  align-items: center;
}

.ren .category_name > h2 {
  font-weight: 700;
  font-size: 18px;
  color: #000000;
  margin: 0;
  white-space: nowrap;
}

.ren .td_phone_Model {
  width: 36%;
  font-weight: 700;
  font-size: 17px;
  color: #000000;
}

.ren .td_phone_price {
  width: 22%;
  font-weight: 700;
  font-size: 17px;
  color: #000000;
}

.ren .category_div_null_div {
  width: 16%;
}

/* 商品清單列 (完全對標 1101 字體、大小、紅色金額、單一藍色進入估價按鈕) */
.product_list_wrap {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.ren .product_list {
  display: flex;
  width: 100%;
  align-items: center;
  border-bottom: 1px solid #CBCBCB;
  padding: 14px 16px;
  box-sizing: border-box;
  transition: background-color 0.15s;
}

.ren .product_list:hover {
  background-color: #fffdf5;
}

/* 1101 官方留白欄位 (對標表頭 category_name 26% 寬度) */
.ren .category_null_div {
  width: 26%;
  flex-shrink: 0;
}

/* 型號欄位 (對標表頭 td_phone_Model 36% 寬度) */
.ren .product_title {
  width: 36%;
  margin: 0;
  box-sizing: border-box;
}

.ren .product_title a,
.ren .product_title .title_link {
  font-weight: 700;
  font-size: 17px;
  color: #000000;
  text-decoration: none;
  cursor: pointer;
  display: block;
}

.ren .product_title a:hover,
.ren .product_title .title_link:hover {
  color: #d97706;
}

.ren .product_title h3 {
  font-size: 14px;
  margin-top: 3px;
  margin-bottom: 0;
  font-weight: 600;
  color: #666666;
}

/* 價格顯示 (紅色粗體 17px，標籤 14px) */
.ren .product_price {
  width: 22%;
  font-weight: 600;
  font-size: 17px;
  color: red !important;
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.ren .product_price::before {
  content: '最高收購：';
  color: #757575;
  font-weight: 500;
  font-size: 14px;
}

/* 單一進入估價按鈕 (對標要求：刪除詳細內容，只保留進入估價) */
.ren .product_actions_wrap {
  width: 16%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.btn-valuation-blue {
  background-color: #3b5999 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 15px !important;
  padding: 8px 18px;
  border-radius: 4px;
  border: 1px solid transparent;
  transition: all .2s;
  height: 38px;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.btn-valuation-blue:hover {
  background-color: #2b4372 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(59, 89, 153, 0.35);
}

/* LINE 官方品牌綠按鈕 (專人詢價專屬) */
.btn-valuation-green {
  background-color: #06C755 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 15px !important;
  padding: 8px 18px;
  border-radius: 4px;
  border: 1px solid transparent;
  transition: all .2s;
  height: 38px;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-valuation-green:hover {
  background-color: #05a847 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(6, 199, 85, 0.4);
}

/* ==================== 階段 B：專屬細節點選估價頁面 ==================== */
.valuation-detail-view {
  display: none;
  padding-top: 10px;
}

.detail-nav-back {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}

.btn-back-btn {
  background: #F8D34C;
  border: none;
  color: #000000;
  padding: 8px 18px;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-back-btn:hover {
  background: #eab308;
}

.model-header-card {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 22px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.model-title-text {
  font-size: 24px;
  font-weight: 900;
  color: var(--brand-black);
  margin-bottom: 4px;
}

.model-live-price-box {
  text-align: right;
}

.model-price-label {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
}

.model-price-number {
  font-size: 34px;
  font-weight: 900;
  color: red;
  line-height: 1.1;
}

.spec-section-group {
  margin-bottom: 24px;
}

.spec-group-title {
  font-size: 15px;
  font-weight: 900;
  color: var(--brand-black);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.step-number-tag {
  background: var(--brand-yellow);
  color: var(--brand-black);
  font-size: 12px;
  font-weight: 900;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}

.pill-grid.grid-1 {
  grid-template-columns: 1fr;
}

.spec-button {
  background: #fff;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 800;
  color: #334155;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
}

.spec-button:hover {
  border-color: var(--brand-yellow);
}

.spec-button.active {
  background: #F8D34C !important;
  color: #000000 !important;
  border-color: #F8D34C !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  font-weight: 900;
}

.calc-breakdown-card {
  background: #f8fafc;
  border: 1.5px dashed #cbd5e1;
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 24px;
}

.calc-row {
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
  margin-bottom: 6px;
  color: #475569;
}

.calc-val.green {
  color: #16a34a;
  font-weight: 800;
}

.calc-val.red {
  color: #dc2626;
  font-weight: 800;
}

.reserve-panel {
  background: #fff;
  border: 2px solid var(--brand-yellow);
  border-radius: 10px;
  padding: 22px;
  box-shadow: 0 4px 15px rgba(248, 211, 76, 0.12);
}

.store-dropdown {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 800;
  color: var(--brand-black);
  margin-bottom: 14px;
  outline: none;
}

.btn-line-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 52px;
  background: var(--line-green);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 17px;
  font-weight: 900;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(6,199,85,0.3);
  transition: all 0.2s;
}

.btn-line-cta:hover {
  background: var(--line-green-hover);
}

/* ==================== 1101 知識庫與門市頁尾 ==================== */
.knowledge-section-1101 {
  margin-top: 40px;
  border-top: 1px solid var(--border-light);
  padding-top: 28px;
}

.accordion-box {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  margin-bottom: 8px;
  overflow: hidden;
}

.accordion-btn {
  padding: 14px 18px;
  font-size: 14.5px;
  font-weight: 800;
  color: var(--brand-black);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
}

.accordion-body {
  display: none;
  padding: 16px 20px;
  font-size: 13.5px;
  color: #475569;
  border-top: 1px solid var(--border-light);
  line-height: 1.7;
}

.accordion-box.open .accordion-body {
  display: block;
}

.site-footer-1101 {
  background: #111827;
  color: #9ca3af;
  padding: 36px 20px;
  text-align: center;
  font-size: 13px;
  line-height: 1.8;
}

.site-footer-1101 strong {
  color: #fff;
}

/* ==================== 來電 / LINE 專人詢價樣式與彈窗 ==================== */
.ren .product_price.product_price_inquiry {
  color: #b45309 !important;
  font-weight: 800 !important;
  font-size: 16px !important;
}

.ren .product_price.product_price_inquiry::before {
  content: '收購行情：';
  color: #757575;
  font-weight: 500;
  font-size: 14px;
}

.inquiry-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 16px;
  animation: fadeInModal 0.2s ease-out;
}

@keyframes fadeInModal {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.inquiry-modal-card {
  background: #ffffff;
  border-radius: 14px;
  max-width: 520px;
  width: 100%;
  padding: 26px 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  position: relative;
  text-align: left;
}

.inquiry-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.inquiry-modal-badge {
  background: #fef3c7;
  color: #b45309;
  font-size: 13px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 20px;
}

.inquiry-modal-close {
  background: none;
  border: none;
  font-size: 28px;
  color: #64748b;
  cursor: pointer;
  line-height: 1;
}

.inquiry-modal-close:hover {
  color: #0f172a;
}

.inquiry-modal-title {
  font-size: 22px;
  font-weight: 900;
  color: #111111;
  margin: 4px 0;
}

.inquiry-modal-spec {
  font-size: 14px;
  color: #64748b;
  font-weight: 700;
  margin-bottom: 14px;
}

.inquiry-modal-desc {
  font-size: 14px;
  line-height: 1.6;
  color: #334155;
  background: #f8fafc;
  padding: 14px;
  border-radius: 8px;
  border-left: 4px solid #F8D34C;
  margin-bottom: 18px;
}

.inquiry-btn-line {
  display: block;
  background: #06C755;
  color: #ffffff !important;
  font-size: 16px;
  font-weight: 800;
  text-align: center;
  padding: 13px 20px;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(6, 199, 85, 0.25);
  transition: all 0.15s;
}

.inquiry-btn-line:hover {
  background: #05a847;
}

.inquiry-stores-section {
  margin-top: 18px;
  border-top: 1px solid #e2e8f0;
  padding-top: 14px;
}

.inquiry-stores-title {
  font-size: 13px;
  font-weight: 800;
  color: #475569;
  margin-bottom: 10px;
}

.inquiry-store-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.store-call-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #f1f5f9;
  border-radius: 6px;
  color: #1e293b;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  transition: background 0.15s;
}

.store-call-item:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.store-call-item span {
  color: #64748b;
  font-weight: 600;
  font-size: 12px;
}
