:root {
    --c-bg: #f6f7f5;
    --c-surface: #ffffff;
    --c-text: #20251f;
    --c-muted: #6b7280;
    --c-line: #e5e7eb;
    --c-primary: #2f6b3a;     /* 자연스러운 그린 (자재/건축 톤) */
    --c-primary-dark: #235029;
    --c-accent: #c8862a;       /* 우드/브론즈 포인트 */
    --c-danger: #c0392b;
    --radius: 12px;
    --shadow: 0 4px 20px rgba(0,0,0,.06);
    --shadow-lg: 0 10px 40px rgba(0,0,0,.10);
    --maxw: 1140px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: 'Noto Sans KR', system-ui, -apple-system, sans-serif;
    color: var(--c-text);
    background: var(--c-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1,h2,h3,h4 { line-height: 1.3; margin: 0 0 .5em; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255,255,255,.92);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--c-line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.brand { display: flex; align-items: baseline; gap: 8px; }
.brand-mark {
    font-weight: 900; letter-spacing: 1px; color: #fff;
    background: var(--c-primary); padding: 4px 8px; border-radius: 6px; font-size: 14px;
}
.brand-name { font-weight: 700; font-size: 18px; }
.main-nav { display: flex; align-items: center; gap: 6px; }
.main-nav a { padding: 10px 14px; border-radius: 8px; font-weight: 500; color: #374151; transition: .15s; }
.main-nav a:hover { background: #eef2ee; color: var(--c-primary-dark); }
.nav-quote { background: var(--c-primary); color: #fff !important; }
.nav-quote:hover { background: var(--c-primary-dark) !important; }
.badge { background: var(--c-accent); color:#fff; border-radius: 999px; padding: 1px 8px; font-size: 12px; margin-left: 2px; }
.nav-toggle { display: none; font-size: 26px; background: none; border: 0; cursor: pointer; }

/* ---------- Hero ---------- */
.hero {
    background: linear-gradient(135deg, #2f6b3a 0%, #3d8049 55%, #57a05f 100%);
    color: #fff; padding: 90px 0; position: relative; overflow: hidden;
}
.hero h1 { font-size: clamp(28px, 5vw, 46px); font-weight: 900; margin-bottom: 16px; }
.hero p { font-size: clamp(15px, 2vw, 19px); opacity: .94; max-width: 620px; }
.hero-actions { margin-top: 30px; display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 8px; justify-content: center;
    padding: 12px 22px; border-radius: 10px; font-weight: 700; cursor: pointer;
    border: 1px solid transparent; font-size: 15px; transition: .15s; background: #eef2ee; color: var(--c-primary-dark);
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--c-primary); color: #fff; }
.btn-primary:hover { background: var(--c-primary-dark); }
.btn-accent { background: var(--c-accent); color: #fff; }
.btn-ghost { background: rgba(255,255,255,.15); color:#fff; border-color: rgba(255,255,255,.4); }
.btn-outline { background: #fff; border-color: var(--c-line); color: var(--c-text); }
.btn-danger { background: var(--c-danger); color:#fff; }
.btn-sm { padding: 7px 13px; font-size: 13px; }
.btn-block { width: 100%; }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section-head { text-align: center; margin-bottom: 40px; }
.section-head h2 { font-size: 28px; }
.section-head p { color: var(--c-muted); }

/* ---------- Feature row ---------- */
.features { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }
.feature { background: var(--c-surface); border:1px solid var(--c-line); border-radius: var(--radius); padding: 26px; text-align:center; box-shadow: var(--shadow); }
.feature .ic { font-size: 30px; }
.feature h3 { margin-top: 12px; font-size: 17px; }
.feature p { color: var(--c-muted); font-size: 14px; margin: 0; }

/* ---------- Cards / grid ---------- */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3,1fr); }
.grid-4 { grid-template-columns: repeat(4,1fr); }

.card {
    background: var(--c-surface); border: 1px solid var(--c-line);
    border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
    transition: .18s; display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card-thumb { aspect-ratio: 4/3; background:#eceee9; overflow: hidden; }
.card-thumb img { width:100%; height:100%; object-fit: cover; }
.card-body { padding: 16px; flex: 1; display:flex; flex-direction: column; }
.card-cat { font-size: 12px; color: var(--c-primary); font-weight: 700; }
.card-title { font-size: 16px; font-weight: 700; margin: 4px 0; }
.card-summary { color: var(--c-muted); font-size: 13px; flex: 1; }
.card-price { margin-top: 10px; font-weight: 800; color: var(--c-text); }
.card-price small { color: var(--c-muted); font-weight: 500; font-size: 12px; }

/* ---------- Layout with sidebar ---------- */
.page-head { padding: 40px 0 10px; }
.page-head h1 { font-size: 30px; }
.breadcrumb { color: var(--c-muted); font-size: 13px; margin-bottom: 8px; }
.breadcrumb a:hover { color: var(--c-primary); }
.layout { display: grid; grid-template-columns: 220px 1fr; gap: 30px; align-items: start; }
.sidebar { background: var(--c-surface); border:1px solid var(--c-line); border-radius: var(--radius); padding: 18px; position: sticky; top: 90px; }
.sidebar h4 { font-size: 14px; color: var(--c-muted); text-transform: uppercase; letter-spacing: .04em; }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li a { display: block; padding: 9px 12px; border-radius: 8px; color: #374151; }
.sidebar li a:hover, .sidebar li a.active { background: #eef2ee; color: var(--c-primary-dark); font-weight: 600; }

/* ---------- Detail ---------- */
.detail { display: grid; grid-template-columns: 1.1fr 1fr; gap: 36px; }
.gallery .main-img { border-radius: var(--radius); overflow:hidden; border:1px solid var(--c-line); aspect-ratio: 4/3; background:#eceee9; }
.gallery .main-img img { width:100%; height:100%; object-fit: cover; }
.thumbs { display:flex; gap:10px; margin-top: 12px; flex-wrap: wrap; }
.thumbs img { width: 70px; height: 70px; object-fit: cover; border-radius: 8px; border:1px solid var(--c-line); cursor: pointer; }
.thumbs img:hover { border-color: var(--c-primary); }
.detail-info h1 { font-size: 26px; }
.detail-price { font-size: 26px; font-weight: 900; color: var(--c-primary-dark); margin: 14px 0; }
.spec-table { width:100%; border-collapse: collapse; margin: 16px 0; font-size: 14px; }
.spec-table th, .spec-table td { border:1px solid var(--c-line); padding: 10px 12px; text-align: left; }
.spec-table th { background:#f3f5f2; width: 35%; color:#374151; }

.prose { font-size: 15px; color:#374151; }
.prose img { border-radius: 8px; margin: 10px 0; }

/* ---------- Tables ---------- */
.table { width: 100%; border-collapse: collapse; background: var(--c-surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.table th, .table td { padding: 13px 14px; border-bottom: 1px solid var(--c-line); text-align: left; font-size: 14px; }
.table th { background: #f3f5f2; font-weight: 700; color:#374151; }
.table tbody tr:hover { background: #fafbf9; }
.table .num { text-align: right; }
.table .center { text-align: center; }

/* ---------- Forms ---------- */
.form-card { background: var(--c-surface); border:1px solid var(--c-line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.field { margin-bottom: 18px; }
.field label { display:block; font-weight: 600; margin-bottom: 6px; font-size: 14px; }
.field .req { color: var(--c-danger); }
.input, .textarea, .select {
    width: 100%; padding: 11px 13px; border:1px solid var(--c-line); border-radius: 9px;
    font-size: 15px; font-family: inherit; background:#fff; color: var(--c-text);
}
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(47,107,58,.12); }
.textarea { min-height: 130px; resize: vertical; }
.hint { color: var(--c-muted); font-size: 12px; margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ---------- Alerts ---------- */
.alert { padding: 13px 16px; border-radius: 10px; margin: 16px 0; font-size: 14px; }
.alert-success { background: #e7f4ea; color: #1f6b34; border:1px solid #bfe3c8; }
.alert-error { background: #fbeaea; color: #a52a2a; border:1px solid #f1c3c3; }
.alert-info { background: #eef3fb; color:#2b5f9e; border:1px solid #c9ddf5; }

/* ---------- Quote / cart ---------- */
.quote-grid { display:grid; grid-template-columns: 1.4fr 1fr; gap: 30px; align-items: start; }
.summary-box { background: var(--c-surface); border:1px solid var(--c-line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); position: sticky; top: 90px; }
.summary-line { display:flex; justify-content: space-between; padding: 8px 0; font-size: 15px; }
.summary-total { display:flex; justify-content: space-between; padding: 14px 0 4px; border-top: 2px solid var(--c-line); margin-top: 8px; font-size: 20px; font-weight: 900; color: var(--c-primary-dark); }
.qty-input { width: 70px; padding: 6px 8px; text-align:center; border:1px solid var(--c-line); border-radius: 8px; }

/* ---------- Tag chips (색상 태그) ---------- */
.tagchip { display:inline-block; border-radius:999px; padding:3px 11px; font-size:12px; font-weight:700; margin:2px 3px 2px 0; line-height:1.6; white-space:nowrap; }
a.tagchip { transition:.15s; } a.tagchip:hover { filter:brightness(1.08); transform:translateY(-1px); }
.tagchip.outline { background:transparent !important; border:1.5px solid currentColor; }
.tag-filter { display:flex; flex-wrap:wrap; gap:8px; }
.tag-filter .tagchip { cursor:pointer; opacity:.55; padding:7px 16px; font-size:14px; }
.tag-filter .tagchip.on { opacity:1; box-shadow:0 2px 10px rgba(0,0,0,.18); }

/* ---------- Hotspot (사진 위 자재 핀) ---------- */
.hotspot-stage { position:relative; display:inline-block; width:100%; border-radius:var(--radius); overflow:hidden; }
.hotspot-stage img { width:100%; display:block; }
.hotspot {
    position:absolute; width:30px; height:30px; transform:translate(-50%,-50%);
    border-radius:50%; background:rgba(47,107,58,.92); border:3px solid #fff;
    color:#fff; font-weight:800; font-size:14px; cursor:pointer; box-shadow:0 2px 8px rgba(0,0,0,.4);
    display:flex; align-items:center; justify-content:center; z-index:3;
    animation:pulse 2s infinite;
}
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(47,107,58,.5);} 70%{box-shadow:0 0 0 12px rgba(47,107,58,0);} 100%{box-shadow:0 0 0 0 rgba(47,107,58,0);} }
.hotspot:hover { background:var(--c-accent); }
.hotspot-pop {
    position:absolute; transform:translate(-50%,-115%); z-index:5; width:220px;
    background:#fff; border-radius:10px; box-shadow:var(--shadow-lg); overflow:hidden; display:none;
    border:1px solid var(--c-line);
}
.hotspot-pop.show { display:block; }
.hotspot-pop img { width:100%; height:120px; object-fit:cover; }
.hotspot-pop .hp-body { padding:10px 12px; }
.hotspot-pop .hp-title { font-weight:700; font-size:14px; }
.hotspot-pop .hp-price { color:var(--c-primary-dark); font-weight:800; font-size:13px; margin-top:2px; }

/* ---------- Misc ---------- */
.tag { display:inline-block; background:#eef2ee; color: var(--c-primary-dark); border-radius: 999px; padding: 3px 11px; font-size: 12px; font-weight: 600; margin: 2px; }
.empty { text-align:center; color: var(--c-muted); padding: 60px 0; }
.pagination { display:flex; gap:6px; justify-content:center; margin-top: 30px; flex-wrap: wrap; }
.pagination a, .pagination span { padding: 8px 13px; border-radius: 8px; border:1px solid var(--c-line); background:#fff; font-size: 14px; }
.pagination .cur { background: var(--c-primary); color:#fff; border-color: var(--c-primary); }
.badge-status { font-size: 12px; padding: 3px 9px; border-radius: 999px; font-weight: 700; }
.st-pending { background:#fff4e0; color:#9a6700; }
.st-answered { background:#e7f4ea; color:#1f6b34; }

/* ---------- Footer ---------- */
.site-footer { background: #1e241d; color:#cbd2c8; margin-top: 70px; padding: 44px 0 26px; }
.footer-inner { display:flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.footer-company strong { color:#fff; font-size: 16px; }
.footer-company p { margin: 3px 0; font-size: 13px; opacity: .85; }
.footer-links { display:flex; flex-direction: column; gap: 6px; }
.footer-links a:hover { color:#fff; }
.footer-copy { margin-top: 24px; padding-top: 16px; border-top: 1px solid #333a30; font-size: 12px; opacity: .7; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .features, .grid-4 { grid-template-columns: repeat(2,1fr); }
    .grid-3 { grid-template-columns: repeat(2,1fr); }
    .detail, .quote-grid { grid-template-columns: 1fr; }
    .layout { grid-template-columns: 1fr; }
    .sidebar { position: static; }
}
@media (max-width: 640px) {
    .nav-toggle { display: block; }
    .main-nav {
        display: none; position: absolute; top: 70px; left: 0; right: 0;
        flex-direction: column; background:#fff; border-bottom:1px solid var(--c-line); padding: 12px 20px;
    }
    body.nav-open .main-nav { display: flex; }
    .features, .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
    .form-row { grid-template-columns: 1fr; }
}
