/* ===== base ===== */
:root{
  --bg:#f3f4f6;
  --card:#ffffff;
  --text:#111827;
  --muted:#6b7280;
  --border:#e5e7eb;
  --brand:#ef4444;
  --shadow: 0 10px 28px rgba(17,24,39,0.08);
  --radius:18px;
  --bottom-safe: 50px;
}
*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family:-apple-system,BlinkMacSystemFont,"Noto Sans KR",sans-serif;
  background:var(--bg);
  color:var(--text);
  padding-bottom: calc(var(--bottom-safe) + env(safe-area-inset-bottom));
}
a{ color:inherit; text-decoration:none; }
button{ font-family:inherit; }

.wrap{ 
  max-width: 560px; 
  margin: 0 auto; 
  padding: 16px 14px 110px;
  padding-bottom: calc(var(--bottom-safe) + 20px);
}
/* admin wide */
.wrap.admin-wide{ max-width:1280px; }


/* hero carousel */
.hero-carousel{ position:relative; overflow:hidden; border-radius: 22px; box-shadow: var(--shadow); }
.hero-track{ display:flex; transition: transform .35s ease; will-change: transform; }
.hero-slide{ min-width:100%; }

.hero-link{ display:block; text-decoration:none; color:inherit; }
.hero-link:hover{ text-decoration:none; }
.hero-card{ height: 190px; display:flex; justify-content:space-between; padding: 18px 16px; border-radius: 22px; position:relative; color:#fff; }
.hero-1{ background: linear-gradient(135deg,#2dd4bf,#0ea5e9); }
.hero-2{ background: linear-gradient(135deg,#111827,#000); }
.hero-3{ background: linear-gradient(135deg,#f97316,#ef4444); }
.hero-text{ display:flex; flex-direction:column; gap:6px; }
.hero-kicker{ font-size:14px; opacity:.95; font-weight:800; }
.hero-title{ font-size:24px; font-weight:900; letter-spacing:-.02em; line-height:1.05; }
.hero-sub{ font-size:12px; opacity:.92; font-weight:700; }
.hero-right{ display:flex; align-items:flex-end; }
.hero-car{ width: 150px; height: 110px; object-fit: contain; filter: drop-shadow(0 14px 20px rgba(0,0,0,.25)); }
.hero-page{ position:absolute; right:12px; bottom:10px; font-size:12px; padding:6px 10px; border-radius:999px; background: rgba(0,0,0,.25); color:#fff; }

.hero-dots{ position:absolute; left:0; right:0; bottom:10px; display:flex; justify-content:center; gap:6px; pointer-events:none; }
.hero-dot{ width: 7px; height: 7px; border-radius:999px; background: rgba(255,255,255,.45); }
.hero-dot.active{ background:#fff; }

.center-note{ text-align:center; color: var(--muted); margin: 14px 0 14px; font-size:14px; }
.center-note b{ color:#111; }

/* search */
.searchbar{ display:flex; align-items:center; gap: 10px; background: var(--card); border: 1px solid var(--border); border-radius: 999px; padding: 14px 16px; box-shadow: 0 10px 22px rgba(17,24,39,0.04); }
.search-icon{ width: 26px; height: 26px; border-radius: 999px; display:flex; align-items:center; justify-content:center; background: #f3f4f6; color:#111; font-weight:900; }
.search-placeholder{ color:#9ca3af; font-weight:800; }

/* cards */
.grid-1{ display:grid; gap: 12px; margin-top:14px; }
.big-card{ background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; display:flex; justify-content:space-between; align-items:center; box-shadow: 0 10px 22px rgba(17,24,39,0.04); }
.big-title{ font-size:18px; font-weight:900; letter-spacing:-.02em; }
.big-sub{ margin-top:6px; color:var(--muted); font-size:13px; line-height:1.25; font-weight:700; }
.big-card-right{ width: 100px; display:flex; justify-content:flex-end; }
.car-illu{ width: 76px; height: 46px; border-radius: 14px; background: linear-gradient(135deg,#e5e7eb,#f3f4f6); position:relative; }
.car-illu:after{ content:""; position:absolute; left:10px; right:10px; top:14px; height:18px; border-radius: 12px; background:#fff; box-shadow: 0 8px 14px rgba(0,0,0,.06); }
.brief-illu{ width: 54px; height: 54px; border-radius: 14px; background: linear-gradient(135deg,#e5e7eb,#f3f4f6); position:relative; }
.brief-illu:after{ content:""; position:absolute; left:12px; right:12px; top:16px; height:22px; border-radius: 8px; background:#fff; }

.grid-2{ display:grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top:12px; }
.small-card{ background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 14px; box-shadow: 0 10px 22px rgba(17,24,39,0.04); }
.small-title{ font-weight:900; }
.small-sub{ margin-top:4px; color:var(--muted); font-size:12px; font-weight:700; }

/* bottom nav */
.bottom-nav{ position: fixed; left:0; right:0; bottom:0; background:#fff; border-top: 1px solid var(--border); display:flex; justify-content:center; gap: 10px; padding: 10px 8px 12px; z-index:50; }
.bottom-nav .bn-item{ width: 92px; display:flex; flex-direction:column; align-items:center; gap: 4px; color:#6b7280; font-weight:800; font-size:12px; }
.bn-ico{ font-size:20px; }
.bn-item.active{ color: var(--brand); }
.bn-item.disabled{ opacity:.45; pointer-events:none; }

/* sheet */
body.sheet{ background:#fff; }
.topbar{ position: sticky; top:0; background:#fff; border-bottom: 1px solid var(--border); display:flex; align-items:center; justify-content:space-between; padding: 10px 10px; z-index: 20; }
.top-btn{ width: 42px; height: 38px; border-radius: 10px; display:flex; align-items:center; justify-content:center; font-size: 18px; }
.top-title{ font-weight:900; letter-spacing:-.02em; }
.sheet-wrap{ max-width:560px; margin:0 auto; padding: 16px 14px 24px; }

.section-title{ font-size:18px; font-weight:900; margin: 10px 2px 12px; }
.mt24{ margin-top:24px; }

/* brand grid */
.brand-grid{ display:grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.brand-tile{ border: 1px solid var(--border); border-radius: 16px; padding: 14px 10px 12px; display:flex; flex-direction:column; align-items:center; gap: 8px; background:#fff; }
.brand-img{ width: 44px; height: 44px; border-radius: 14px; object-fit:contain; background:#f3f4f6; }
.brand-name{ font-weight:900; font-size:13px; }

/* pills */
.pill-row{ display:flex; gap: 10px; margin-bottom: 12px; }
.pill{ flex:1; border-radius: 999px; padding: 12px 12px; text-align:center; font-weight:900; border:1px solid var(--border); background:#f9fafb; color:#111; }
.pill.active{ background:#fff; }
.pill.disabled{ opacity:.4; }

/* models */
.model-card{ border: 1px solid var(--border); border-radius: 18px; padding: 16px; background:#fff; display:flex; justify-content:space-between; align-items:center; margin-bottom: 12px; gap:12px; }
.rank{ color: var(--brand); font-weight:900; font-size:13px; }
.model-name{ font-size:24px; font-weight:900; margin-top:6px; }
.model-price{ color:var(--muted); font-weight:800; margin-top:4px; }
.model-img{ width: 120px; height: 70px; border-radius: 16px; object-fit: cover; background: linear-gradient(135deg,#e5e7eb,#f3f4f6); }

/* buy */
.buy-head{ margin-top: 10px; }
.buy-title{ font-size:28px; font-weight:900; letter-spacing:-.02em; }
.buy-sub{ color:var(--muted); font-weight:800; margin-top:6px; }

.price-row{ margin-top: 14px; display:flex; align-items:center; justify-content:space-between; padding: 12px 14px; border: 1px solid var(--border); border-radius: 16px; background:#fff; }
.price-left{ font-weight:900; }
.price-right{ display:flex; align-items:center; gap: 10px; }
.badge{ background: var(--brand); color:#fff; border-radius: 10px; padding: 4px 8px; font-weight:900; font-size:12px; }
.price-num{ font-size:20px; font-weight:900; }

.method-grid{ display:grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.method-btn{ border: 1px solid var(--border); background:#fff; padding: 16px 14px; border-radius: 16px; font-weight:900; font-size:16px; }
.method-btn.active{ border: 2px solid var(--brand); box-shadow: 0 10px 22px rgba(239,68,68,0.12); }

.lead-form{ margin-top: 10px; }
.field{ margin-top: 10px; }
label{ display:block; font-weight:900; font-size:13px; margin-bottom:6px; }
input, textarea{ width:100%; padding: 14px 12px; border-radius: 14px; border: 1px solid var(--border); background:#fff; outline:none; font-size:16px; }
textarea{ resize: vertical; }

.agree{ margin-top: 14px; display:flex; align-items:center; justify-content:space-between; gap: 10px; }
.chk{ display:flex; align-items:center; gap: 10px; font-weight:900; }
.chk input{ width:18px; height:18px; }
.agree-link{ background: transparent; border:0; color: var(--brand); font-weight:900; cursor:pointer; }

.cta{ margin-top: 16px; width: 100%; border:0; border-radius: 18px; padding: 16px 16px; background: #111827; color:#fff; font-weight:900; font-size:18px; cursor:pointer; }

.alert{ margin-top: 10px; background:#fff7ed; border: 1px solid #fed7aa; color:#9a3412; padding: 12px 12px; border-radius: 14px; font-weight:800; }

/* modal */
.modal{ position: fixed; inset:0; display:none; z-index: 60; }
.modal.open{ display:block; }
.modal-dim{ position:absolute; inset:0; background: rgba(0,0,0,.38); }
.modal-panel{ position:absolute; left: 50%; transform: translateX(-50%); bottom: 10px; width: min(560px, calc(100% - 16px)); background:#fff; border-radius: 20px; overflow:hidden; box-shadow: 0 16px 50px rgba(0,0,0,.22); }
.modal-top{ display:flex; align-items:center; justify-content:space-between; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.modal-title{ font-weight:900; }
.modal-close{ width: 36px; height: 32px; border-radius: 10px; border: 1px solid var(--border); background:#fff; font-size:16px; cursor:pointer; }
.modal-body{ padding: 14px; max-height: 55vh; overflow:auto; }
.modal-bottom{ padding: 12px 14px; border-top: 1px solid var(--border); }
.modal-ok{ width:100%; border:0; border-radius: 14px; padding: 14px; background:#111827; color:#fff; font-weight:900; cursor:pointer; }
.policy p{ margin: 0 0 10px; line-height:1.35; }
.policy hr{ border:0; border-top:1px solid var(--border); margin: 12px 0; }
.policy .muted{ color: var(--muted); font-size:13px; }

/* thanks */
.thanks{ background:#fff; border: 1px solid var(--border); border-radius: 22px; padding: 18px; box-shadow: var(--shadow); }
.thanks-badge{ display:inline-block; background: #dcfce7; border: 1px solid #86efac; color:#166534; font-weight:900; border-radius: 999px; padding: 6px 10px; font-size:12px; }
.thanks-title{ margin: 10px 0 6px; font-size:24px; letter-spacing:-.02em; }
.thanks-sub{ color: var(--muted); font-weight:800; line-height:1.35; }
.thanks-actions{ display:flex; gap: 10px; margin-top: 14px; }
.btn-primary{ flex:1; display:flex; align-items:center; justify-content:center; background:#111827; color:#fff; border-radius: 32px; padding: 14px; font-weight:900; }

.btn-ghost{ flex:1; display:flex; align-items:center; justify-content:center; border: 1px solid var(--border); border-radius: 16px; padding: 14px; font-weight:900; background:#fff; }
.mini-note{ color: var(--muted); font-weight:700; margin-top: 14px; font-size:12px; }

/* admin */
.admin-top{ display:flex; align-items:flex-end; justify-content:space-between; gap: 12px; margin-bottom: 12px; }
.admin-title{ margin:0; font-size:20px; font-weight:900; }
.admin-desc{ color: var(--muted); font-weight:800; font-size:12px; margin-top:4px; }
.admin-actions{ display:flex; gap: 8px; }
.admin-link{ border: 1px solid var(--border); background:#fff; border-radius: 10px; padding: 6px 10px; font-weight:900; font-size:12px; }

.table-wrap{ overflow:auto; border: 1px solid var(--border); border-radius: 16px; background:#fff; }
.table{ width:100%; border-collapse: collapse; min-width: 720px; }
.table th, .table td{ 
  border-bottom: 1px solid var(--border); 
  padding: 6px 8px; 
  text-align:left; 
  font-size:12px; 
  white-space: nowrap;
  line-height: 1.3;
}
.table th{ background:#f9fafb; font-weight:900; padding: 8px 8px; }
.table td{ vertical-align: middle; }
.muted{ color: var(--muted); font-weight:700; }

.stat-grid{ display:grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat-card{ background:#fff; border: 1px solid var(--border); border-radius: 18px; padding: 14px; }
.stat-k{ color: var(--muted); font-weight:800; font-size:12px; }
.stat-v{ font-size:26px; font-weight:900; margin-top:6px; }

/* ===== Footer (legal/business) ===== */
.site-footer{
  position: relative;
  margin: 18px auto 0;
  width: 100%;
  max-width: 560px;
  padding: 0;
  background: rgba(255,255,255,0.95);
  border: 1px solid rgba(148,163,184,0.25);
  border-radius: 16px;
  overflow: hidden;
}

.site-footer .footer-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding: 12px 14px;
  color:#334155;
}

.site-footer .footer-brand{
  font-weight:900;
  font-size:13px;
  color:#0f172a;
  white-space:nowrap;
}

.site-footer .footer-links{
  display:flex;
  align-items:center;
  gap:14px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.site-footer .footer-link{
  background: transparent;
  border:0;
  padding:0;
  color:#334155;
  font-size:12px;
  cursor:pointer;
}

.site-footer .footer-link:hover{
  text-decoration: underline;
}

.policy-pre{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  line-height: 1.55;
  color:#0f172a;
}

/* ===== Quick CTA ===== */
.primary-cta{
  display:block;
  margin:16px 0;
  padding:16px;
  border-radius:14px;
  background:#111827;
  color:#fff;
  text-align:center;
}
.primary-cta .cta-title{ font-size:18px; font-weight:800; }
.primary-cta .cta-sub{ font-size:13px; opacity:.8; }

/* ===== Review slider ===== */
.review-section{ margin:24px 0; }
.review-title{ font-size:16px; font-weight:800; margin-bottom:8px; }
.review-strip{
  display:flex;
  gap:10px;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}
.review-item{
  flex:0 0 auto;
  width:140px;
  height:140px;
  border-radius:12px;
  overflow:hidden;
  border:1px solid rgba(17,24,39,0.10);
}
.review-item img{
  width:100%;
  height:100%;
  object-fit:cover;
}

/* ===== Brands top box ===== */
.brands-topbox{
  margin: 0 0 14px;
  padding: 14px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(17,24,39,0.10);
  box-shadow: 0 8px 22px rgba(17,24,39,0.06);
}
.brands-topbox-title{
  font-size: 16px;
  font-weight: 900;
  color: #111827;
  margin-bottom: 4px;
}
.brands-topbox-sub{
  font-size: 13px;
  color: #6b7280;
  line-height: 1.35;
}
.brands-topbox-actions{
  display: flex;
  gap: 10px;
  margin-top: 10px;
}
.brands-topbox-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 13px;
  text-decoration: none;
  background: #111827;
  color: #fff;
  border: 1px solid rgba(17,24,39,0.14);
}
.brands-topbox-btn:hover{
  opacity: .92;
}

/* ===== Brands CTA (top) ===== */
.brands-cta{
  display:block;
  margin: 0 0 14px;
  padding: 16px 14px;
  border-radius: 14px;
  background: #111827;
  color: #fff;
  text-decoration: none;
  text-align: center;
  border: 1px solid rgba(17,24,39,0.14);
  box-shadow: 0 10px 26px rgba(17,24,39,0.14);
}
.brands-cta-title{
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.2px;
}
.brands-cta-sub{
  margin-top: 4px;
  font-size: 13px;
  opacity: .85;
}
.brands-cta:hover{ opacity: .94; }

/* ===== Responsive ===== */
@media (max-width: 520px){
  .brand-grid{ grid-template-columns: repeat(3, 1fr); }
  .hero-card{ height: 180px; }
  .hero-title{ font-size:22px; }
  .hero-car{ width: 140px; height: 100px; }
  .site-footer .footer-inner{ align-items:flex-start; flex-direction:column; }
  .site-footer .footer-links{ justify-content:flex-start; }
  .wrap{ padding-bottom: 220px !important; }
}
