/* ===== 소소플리마켓 메인 CSS ===== */
:root {
    --primary: #1a237e;
    --primary-light: #3949ab;
    --danger: #f44336;
    --success: #4caf50;
    --warning: #ff9800;
    --bg: #f8f9fa;
    --text: #333;
    --muted: #888;
    --border: #e0e0e0;
    --radius: 12px;
    --shadow: 0 2px 12px rgba(0,0,0,.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; }

/* 컨테이너 */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* 버튼 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 18px; border-radius: 8px; border: none; cursor: pointer; font-size: 14px; font-weight: 600; text-decoration: none; transition: all .2s; }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-light); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #d32f2f; color: #fff; }
.btn-light { background: #f0f0f0; color: var(--text); }
.btn-light:hover { background: #e0e0e0; }
.btn-outline-primary { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline-primary:hover { background: var(--primary); color: #fff; }
.btn-outline-secondary { background: transparent; color: #666; border: 1px solid #ddd; }
.btn-outline-secondary:hover { background: #f0f0f0; }
.btn-sm { padding: 5px 12px; font-size: 12px; }

/* 폼 */
.form-control { width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; outline: none; transition: border-color .2s; }
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,35,126,.1); }
.form-select { width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; outline: none; background: #fff; cursor: pointer; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: #555; margin-bottom: 6px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }

/* 상품 그리드 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
.product-card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); text-decoration: none; color: var(--text); display: block; transition: transform .2s, box-shadow .2s; position: relative; }
.product-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.product-img { width: 100%; height: 200px; object-fit: cover; display: block; }
.product-img-placeholder { width: 100%; height: 200px; background: #f0f0f0; display: flex; align-items: center; justify-content: center; color: #ccc; font-size: 40px; }
.product-info { padding: 14px; }
.product-name { font-size: 13px; font-weight: 600; line-height: 1.4; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price-wrap { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.product-price { font-size: 16px; font-weight: 800; color: var(--danger); }
.product-retail { font-size: 12px; color: var(--muted); text-decoration: line-through; }
.product-discount { font-size: 12px; font-weight: 700; color: var(--danger); }
.product-cart-btn { width: 100%; padding: 8px; background: var(--primary); color: #fff; border: none; border-radius: 6px; font-size: 13px; font-weight: 600; cursor: pointer; transition: background .2s; }
.product-cart-btn:hover { background: var(--primary-light); }

/* 필터 박스 */
.filter-box { background: #fff; border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.filter-section { margin-bottom: 20px; }
.filter-section h4 { font-size: 13px; font-weight: 700; color: #555; margin-bottom: 10px; }
.filter-section ul { list-style: none; padding: 0; }
.filter-section ul li { margin-bottom: 4px; }
.filter-section ul li a { font-size: 13px; color: #666; text-decoration: none; padding: 4px 8px; border-radius: 4px; display: block; }
.filter-section ul li a:hover, .filter-section ul li a.active { background: var(--primary); color: #fff; }

/* 반응형 */
@media (max-width: 768px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .container { padding: 0 12px; }
    header .container { flex-wrap: wrap; gap: 10px; }
    footer .container > div:first-child { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .product-img, .product-img-placeholder { height: 150px; }
}
