/* ============================================================
   글담(GlDam) - 고객 사이트 CSS
   ============================================================ */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
    color: #2c2c2a;
    background: #fff;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; transition: color 0.2s; }
img { max-width: 100%; height: auto; display: block; }
input, select, textarea, button {
    font-family: inherit; font-size: inherit;
    border: 1px solid #d1d0cc; border-radius: 6px;
    padding: 10px 14px; outline: none; transition: border-color 0.2s;
}
input:focus, select:focus, textarea:focus { border-color: #2c2c2a; }
textarea { resize: vertical; }

.serif { font-family: 'Noto Serif KR', serif; }

/* --- Layout --- */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.section-dark { background: #f8f7f5; }

/* --- Header --- */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255,255,255,0.97);
    border-bottom: 1px solid #eee;
    backdrop-filter: blur(10px);
}
.header-inner {
    max-width: 1100px; margin: 0 auto; padding: 0 24px;
    display: flex; align-items: center; height: 64px; gap: 32px;
}
.logo { display: flex; align-items: baseline; gap: 6px; }
.logo-main { font-family: 'Noto Serif KR', serif; font-size: 22px; font-weight: 700; color: #2c2c2a; }
.logo-sub { font-size: 11px; color: #888780; font-weight: 400; letter-spacing: 1px; }

.gnb { display: flex; gap: 24px; margin-left: auto; }
.gnb a { font-size: 14px; color: #5f5e5a; font-weight: 400; position: relative; }
.gnb a:hover { color: #2c2c2a; }

.header-util { display: flex; gap: 16px; margin-left: 32px; }
.util-link { font-size: 13px; color: #888780; }
.util-link:hover { color: #2c2c2a; }
.cart-link { position: relative; }
.cart-badge {
    position: absolute; top: -8px; right: -14px;
    background: #e24b4a; color: #fff; font-size: 10px;
    width: 18px; height: 18px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 600;
}
.mobile-menu-btn { display: none; background: none; border: none; font-size: 22px; cursor: pointer; padding: 4px; }

/* --- Hero Section --- */
.hero {
    position: relative; overflow: hidden;
    background: #1a1a18; color: #fff;
    min-height: 520px; display: flex; align-items: center;
}
.hero-bg {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
    opacity: 0.45;
}
.hero-content {
    position: relative; z-index: 2;
    max-width: 1100px; margin: 0 auto; padding: 60px 24px;
}
.hero-eyebrow {
    font-size: 13px; letter-spacing: 3px; text-transform: uppercase;
    color: rgba(255,255,255,0.6); margin-bottom: 16px;
}
.hero-title {
    font-family: 'Noto Serif KR', serif;
    font-size: 42px; font-weight: 700; line-height: 1.3;
    margin-bottom: 20px;
}
.hero-desc {
    font-size: 17px; line-height: 1.8; color: rgba(255,255,255,0.8);
    max-width: 520px; margin-bottom: 32px;
}
.hero-btn {
    display: inline-flex; align-items: center; gap: 8px;
    background: #fff; color: #2c2c2a;
    padding: 14px 36px; border-radius: 8px;
    font-size: 15px; font-weight: 600;
    transition: all 0.2s;
    border: none; cursor: pointer;
}
.hero-btn:hover { background: #f0efeb; transform: translateY(-1px); }

/* --- Section Titles --- */
.sec-title {
    font-family: 'Noto Serif KR', serif;
    font-size: 28px; font-weight: 600; text-align: center;
    margin-bottom: 12px;
}
.sec-subtitle {
    font-size: 15px; color: #888780; text-align: center;
    margin-bottom: 48px;
}

/* --- Product Cards --- */
.product-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}
.product-card {
    background: #fff; border: 1px solid #eee; border-radius: 12px;
    overflow: hidden; transition: all 0.25s; cursor: pointer;
}
.product-card:hover { border-color: #d1d0cc; transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.06); }
.product-card-img {
    height: 180px; background: #f8f7f5;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.product-card-img img { width: 100%; height: 100%; object-fit: cover; }
.product-card-body { padding: 20px; }
.product-card-name { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.product-card-desc { font-size: 13px; color: #888780; margin-bottom: 10px; }
.product-card-price { font-size: 18px; font-weight: 700; }
.product-card-price small { font-size: 13px; font-weight: 400; color: #888780; }

/* --- Feature Section --- */
.feature-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px;
}
.feature-item { text-align: center; padding: 32px 20px; }
.feature-icon { font-size: 36px; margin-bottom: 16px; }
.feature-title { font-size: 17px; font-weight: 600; margin-bottom: 10px; }
.feature-desc { font-size: 14px; color: #888780; line-height: 1.7; }

/* --- Image Gallery --- */
.gallery-row {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
    margin-bottom: 16px;
}
.gallery-item {
    border-radius: 10px; overflow: hidden;
    aspect-ratio: 4/3;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.gallery-item:hover img { transform: scale(1.04); }

/* --- How It Works --- */
.steps-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
    counter-reset: step;
}
.step-item {
    text-align: center; padding: 28px 16px;
    background: #fff; border-radius: 12px; border: 1px solid #eee;
    position: relative;
}
.step-item::before {
    counter-increment: step;
    content: counter(step);
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; margin: 0 auto 14px;
    background: #2c2c2a; color: #fff; border-radius: 50%;
    font-size: 15px; font-weight: 600;
}
.step-title { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.step-desc { font-size: 13px; color: #888780; }

/* --- Buttons --- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 24px; border: 1px solid transparent; border-radius: 6px; font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.2s; }
.btn-dark { background: #2c2c2a; color: #fff; }
.btn-dark:hover { background: #444441; }
.btn-outline { background: transparent; color: #2c2c2a; border-color: #d1d0cc; }
.btn-outline:hover { background: #f4f3f0; }
.btn-lg { padding: 14px 36px; font-size: 16px; }
.btn-danger { background: #e24b4a; color: #fff; }

/* --- Forms --- */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; color: #5f5e5a; }
.form-group input, .form-group select, .form-group textarea { width: 100%; }
.form-row { display: flex; gap: 16px; }
.form-row .form-group { flex: 1; }
.form-help { font-size: 12px; color: #888780; margin-top: 4px; }

/* --- Order Page --- */
.order-wrap { display: grid; grid-template-columns: 1fr 360px; gap: 32px; }
.order-summary {
    position: sticky; top: 88px;
    background: #f8f7f5; border-radius: 12px; padding: 28px;
    border: 1px solid #eee; align-self: start;
}
.summary-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 14px; }
.summary-total { border-top: 2px solid #2c2c2a; padding-top: 12px; margin-top: 8px; font-size: 18px; font-weight: 700; }

/* --- Paper Type Selector --- */
.paper-types { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.paper-type-card {
    border: 2px solid #eee; border-radius: 10px; padding: 20px;
    cursor: pointer; transition: all 0.2s; text-align: center;
}
.paper-type-card:hover { border-color: #b4b2a9; }
.paper-type-card.selected { border-color: #2c2c2a; background: #fafaf8; }
.paper-type-card input[type="radio"] { display: none; }
.paper-swatch {
    width: 48px; height: 48px; border-radius: 8px; margin: 0 auto 10px;
    border: 1px solid #d1d0cc;
}
.paper-swatch.white { background: #fff; }
.paper-swatch.black { background: #2c2c2a; }

/* --- Size Selector --- */
.size-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.size-option {
    border: 2px solid #eee; border-radius: 10px; padding: 16px;
    cursor: pointer; text-align: center; transition: all 0.2s;
}
.size-option:hover { border-color: #b4b2a9; }
.size-option.selected { border-color: #2c2c2a; background: #fafaf8; }
.size-option input[type="radio"] { display: none; }
.size-name { font-size: 15px; font-weight: 600; }
.size-chars { font-size: 12px; color: #888780; margin-top: 2px; }
.size-price { font-size: 16px; font-weight: 700; margin-top: 6px; }

/* --- Message Input --- */
.msg-tabs { display: flex; gap: 0; margin-bottom: 16px; }
.msg-tab {
    flex: 1; padding: 12px; text-align: center; font-size: 14px; font-weight: 500;
    background: #f0efeb; color: #888780; cursor: pointer;
    border: 1px solid #e8e7e3; transition: all 0.2s;
}
.msg-tab:first-child { border-radius: 8px 0 0 8px; }
.msg-tab:last-child { border-radius: 0 8px 8px 0; }
.msg-tab.active { background: #2c2c2a; color: #fff; border-color: #2c2c2a; }
.msg-panel { display: none; }
.msg-panel.active { display: block; }

/* --- Template Cards --- */
.tmpl-list { display: grid; gap: 10px; max-height: 300px; overflow-y: auto; padding-right: 4px; }
.tmpl-card {
    border: 1px solid #eee; border-radius: 8px; padding: 14px;
    cursor: pointer; transition: all 0.2s; font-size: 13px; line-height: 1.6;
}
.tmpl-card:hover { border-color: #b4b2a9; background: #fafaf8; }
.tmpl-card.selected { border-color: #2c2c2a; background: #f8f7f5; }
.tmpl-card-title { font-weight: 600; margin-bottom: 4px; font-size: 14px; }
.tmpl-card-text { color: #5f5e5a; }

/* --- Cart --- */
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th { text-align: left; padding: 12px; border-bottom: 2px solid #eee; font-size: 13px; color: #888780; }
.cart-table td { padding: 14px 12px; border-bottom: 1px solid #f0efeb; vertical-align: middle; }

/* --- Badges --- */
.badge { display: inline-block; padding: 3px 10px; border-radius: 4px; font-size: 12px; font-weight: 500; }
.badge-wait { background: #faeeda; color: #854f0b; }
.badge-paid { background: #e6f1fb; color: #185fa5; }
.badge-make { background: #eeedfe; color: #534ab7; }
.badge-ship { background: #e1f5ee; color: #0f6e56; }
.badge-done { background: #f1efe8; color: #5f5e5a; }
.badge-cancel { background: #fcebeb; color: #a32d2d; }

/* --- Paging --- */
.paging { display: flex; align-items: center; justify-content: center; gap: 4px; padding: 24px 0; }
.paging a, .paging span { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; border-radius: 6px; font-size: 14px; }
.paging a:hover { background: #f0efeb; }
.pg-current { background: #2c2c2a; color: #fff; font-weight: 600; }

/* --- Alert --- */
.alert { padding: 14px 18px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }
.alert-info { background: #e6f1fb; color: #0c447c; }
.alert-success { background: #e1f5ee; color: #085041; }
.alert-warning { background: #faeeda; color: #633806; }

/* --- Order Complete --- */
.order-complete {
    max-width: 600px; margin: 60px auto; text-align: center; padding: 0 24px;
}
.order-complete-icon { font-size: 48px; margin-bottom: 20px; }
.order-complete h2 { font-family: 'Noto Serif KR', serif; font-size: 26px; margin-bottom: 12px; }
.bank-info {
    background: #f8f7f5; border: 1px solid #eee; border-radius: 12px;
    padding: 28px; margin: 24px 0; text-align: left;
}
.bank-info-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #eee; }
.bank-info-row:last-child { border-bottom: none; }
.bank-info-label { color: #888780; font-size: 14px; }
.bank-info-value { font-weight: 600; font-size: 14px; }
.bank-info-value.highlight { color: #e24b4a; font-size: 18px; }

/* --- Footer --- */
.site-footer {
    background: #2c2c2a; color: #b4b2a9; padding: 48px 0 32px;
    margin-top: 80px;
}
.footer-inner { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.footer-brand { margin-bottom: 20px; }
.footer-brand strong { color: #fff; font-size: 18px; }
.footer-brand p { font-size: 13px; margin-top: 4px; }
.footer-info { font-size: 12px; line-height: 1.8; margin-bottom: 16px; }
.footer-links { display: flex; gap: 20px; margin-bottom: 20px; }
.footer-links a { font-size: 12px; color: #888780; }
.footer-links a:hover { color: #fff; }
.footer-copy { font-size: 11px; color: #5f5e5a; border-top: 1px solid #444441; padding-top: 16px; }
.footer-notice { margin-top: 6px; font-style: italic; }

/* --- Responsive --- */
@media (max-width: 768px) {
    .hero-title { font-size: 28px; }
    .hero { min-height: 400px; }
    .gnb { display: none; position: absolute; top: 64px; left: 0; right: 0; background: #fff; flex-direction: column; padding: 16px 24px; border-bottom: 1px solid #eee; box-shadow: 0 4px 12px rgba(0,0,0,0.06); }
    .gnb.open { display: flex; }
    .mobile-menu-btn { display: block; }
    .header-util { display: none; }
    .feature-grid { grid-template-columns: 1fr; }
    .steps-grid { grid-template-columns: 1fr 1fr; }
    .order-wrap { grid-template-columns: 1fr; }
    .order-summary { position: static; }
    .gallery-row { grid-template-columns: 1fr 1fr; }
    .form-row { flex-direction: column; }
    .sec-title { font-size: 22px; }
    .section { padding: 48px 0; }
}
