/* ===== 낚시마켓 — B-type 커뮤니티 ===== */

:root {
  --primary: #0066CC;
  --primary-dark: #004C99;
  --primary-light: #E8F2FF;
  --accent: #FF5722;
  --green: #2E7D32;
  --orange: #F57C00;
  --red: #D32F2F;
  --bg: #F4F5F7;
  --white: #FFFFFF;
  --dark: #1A1A2E;
  --text: #333333;
  --text-muted: #777777;
  --border: #E0E0E0;
  --font: 'Noto Sans KR', -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
}
a { color: var(--text); text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ===== TOP BAR ===== */
.top-bar {
  background: var(--dark);
  color: #ccc;
  font-size: 12px;
  padding: 6px 0;
}
.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.top-bar-info strong { color: var(--accent); }
.top-bar-links { display: flex; gap: 16px; }
.top-bar-links a { color: #aaa; font-size: 12px; }
.top-bar-links a:hover { color: #fff; }

/* ===== HEADER ===== */
.header {
  background: var(--white);
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.logo-icon { font-size: 28px; }
.logo-text {
  font-size: 22px;
  font-weight: 900;
  color: var(--primary);
}
.logo-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: -4px;
}
.search-bar {
  flex: 1;
  display: flex;
  max-width: 500px;
}
.search-input {
  flex: 1;
  padding: 10px 16px;
  border: 2px solid var(--border);
  border-right: none;
  border-radius: 6px 0 0 6px;
  font-size: 14px;
  font-family: var(--font);
  outline: none;
  transition: border-color 0.3s;
}
.search-input:focus { border-color: var(--primary); }
.search-btn {
  padding: 10px 20px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 0 6px 6px 0;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font);
}
.search-btn:hover { background: var(--primary-dark); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
}
.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--text);
}

/* ===== NAV BAR ===== */
.nav-bar {
  background: var(--primary);
  border-bottom: 3px solid var(--primary-dark);
}
.nav-scroll {
  display: flex;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.nav-item {
  padding: 12px 20px;
  color: rgba(255,255,255,0.85);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.2s;
  border-bottom: 3px solid transparent;
  margin-bottom: -3px;
}
.nav-item:hover,
.nav-item.active {
  color: #fff;
  background: rgba(255,255,255,0.1);
  border-bottom-color: #fff;
}

/* MOBILE NAV */
.mobile-nav {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100vh;
  background: rgba(26,26,46,0.98);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
}
.mobile-nav.active { display: flex; }
.mobile-nav-link {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
}
.mobile-nav-link:hover { color: var(--accent); }

/* ===== HERO BANNER ===== */
.hero-banner {
  padding: 16px 0 0;
}
.banner-slide {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  height: 280px;
}
.banner-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.2) 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px;
}
.banner-overlay h2 {
  font-size: 28px;
  color: #fff;
  margin-bottom: 8px;
}
.banner-overlay p {
  font-size: 15px;
  color: rgba(255,255,255,0.8);
  margin-bottom: 20px;
}
.btn {
  display: inline-block;
  padding: 10px 24px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  font-family: var(--font);
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: #E64A19;
}

/* ===== MAIN GRID ===== */
.main-content { padding: 20px 0 40px; }
.main-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
}

/* ===== BOARD SECTION ===== */
.board-section {
  background: var(--white);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
}
.board-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary);
}
.board-title {
  font-size: 17px;
  font-weight: 900;
}
.board-more {
  font-size: 13px;
  color: var(--primary);
  font-weight: 600;
}
.board-more:hover { text-decoration: underline; }

