@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700&family=Outfit:wght@400;600;800&display=swap');
/* Last Updated: 2026-04-14 14:49 (Mobile Force Update) */
html {
  font-size: 77%; /* Scale down overall font-size by 23% (15% further from 90%) */
}
:root {
  --primary: #26A69A; /* Mint */
  --primary-light: #B2DFDB;
  --primary-dark: #00796B;
  --secondary: #4E342E; /* Deep Brown */
  --accent: #80CBC4;
  --bg-primary: #FFFFFF;
  --bg-secondary: #FFFFFF;
  --body-text: #3E2723;
  --muted-text: #6D4C41;
  --white: #FFFFFF;
  --shadow: 0 10px 30px rgba(62, 39, 35, 0.08);
  --shadow-hover: 0 15px 40px rgba(62, 39, 35, 0.12);
  --border-radius: 16px;
  --transition: all 0.3s ease;

  /* Rainbow points for 8-do representation */
  --p1: #FF5252; --p2: #FFAD42; --p3: #F4FF81; --p4: #64FFDA;
  --p5: #40C4FF; --p6: #7C4DFF; --p7: #E040FB; --p8: #FF4081;
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: 'Noto Sans KR', sans-serif;
  background-color: var(--bg-primary);
  color: var(--body-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  color: var(--body-text);
}
a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}
button {
  cursor: pointer;
  border: none;
  outline: none;
  transition: var(--transition);
  font-family: inherit;
}
ul {
  list-style: none;
}
/* Common Layout */
.container {
  max-width: 1020px; /* Reduced from 1200px by 15% */
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}
@media (max-width: 768px) {
  .container {
    padding: 0 15px;
  }
}
.glass-card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}
/* Response Grid Classes */
.responsive-grid-2 {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 15px; /* Reduced from 20px */
}
.adoption-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 15px;
}
@media (max-width: 1200px) {
  .responsive-grid-2 { grid-template-columns: repeat(4, 1fr) !important; }
  .adoption-grid { grid-template-columns: repeat(5, 1fr) !important; }
}
@media (max-width: 992px) {
  .responsive-grid-2 { grid-template-columns: repeat(3, 1fr) !important; }
  .adoption-grid { grid-template-columns: repeat(4, 1fr) !important; }
}
@media (max-width: 768px) {
  .adoption-grid { grid-template-columns: repeat(3, 1fr) !important; }
}
@media (max-width: 600px) {
  .responsive-grid-2 { 
    grid-template-columns: repeat(2, 1fr) !important; 
    gap: 10px; /* Reduced from 12px */
  }
}
@media (max-width: 480px) {
  .adoption-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px;
  }
}
.recommend-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}
@media (max-width: 768px) {
  .recommend-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}
