/* ============================================
   SLASH MARKETPLACE - MAQUETTE WIREFRAME
   Mobile-First Responsive Design
   ============================================ */

/* ---------- RESET & BASE ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary: #e63946;
  --primary-dark: #c1121f;
  --secondary: #1d3557;
  --accent: #f4a261;
  --success: #2a9d8f;
  --bg: #f1faee;
  --bg-white: #ffffff;
  --text: #1d3557;
  --text-light: #6c757d;
  --border: #d1d5db;
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
  --radius: 8px;
  --radius-sm: 4px;
  --radius-lg: 12px;
  --nav-height: 60px;
  --bottom-nav-height: 65px;
}

html {
  font-size: 14px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  padding-bottom: calc(var(--bottom-nav-height) + 20px);
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  cursor: pointer;
  border: none;
  font-family: inherit;
  font-size: inherit;
}

/* ---------- UTILITY ---------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 12px;
}

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-light { color: var(--text-light); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-promo { background: var(--primary); color: #fff; }
.badge-sponsor { background: var(--accent); color: #fff; }
.badge-flash { background: #ff6b6b; color: #fff; }

/* ---------- TOP NAVBAR (Desktop hidden on mobile) ---------- */
.top-nav {
  display: none;
  background: var(--secondary);
  color: #fff;
  padding: 8px 0;
  font-size: 0.8rem;
}
.top-nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.top-nav a {
  color: #a8dadc;
  transition: color 0.2s;
}
.top-nav a:hover { color: #fff; }
.top-nav-links {
  display: flex;
  gap: 16px;
  align-items: center;
}

/* ---------- HEADER / NAVBAR ---------- */
.header {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
}
.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 8px;
}

.logo {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary);
  white-space: nowrap;
  letter-spacing: -0.5px;
}
.logo span {
  color: var(--secondary);
}

.search-bar {
  flex: 1;
  max-width: 480px;
  position: relative;
  display: none;
}
.search-bar input {
  width: 100%;
  padding: 8px 40px 8px 14px;
  border: 2px solid var(--border);
  border-radius: 25px;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}
.search-bar input:focus {
  border-color: var(--primary);
}
.search-bar button {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-btn {
  background: none;
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  position: relative;
  transition: background 0.2s;
}
.nav-btn:hover { background: var(--bg); }
.nav-btn .notif-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
}
.nav-btn svg { width: 22px; height: 22px; }

/* Desktop menu */
.nav-menu {
  display: none;
  gap: 20px;
  align-items: center;
}
.nav-menu a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}
.nav-menu a:hover {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* ---------- BOTTOM NAVBAR (Mobile) ---------- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-white);
  border-top: 1px solid var(--border);
  z-index: 100;
  height: var(--bottom-nav-height);
  display: flex;
  align-items: center;
  justify-content: space-around;
}
.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 12px;
  color: var(--text-light);
  font-size: 0.7rem;
  transition: color 0.2s;
  text-align: center;
}
.bottom-nav-item.active,
.bottom-nav-item:hover {
  color: var(--primary);
}
.bottom-nav-item svg { width: 22px; height: 22px; }
.bottom-nav-item span { font-weight: 500; }

/* ---------- POPUP / MODAL ---------- */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.3s;
}
.popup-overlay.hidden { display: none; }