/* ===== PRODUCT GRID (중고장터) ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.product-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  background: var(--white);
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.product-img {
  position: relative;
  height: 160px;
  overflow: hidden;
}
.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-status {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}
.product-status.sale { background: var(--green); }
.product-status.reserved { background: var(--orange); }
.product-status.sold { background: var(--text-muted); }
.product-info { padding: 12px; }
.product-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-price {
  font-size: 16px;
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 8px;
}
.product-price s {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 14px;
}
.product-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
}

/* ===== BOARD LIST (게시판 목록) ===== */
.board-list { display: flex; flex-direction: column; }
.board-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
}
.board-row:last-child { border-bottom: none; }
.board-badge {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  min-width: 52px;
  text-align: center;
}
.board-badge.hot { background: #FFEBEE; color: var(--red); }
.board-badge.new { background: #E8F5E9; color: var(--green); }
.board-badge.answer { background: var(--primary-light); color: var(--primary); }
.board-badge.question { background: #FFF3E0; color: var(--orange); }
.board-badge:empty { min-width: 52px; }
.board-link {
  flex: 1;
  font-size: 14px;
  line-height: 1.4;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.board-link:hover { color: var(--primary); }
.board-comment {
  font-size: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.board-date {
  font-size: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
  min-width: 60px;
  text-align: right;
}

/* ===== REVIEW GRID (조행기) ===== */
.review-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.review-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.2s;
}
.review-card:hover { transform: translateY(-4px); }
.review-img { height: 180px; overflow: hidden; }
.review-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.review-body { padding: 16px; }
.review-body h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
}
.review-body p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
}
.review-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

/* ===== SIDEBAR ===== */
.sidebar { display: flex; flex-direction: column; gap: 16px; }
.sidebar-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}
.sidebar-title {
  font-size: 15px;
  font-weight: 900;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary);
}

/* 인기 매물 */
.hot-list {
  list-style: none;
  counter-reset: hot;
}
.hot-list li {
  counter-increment: hot;
  padding: 8px 0;
  border-bottom: 1px solid #f5f5f5;
  font-size: 13px;
}
.hot-list li:last-child { border-bottom: none; }
.hot-list li::before {
  content: counter(hot);
  display: inline-block;
  width: 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  background: var(--primary);
  color: #fff;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  margin-right: 8px;
}
.hot-list li:nth-child(1)::before { background: var(--red); }
.hot-list li:nth-child(2)::before { background: var(--accent); }
.hot-list li:nth-child(3)::before { background: var(--orange); }
.hot-price {
  display: block;
  font-weight: 700;
  color: var(--primary);
  font-size: 12px;
  margin-top: 2px;
  margin-left: 28px;
}

/* 공지 */
.notice-list { list-style: none; }
.notice-list li {
  padding: 8px 0;
  border-bottom: 1px solid #f5f5f5;
}
.notice-list li:last-child { border-bottom: none; }
.notice-list a {
  font-size: 13px;
  line-height: 1.5;
}
.notice-list a:hover { color: var(--primary); }

/* 날씨 */
.weather-info { display: flex; flex-direction: column; gap: 10px; }
.weather-item {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}
.weather-loc { font-weight: 600; }
.weather-data { color: var(--text-muted); }

