/* ============================================================
   GoodPlus - Main Stylesheet
   lemer-shop.com 참고 — 미니멀 프리미엄 쇼핑몰
   ============================================================ */

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --primary: #333;
    --primary-hover: #000;
    --accent: #d13f4a;
    --accent-hover: #ff3061;
    --blue: #4472c4;
    --blue-light: #f2f9fb;
    --blue-hover: #2375eb;
    --success: #5d910b;
    --warning: #f6bb42;
    --danger: #d13f4a;
    --info: #4472c4;
    --bg: #fff;
    --bg-sub: #f5f5f5;
    --bg-dark: #282828;
    --border: #e9e9e9;
    --border-dark: #ddd;
    --text: #333;
    --text-light: #777;
    --text-muted: #999;
    --text-faint: #aaa;
    --text-white: #fff;
    --radius: 3px;
    --radius-md: 5px;
    --radius-lg: 5px;
    --shadow: 0 1px 4px rgba(0,0,0,0.06);
    --shadow-md: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.1);
    --font: "AppleSDGothicNeo-Medium", "Apple SD Gothic Neo", "NanumGothic", "Malgun Gothic", "dotum", "Arial", sans-serif;
    --container: 1200px;
    --header-h: 120px;
    --nav-h: 50px;
    --input-h: 50px;
}

html { font-size: 15.5px; }
body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    letter-spacing: -0.02em;
}

a { color: var(--text); text-decoration: none; }
a:hover { text-decoration: none; color: var(--primary-hover); }
img { max-width: 100%; height: auto; vertical-align: top; }

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