.responsive-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px; /* Reduced from 24px */
}
@media (max-width: 1200px) {
  .responsive-grid-4 { grid-template-columns: repeat(3, 1fr) !important; }
}
@media (max-width: 768px) {
  .responsive-grid-4 { 
    grid-template-columns: repeat(2, 1fr) !important; 
    gap: 12px; /* Reduced from 15px */
  }
}
/* Section Title Styles */
.section-title-wrap {
  margin-bottom: 25px;
  display: flex;
  align-items: baseline;
  gap: 15px;
  flex-wrap: wrap;
}
.section-title-wrap h2 {
  font-size: 1.8rem;
  font-weight: 800;
  white-space: nowrap;
  word-break: keep-all;
}
.section-title-wrap span {
  color: var(--muted-text);
  font-size: 1rem;
  white-space: nowrap;
}
@media (max-width: 600px) {
  .section-title-wrap {
    gap: 5px;
    margin-bottom: 15px;
  }
  .section-title-wrap h2 {
    font-size: 1.4rem;
  }
  .section-title-wrap span {
    font-size: 0.85rem;
    width: 100%;
    margin-top: -2px;
  }
}
/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.75; transform: scale(1.08); }
}
.fade-in {
  animation: fadeIn 0.8s ease forwards;
}
/* Badge Styles */
.badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  display: inline-block;
  white-space: nowrap;
}
.badge-safe { background: #E8F5E9; color: #2E7D32; }
.badge-popular { background: #FFF3E0; color: #E65100; }
.badge-special { background: #F3E5F5; color: #7B1FA2; }
.badge-recommend { background: #E0F2FE; color: #0369A1; }
.badge-new { background: #FFE4E6; color: #E11D48; }
/* Modern Card Layout */
.modern-card:hover .card-image-container {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}
.modern-card:hover h3 {
  color: var(--primary);
}
.card-image-container {
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.3s ease;
}
.card-image-container::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0,0,0,0.05), transparent 30%);
  pointer-events: none;
}
/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
  background: var(--primary-light);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}
/* Popular Breeds Section */
.breed-item {
  transition: transform 0.3s ease;
}
.breed-item:hover {
  transform: translateY(-5px);
}
.breed-item:hover .breed-icon-circle {
  background-color: var(--primary-light);
  border-color: var(--primary);
}
.breed-item:hover span {
  color: var(--primary-dark);
}
.breed-icon-circle {
  transition: var(--transition);
}
@media (max-width: 992px) {
  .breed-grid {
    grid-template-columns: repeat(4, 1fr) !important;
  }
}
@media (max-width: 600px) {
  .breed-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
  .breed-icon-circle {
    width: 60px !important;
    height: 60px !important;
    font-size: 1.5rem !important;
  }
}
/* Utility for text truncation */
.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* Logo Responsive */
.logo-container {
  display: flex;
  align-items: center;
}
.logo-image {
  height: 42px;
  width: auto;
  object-fit: contain;
  transition: var(--transition);
}
@media (max-width: 600px) {
  .logo-image {
    height: 32px;
  }
}
/* Header Responsive */
.header-responsive {
  transition: var(--transition);
}
@media (max-width: 600px) {
  .header-content {
    height: 60px !important;
  }
  .nav-group {
    gap: 10px !important;
  }
  .nav-link {
    font-size: 0.75rem !important;
  }
  .nav-btn {
    padding: 6px 12px !important;
    font-size: 0.75rem !important;
  }
}
@media (max-width: 400px) {
  .nav-group {
    gap: 5px !important;
  }
  .nav-btn {
    padding: 5px 8px !important;
    font-size: 0.7rem !important;
  }
}
html, body {
  max-width: 100%;
  overflow-x: hidden;
}
/* Mobile Helpers */
.mobile-only {
  display: none;
}
.desktop-only {
  display: block;
}
@media (max-width: 600px) {
  .mobile-only {
    display: block;
  }
  .desktop-only {
    display: none;
  }
}
/* Detail Page Responsive */
.detail-main-grid {
  display: grid;
  grid-template-columns: 1fr 310px;
  gap: 30px;
}
@media (max-width: 992px) {
  .detail-main-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
  }
  .detail-sidebar {
    order: 1 !important; /* 모바일에서 판매자 정보/가격이 먼저 노출됨 */
    position: static !important;
    margin-top: 0 !important;
    width: 100% !important;
  }
  .detail-main-content {
    order: 2 !important; /* 상세 설명은 그 다음 */
  }
}
.detail-image-section {
  margin-bottom: 25px;
}
.mobile-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: white;
  padding: 12px 16px;
  box-shadow: 0 -5px 25px rgba(0,0,0,0.15);
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  z-index: 9999; /* 최상단 보장 */
}
@media (max-width: 768px) {
  .mobile-bottom-bar {
    display: grid !important;
  }
  .fade-in {
    padding-bottom: 80px !important; /* 하단 바 공간 확보 */
  }
}
.info-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
.info-grid-child-border {
  border-left: 1px solid #eee;
  padding-left: 40px;
}
@media (max-width: 768px) {
  .info-grid-2 {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
  .info-grid-child-border {
    border-left: none !important;
    padding-left: 0 !important;
    border-top: 1px solid #eee;
    padding-top: 20px;
  }
}
/* =============================
   MyPage Mobile Optimization
   ============================= */
/* 마이페이지 전체 레이아웃 */
.mypage-layout {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 3fr;
  gap: 30px;
}
@media (max-width: 992px) {
  .mypage-layout {
    grid-template-columns: 1fr !important;
    gap: 15px !important;
  }
}
/* 모바일 탭 내비게이션 */
.mypage-mobile-nav {
  display: none;
}
.mypage-desktop-sidebar {
  display: block;
}
.mypage-profile-card {
  display: none;
}
@media (max-width: 992px) {
  .mypage-mobile-nav {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding: 10px 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .mypage-mobile-nav::-webkit-scrollbar { display: none; }

  .mypage-desktop-sidebar { display: none !important; }

  .mypage-profile-card {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 15px !important;
    padding: 15px 20px !important;
    text-align: left !important;
  }
}
/* 탭 칩 버튼 */
.mypage-nav-chip {
  flex-shrink: 0;
  white-space: nowrap;
  padding: 8px 16px;
  border-radius: 25px;
  border: 1.5px solid #eee;
  background: white;
  font-size: 0.85rem;
  font-weight: 700;
  color: #555;
  cursor: pointer;
  transition: all 0.2s;
}
.mypage-nav-chip.active {
  background: var(--primary-dark);
  color: white;
  border-color: var(--primary-dark);
}
/* 메인 컨텐츠 패딩 */
@media (max-width: 992px) {
  .mypage-main-card {
    padding: 20px 15px !important;
    min-height: auto !important;
  }
}
/* 게시물‧광고 테이블 숨기고 카드 보이기 (모바일) */
.post-card-list { display: none; }
@media (max-width: 768px) {
  .post-table-wrap { display: none !important; }
  .post-card-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
}
/* 포스트 모바일 카드 */
.post-mobile-card {
  border: 1px solid #eee;
  border-radius: 14px;
  padding: 14px;
  background: white;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
/* 채팅 레이아웃 모바일 대응 */
.chat-layout {
  display: grid;
  grid-template-columns: 350px 1fr;
  grid-template-rows: 700px;
  gap: 0;
  height: 700px;
  background: white;
  border-radius: 20px;
  border: none;
  overflow: hidden;
}
.chat-room-panel {
  border-right: 1px solid #eee;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}
.chat-detail-panel {
  height: 100%;
  background: #fcfcfc;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
@media (max-width: 768px) {
  .chat-layout {
    grid-template-columns: 1fr !important;
    height: auto !important;
    gap: 12px !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
  }
  .chat-room-panel {
    border-right: none !important;
    border: 1px solid #eee !important;
    border-radius: 16px !important;
    height: auto !important;
    max-height: 55vh;
    overflow-y: auto;
  }
  .chat-detail-panel {
    border: 1px solid #eee !important;
    border-radius: 16px !important;
    height: 70vh;
    overflow: hidden;
    background: white !important;
  }
  /* 대화방 선택 시 목록 숨김 */
  .chat-layout.room-open .chat-room-panel { display: none; }
  .chat-layout.room-open .chat-detail-panel { height: 80vh; }
}
/* 폼 그리드 모바일 1열 */
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 768px) {
  .form-grid-2 {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
}
/* 통계 그리드 */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}
@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: 1fr !important;
    gap: 15px !important;
  }
}
/* =============================
   Naver Style Portal Layout
   ============================= */
.main-portal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px; /* Width reduced from 340px to 320px */
  gap: 20px; /* Reduced from 24px */
  margin-top: 10px; /* Reduced by 50% */
  margin-bottom: 22px; /* Reduced by 50% */
}
@media (max-width: 1024px) {
  .main-portal-layout {
    grid-template-columns: 1fr;
    gap: 15px;
  }
}
/* Naver Style Search Bar */
.naver-search-container {
  display: flex;
  justify-content: center;
  padding: 20px 0; /* Reduced from 30px 0 */
  background-color: var(--bg-primary);
}
.naver-search-bar {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 550px; /* Reduced from 600px */
  height: 48px; /* Reduced from 56px */
  border: 2px solid var(--primary);
  border-radius: 4px;
  background-color: white;
  padding: 0 14px;
  box-shadow: 0 2px 8px rgba(38, 166, 154, 0.08);
}
.naver-search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--body-text);
  padding: 0 10px;
}
.naver-search-button {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Breed Chips (Naver Style Quick Shortcuts) */
.breed-chips-container {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 0;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  scrollbar-width: none; /* Firefox */
}
.breed-chips-container::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}
.breed-chip {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: 20px;
  background-color: white;
  border: 1px solid #e2e8f0;
  font-size: 0.85rem;
  font-weight: 600;
  color: #4a5568;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}
.breed-chip:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
  background-color: var(--primary-light);
}
/* Cast Tabs (안심 / 인기 / 스페셜) */
.cast-tabs-container {
  border: 1px solid #e2e8f0;
  background-color: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 30px;
}
.cast-tabs-header {
  display: flex;
  background-color: #f7fafc;
  border-bottom: 1px solid #e2e8f0;
}
.cast-tab-btn {
  flex: 1;
  padding: 16px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #718096;
  background: none;
  border: none;
  cursor: pointer;
  text-align: center;
  transition: var(--transition);
}
.cast-tab-btn.active {
  color: var(--primary-dark);
  background-color: white;
  border-bottom: 2px solid var(--primary);
  margin-bottom: -1px;
}
.cast-tab-content {
  padding: 24px;
}
/* Login Widget (Sidebar) */
.naver-login-widget {
  background-color: white;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 10px;
}
.naver-login-widget-text {
  font-size: 0.85rem;
  color: #718096;
  margin-bottom: 12px;
}
.naver-login-btn {
  display: block;
  width: 100%;
  padding: 14px;
  background-color: var(--primary);
  color: white;
  text-align: center;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(38, 166, 154, 0.2);
  margin-bottom: 12px;
  transition: var(--transition);
}
.naver-login-btn:hover {
  background-color: var(--primary-dark);
}
.naver-login-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  font-size: 0.8rem;
  color: #a0aec0;
  padding: 0;
}
.naver-login-links a {
  color: #a0aec0 !important;
}
.naver-login-links a:hover {
  text-decoration: underline;
  color: var(--body-text) !important;
}
/* Profile Widget (Sidebar - Logged In) */
.naver-profile-widget {
  background-color: white;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 10px;
}
.profile-widget-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.profile-widget-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-dark);
  overflow: hidden;
}
.profile-widget-info h4 {
  font-size: 0.95rem;
  margin-bottom: 2px;
}
.profile-widget-info span {
  font-size: 0.75rem;
  color: #718096;
}
.profile-widget-menu {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  border-top: 1px solid #edf2f7;
  padding-top: 16px;
}
.profile-widget-menu-btn {
  padding: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  border-radius: 6px;
  background-color: #f7fafc;
  border: 1px solid #cbd5e1;
  transition: var(--transition);
}
.profile-widget-menu-btn:hover {
  background-color: #edf2f7;
  color: var(--primary-dark);
}
.profile-widget-logout-btn {
  grid-column: 1 / -1;
  background-color: white;
  border: 1px solid #fed7d7;
  color: #e53e3e;
}
.profile-widget-logout-btn:hover {
  background-color: #fff5f5;
  color: #c53030;
}
/* Header User Dropdown Item */
.header-dropdown-item {
  padding: 10px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--body-text) !important;
  text-decoration: none;
  display: block;
  transition: var(--transition);
  text-align: left;
  background: none;
  border: none;
  width: 100%;
  cursor: pointer;
  box-sizing: border-box;
}
.header-dropdown-item:hover {
  background-color: #f1f5f9;
  color: var(--primary) !important;
}
/* MyPage Dashboard Stats Grid */
.dashboard-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-bottom: 40px;
}
.dashboard-stats-grid.buyer {
  grid-template-columns: repeat(2, 1fr);
}
@media (max-width: 768px) {
  .dashboard-stats-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }
}
/* Ad Section Carousel Arrow Button */
.ad-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.9);
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
  color: #475569;
}
.ad-carousel-btn:hover {
  background-color: #ffffff;
  transform: translateY(-50%) scale(1.1);
  color: #26A69A; /* var(--primary) */
}
.ad-carousel-btn.left {
  left: 5px;
}
.ad-carousel-btn.right {
  right: 5px;
}
/* Header Slogans Responsive */
@media (max-width: 900px) {
  .header-slogans-container {
    display: none !important;
  }
}