.popup-ad {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  max-width: 460px;
  width: 100%;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  animation: slideUp 0.4s;
  position: relative;
}
.popup-ad-img {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  padding: 20px;
}
.popup-ad-body {
  padding: 20px;
}
.popup-ad-body h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}
.popup-ad-body p {
  color: var(--text-light);
  font-size: 0.85rem;
  margin-bottom: 16px;
}
.popup-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0,0,0,0.4);
  color: #fff;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  z-index: 2;
  transition: background 0.2s;
}
.popup-close:hover { background: rgba(0,0,0,0.7); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s;
  border: none;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: var(--secondary); color: #fff; }
.btn-secondary:hover { background: #142847; }
.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #e8953f; }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }

/* ---------- SECTIONS ---------- */
.section {
  padding: 20px 0;
}
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.section-title {
  font-size: 1.2rem;
  font-weight: 700;
  position: relative;
  padding-left: 12px;
}
.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 2px;
  width: 4px;
  background: var(--primary);
  border-radius: 2px;
}
.section-link {
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 500;
}

/* ---------- AD BANNERS ---------- */
.ad-banner {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  background: var(--bg-white);
  margin: 12px 0;
  position: relative;
  overflow: hidden;
}
.ad-banner-label {
  position: absolute;
  top: 4px;
  left: 8px;
  font-size: 0.6rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.ad-banner-lg {
  padding: 40px 20px;
}
.ad-banner-lg h3 {
  font-size: 1.3rem;
  margin-bottom: 8px;
}
.ad-banner-lg p {
  color: var(--text-light);
  font-size: 0.85rem;
  margin-bottom: 16px;
}

.ad-sidebar {
  display: none;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 20px 12px;
  text-align: center;
  background: var(--bg-white);
  margin-bottom: 12px;
  font-size: 0.8rem;
  color: var(--text-light);
  position: relative;
}
.ad-sidebar .ad-banner-label {
  position: absolute;
  top: 4px;
  left: 8px;
}

/* ---------- HERO BANNER (Homepage) ---------- */
.hero-banner {
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  border-radius: var(--radius-lg);
  padding: 30px 20px;
  color: #fff;
  margin: 12px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  position: relative;
  overflow: hidden;
}
.hero-banner::after {
  content: 'HERO PUB';
  position: absolute;
  bottom: 8px;
  right: 12px;
  font-size: 0.6rem;
  opacity: 0.5;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.hero-banner h2 {
  font-size: 1.5rem;
  font-weight: 800;
}
.hero-banner p {
  font-size: 0.9rem;
  opacity: 0.9;
  max-width: 350px;
}
.hero-search {
  width: 100%;
  max-width: 350px;
  position: relative;
}
.hero-search input {
  width: 100%;
  padding: 12px 16px;
  padding-right: 50px;
  border: none;
  border-radius: 25px;
  font-size: 0.95rem;
  outline: none;
}
.hero-search button {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- FLASH DEAL COUNTDOWN ---------- */
.flash-deals-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 16px;
  gap: 8px;
  flex-wrap: wrap;
}
.flash-deals-bar .flash-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1rem;
}
.flash-deals-bar .flash-label svg { color: var(--primary); }
.countdown {
  display: flex;
  align-items: center;
  gap: 4px;
}
.countdown-item {
  background: var(--secondary);
  color: #fff;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 700;
  min-width: 32px;
  text-align: center;
}
.countdown-sep {
  font-weight: 700;
  color: var(--text-light);
}

/* ---------- PRODUCT CARDS ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.product-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}
.product-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.product-card-img {
  width: 100%;
  aspect-ratio: 1;
  background: #e9ecef;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 0.75rem;
  position: relative;
  overflow: hidden;
}
.product-card-img .placeholder-img {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e9ecef, #dee2e6);
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-card-img svg {
  width: 36px;
  height: 36px;
  color: #adb5bd;
}
.product-card-badges {
  position: absolute;
  top: 6px;
  left: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.product-card-wishlist {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(255,255,255,0.9);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  color: var(--text-light);
}
.product-card-wishlist.active { color: var(--primary); }
.product-card-wishlist svg { width: 16px; height: 16px; }
.product-card-body {
  padding: 10px;
}
.product-card-name {
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}
.product-card-price {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.product-card-price .current {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
}
.product-card-price .old {
  font-size: 0.75rem;
  color: var(--text-light);
  text-decoration: line-through;
}
.product-card-price .discount {
  font-size: 0.7rem;
  font-weight: 600;
  color: #fff;
  background: var(--primary);
  padding: 1px 6px;
  border-radius: 3px;
}
.product-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 0.7rem;
  color: var(--text-light);
}
.product-card-meta .views {
  display: flex;
  align-items: center;
  gap: 3px;
}
.product-card-meta .rating {
  display: flex;
  align-items: center;
  gap: 3px;
  color: var(--accent);
}
.sponsored-label {
  position: absolute;
  bottom: 6px;
  left: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 0.6rem;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 600;
  text-transform: uppercase;
}

/* ---------- HORIZONTAL SCROLL PRODUCTS ---------- */
.product-scroll-wrapper {
  position: relative;
}
.product-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
  scrollbar-width: none;
}
.product-scroll::-webkit-scrollbar { display: none; }
.product-scroll .product-card {
  min-width: 150px;
  max-width: 150px;
  scroll-snap-align: start;
  flex-shrink: 0;
}

/* ---------- CATEGORIES ---------- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.category-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  background: var(--bg-white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  text-align: center;
  transition: all 0.2s;
  text-decoration: none;
}
.category-item:hover {
  border-color: var(--primary);
  background: #fff5f5;
}
.category-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.category-icon svg { width: 22px; height: 22px; }
.category-name {
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text);
}

/* ---------- MAIN CONTENT LAYOUT (with sidebar) ---------- */
.main-with-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ---------- CHAT WIDGET ---------- */
.chat-fab {
  position: fixed;
  bottom: calc(var(--bottom-nav-height) + 12px);
  right: 16px;
  width: 52px;
  height: 52px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(230,57,70,0.4);
  z-index: 90;
  transition: transform 0.2s;
}
.chat-fab:hover { transform: scale(1.1); }
.chat-fab svg { width: 24px; height: 24px; }

/* ---------- BREADCRUMB ---------- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 0;
  font-size: 0.8rem;
  color: var(--text-light);
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--primary); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { color: var(--border); }

/* ---------- FILTERS BAR ---------- */
.filters-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 0;
  scrollbar-width: none;
}
.filters-bar::-webkit-scrollbar { display: none; }
.filter-chip {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.8rem;
  white-space: nowrap;
  background: var(--bg-white);
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text);
}
.filter-chip:hover, .filter-chip.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ---------- PRODUCT DETAIL PAGE ---------- */
.product-detail-section {
  padding: 16px 0;
}
.product-detail-gallery {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  margin-bottom: 16px;
}
.product-detail-gallery::-webkit-scrollbar { display: none; }
.product-detail-gallery-item {
  min-width: 100%;
  aspect-ratio: 1;
  background: linear-gradient(135deg, #e9ecef, #dee2e6);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 0.85rem;
  flex-shrink: 0;
}
.product-thumbs {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}
.product-thumb {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  background: #e9ecef;
  flex-shrink: 0;
}
.product-thumb.active { border-color: var(--primary); }
.product-detail-info h1 {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
}
.product-detail-price {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
}
.product-detail-price .current {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
}
.product-detail-price .old {
  font-size: 1rem;
  color: var(--text-light);
  text-decoration: line-through;
}
.product-detail-price .discount {
  background: var(--primary);
  color: #fff;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 700;
}
.product-stats {
  display: flex;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 16px;
}
.product-stats span {
  display: flex;
  align-items: center;
  gap: 4px;
}
.product-detail-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}
.product-detail-actions .btn { flex: 1; }
.seller-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--bg-white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 16px;
}
.seller-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--secondary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
}
.seller-info { flex: 1; }
.seller-info h4 { font-size: 0.9rem; }
.seller-info p { font-size: 0.75rem; color: var(--text-light); }

