/* Header styles */
.header {
  background: var(--background-white);
  box-shadow: 0 2px 8px var(--shadow-light);
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  border-bottom: 1px solid var(--border-light);
  z-index: 1000;
}

@media (max-width: 1200px) {
  .header {
    max-width: none;
  }
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  padding: 0 var(--spacing-sm);
}

/* Desktop Navigation */
.desktop-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  width: 100%;
}

.mobile-nav {
  display: none;
}

.mobile-logo {
  display: none;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
}

.category-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 8px;
  border: none;
  border-radius: 8px;
  background: none;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
}

.category-toggle:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.search-container {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  max-width: 400px;
  z-index: 1100;
}

.search-input {
  width: 100%;
  padding: 12px 50px 12px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  font-size: 14px;
  background: #f8fafc;
  transition: all 0.2s ease;
}

.search-input:focus {
  outline: none;
  border-color: #8b5cf6;
  background: white;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.search-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  padding: 8px;
  border: none;
  background: none;
  color: #64748b;
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.search-btn:hover {
  background: #f1f5f9;
  color: #475569;
}

/* Search Dropdown */
.search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 9999;
  margin-top: 4px;
  max-height: 400px;
  overflow-y: auto;
  display: none;
}

.search-dropdown.show {
  display: block;
}

.search-dropdown-content {
  padding: 8px 0;
}

