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

body {
  font-family: 'Hiragino Kaku Gothic ProN', 'Meiryo', sans-serif;
  font-size: 14px;
  color: #333;
  background: #f5f5f5;
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

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

/* =====================
   Header
===================== */
.header {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-top .container {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
}

.logo {
  flex-shrink: 0;
}

.logo-text {
  font-size: 1.8rem;
  font-weight: 900;
  color: #ff6b35;
  letter-spacing: -1px;
}

.search-bar {
  flex: 1;
  display: flex;
  align-items: center;
  border: 2px solid #ff6b35;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.search-location {
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-right: 1px solid #ddd;
  color: #666;
  gap: 6px;
  flex-shrink: 0;
}

.search-location select {
  border: none;
  outline: none;
  font-size: 13px;
  color: #333;
  background: transparent;
  cursor: pointer;
  padding: 10px 0;
}

#searchInput {
  flex: 1;
  border: none;
  outline: none;
  padding: 10px 14px;
  font-size: 14px;
}

.btn-search {
  background: #ff6b35;
  color: #fff;
  border: none;
  padding: 10px 20px;
  font-size: 14px;
  cursor: pointer;
  font-weight: bold;
  white-space: nowrap;
  transition: background 0.2s;
}

.btn-search:hover {
  background: #e55a25;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.btn-post {
  background: #ff6b35;
  color: #fff;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: bold;
  font-size: 14px;
  white-space: nowrap;
  transition: background 0.2s;
}

.btn-post:hover {
  background: #e55a25;
}

.btn-login {
  color: #ff6b35;
  font-weight: bold;
  padding: 10px 16px;
  border: 2px solid #ff6b35;
  border-radius: 6px;
  font-size: 14px;
  transition: all 0.2s;
}

.btn-login:hover {
  background: #ff6b35;
  color: #fff;
}

/* Nav Categories */
.header-nav {
  background: #fff;
  border-top: 1px solid #eee;
}

.header-nav .container {
  overflow-x: auto;
}

.nav-categories {
  display: flex;
  gap: 0;
  white-space: nowrap;
}

.nav-categories li a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  font-size: 13px;
  color: #555;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
}

.nav-categories li a:hover,
.nav-categories li a.active {
  color: #ff6b35;
  border-bottom-color: #ff6b35;
  background: #fff5f2;
}

/* =====================
   Hero Banner
===================== */
.hero-banner {
  background: linear-gradient(135deg, #ff6b35, #f7c59f);
  padding: 60px 0;
  text-align: center;
  color: #fff;
}

.hero-banner h1 {
  font-size: 2.2rem;
  font-weight: 900;
  margin-bottom: 12px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.hero-banner p {
  font-size: 1rem;
  opacity: 0.9;
  margin-bottom: 28px;
}

.btn-hero {
  display: inline-block;
  background: #fff;
  color: #ff6b35;
  padding: 14px 40px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: bold;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-hero:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.25);
  border: 1px solid rgba(255,255,255,0.6);
  color: #fff;
  padding: 5px 14px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: bold;
  margin-bottom: 14px;
  backdrop-filter: blur(4px);
}

/* =====================
   Sections
===================== */
.category-section,
.listings-section,
.area-section {
  padding: 40px 0;
}

.bg-light {
  background: #fff;
}

.section-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: #333;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.section-header .section-title {
  margin-bottom: 0;
}

.view-all {
  color: #ff6b35;
  font-size: 13px;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 4px;
}

.view-all:hover {
  text-decoration: underline;
}

.badge-free {
  background: #4ecdc4;
  color: #fff;
  font-size: 11px;
  font-weight: bold;
  padding: 2px 8px;
  border-radius: 4px;
}

/* =====================
   Category Grid
===================== */
.category-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 12px;
}

@media (max-width: 1024px) {
  .category-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 600px) {
  .category-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 8px;
  background: #fff;
  border-radius: 10px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.category-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.category-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.3rem;
}

.category-card span {
  font-size: 12px;
  font-weight: bold;
  color: #333;
  line-height: 1.3;
}

.category-card small {
  font-size: 11px;
  color: #999;
}

/* =====================
   Listings Grid
===================== */
.listings-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 900px) {
  .listings-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 600px) {
  .listings-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.listing-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.listing-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.14);
}