/* ---------- CHAT PAGE ---------- */
.chat-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.chat-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #e9ecef;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}
.chat-preview { flex: 1; min-width: 0; }
.chat-preview h4 { font-size: 0.9rem; font-weight: 600; }
.chat-preview p {
  font-size: 0.8rem;
  color: var(--text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-time {
  font-size: 0.7rem;
  color: var(--text-light);
  flex-shrink: 0;
}
.chat-unread {
  background: var(--primary);
  color: #fff;
  font-size: 0.65rem;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-window {
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--nav-height) - var(--bottom-nav-height));
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chat-msg {
  max-width: 75%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 0.9rem;
  line-height: 1.4;
}
.chat-msg.received {
  background: var(--bg-white);
  border: 1px solid var(--border);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.chat-msg.sent {
  background: var(--primary);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.chat-msg .msg-time {
  font-size: 0.65rem;
  opacity: 0.7;
  margin-top: 4px;
}
.chat-input-bar {
  display: flex;
  gap: 8px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  align-items: center;
}
.chat-input-bar input {
  flex: 1;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 25px;
  font-size: 0.9rem;
  outline: none;
}
.chat-input-bar input:focus { border-color: var(--primary); }
.chat-input-bar button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.chat-input-bar button svg { width: 18px; height: 18px; }

/* ---------- LOGIN PAGE ---------- */
.auth-page {
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.auth-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 30px 24px;
  max-width: 400px;
  width: 100%;
  box-shadow: var(--shadow);
}
.auth-card h2 {
  text-align: center;
  font-size: 1.3rem;
  margin-bottom: 4px;
}
.auth-card .subtitle {
  text-align: center;
  color: var(--text-light);
  font-size: 0.85rem;
  margin-bottom: 24px;
}
.form-group {
  margin-bottom: 14px;
}
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.form-group input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}
.form-group input:focus { border-color: var(--primary); }
.auth-divider {
  text-align: center;
  color: var(--text-light);
  font-size: 0.8rem;
  margin: 16px 0;
  position: relative;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: var(--border);
}
.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }
.auth-switch {
  text-align: center;
  font-size: 0.85rem;
  margin-top: 16px;
  color: var(--text-light);
}
.auth-switch a { color: var(--primary); font-weight: 600; }

/* ---------- WISHLIST PAGE ---------- */
.wishlist-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-light);
}
.wishlist-empty svg { width: 64px; height: 64px; margin-bottom: 16px; color: var(--border); }
.wishlist-empty h3 { margin-bottom: 8px; color: var(--text); }