.search-dropdown-item {
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid #f8fafc;
  transition: background-color 0.2s ease;
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-dropdown-item:last-child {
  border-bottom: none;
}

.search-dropdown-item:hover {
  background: #f8fafc;
}

.search-dropdown-item.highlighted {
  background: #f1f5f9;
}

.search-item-image {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.search-item-content {
  flex: 1;
  min-width: 0;
}

.search-item-title {
  font-weight: 600;
  color: #1e293b;
  font-size: 14px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-item-category {
  font-size: 12px;
  color: #64748b;
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 12px;
  display: inline-block;
}

.search-item-price {
  font-size: 13px;
  color: #8b5cf6;
  font-weight: 600;
}

.search-no-results {
  padding: 20px;
  text-align: center;
  color: #64748b;
  font-size: 14px;
}

.search-loading {
  padding: 20px;
  text-align: center;
  color: #64748b;
  font-size: 14px;
}

/* Mobile Search Section */
.mobile-search-section {
  display: none;
  background: white;
  padding: 16px 0;
  border-bottom: 1px solid #f0f0f0;
}

.mobile-search-container {
  position: relative;
  max-width: 100%;
}

.mobile-search-input {
  width: 100%;
  padding: 12px 50px 12px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  font-size: 14px;
  background: #f8fafc;
  transition: all 0.2s ease;
}

.mobile-search-input:focus {
  outline: none;
  border-color: #8b5cf6;
  background: white;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.mobile-search-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  padding: 8px;
  border: none;
  background: none;
  color: #64748b;
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.mobile-search-btn:hover {
  background: #f1f5f9;
  color: #475569;
}

.mobile-search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 9999;
  margin-top: 4px;
  max-height: 400px;
  overflow-y: auto;
  display: none;
}

.mobile-search-dropdown.show {
  display: block;
}

.mobile-search-dropdown-content {
  padding: 8px 0;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  justify-content: flex-end;
}

/* Host Apply Button - Desktop only */
.host-apply-btn {
  background: #000000;
  color: white;
  padding: 10px 20px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
  border: 2px solid #000000;
}

.host-apply-btn:hover {
  background: white;
  color: #000000;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Mobile host apply button */
.mobile-host-btn {
  background: #000000 !important;
  color: white !important;
  padding: 8px 16px !important;
  border-radius: 20px !important;
  text-decoration: none !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  transition: all 0.3s ease !important;
  border: 2px solid #000000 !important;
}

.mobile-host-btn:hover {
  background: white !important;
  color: #000000 !important;
}

.nav-icon {
  padding: 8px;
  color: #64748b;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.nav-icon:hover {
  background: #f8fafc;
  color: #475569;
}

/* Mobile app-like header */
@media (max-width: 768px) {
  .desktop-nav {
    display: none;
  }
  
  .desktop-nav .logo {
    display: none;
  }
  
  .mobile-nav {
    display: block;
  }
  
  .mobile-logo {
    display: block;
  }
  
  .header {
    background: var(--background-white);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid #f0f0f0;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
  }

  .header-content {
    height: 60px;
    padding: 0 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .logo {
    font-size: 1.25rem;
    font-weight: 700;
  }

  .mobile-search-section {
    display: block;
  }
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.logo img {
  height: 35px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  gap: var(--spacing-md);
}

.nav-link {
  font-weight: 500;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-medium);
  transition: all 0.3s ease;
}

.nav-link:hover {
  background: var(--background-light);
  color: var(--primary-color);
}

.nav-link.cta {
  background: var(--primary-color);
  color: white;
}

.nav-link.cta:hover {
  background: #ff5252;
  color: white;
}

/* Main content */
.main {
  margin-top: 70px;
  min-height: calc(100vh - 70px);
}

/* Mobile app-like main content */
@media (max-width: 768px) {
  .main {
    margin-top: 60px;
    min-height: calc(100vh - 60px);
    background: var(--background-white);
  }
}

/* Section styles */
.section {
  padding: var(--spacing-xl) 0;
}

.section-title {
  text-align: left;
  margin-bottom: 0;
  color: var(--text-primary);
  font-size: 1.3rem;
}

/* Footer styles */
.footer {
  background: #f8f9fa;
  color: #666;
  padding: 60px 0 30px;
  margin-top: auto;
  border-top: 1px solid #e9ecef;
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.footer-nav {
  display: flex;
  justify-content: flex-start;
  gap: 40px;
  padding-bottom: 30px;
  border-bottom: 1px solid #e9ecef;
}

.footer-link {
  color: #000000;
  text-decoration: none;
  font-size: 14px;
  font-weight: bold;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: #333;
}

.footer-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

.footer-logo-section {
  display: flex;
  align-items: center;
  gap: 20px;
}

.footer-logo img {
  height: 32px;
}

.footer-logo .home-link {
  text-decoration: none;
}

.support-btn {
  background: #000;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.3s ease;
}

.support-btn:hover {
  background: #333;
}

.footer-left .footer-text {
  margin: 0;
}

.footer-left .footer-text p {
  color: #666;
  font-size: 14px;
  margin: 0;
  text-align: left;
}

.footer-copyright p {
  color: #999;
  font-size: 12px;
  margin: 0;
  text-align: left;
}

.footer-copyright a {
  color: #999;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-copyright a:hover {
  color: #666;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #e9ecef;
  color: #999;
  font-size: 12px;
}

.footer-bottom a {
  color: #999;
  text-decoration: none;
}

.footer-bottom a:hover {
  color: #666;
}

.kakao-btn {
  background: #fee500;
  color: #3a1d1d;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 8px;
}

.kakao-btn:hover {
  background: #fdd835;
  transform: translateY(-1px);
}

.social-icons {
  display: flex;
  gap: 15px;
  align-items: center;
}




/* Footer responsive */
@media (max-width: 768px) {
  .footer-nav {
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
  }
  
  .footer-main {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }
  
  .footer-left {
    align-items: center;
    text-align: center;
  }
  
  .footer-logo-section {
    flex-direction: column;
    gap: 15px;
  }
  
  .footer-left .footer-text p,
  .footer-copyright p {
    text-align: center;
  }
  
  .social-icons {
    justify-content: center;
  }
}

/* Grid layouts */
.grid {
  display: grid;
  gap: var(--spacing-md);
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}
.grid-6 {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

/* Mobile app-like grid adjustments */
@media (max-width: 768px) {
  .grid {
    gap: 12px;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-6 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Flex layouts */
.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-wrap {
  flex-wrap: wrap;
}

.flex-column {
  flex-direction: column;
}

/* Spacing utilities */
.mt-sm {
  margin-top: var(--spacing-sm);
}
.mt-md {
  margin-top: var(--spacing-md);
}
.mt-lg {
  margin-top: var(--spacing-lg);
}
.mb-sm {
  margin-bottom: var(--spacing-sm);
}
.mb-md {
  margin-bottom: var(--spacing-md);
}
.mb-lg {
  margin-bottom: var(--spacing-lg);
}
.p-sm {
  padding: var(--spacing-sm);
}
.p-md {
  padding: var(--spacing-md);
}
.p-lg {
  padding: var(--spacing-lg);
}

/* Language Switcher */
.language-switcher {
  display: flex;
  align-items: center;
  margin-right: 20px;
  font-size: 14px;
}

.lang-link {
  color: #64748b;
  text-decoration: none;
  transition: all 0.2s ease;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  white-space: nowrap;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
}

.lang-link:hover {
  color: var(--primary-color);
  background-color: rgba(255, 107, 107, 0.1);
}

/* Default: Hide Korean on Korean pages, show English */
.lang-link.lang-ko {
  display: none;
}

.lang-link.lang-en {
  display: inline-block;
}

/* On English pages: Hide English, show Korean */
html[lang="en"] .lang-link.lang-ko,
body.en-page .lang-link.lang-ko {
  display: inline-block;
}

html[lang="en"] .lang-link.lang-en,
body.en-page .lang-link.lang-en {
  display: none;
}

.mobile-lang-switcher {
  margin-right: 12px;
  font-size: 12px;
}

.mobile-lang-switcher .lang-link {
  padding: 4px 8px;
  font-size: 12px;
}

@media (max-width: 768px) {
  .language-switcher {
    margin-right: 10px;
  }
}
