/* =============================================
   estimate.css - 寃ъ쟻 由ъ뒪�듃 (�떎�떆媛�/�궡寃ъ쟻/李�)
   com.kindgold
   ============================================= */

/* ���� 諛곕�� �룄�쁽泥� �룿�듃 ���� */
@font-face {
  font-family: 'BMDohyeon';
  src: url('/resources/fonts/BMDOHYEON_otf.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

:root {
  --est-purple: #5A3DC8;
  --est-purple-light: #EDE8FB;
  --est-purple-mid: #7B5CE5;
  --est-text-dark: #0a0a0a;
  --est-text-mid: #1a1a2e;
  --est-text-gray: #8A87A8;
  --est-text-light: #B8B5D0;
  --est-border: #E2DEEF;
  --est-white: #FFFFFF;
  --est-bg: #F4F2FA;
  --est-tag-gold: #5A3DC8;
  --est-tag-diamond: #2563EB;
  --est-increase: #E03A3A;
  --est-decrease: #2563EB;
}

.est-wrap * { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
.est-wrap { font-family: 'Pretendard', 'Apple SD Gothic Neo','Noto Sans KR',-apple-system,sans-serif; background: var(--est-bg); color: var(--est-text-dark); max-width: 430px; margin: 0 auto; min-height: 100vh; }

/* ���� �뿤�뜑 ���� */
.est-header { background: var(--est-white); padding: 24px 20px 0; border-bottom: 1px solid var(--est-border); }
.est-header-top { display:flex; align-items:center; justify-content:space-between; margin-bottom:4px; position:relative; }
.est-header-title { font-size:18px; font-weight:700; color:#333; text-decoration:none; position:absolute; left:50%; transform:translateX(-50%); font-family:'BMDohyeon', sans-serif; }
.est-back-btn { display: inline-flex; align-items: center; padding: 6px 0; cursor: pointer; text-decoration: none; flex-shrink:0; }
.est-back-btn svg { width: 20px; height: 20px; stroke: var(--est-text-dark); fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.est-home-btn { display: inline-flex; align-items: center; padding: 6px 0; cursor: pointer; text-decoration: none; flex-shrink:0; }
.est-home-btn svg { width: 20px; height: 20px; stroke: var(--est-text-dark); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ���� �꺆 ���� */
.est-tabs { display: flex; gap: 4px; }
.est-tab { flex: 1; text-align: center; padding: 12px 0 10px; font-size: 14px; font-weight: 500; color: var(--est-text-gray); cursor: pointer; border-bottom: 2px solid transparent; transition: all .2s; }
.est-tab.active { color: #111111; font-weight: 700; border-bottom: 2.5px solid #111111; }
.est-tab-content { display: none; }
.est-tab-content.active { display: block; }

/* ���� �뒪�겕濡� �쁺�뿭 ���� */
.est-scroll { padding: 9px 14px 30px; display: flex; flex-direction: column; gap: 10px; }

/* ���� 寃ъ쟻 �벑濡앺븯湲� 踰꾪듉 ���� */
.est-register-btn { width: 100%; background: var(--est-white); border: 1.5px dashed #111111; border-radius: 12px; padding: 14px; display: flex; align-items: center; justify-content: center; gap: 6px; color: #111111; font-size: 15px; font-weight: 600; cursor: pointer; transition: background .15s; }
.est-register-btn:hover { background: var(--est-purple-light); }
.est-register-btn-fixed { padding: 14px !important; border: 1.5px dashed #111111 !important; border-radius: 12px !important; transition: none !important; }
.est-register-btn-fixed:focus { background: var(--est-white) !important; outline: none !important; }

/* ���� �븘�꽣 諛뺤뒪 ���� */
.est-filter-box { background: var(--est-white); border-radius: 14px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.05); }
.est-filter-top { display: flex; align-items: center; gap: 8px; padding: 12px 14px; }
.est-icon-wrap { width: 20px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.est-icon-wrap svg { width: 16px; height: 16px; stroke: var(--est-text-gray); fill: none; stroke-width: 2; }
.est-filter-select { display: flex; align-items: center; gap: 4px; border: 1.5px solid var(--est-border); border-radius: 8px; padding: 5px 10px; font-size: 13px; font-weight: 500; color: var(--est-text-mid); background: var(--est-white); cursor: pointer; white-space: nowrap; flex-shrink: 0; }
.est-filter-select .est-arrow { font-size: 10px; color: var(--est-text-gray); }
.est-filter-select-el { border: 1.5px solid var(--est-border); border-radius: 8px; padding: 5px 10px; font-size: 13px; font-weight: 500; color: var(--est-text-mid); background: var(--est-white); cursor: pointer; flex-shrink: 0; }
.est-filter-select-el:disabled { opacity: .4; }
.est-spacer { flex: 1; }
.est-fold-btn { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border: 1.5px solid var(--est-border); border-radius: 8px; cursor: pointer; flex-shrink: 0; transition: background .15s; }
.est-fold-btn:hover { background: var(--est-bg); }
.est-fold-btn svg { width: 14px; height: 14px; stroke: var(--est-text-gray); fill: none; stroke-width: 2; transition: transform .25s; }
.est-fold-btn.open svg { transform: rotate(180deg); }
.est-filter-detail { border-top: 1px solid var(--est-border); display: flex; flex-direction: column; gap: 10px; overflow: hidden; max-height: 0; opacity: 0; padding: 0 14px; transition: max-height .3s ease, opacity .3s ease, padding .3s ease; }
.est-filter-detail.open { max-height: 300px; opacity: 1; padding: 12px 14px; }
.est-filter-row { display: flex; align-items: center; gap: 8px; }
.est-filter-checkbox { display: flex; align-items: center; gap: 5px; margin-left: auto; white-space: nowrap; flex-shrink: 0; }
.est-filter-checkbox input[type=checkbox] { width: 14px; height: 14px; accent-color: var(--est-purple); }
.est-filter-checkbox label { font-size: 12px; color: var(--est-text-mid); cursor: pointer; }
.est-tilde { font-size: 13px; color: var(--est-text-gray); flex-shrink: 0; }
.est-search-btn { width: 100%; background: var(--est-white); border: 1.5px solid var(--est-border); border-radius: 10px; padding: 10px; display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--est-text-mid); font-size: 14px; font-weight: 500; cursor: pointer; }
.est-filter-reset { text-align: center; font-size: 12px; color: var(--est-text-gray); cursor: pointer; }

/* ���� 移대뱶 ���� */
.est-card-wrap { border-radius: 14px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.06); border: 1.5px solid transparent; transition: border-color .2s, box-shadow .2s; }
.est-card-wrap.expanded { border-color: #7B5CE5; box-shadow: 0 4px 20px rgba(90,61,200,.14); }
.est-card-top-bar { height: 2px; background: linear-gradient(90deg, #5A3DC8, #8B63F0); }
.est-card { background: var(--est-white); padding: 10px 12px; cursor: pointer; }
.est-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.est-shop-info { display: flex; align-items: center; gap: 5px; }
.est-shop-icon svg { width: 14px; height: 14px; stroke: none; fill: var(--est-text-gray); }
.est-shop-name { font-size: 11px; color: #444 !important; font-weight: 500; }
.est-card-meta { display: flex; align-items: center; gap: 8px; }
.est-date-label { font-size: 10px; color: #666 !important; }
.est-bookmark-btn { cursor: pointer; display: flex; align-items: center; }
.est-bookmark-btn svg { width: 17px; height: 17px; stroke: var(--est-text-gray); fill: none; stroke-width: 2; transition: all .2s; }
.est-bookmark-btn.active svg { stroke: #9B8FD4; fill: #9B8FD4; }
.est-product-name { font-size: 12px; font-weight: 700; margin-bottom: 4px; color: #111 !important; }
.est-tag-row { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 5px; }
.est-tag.gold { background: transparent; border: 1.5px solid var(--est-tag-gold); color: var(--est-tag-gold); border-radius: 6px; padding: 2px 7px; font-size: 11px; font-weight: 500; }
.est-tag.diamond { background: transparent; border: 1.5px solid var(--est-tag-diamond); color: var(--est-tag-diamond); border-radius: 6px; padding: 2px 7px; font-size: 11px; font-weight: 500; }
.est-card-footer { display: flex; align-items: center; justify-content: space-between; }
.est-like-btn { display: flex; align-items: center; gap: 3px; background: transparent; border-radius: 20px; padding: 0 7px; height: 21px; font-size: 11px; color: var(--est-text-mid); cursor: pointer; border: 1.5px solid var(--est-border); line-height:1; }
.est-like-btn svg { width: 11px; height: 11px; stroke: var(--est-text-gray); fill: none; stroke-width: 2; }
.est-like-btn.active { background: transparent; color: var(--est-purple); }
.est-like-btn.active svg { stroke: var(--est-purple); fill: none; }
.est-badge { font-size: 11px; font-weight: 600; color: var(--est-purple); background: var(--est-purple-light); border-radius: 5px; padding: 0 7px; height: 21px; display:inline-flex; align-items:center; line-height:1; }
.est-badge.photo { color: #E05A1A; background: #FFF3EE; }
.est-badge.complete { color: #1A7A5E; background: #EAF5F1; }
.est-price-row { display: flex; align-items: center; gap: 6px; }
.est-price-main { font-size: 13px; font-weight: 700; color: #111 !important; }
.est-price-change { display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; padding: 2px 7px; border-radius: 5px; }
.est-price-change.up { background: #FFF0F0; color: var(--est-increase); }
.est-price-change.up::before { content: '�뼯 '; }
.est-price-change.down { background: #EFF6FF; color: var(--est-decrease); }
.est-price-change.down::before { content: '�뼹 '; }

/* ���� �긽�꽭 �뙣�꼸 ���� */
.est-detail-panel { background: var(--est-white); border-top: 1px dashed var(--est-border); overflow: hidden; max-height: 0; opacity: 0; transition: max-height .35s ease, opacity .3s ease; }
.est-detail-panel.open { max-height: 1200px; opacity: 1; }
.est-detail-inner { padding: 14px; }
.est-result-title { display: flex; justify-content: space-between; align-items: center; font-size: 14px; font-weight: 700; margin-bottom: 10px; }
.est-result-date { font-size: 12px; font-weight: 400; color: var(--est-text-gray); }
.est-result-row { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; }
.est-result-row .lbl { font-size: 13px; color: var(--est-text-mid); }
.est-result-row .lbl.sub { padding-left: 14px; color: var(--est-text-gray); font-size: 12px; }
.est-result-row .lbl.sub::before { content: '�꽩 '; }
.est-result-row .val { font-size: 13px; color: var(--est-text-dark); font-weight: 500; }
.est-result-row .val.strike { text-decoration: line-through; color: var(--est-text-light); font-size: 12px; }
.est-result-row.highlight .lbl { font-weight: 700; color: var(--est-text-dark); font-size: 13px; }
.est-result-row.highlight .val { font-weight: 700; color: var(--est-text-dark); font-size: 14px; }
.est-val-change { display: flex; align-items: center; gap: 6px; }
.est-divider { border: none; border-top: 1px dashed var(--est-border); margin: 8px 0; }
.est-total-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0 4px; border-top: 1px solid var(--est-border); margin-top: 6px; }
.est-total-row .lbl { font-size: 14px; font-weight: 700; color: var(--est-purple); }
.est-total-row .val { font-size: 16px; font-weight: 800; color: var(--est-purple); }
.est-memo-label { font-size: 12px; font-weight: 600; color: var(--est-text-gray); margin-bottom: 4px; display: block; }
.est-memo-area { background: var(--est-bg); border: 1px solid var(--est-border); border-radius: 10px; padding: 10px; font-size: 13px; color: var(--est-text-mid); line-height: 1.6; margin: 10px 0; min-height: 60px; }
.est-photo-row { display: flex; gap: 8px; margin-bottom: 12px; }
.est-photo-thumb { width: 52px; height: 52px; border-radius: 8px; background: var(--est-border); display: flex; align-items: center; justify-content: center; }
.est-photo-thumb svg { width: 24px; height: 24px; stroke: var(--est-text-light); fill: none; stroke-width: 1.5; }
.est-store-btn { width: 100%; display: flex; align-items: center; justify-content: space-between; background: transparent; border: 1.5px solid var(--est-border); border-radius: 10px; padding: 12px 14px; cursor: pointer; text-decoration: none; transition: background .15s; }
.est-store-btn:hover { background: var(--est-purple-light); }
.est-store-btn .btn-texts { display: flex; flex-direction: column; gap: 2px; }
.est-store-btn .btn-main { font-size: 14px; font-weight: 700; color: var(--est-purple); }
.est-store-btn .btn-sub { font-size: 11px; color: var(--est-text-gray); }
.est-arrow-icon { width: 28px; height: 28px; background: linear-gradient(135deg, #5A3DC8, #8B63F0); border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.est-arrow-icon svg { width: 14px; height: 14px; stroke: white; fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

/* ���� �궡 寃ъ쟻 �븸�뀡 踰꾪듉 ���� */
.est-action-btns { display: flex; gap: 8px; margin-top: 12px; }
.est-btn-edit { flex: 1; padding: 12px 0; border-radius: 10px; font-size: 14px; font-weight: 700; cursor: pointer; background: transparent; border: 1.5px solid #1A7A5E; color: #1A7A5E; transition: background .15s; }
.est-btn-edit:hover { background: #EAF5F1; }
.est-btn-delete { flex: 1; padding: 12px 0; border-radius: 10px; font-size: 14px; font-weight: 700; cursor: pointer; background: transparent; border: 1.5px solid #C0392B; color: #C0392B; transition: background .15s; }
.est-btn-delete:hover { background: #FEF0EE; }
.est-btn-complete { flex: 1.3; padding: 12px 0; border-radius: 10px; font-size: 14px; font-weight: 700; cursor: pointer; background: transparent; border: 1.5px solid var(--est-purple); color: var(--est-purple); transition: background .15s; }
.est-btn-complete:hover { background: var(--est-purple-light); }

/* ���� �븷�땲硫붿씠�뀡 ���� */
@keyframes estFadeInUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.est-card-wrap, .est-filter-box, .est-register-btn { animation: estFadeInUp .28s ease both; }

/* ���� �떆�꽭 利앷컧 ���� */
.est-up   { color:#E03A3A; font-size:12px; font-weight:600; }
.est-down { color:#2563EB; font-size:12px; font-weight:600; }

/* ���� �긽�꽭 �뙣�꼸 �꽌釉뚮줈�슦 ���� */
.est-sub-row .lbl { padding-left:8px; color:var(--est-text-gray); font-size:13px; }
.est-sub-row .val { font-size:13px; }
.est-section-title .lbl { font-weight:600; color:var(--est-text-dark); }
.est-section-title .val { display:flex; align-items:center; gap:4px; }
.est-price-strong { font-weight:700; color:var(--est-text-dark); }
.est-now-price-row { background:var(--est-purple-light); border-radius:8px; padding:8px 10px; margin:4px 0; border:1.5px solid var(--est-purple); }
.est-now-price-row .lbl { font-weight:700; color:var(--est-purple); font-size:13px; }
.est-now-price-row .val { font-weight:700; font-size:15px; color:var(--est-text-dark); display:flex; align-items:center; gap:6px; }

/* ���� 踰붾� ���� */
.est-legend { font-size:11px; color:var(--est-text-gray); display:flex; align-items:center; gap:8px; margin:6px 0 2px; justify-content:flex-end; }
.est-legend-item { display:flex; align-items:center; gap:3px; }
.est-legend-info { display:inline-flex; align-items:center; justify-content:center; width:14px; height:14px; border-radius:50%; border:1.5px solid var(--est-text-gray); font-size:9px; color:var(--est-text-gray); cursor:pointer; flex-shrink:0; font-weight:700; line-height:1; }
.est-legend-tooltip { display:none; position:absolute; right:14px; background:#18162E; color:#fff; font-size:11px; padding:7px 10px; border-radius:8px; white-space:nowrap; z-index:100; box-shadow:0 2px 8px rgba(0,0,0,.2); }
.est-legend-tooltip.show { display:block; }

/* ���� �궗吏� �뜽�꽕�씪 ���� */
.est-img-list { display:flex; gap:8px; flex-wrap:wrap; margin:10px 0 4px; }
.est-img-thumb { width:72px; height:72px; border-radius:10px; object-fit:cover; cursor:pointer; border:1.5px solid var(--est-border); }

/* ���� �씠誘몄� 紐⑤떖 ���� */
.est-img-modal { display:none; position:fixed; inset:0; background:rgba(0,0,0,0.88); z-index:9999; flex-direction:column; align-items:center; justify-content:center; }
.est-img-modal.open { display:flex; }
.est-img-modal-close { position:absolute; top:18px; right:18px; width:36px; height:36px; background:rgba(255,255,255,0.15); border-radius:50%; display:flex; align-items:center; justify-content:center; cursor:pointer; }
.est-img-modal-close svg { stroke:#fff; width:20px; height:20px; }
.est-img-modal-canvas-wrap { position:relative; max-width:78vw; max-height:78vh; display:flex; align-items:center; justify-content:center; }
.est-img-modal-canvas-wrap canvas { max-width:78vw; max-height:78vh; border-radius:12px; display:block; }
.est-img-modal-arrow { position:absolute; top:50%; transform:translateY(-50%); width:36px; height:36px; background:rgba(255,255,255,0.18); border-radius:50%; display:flex; align-items:center; justify-content:center; cursor:pointer; z-index:10; }
.est-img-modal-arrow.left  { left:8px; }
.est-img-modal-arrow.right { right:8px; }
.est-img-modal-dots { display:flex; gap:6px; margin-top:14px; }
.est-img-modal-dot { width:7px; height:7px; border-radius:50%; background:rgba(255,255,255,0.35); }
.est-img-modal-dot.active { background:#fff; }

/* ── 카카오 애드핏 광고 ── */
.adfit-top-wrap { padding: 6px 12px; background: #fff; margin-bottom: -6px; }
.adfit-top-wrap ins, .adfit-list-wrap ins { overflow: hidden; }
.adfit-list-wrap { margin: 2px 12px; overflow: hidden; text-align: center; }
/* 견적리스트 배경색 통일 */
.est-wrap .adfit-top-wrap { background: var(--est-bg); }