/* === Header (3-tier, sticky, scroll effect) === */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background 0.3s;
}
.site-header.scrolled {
    background: rgba(0, 0, 0, 0.88);
}
.site-header.scrolled .header-top { background: transparent; border: none; }
.site-header.scrolled .header-mid { background: transparent; border: none; }
.site-header.scrolled .header-nav { background: transparent; border: none; }
.site-header.scrolled .header-link,
.site-header.scrolled .header-point,
.site-header.scrolled .header-icon-link { color: var(--text-white); }
.site-header.scrolled .mobile-menu-btn span { background: var(--text-white); }
.site-header.scrolled .nav-list a { color: rgba(255,255,255,0.85); }
.site-header.scrolled .nav-list a:hover { color: #fff; }

/* 1단: 상단 유틸리티 */
.header-top {
    background: var(--bg-dark);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.header-top-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 44px;
}
.header-top-right {
    display: flex;
    align-items: center;
    gap: 16px;
}
.header-link {
    color: rgba(255,255,255,0.7);
    font-size: 0.93rem;
    transition: color 0.2s;
    letter-spacing: 0;
    padding: 6px 4px;
}
.header-link:hover { color: #fff; }
.header-point {
    color: var(--accent);
    font-weight: 700;
    font-size: 0.93rem;
}

/* 2단: 로고 */
.header-mid {
    background: var(--bg-dark);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.header-mid-inner {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 90px;
    position: relative;
}
.logo {
    display: flex;
    align-items: center;
}
.logo img {
    height: 36px;
    width: auto;
}
.header-mid-right {
    position: absolute;
    right: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}
.header-icon-link {
    color: rgba(255,255,255,0.7);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}
.header-icon-link:hover { color: #fff; }

/* 3단: 카테고리 네비 */
.header-nav {
    background: var(--bg-dark);
}
.nav-list {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 0;
}
.nav-list li a {
    display: inline-flex;
    align-items: center;
    height: 54px;
    padding: 0 36px;
    color: rgba(255,255,255,0.85);
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    transition: background 0.2s, color 0.2s;
}
.nav-list li a:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

/* Mobile menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    position: absolute;
    left: 0;
}
.mobile-menu-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-white);
    margin: 5px 0;
    transition: 0.3s;
}
.mobile-nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 300;
}
.mobile-nav-overlay.open { display: block; }
.mobile-nav-panel {
    width: 280px;
    height: 100%;
    background: var(--bg-dark);
    padding: 20px 0;
    overflow-y: auto;
}
.mobile-nav-close {
    display: block;
    background: none;
    border: none;
    color: var(--text-white);
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0 20px 16px;
}
.mobile-nav-list { list-style: none; }
.mobile-nav-list li a {
    display: block;
    padding: 14px 24px;
    color: rgba(255,255,255,0.8);
    font-size: 0.93rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.mobile-nav-list li a:hover { background: rgba(255,255,255,0.05); color: #fff; }
.mobile-nav-divider { height: 1px; background: rgba(255,255,255,0.12); margin: 8px 0; }

/* === Main === */
.site-main { flex: 1; padding: 0; }
.site-main > .container { padding-top: 40px; padding-bottom: 40px; }

/* === Policy Bar === */
.policy-bar {
    background: var(--bg-sub);
    border-top: 1px solid var(--border);
    padding: 14px 0;
    text-align: center;
    font-size: 0.85rem;
}
.policy-bar a { color: var(--text); font-weight: 600; }
.policy-bar a:hover { text-decoration: underline; }
.policy-divider { color: var(--text-muted); margin: 0 12px; }

/* === Footer === */
.site-footer {
    background: var(--bg-dark);
    color: rgba(255,255,255,0.5);
    padding: 40px 0 30px;
    font-size: 0.8rem;
    margin-top: auto;
    line-height: 2;
}
.footer-inner { text-align: center; }
.footer-logo { margin-bottom: 20px; }
.footer-logo img { height: 28px; opacity: 0.7; }
.footer-info { margin-bottom: 16px; }
.footer-info p { margin-bottom: 2px; }
.footer-copy { border-top: 1px solid rgba(255,255,255,0.08); padding-top: 16px; margin-top: 16px; }

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: var(--input-h);
    padding: 0 24px;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.93rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    gap: 6px;
    line-height: 1;
    letter-spacing: 0;
}
.btn:hover { opacity: 0.85; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 0.8rem; }
.btn-lg { height: 56px; padding: 0 36px; font-size: 1rem; font-weight: 600; }
.btn-block { display: flex; width: 100%; }
.btn-primary { background: var(--bg-dark); color: var(--text-white); border-color: var(--bg-dark); }
.btn-primary:hover { background: #000; color: var(--text-white); border-color: #000; }
.btn-accent { background: var(--accent); color: var(--text-white); border-color: var(--accent); }
.btn-accent:hover { background: var(--accent-hover); color: var(--text-white); }
.btn-success { background: var(--success); color: var(--text-white); }
.btn-danger { background: var(--danger); color: var(--text-white); }
.btn-danger:hover { background: var(--accent-hover); color: var(--text-white); }
.btn-warning { background: var(--warning); color: var(--text); }
.btn-dark { background: var(--bg-dark); color: var(--text-white); }
.btn-dark:hover { background: #000; color: var(--text-white); }
.btn-outline {
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border-dark);
}
.btn-outline:hover { background: var(--bg-sub); }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }

/* === Forms === */
.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text);
}
.form-group .hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 6px;
}
.form-control {
    width: 100%;
    height: var(--input-h);
    padding: 0 14px;
    border: 1px solid var(--border-dark);
    border-radius: var(--radius);
    font-size: 0.93rem;
    font-family: var(--font);
    transition: border-color 0.2s, box-shadow 0.2s;
    background: var(--bg);
    color: var(--text);
}
.form-control:focus {
    outline: none;
    border-color: #558ab7;
    box-shadow: 0 0 5px #9ed4ff;
}
.form-control::placeholder { color: var(--text-faint); }
select.form-control { appearance: auto; background: #f8f8f8; }
textarea.form-control { min-height: 120px; resize: vertical; padding: 12px 14px; height: auto; line-height: 1.6; }
.form-inline { display: flex; gap: 8px; align-items: center; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* === Alerts === */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid var(--border);
}
.alert-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.5;
    padding: 0 4px;
}
.alert-success { background: #f0faf0; color: #2d6a2d; border-color: #c3e6c3; }
.alert-error { background: #fff5f5; color: #a02020; border-color: #f5c6c6; }
.alert-warning { background: #fffbf0; color: #8a6d00; border-color: #f0dca0; }
.alert-info { background: var(--blue-light); color: #1e5a8a; border-color: #b0d0e8; }

/* === Cards === */
.card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.card-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-sub);
}
.card-body { padding: 24px; }
.card-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    background: var(--bg-sub);
}

/* === Tables === */
.table-wrap { overflow-x: auto; }
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.table th, .table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.table th {
    background: var(--bg-sub);
    font-weight: 600;
    color: var(--text-light);
    white-space: nowrap;
    font-size: 0.85rem;
}
.table tbody tr:hover { background: #fafafa; }
.table .text-center { text-align: center; }
.table .text-right { text-align: right; }

/* === Badges === */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: 0;
}
.badge-pending { background: #fff3cd; color: #856404; }
.badge-approved { background: #d4edda; color: #155724; }
.badge-blocked { background: #f8d7da; color: #721c24; }
.badge-rejected { background: #e9ecef; color: #495057; }
.badge-waiting { background: #fff3cd; color: #856404; }
.badge-answered { background: #d1ecf1; color: #0c5460; }
.badge-closed { background: #e9ecef; color: #495057; }
.badge-paid { background: #d4edda; color: #155724; }
.badge-pending_deposit { background: #fff3cd; color: #856404; }
.badge-deposit_confirmed { background: #d1ecf1; color: #0c5460; }
.badge-preparing { background: #e8daef; color: #6c3483; }
.badge-shipping { background: #d6eaf8; color: #1a5276; }
.badge-completed { background: #d4edda; color: #155724; }
.badge-canceled { background: #f8d7da; color: #721c24; }

/* === Pagination === */
.pagination {
    display: flex;
    justify-content: center;
    gap: 2px;
    margin-top: 30px;
}
.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--border-dark);
    color: var(--text-light);
    font-size: 0.85rem;
    transition: 0.2s;
}
.page-link:hover { background: var(--bg-sub); color: var(--text); }
.page-link.active {
    background: var(--bg-dark);
    color: var(--text-white);
    border-color: var(--bg-dark);
}

/* === Banner Carousel === */
.banner-carousel-wrap {
    width: 100%;
    max-width: 100vw;
    margin: 0;
    overflow: hidden;
}
.banner-carousel {
    position: relative;
    overflow: hidden;
    background: var(--bg-dark);
    width: 100%;
}
.carousel-track {
    display: flex;
    transition: transform 0.5s ease;
    width: 100%;
}
.carousel-slide {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    flex: 0 0 100%;
}
.carousel-slide img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    display: block;
}
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.3);
    color: #fff;
    border: none;
    width: 48px;
    height: 48px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background 0.2s;
    z-index: 10;
}
.carousel-btn:hover { background: rgba(0,0,0,0.6); }
.carousel-prev { left: 20px; }
.carousel-next { right: 20px; }
.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}
.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: background 0.2s;
}
.carousel-dot.active { background: #fff; }

/* Banner placeholder (when no banners) */
.banner-placeholder {
    background: var(--bg-dark);
    color: var(--text-white);
    text-align: center;
    padding: 100px 20px;
}
.banner-placeholder-inner { max-width: 600px; margin: 0 auto; }
.banner-ph-sub { font-size: 0.8rem; letter-spacing: 4px; opacity: 0.5; margin-bottom: 14px; }
.banner-ph-title { font-size: 2.8rem; font-weight: 800; letter-spacing: 4px; margin-bottom: 10px; }
.banner-ph-desc { font-size: 1rem; opacity: 0.6; font-weight: 300; }

/* === Product Section === */
.product-section {
    padding: 60px 0;
    border-bottom: 1px solid var(--border);
}
.product-section:last-of-type { border-bottom: none; }

/* === Product Grid === */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.product-card {
    display: block;
    background: var(--bg);
    text-decoration: none;
    transition: opacity 0.2s;
}
.product-card:hover { opacity: 0.85; }
.product-card .thumb {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    background: var(--bg-sub);
    border: 1px solid var(--border);
}
.product-card .info {
    padding: 14px 0;
}
.product-card .name {
    font-weight: 400;
    color: var(--text);
    margin-bottom: 8px;
    font-size: 0.93rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-card .price {
    font-weight: 700;
    color: var(--accent);
    font-size: 1.05rem;
}

/* === Section Titles === */
.section-title {
    font-size: 1.3rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 32px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text);
}
.section-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background: var(--text);
    margin: 12px auto 0;
}
.section-sub {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: -20px;
    margin-bottom: 32px;
}

/* === Order Summary Box === */
.order-summary {
    background: var(--bg);
    border: 2px solid var(--bg-dark);
    border-radius: var(--radius-lg);
    padding: 28px;
    position: sticky;
    top: 140px;
}
.order-summary h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--text);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.order-summary .summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 0.9rem;
    color: var(--text-light);
}
.order-summary .summary-row span:last-child { color: var(--text); font-weight: 500; }
.order-summary .summary-row.total {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent);
    border-top: 1px solid var(--border);
    margin-top: 10px;
    padding-top: 16px;
}
.order-summary .summary-row.total span:last-child { color: var(--accent); }

.bank-info-box {
    background: var(--bg-sub);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-top: 20px;
}
.bank-info-box h4 {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 14px;
    color: var(--text);
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}
.bank-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 0.875rem;
}
.bank-info-row .label { color: var(--text-muted); min-width: 70px; }
.bank-info-row .value { font-weight: 600; color: var(--text); text-align: right; }
.copy-btn {
    background: var(--bg-dark);
    color: var(--text-white);
    border: none;
    padding: 5px 12px;
    border-radius: var(--radius);
    font-size: 0.75rem;
    cursor: pointer;
    font-weight: 500;
    margin-left: 8px;
}
.copy-btn:hover { background: #000; }
.bank-info-box .notice {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* === Checkout Layout === */
.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
    align-items: start;
}

/* === Mypage === */
.mypage-nav {
    display: flex;
    gap: 0;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--text);
}
.mypage-nav a {
    padding: 14px 24px;
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.9rem;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: 0.2s;
}
.mypage-nav a.active,
.mypage-nav a:hover {
    color: var(--text);
    border-bottom-color: var(--text);
    background: transparent;
}
.point-balance-display {
    text-align: center;
    padding: 40px;
    background: var(--bg-dark);
    color: var(--text-white);
    margin-bottom: 30px;
}
.point-balance-display .label { font-size: 0.85rem; opacity: 0.7; letter-spacing: 2px; text-transform: uppercase; }
.point-balance-display .amount {
    font-size: 2.8rem;
    font-weight: 800;
    margin-top: 8px;
    letter-spacing: -1px;
}

/* === Auth Pages === */
.auth-wrap {
    max-width: 460px;
    margin: 50px auto;
}
.auth-wrap .card { border: 1px solid var(--border); }
.auth-wrap .card-header {
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    background: var(--bg);
    border-bottom: 2px solid var(--text);
    letter-spacing: 1px;
    text-transform: uppercase;
}
.auth-notice {
    background: var(--bg-sub);
    padding: 16px 18px;
    border: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 24px;
    line-height: 1.6;
}

/* === Pending Page === */
.pending-wrap {
    max-width: 500px;
    margin: 80px auto;
    text-align: center;
}
.pending-wrap .icon {
    font-size: 3rem;
    margin-bottom: 20px;
    opacity: 0.6;
}
.pending-wrap h2 {
    font-size: 1.4rem;
    margin-bottom: 16px;
    font-weight: 700;
}
.pending-wrap p {
    color: var(--text-light);
    margin-bottom: 8px;
    font-size: 0.93rem;
}

/* === Empty State === */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
}
.empty-state p { font-size: 1rem; }

/* === Payment Method Selector === */
.payment-methods {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}
.payment-method-option {
    border: 2px solid var(--border-dark);
    border-radius: var(--radius-md);
    padding: 24px 16px;
    cursor: pointer;
    text-align: center;
    transition: 0.2s;
}
.payment-method-option:hover { border-color: var(--text); }
.payment-method-option.selected {
    border-color: var(--bg-dark);
    background: var(--bg-sub);
}
.payment-method-option input[type="radio"] { display: none; }
.payment-method-option .method-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text);
    margin-bottom: 6px;
}
.payment-method-option .method-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* === Inquiry === */
.inquiry-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}
.inquiry-item .title { font-weight: 500; color: var(--text); }
.inquiry-item .meta { font-size: 0.8rem; color: var(--text-muted); }

/* === Utilities === */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-primary { color: var(--text); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-gray { color: var(--text-muted); }
.text-sm { font-size: 0.85rem; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.fw-bold { font-weight: 700; }
.gap-2 { gap: 16px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }

/* === Star Rating Input === */
.star-rating {
    display: inline-flex;
    flex-direction: row-reverse;
    gap: 2px;
}
.star-rating input { display: none; }
.star-rating label {
    font-size: 1.8rem;
    color: var(--border-dark);
    cursor: pointer;
    transition: color 0.15s;
}
.star-rating input:checked ~ label,
.star-rating label:hover,
.star-rating label:hover ~ label {
    color: var(--accent);
}