.listing-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ccc;
  font-size: 2rem;
  position: relative;
  overflow: hidden;
}

.listing-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.listing-img .no-image {
  width: 100%;
  aspect-ratio: 1;
  background: linear-gradient(135deg, #f5f5f5, #e0e0e0);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #bbb;
  font-size: 2rem;
}

.badge-price-free {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #ff4757;
  color: #fff;
  font-size: 11px;
  font-weight: bold;
  padding: 3px 8px;
  border-radius: 4px;
}

.listing-body {
  padding: 12px;
}

.listing-title {
  font-size: 13px;
  font-weight: bold;
  color: #333;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.listing-price {
  font-size: 1rem;
  font-weight: 900;
  color: #ff6b35;
  margin-bottom: 6px;
}

.listing-price.free {
  color: #ff4757;
}

.listing-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #999;
}

.listing-meta i {
  font-size: 10px;
}

/* =====================
   Area Section
===================== */
.area-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.area-grid.okinawa-grid {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 900px) {
  .area-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px) {
  .area-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.area-region h3 {
  font-size: 13px;
  font-weight: bold;
  color: #555;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid #ff6b35;
}

.area-region ul li {
  margin-bottom: 4px;
}

.area-region ul li a {
  font-size: 13px;
  color: #555;
  display: flex;
  align-items: center;
}

.area-region ul li a:hover {
  color: #ff6b35;
  text-decoration: underline;
}

.area-region ul li a::before {
  content: '›';
  margin-right: 4px;
  color: #ff6b35;
}

/* =====================
   Footer
===================== */
.footer {
  background: #333;
  color: #ccc;
  padding: 40px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 30px;
  margin-bottom: 30px;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-col p {
  font-size: 13px;
  line-height: 1.7;
  color: #aaa;
  margin-top: 8px;
}

.footer-col h4 {
  font-size: 14px;
  font-weight: bold;
  color: #fff;
  margin-bottom: 12px;
}

.footer-col ul li {
  margin-bottom: 8px;
}

.footer-col ul li a {
  font-size: 13px;
  color: #aaa;
  transition: color 0.2s;
}

.footer-col ul li a:hover {
  color: #ff6b35;
}

.social-links {
  display: flex;
  gap: 12px;
  margin-top: 4px;
}

.social-links a {
  width: 36px;
  height: 36px;
  background: #555;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  transition: background 0.2s;
}

.social-links a:hover {
  background: #ff6b35;
}

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

/* =====================
   Listings Page
===================== */
.page-header {
  background: #fff;
  padding: 16px 0;
  border-bottom: 1px solid #eee;
}

.page-header h1 {
  font-size: 1.3rem;
  font-weight: 800;
  color: #333;
}

.listings-layout {
  display: flex;
  gap: 20px;
  padding: 20px 0;
}

.sidebar {
  width: 240px;
  flex-shrink: 0;
}

.sidebar-card {
  background: #fff;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.sidebar-card h3 {
  font-size: 14px;
  font-weight: bold;
  color: #333;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #ff6b35;
}

.filter-group {
  margin-bottom: 14px;
}

.filter-group label {
  display: block;
  font-size: 12px;
  color: #666;
  margin-bottom: 4px;
  font-weight: bold;
}

.filter-group select,
.filter-group input[type="text"],
.filter-group input[type="number"] {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  outline: none;
}

.filter-group select:focus,
.filter-group input:focus {
  border-color: #ff6b35;
}

.price-range {
  display: flex;
  align-items: center;
  gap: 6px;
}

.price-range input {
  flex: 1;
}

.btn-filter {
  width: 100%;
  background: #ff6b35;
  color: #fff;
  border: none;
  padding: 10px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.2s;
}

.btn-filter:hover {
  background: #e55a25;
}

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

.sort-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.sort-bar .count {
  font-size: 13px;
  color: #666;
}

.sort-bar .count strong {
  color: #ff6b35;
}

.sort-options {
  display: flex;
  gap: 8px;
}

.sort-btn {
  padding: 6px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  background: #fff;
  color: #555;
  transition: all 0.2s;
}

.sort-btn.active,
.sort-btn:hover {
  background: #ff6b35;
  color: #fff;
  border-color: #ff6b35;
}

.listings-grid-wide {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

@media (max-width: 900px) {
  .listings-grid-wide {
    grid-template-columns: repeat(3, 1fr);
  }
  .sidebar {
    display: none;
  }
}

@media (max-width: 600px) {
  .listings-grid-wide {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* =====================
   Detail Page
===================== */
.detail-layout {
  display: flex;
  gap: 24px;
  padding: 20px 0;
}

.detail-main {
  flex: 1;
  min-width: 0;
}

.detail-sidebar {
  width: 300px;
  flex-shrink: 0;
}

.detail-images {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.main-image {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ccc;
  font-size: 4rem;
}

.main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-list {
  display: flex;
  gap: 8px;
  padding: 12px;
  overflow-x: auto;
}

.thumb-list img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid transparent;
}

.thumb-list img.active {
  border-color: #ff6b35;
}

.detail-info {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.detail-title {
  font-size: 1.3rem;
  font-weight: bold;
  color: #333;
  margin-bottom: 10px;
}

.detail-price-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.detail-price {
  font-size: 1.8rem;
  font-weight: 900;
  color: #ff6b35;
}

.detail-category-badge {
  background: #fff5f2;
  color: #ff6b35;
  border: 1px solid #ff6b35;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
  margin-bottom: 16px;
}

.detail-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #666;
}

.detail-meta-item i {
  color: #ff6b35;
  width: 16px;
}

.detail-desc {
  font-size: 14px;
  line-height: 1.8;
  color: #444;
  white-space: pre-wrap;
}

.detail-desc h3 {
  font-size: 15px;
  font-weight: bold;
  color: #333;
  margin: 16px 0 8px;
}

/* Sticky Sidebar Card */
.seller-card {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  position: sticky;
  top: 80px;
}

.seller-info {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eee;
}

.seller-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #bbb;
}

.seller-name {
  font-weight: bold;
  font-size: 14px;
  color: #333;
}

.seller-rating {
  color: #f7c59f;
  font-size: 12px;
  margin-top: 2px;
}

.seller-rating strong {
  color: #333;
  font-size: 13px;
}

.btn-contact {
  width: 100%;
  background: #ff6b35;
  color: #fff;
  border: none;
  padding: 14px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  margin-bottom: 10px;
  transition: background 0.2s;
}

.btn-contact:hover {
  background: #e55a25;
}

.btn-favorite {
  width: 100%;
  background: #fff;
  color: #ff6b35;
  border: 2px solid #ff6b35;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-favorite:hover {
  background: #fff5f2;
}

.detail-stats {
  display: flex;
  justify-content: space-around;
  padding: 12px 0;
  border-top: 1px solid #eee;
  margin-top: 14px;
  text-align: center;
}

.detail-stat {
  font-size: 12px;
  color: #999;
}

.detail-stat strong {
  display: block;
  font-size: 16px;
  color: #333;
  font-weight: bold;
}

/* =====================
   Post Page
===================== */
.post-page {
  padding: 30px 0;
}

.post-container {
  max-width: 760px;
  margin: 0 auto;
}

.post-card {
  background: #fff;
  border-radius: 10px;
  padding: 28px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  margin-bottom: 16px;
}

.post-card h2 {
  font-size: 1.1rem;
  font-weight: bold;
  color: #333;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #ff6b35;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: bold;
  color: #555;
  margin-bottom: 6px;
}

.form-group label .required {
  color: #ff4757;
  margin-left: 4px;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: #ff6b35;
  box-shadow: 0 0 0 3px rgba(255,107,53,0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.image-upload-area {
  border: 2px dashed #ddd;
  border-radius: 8px;
  padding: 30px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s;
}

.image-upload-area:hover {
  border-color: #ff6b35;
  background: #fff5f2;
}

.image-upload-area i {
  font-size: 2.5rem;
  color: #ddd;
  margin-bottom: 10px;
}

.image-upload-area p {
  font-size: 13px;
  color: #999;
}

.image-upload-area small {
  font-size: 11px;
  color: #bbb;
}

.image-preview-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.image-preview-item {
  position: relative;
  width: 80px;
  height: 80px;
}

.image-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}

.image-preview-item .remove-img {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 20px;
  height: 20px;
  background: #ff4757;
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-submit {
  width: 100%;
  background: #ff6b35;
  color: #fff;
  border: none;
  padding: 16px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-submit:hover {
  background: #e55a25;
}

/* =====================
   Login / Register Page
===================== */
.auth-page {
  padding: 40px 0;
  min-height: calc(100vh - 200px);
  display: flex;
  align-items: center;
}

.auth-container {
  max-width: 440px;
  margin: 0 auto;
  width: 100%;
}

.auth-card {
  background: #fff;
  border-radius: 12px;
  padding: 36px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.auth-card h1 {
  text-align: center;
  font-size: 1.5rem;
  font-weight: bold;
  color: #333;
  margin-bottom: 8px;
}

.auth-card .auth-subtitle {
  text-align: center;
  font-size: 13px;
  color: #999;
  margin-bottom: 24px;
}

.auth-divider {
  text-align: center;
  color: #999;
  font-size: 12px;
  margin: 20px 0;
  position: relative;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: #eee;
}

.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }

.btn-social {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #ddd;
  background: #fff;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
  transition: background 0.2s;
}

.btn-social:hover {
  background: #f5f5f5;
}

.btn-social.google { color: #ea4335; }
.btn-social.twitter { color: #1da1f2; }
.btn-social.line { color: #00b900; }

.auth-link {
  text-align: center;
  font-size: 13px;
  color: #666;
  margin-top: 16px;
}

.auth-link a {
  color: #ff6b35;
  font-weight: bold;
}

/* =====================
   Breadcrumb
===================== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 0;
  font-size: 12px;
  color: #999;
}

.breadcrumb a {
  color: #ff6b35;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb .sep {
  color: #ccc;
}

/* =====================
   Pagination
===================== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 30px 0;
}

.page-btn {
  width: 36px;
  height: 36px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.page-btn:hover,
.page-btn.active {
  background: #ff6b35;
  color: #fff;
  border-color: #ff6b35;
}

/* =====================
   Toast Notification
===================== */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #333;
  color: #fff;
  padding: 14px 20px;
  border-radius: 8px;
  font-size: 14px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  z-index: 9999;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.success { background: #2ecc71; }
.toast.error { background: #e74c3c; }

/* =====================
   Modal
===================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: #fff;
  border-radius: 12px;
  padding: 28px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-header h2 {
  font-size: 1.1rem;
  font-weight: bold;
  color: #333;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: #999;
  cursor: pointer;
}

/* =====================
   Responsive
===================== */
@media (max-width: 768px) {
  .header-top .container {
    flex-wrap: wrap;
  }

  .search-bar {
    order: 3;
    width: 100%;
    flex: none;
  }

  .logo-text {
    font-size: 1.4rem;
  }

  .btn-register, .btn-login {
    padding: 7px 12px;
    font-size: 12px;
  }

  .hero-banner h1 {
    font-size: 1.5rem;
  }

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

  .detail-sidebar {
    width: 100%;
  }

  .seller-card {
    position: static;
  }

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

/* =====================
   Auth Header UI
===================== */
.auth-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-register {
  background: #ff6b35;
  color: #fff;
  padding: 9px 18px;
  border-radius: 6px;
  font-weight: bold;
  font-size: 13px;
  white-space: nowrap;
  transition: background 0.2s;
}

.btn-register:hover {
  background: #e55a25;
}

.btn-login {
  color: #ff6b35;
  font-weight: bold;
  padding: 9px 14px;
  border: 2px solid #ff6b35;
  border-radius: 6px;
  font-size: 13px;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-login:hover {
  background: #ff6b35;
  color: #fff;
}

/* User menu (logged in) */
.user-menu {
  position: relative;
}

.user-menu-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  background: none;
  border: 2px solid #ff6b35;
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: bold;
  color: #ff6b35;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.user-menu-btn:hover {
  background: #fff5f2;
}

.user-menu-btn i:first-child {
  font-size: 1.2rem;
}

.user-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  min-width: 160px;
  overflow: hidden;
  z-index: 200;
}

.user-dropdown.open {
  display: block;
}

.user-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  font-size: 13px;
  color: #333;
  transition: background 0.15s;
}

.user-dropdown a:hover {
  background: #fff5f2;
  color: #ff6b35;
}

.user-dropdown a i {
  width: 16px;
  color: #ff6b35;
}