/* 새 회원 */
.new-members { display: flex; flex-direction: column; gap: 10px; }
.member {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.member img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--dark);
  color: #999;
  padding: 32px 0;
  margin-top: 20px;
}
.footer-disclaimer {
  text-align: center;
  color: #e53e3e;
  font-weight: 700;
  font-size: 12px;
  padding: 10px;
  margin-bottom: 20px;
  border: 1px solid rgba(229,62,62,0.3);
  border-radius: 6px;
  background: rgba(229,62,62,0.05);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-brand {
  font-size: 18px;
  font-weight: 900;
  color: #fff;
}
.footer-brand p {
  font-size: 12px;
  color: #777;
  font-weight: 400;
  margin-top: 4px;
}
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: 13px; color: #888; }
.footer-links a:hover { color: #fff; }
.footer-copy { font-size: 12px; color: #555; width: 100%; text-align: center; margin-top: 12px; }

/* ===== INTERACTION STATES ===== */
.header.scrolled {
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
}
.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}
.hamburger span {
  transition: transform 0.3s, opacity 0.3s;
}
.search-bar.focused {
  box-shadow: 0 0 0 3px rgba(0,102,204,0.25);
  border-radius: 6px;
}
.nav-item.active,
.mobile-nav-link.active {
  color: #fff;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .main-grid { grid-template-columns: 1fr; }
  .sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .product-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  /* 탑바 */
  .top-bar { padding: 5px 0; }
  .top-bar-info { display: none; }
  .top-bar-links { width: 100%; justify-content: flex-end; gap: 12px; }
  .top-bar-links a { font-size: 11px; }

  /* 헤더 */
  .header { padding: 10px 0; }
  .header-inner { gap: 12px; }
  .logo-icon { font-size: 24px; }
  .logo-text { font-size: 18px; }
  .logo-sub { display: none; }
  .search-bar { display: none; }
  .hamburger { display: flex; }
  .nav-bar { display: none; }

  /* 배너 */
  .hero-banner { padding: 12px 0 0; }
  .banner-slide { height: 180px; border-radius: 8px; }
  .banner-overlay { padding: 20px; }
  .banner-overlay h2 { font-size: 18px; line-height: 1.3; margin-bottom: 6px; }
  .banner-overlay p { font-size: 12px; margin-bottom: 14px; }
  .btn { padding: 8px 18px; font-size: 13px; }

  /* 메인 콘텐츠 */
  .main-content { padding: 12px 0 24px; }
  .container { padding: 0 12px; }

  /* 보드 섹션 */
  .board-section { padding: 16px; margin-bottom: 12px; border-radius: 8px; }
  .board-header { margin-bottom: 12px; padding-bottom: 10px; }
  .board-title { font-size: 15px; }

  /* 상품 그리드 */
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .product-img { height: 140px; }
  .product-info { padding: 10px; }
  .product-name { font-size: 13px; margin-bottom: 4px; }
  .product-price { font-size: 14px; margin-bottom: 6px; }
  .product-meta { font-size: 10px; }
  .product-status { padding: 2px 7px; font-size: 10px; }

  /* 게시판 리스트 */
  .board-row { gap: 8px; padding: 9px 0; }
  .board-badge { padding: 2px 6px; font-size: 10px; min-width: 44px; }
  .board-link { font-size: 13px; }
  .board-comment { font-size: 11px; }
  .board-date { display: none; }

  /* 조행기 */
  .review-grid { grid-template-columns: 1fr; gap: 12px; }
  .review-img { height: 160px; }
  .review-body { padding: 12px; }
  .review-body h4 { font-size: 14px; margin-bottom: 6px; }
  .review-body p { font-size: 12px; margin-bottom: 8px; }
  .review-meta { font-size: 11px; }

  /* 사이드바 */
  .sidebar { grid-template-columns: 1fr; gap: 12px; }
  .sidebar-box { padding: 16px; border-radius: 8px; }
  .sidebar-title { font-size: 14px; margin-bottom: 10px; padding-bottom: 8px; }

  /* 푸터 */
  .footer { padding: 24px 0; }
  .footer-disclaimer { font-size: 11px; padding: 8px; margin-bottom: 16px; }
  .footer-inner { flex-direction: column; align-items: center; text-align: center; gap: 16px; }
  .footer-brand { font-size: 16px; }
  .footer-brand p { font-size: 11px; }
  .footer-links { flex-wrap: wrap; justify-content: center; gap: 14px; }
  .footer-links a { font-size: 12px; }
  .footer-copy { font-size: 11px; margin-top: 8px; }
}

@media (max-width: 480px) {
  /* 배너 더 축소 */
  .banner-slide { height: 150px; }
  .banner-overlay h2 { font-size: 16px; }
  .banner-overlay p { font-size: 11px; margin-bottom: 10px; }
  .btn { padding: 7px 14px; font-size: 12px; }

  /* 상품카드 */
  .product-img { height: 120px; }
  .product-info { padding: 8px; }
  .product-name { font-size: 12px; }
  .product-price { font-size: 13px; }

  /* 조행기 이미지 축소 */
  .review-img { height: 140px; }

  /* 사이드바 2열로 컴팩트 */
  .sidebar { grid-template-columns: 1fr 1fr; }
  .sidebar-box { padding: 12px; }
  .sidebar-title { font-size: 13px; }
  .hot-list li { font-size: 12px; padding: 6px 0; }
  .hot-price { font-size: 11px; }
  .notice-list a { font-size: 12px; }
  .weather-item { font-size: 12px; }
  .member { font-size: 12px; }
  .member img { width: 28px; height: 28px; }
}

@media (max-width: 360px) {
  .container { padding: 0 8px; }
  .board-section { padding: 12px; }
  .product-grid { gap: 8px; }
  .product-img { height: 100px; }
  .sidebar { grid-template-columns: 1fr; }
  .banner-slide { height: 130px; }
  .banner-overlay { padding: 14px; }
  .banner-overlay h2 { font-size: 14px; }
}