/* ---------- SELLER PROFILE ---------- */
.seller-header {
  text-align: center;
  padding: 20px;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
}
.seller-header-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--secondary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 auto 12px;
}
.seller-header h2 { font-size: 1.2rem; margin-bottom: 4px; }
.seller-stats-row {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 12px;
  font-size: 0.8rem;
}
.seller-stats-row span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.seller-stats-row .stat-val {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
}

/* ---------- USER PROFILE ---------- */
.profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
}
.profile-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
}
.profile-info h2 { font-size: 1.1rem; }
.profile-info p { font-size: 0.85rem; color: var(--text-light); }
.profile-menu {
  background: var(--bg-white);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.profile-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
  color: var(--text);
}
.profile-menu-item:last-child { border-bottom: none; }
.profile-menu-item:hover { background: var(--bg); }
.profile-menu-item svg { width: 20px; height: 20px; color: var(--text-light); }
.profile-menu-item .chevron { margin-left: auto; }

/* ---------- FOOTER ---------- */
.footer {
  background: var(--secondary);
  color: #a8dadc;
  padding: 30px 0 100px;
  margin-top: 30px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}
.footer h4 {
  color: #fff;
  font-size: 0.95rem;
  margin-bottom: 10px;
}
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 6px; }
.footer ul li a {
  color: #a8dadc;
  font-size: 0.8rem;
  transition: color 0.2s;
}
.footer ul li a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 16px;
  text-align: center;
  font-size: 0.75rem;
}

/* ---------- SORT BAR ---------- */
.sort-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  font-size: 0.8rem;
}
.sort-bar select {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  background: var(--bg-white);
  outline: none;
}

/* ---------- NOTIFICATION TOAST ---------- */
.toast {
  position: fixed;
  bottom: calc(var(--bottom-nav-height) + 70px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--secondary);
  color: #fff;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  z-index: 200;
  opacity: 0;
  transition: all 0.3s;
  pointer-events: none;
  white-space: nowrap;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- PAGINATION ---------- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 20px;
}
.pagination button {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-white);
  color: var(--text);
  font-size: 0.85rem;
  transition: all 0.2s;
}
.pagination button:hover,
.pagination button.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ---------- ANIMATIONS ---------- */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* ---------- RESPONSIVE: TABLET (≥600px) ---------- */
@media (min-width: 600px) {
  html { font-size: 15px; }
  .product-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .category-grid { grid-template-columns: repeat(5, 1fr); }
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
  .search-bar { display: block; }
  body { padding-bottom: var(--bottom-nav-height); }
}

/* ---------- RESPONSIVE: DESKTOP (≥992px) ---------- */
@media (min-width: 992px) {
  html { font-size: 16px; }
  body { padding-bottom: 0; }

  .top-nav { display: block; }

  .header {
    height: auto;
    padding: 8px 0;
  }
  .header .container {
    flex-wrap: wrap;
    height: auto;
    gap: 10px;
  }
  .header-top {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .search-bar {
    display: block;
    max-width: 550px;
  }
  .nav-menu { display: flex; }
  .bottom-nav { display: none; }
  .chat-fab {
    bottom: 20px;
  }
  body { padding-bottom: 0; }

  .product-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .product-scroll .product-card {
    min-width: 200px;
    max-width: 200px;
  }
  .category-grid { grid-template-columns: repeat(8, 1fr); }
  .footer-grid { grid-template-columns: repeat(4, 1fr); }

  .main-with-sidebar {
    flex-direction: row;
  }
  .main-content {
    flex: 1;
    min-width: 0;
  }
  .sidebar-ads {
    width: 250px;
    flex-shrink: 0;
  }
  .sidebar-ads .ad-sidebar { display: block; }

  .hero-banner {
    flex-direction: row;
    text-align: left;
    padding: 40px;
  }

  .product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
  }
  .product-detail-gallery-item {
    min-width: auto;
  }

  .auth-page { padding: 40px; }
  .auth-card { padding: 40px; }

  .chat-window {
    height: calc(100vh - 140px);
  }
}

/* ---------- RESPONSIVE: LARGE DESKTOP (≥1200px) ---------- */
@media (min-width: 1200px) {
  .product-grid { grid-template-columns: repeat(5, 1fr); }
  .sidebar-ads { width: 300px; }
}
