/* ============================================================
   BAZARDROP — Mobile-First PWA Marketplace
   Secondhand Fashion for Mexican Gen Z
   ============================================================ */

/* ============================================================
   1. CSS VARIABLES & RESET
   ============================================================ */

:root {
  --bg: #0F0F0F;
  --surface: #1A1A1A;
  --surface-elevated: #252525;
  --border: #2D2D2D;
  --primary: #8B5CF6;
  --primary-dark: #7C3AED;
  --primary-light: #A78BFA;
  --secondary: #EC4899;
  --secondary-dark: #DB2777;
  --accent: #22D3EE;
  --accent-dark: #06B6D4;
  --success: #10B981;
  --warning: #F59E0B;
  --error: #EF4444;
  --text: #F5F5F5;
  --text-muted: #9CA3AF;
  --text-subtle: #6B7280;
  --gradient: linear-gradient(135deg, #8B5CF6, #EC4899);
  --gradient-accent: linear-gradient(135deg, #22D3EE, #8B5CF6);
  --gradient-warm: linear-gradient(135deg, #F59E0B, #EC4899);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 24px rgba(139, 92, 246, 0.3);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --nav-height: 64px;
  --header-height: 56px;
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  height: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
  overflow-x: hidden;
  min-height: 100%;
  min-height: 100dvh;
}

::-webkit-scrollbar {
  display: none;
}

* {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

::selection {
  background-color: rgba(139, 92, 246, 0.4);
  color: #fff;
}

::-moz-selection {
  background-color: rgba(139, 92, 246, 0.4);
  color: #fff;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--primary-light);
}

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

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  outline: none;
  border: none;
  background: none;
}

button {
  cursor: pointer;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}

ul, ol {
  list-style: none;
}

/* ============================================================
   2. TYPOGRAPHY
   ============================================================ */

h1, h2, h3, h4 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  color: var(--text);
  line-height: 1.2;
}

h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
}

h4 {
  font-size: 1.0625rem;
  font-weight: 600;
}

p {
  color: var(--text-muted);
  line-height: 1.6;
}

small, .text-sm {
  font-size: 0.8125rem;
}

.text-xs {
  font-size: 0.75rem;
}

.text-lg {
  font-size: 1.125rem;
}

.brand-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.section-title .see-all {
  font-family: 'Inter', sans-serif;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--primary);
}

/* ============================================================
   3. LAYOUT
   ============================================================ */

.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

/* --- Header --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  padding-top: var(--safe-top);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: 16px;
  padding-right: 16px;
  background: rgba(15, 15, 15, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  transition: transform var(--transition);
}

.header.header-hidden {
  transform: translateY(-100%);
}

.header-left,
.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-center {
  flex: 1;
  text-align: center;
}

.header-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
}

/* --- Main Content --- */
.main-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-top: calc(var(--header-height) + var(--safe-top));
  padding-bottom: calc(var(--nav-height) + var(--safe-bottom) + 16px);
}

/* --- Page --- */
.page {
  min-height: 100%;
  padding: 16px;
  animation: fadeIn 0.25s ease-out;
}

.page-header {
  margin-bottom: 20px;
}

/* --- Bottom Navigation --- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--nav-height) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: rgba(15, 15, 15, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  z-index: 100;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex: 1;
  padding: 8px 0;
  color: var(--text-subtle);
  font-size: 0.625rem;
  font-weight: 500;
  transition: color var(--transition);
  position: relative;
  touch-action: manipulation;
}

.nav-item svg,
.nav-item i,
.nav-item .nav-icon {
  font-size: 1.375rem;
  width: 24px;
  height: 24px;
  transition: transform var(--transition), color var(--transition);
}

.nav-item.active {
  color: var(--primary);
}

.nav-item.active svg,
.nav-item.active .nav-icon {
  transform: scale(1.1);
}

.nav-item-label {
  font-size: 0.625rem;
  letter-spacing: 0.02em;
}

/* Center button — Subir */
.nav-item-center {
  position: relative;
}

.nav-center-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -24px;
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
  transition: transform var(--transition), box-shadow var(--transition);
  color: #fff;
  font-size: 1.5rem;
}

.nav-center-btn:active {
  transform: scale(0.92);
}

.nav-center-btn svg,
.nav-center-btn .nav-icon {
  width: 28px;
  height: 28px;
  color: #fff;
}

/* Unread badge */
.nav-badge {
  position: absolute;
  top: 4px;
  right: calc(50% - 18px);
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--radius-full);
  background: var(--error);
  color: #fff;
  font-size: 0.625rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ============================================================
   4. COMPONENTS
   ============================================================ */

/* --- Product Card --- */
.product-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
}

.product-card:active {
  transform: scale(0.98);
}

@media (hover: hover) {
  .product-card:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow);
  }
}

.product-card-image {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--surface-elevated);
}

.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

@media (hover: hover) {
  .product-card:hover .product-card-image img {
    transform: scale(1.05);
  }
}

.product-card-favorite {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.125rem;
  transition: color var(--transition), transform var(--transition);
  z-index: 2;
}

.product-card-favorite.active,
.product-card-favorite:hover {
  color: var(--error);
}

.product-card-favorite:active {
  transform: scale(1.2);
}

.product-card-condition {
  position: absolute;
  bottom: 8px;
  left: 8px;
  z-index: 2;
}

.product-card-content {
  padding: 12px;
}

.product-card-price {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
}

.product-card-original-price {
  font-size: 0.8125rem;
  color: var(--text-subtle);
  text-decoration: line-through;
  margin-left: 6px;
}

.product-card-discount {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--success);
  margin-left: 6px;
}

.product-card-title {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-store {
  font-size: 0.75rem;
  color: var(--text-subtle);
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.product-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}

.product-tag {
  font-size: 0.6875rem;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--surface-elevated);
  color: var(--text-muted);
}

/* Image counter dots */
.product-card-dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  z-index: 2;
}

.product-card-dots .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
}

.product-card-dots .dot.active {
  background: #fff;
  width: 16px;
  border-radius: 3px;
}

/* --- Store Card --- */
.store-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: transform var(--transition);
}

.store-card:active {
  transform: scale(0.98);
}

.store-card-logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--border);
}

.store-card-info {
  flex: 1;
  min-width: 0;
}

.store-card-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}

.store-card-bio {
  font-size: 0.8125rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 2px;
}

.store-card-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  font-size: 0.75rem;
  color: var(--warning);
}

.store-card-rating span {
  color: var(--text-muted);
}

.store-card-tags {
  display: flex;
  gap: 4px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.store-style-tag {
  font-size: 0.6875rem;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(139, 92, 246, 0.15);
  color: var(--primary-light);
}

/* Featured store card (horizontal scroll) */
.store-card-featured {
  min-width: 200px;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  scroll-snap-align: start;
}

.store-card-featured .store-card-logo {
  width: 56px;
  height: 56px;
}

/* --- PRO Badge --- */
.badge-pro {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--gradient);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

/* --- Verified Badge --- */
.badge-verified {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  color: #000;
  font-size: 0.5rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* --- Condition Badges --- */
.badge-condition {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge-condition.nueva {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
}

.badge-condition.como-nueva {
  background: rgba(34, 211, 238, 0.15);
  color: var(--accent);
}

.badge-condition.buena {
  background: rgba(59, 130, 246, 0.15);
  color: #60A5FA;
}

.badge-condition.usada {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}

.badge-condition.vintage {
  background: rgba(139, 92, 246, 0.15);
  color: var(--primary-light);
}

/* --- Generic Badges --- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-new {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
}

.badge-sold {
  background: rgba(239, 68, 68, 0.15);
  color: var(--error);
}

.badge-reserved {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9375rem;
  transition: all var(--transition);
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.96);
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  border: none;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 6px 24px rgba(139, 92, 246, 0.45);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--text-subtle);
  background: var(--surface);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  padding: 8px 16px;
}

.btn-ghost:hover {
  color: var(--text);
}

.btn-accent {
  background: var(--accent);
  color: #000;
  font-weight: 700;
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--error);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.8125rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 14px 32px;
  font-size: 1rem;
}

.btn-block {
  width: 100%;
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-icon-lg {
  width: 48px;
  height: 48px;
}

.btn-whatsapp {
  background: #25D366;
  color: #fff;
}

.btn-whatsapp:hover {
  background: #20BA5A;
}

/* --- Forms --- */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.9375rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-subtle);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.form-input:invalid:not(:placeholder-shown) {
  border-color: var(--error);
}

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

.form-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%239CA3AF' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}

.form-helper {
  font-size: 0.75rem;
  color: var(--text-subtle);
  margin-top: 4px;
}

.form-error {
  font-size: 0.75rem;
  color: var(--error);
  margin-top: 4px;
}

.form-input-icon {
  position: relative;
}

.form-input-icon .form-input {
  padding-left: 44px;
}

.form-input-icon .icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-subtle);
  font-size: 1.125rem;
  pointer-events: none;
}

/* Search input */
.search-bar {
  position: relative;
  width: 100%;
}

.search-bar .form-input {
  padding-left: 44px;
  padding-right: 44px;
  border-radius: var(--radius-full);
  background: var(--surface-elevated);
  border-color: transparent;
}

.search-bar .form-input:focus {
  background: var(--surface);
  border-color: var(--primary);
}

.search-bar .search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-subtle);
  pointer-events: none;
}

.search-bar .search-filter-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
}

/* Toggle / Switch */
.toggle {
  position: relative;
  width: 48px;
  height: 28px;
  border-radius: 14px;
  background: var(--border);
  cursor: pointer;
  transition: background var(--transition);
}

.toggle.active {
  background: var(--primary);
}

.toggle::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  transition: transform var(--transition);
}

.toggle.active::after {
  transform: translateX(20px);
}

/* Checkbox */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: 4px;
  appearance: none;
  -webkit-appearance: none;
  background: var(--surface);
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:checked {
  background: var(--primary);
  border-color: var(--primary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='white' viewBox='0 0 16 16'%3E%3Cpath d='M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

/* --- Modal --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.modal-overlay.open {
  display: flex;
  animation: fadeIn 0.2s ease-out;
}

.modal-content,
.modal-sheet {
  background: var(--surface);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 24px;
  animation: slideUp 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
}

.modal-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 4px;
  margin-bottom: 20px;
}

.auth-tabs {
  display: flex;
  gap: 4px;
  background: var(--surface-elevated);
  border-radius: var(--radius);
  padding: 4px;
  margin-bottom: 20px;
}

.auth-tab {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.auth-tab.active {
  background: var(--primary);
  color: #fff;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-form[hidden] {
  display: none;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-input {
  padding: 12px 14px;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.9375rem;
  outline: none;
  transition: border-color var(--transition);
}

.form-input:focus {
  border-color: var(--primary);
}

.btn-primary {
  padding: 14px;
  background: var(--gradient);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity var(--transition);
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.auth-divider {
  text-align: center;
  color: var(--text-subtle);
  font-size: 0.8125rem;
  position: relative;
}

.btn-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color var(--transition);
}

.btn-social:hover {
  border-color: var(--primary);
}

.modal-handle {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  margin: 0 auto 16px;
}

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

.modal-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.125rem;
}

/* Center modal on tablet+ */
@media (min-width: 640px) {
  .modal-overlay {
    align-items: center;
  }
  .modal-content {
    border-radius: var(--radius-xl);
    margin: 24px;
  }
}

/* --- Toast --- */
.toast-container {
  position: fixed;
  top: calc(var(--header-height) + var(--safe-top) + 8px);
  left: 16px;
  right: 16px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--surface-elevated);
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--primary);
  animation: slideDown 0.3s ease-out;
  pointer-events: auto;
}

.toast-success {
  border-left-color: var(--success);
}

.toast-error {
  border-left-color: var(--error);
}

.toast-warning {
  border-left-color: var(--warning);
}

.toast-message {
  flex: 1;
  font-size: 0.875rem;
  color: var(--text);
}

.toast-dismiss {
  animation: fadeIn 0.3s ease-out 2.5s both;
}

/* --- Filter Chips (horizontal scroll) --- */
.filter-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 0;
  -webkit-overflow-scrolling: touch;
}

.filter-chips::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 500;
  border: 1px solid var(--border);
  scroll-snap-align: start;
  transition: all var(--transition);
  white-space: nowrap;
}

.filter-chip.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.filter-chip:active {
  transform: scale(0.95);
}

/* --- Horizontal Scroll Container --- */
.hscroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 4px 0;
}

.hscroll::-webkit-scrollbar {
  display: none;
}

.hscroll > * {
  scroll-snap-align: start;
  flex-shrink: 0;
}

/* --- Product Grid --- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

/* --- Avatar --- */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.avatar-sm {
  width: 32px;
  height: 32px;
}

.avatar-lg {
  width: 56px;
  height: 56px;
}

.avatar-xl {
  width: 80px;
  height: 80px;
}

/* --- Divider --- */
.divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

/* --- Card generic --- */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 16px;
}

.card-elevated {
  background: var(--surface-elevated);
  box-shadow: var(--shadow);
}

/* --- Stat Card --- */
.stat-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 16px;
  text-align: center;
}

.stat-card-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

.stat-card-label {
  font-size: 0.75rem;
  color: var(--text-subtle);
  margin-top: 2px;
}

/* --- Empty State --- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.empty-state-text {
  font-size: 0.875rem;
  color: var(--text-muted);
  max-width: 280px;
}

/* ============================================================
   5. VOICE RECORDING UI
   ============================================================ */

.voice-btn {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  transition: all var(--transition);
}

.voice-btn::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: var(--gradient);
  z-index: -1;
}

.voice-btn .mic-icon {
  font-size: 1.75rem;
  color: var(--text);
}

.voice-btn.recording {
  background: rgba(239, 68, 68, 0.15);
}

.voice-btn.recording::before {
  animation: recording 1.5s ease-in-out infinite;
  background: linear-gradient(135deg, var(--error), var(--secondary));
}

.voice-recording-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: var(--surface);
  border-radius: var(--radius-full);
}

.voice-recording-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--error);
  animation: recording 1s ease-in-out infinite;
}

.voice-recording-text {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.voice-recording-time {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  color: var(--text);
}

.voice-waves {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 32px;
}

.voice-waves .wave-bar {
  width: 3px;
  background: var(--primary);
  border-radius: 2px;
  animation: waveBar 0.8s ease-in-out infinite alternate;
}

.voice-waves .wave-bar:nth-child(2) { animation-delay: 0.1s; }
.voice-waves .wave-bar:nth-child(3) { animation-delay: 0.2s; }
.voice-waves .wave-bar:nth-child(4) { animation-delay: 0.3s; }
.voice-waves .wave-bar:nth-child(5) { animation-delay: 0.4s; }

@keyframes waveBar {
  from { height: 8px; }
  to { height: 28px; }
}

.voice-result {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 16px;
  border: 1px solid var(--border);
}

.voice-result-title {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.voice-result-description {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.voice-result-actions {
  display: flex;
  gap: 8px;
}

/* ============================================================
   6. SPECIFIC PAGES
   ============================================================ */

/* --- Home Page --- */
.hero {
  padding: 24px 0 20px;
  text-align: center;
}

.hero-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 8px;
}

.hero-title .text-gradient {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.hero-search {
  max-width: 400px;
  margin: 0 auto;
}

.home-section {
  margin-bottom: 24px;
}

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

/* Categories horizontal */
.categories-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  padding: 4px 0;
}

.categories-scroll::-webkit-scrollbar {
  display: none;
}

.category-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  scroll-snap-align: start;
  min-width: 72px;
}

.category-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: all var(--transition);
}

.category-item.active .category-icon,
.category-icon:hover {
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid var(--primary);
}

.category-label {
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-align: center;
}

/* --- Explore / Search Page --- */
.explore-header {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 12px 0;
  background: var(--bg);
}

.search-results-count {
  font-size: 0.8125rem;
  color: var(--text-subtle);
  margin-bottom: 12px;
}

.sort-dropdown {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.8125rem;
  border: 1px solid var(--border);
}

/* --- Product Detail Page --- */
.product-detail {}

.product-carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--surface);
}

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

.product-carousel-nav {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}

.product-carousel-nav .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transition: all var(--transition);
}

.product-carousel-nav .dot.active {
  background: #fff;
  width: 24px;
  border-radius: 4px;
}

.product-detail-content {
  padding: 20px 16px;
}

.product-detail-price {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
}

.product-detail-original-price {
  font-size: 1rem;
  color: var(--text-subtle);
  text-decoration: line-through;
  margin-left: 8px;
}

.product-detail-title {
  font-size: 1.125rem;
  color: var(--text);
  margin-top: 8px;
  font-weight: 500;
}

.product-detail-description {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-top: 12px;
  line-height: 1.6;
}

.product-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
}

.product-detail-seller {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  margin-top: 20px;
  background: var(--surface);
  border-radius: var(--radius-lg);
}

.product-detail-seller-info {
  flex: 1;
}

.product-detail-seller-name {
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}

.product-detail-seller-rating {
  font-size: 0.8125rem;
  color: var(--warning);
  margin-top: 2px;
}

.product-detail-actions {
  position: fixed;
  bottom: calc(var(--nav-height) + var(--safe-bottom));
  left: 0;
  right: 0;
  padding: 12px 16px;
  background: rgba(15, 15, 15, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  display: flex;
  gap: 12px;
  z-index: 50;
}

.product-detail-actions .btn {
  flex: 1;
}

/* Related products */
.related-products {
  margin-top: 24px;
}

.related-products-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
}

.related-products-scroll::-webkit-scrollbar {
  display: none;
}

.related-products-scroll .product-card {
  min-width: 160px;
  max-width: 180px;
  scroll-snap-align: start;
}

/* --- Store Page --- */
.store-banner {
  width: 100%;
  height: 160px;
  object-fit: cover;
  background: var(--surface);
}

.store-profile {
  padding: 0 16px;
  margin-top: -40px;
  position: relative;
}

.store-profile-logo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 4px solid var(--bg);
  object-fit: cover;
  background: var(--surface);
}

.store-profile-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.store-profile-bio {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-top: 4px;
}

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

.store-social-link {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.125rem;
  transition: color var(--transition);
}

.store-social-link:hover {
  color: var(--text);
}

.store-stats {
  display: flex;
  gap: 24px;
  margin-top: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.store-stat {
  text-align: center;
}

.store-stat-value {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text);
}

.store-stat-label {
  font-size: 0.75rem;
  color: var(--text-subtle);
}

.store-products {
  padding: 16px;
}

/* PRO AI chat widget */
.store-ai-chat-btn {
  position: fixed;
  bottom: calc(var(--nav-height) + var(--safe-bottom) + 16px);
  right: 16px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.5rem;
  box-shadow: 0 4px 24px rgba(139, 92, 246, 0.4);
  z-index: 90;
  animation: fadeIn 0.3s ease-out;
}

/* --- Chat Page --- */
.chat-list {}

.chat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.chat-item:active {
  background: var(--surface);
}

.chat-item-avatar {
  position: relative;
  flex-shrink: 0;
}

.chat-item-online {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--success);
  border: 2px solid var(--bg);
}

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

.chat-item-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.chat-item-name {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text);
}

.chat-item-time {
  font-size: 0.6875rem;
  color: var(--text-subtle);
  flex-shrink: 0;
}

.chat-item-preview {
  font-size: 0.8125rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.chat-item-unread {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Chat view */
.chat-view {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 0.9375rem;
  line-height: 1.4;
  animation: fadeIn 0.15s ease-out;
}

.chat-bubble-incoming {
  align-self: flex-start;
  background: var(--surface-elevated);
  color: var(--text);
  border-bottom-left-radius: 4px;
}

.chat-bubble-outgoing {
  align-self: flex-end;
  background: var(--primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-bubble-time {
  font-size: 0.625rem;
  color: var(--text-subtle);
  margin-top: 4px;
}

.chat-bubble-outgoing .chat-bubble-time {
  color: rgba(255, 255, 255, 0.6);
  text-align: right;
}

.chat-bubble-image {
  padding: 4px;
}

.chat-bubble-image img {
  border-radius: 14px;
  max-width: 240px;
}

.chat-input-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.chat-input-bar .form-input {
  flex: 1;
  border-radius: var(--radius-full);
  padding: 10px 16px;
  background: var(--surface-elevated);
  border: none;
}

.chat-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chat-send-btn:disabled {
  opacity: 0.4;
}

/* --- Profile / Seller Dashboard --- */
.profile-header {
  text-align: center;
  padding: 24px 16px;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 12px;
  object-fit: cover;
  border: 3px solid var(--primary);
}

.profile-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
}

.profile-handle {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 20px;
}

.plan-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin: 16px 0;
  position: relative;
  overflow: hidden;
}

.plan-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient);
}

.plan-card-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.125rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.plan-card-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.quick-action {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  transition: all var(--transition);
}

.quick-action:active {
  transform: scale(0.97);
  background: var(--surface-elevated);
}

.quick-action-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: rgba(139, 92, 246, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.375rem;
  color: var(--primary);
}

.quick-action-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* Settings list */
.settings-list {
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.settings-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  transition: background var(--transition);
}

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

.settings-item:active {
  background: var(--surface-elevated);
}

.settings-item-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--surface-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.settings-item-label {
  flex: 1;
  font-size: 0.9375rem;
}

.settings-item-arrow {
  color: var(--text-subtle);
}

/* --- Auth Screens --- */
.auth-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 32px 24px;
}

.auth-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 3px;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.auth-tagline {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.auth-form {
  width: 100%;
  max-width: 360px;
}

.auth-social-proof {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  padding: 12px 16px;
  background: var(--surface);
  border-radius: var(--radius);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.auth-social-proof-avatars {
  display: flex;
}

.auth-social-proof-avatars img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--bg);
  margin-left: -8px;
}

.auth-social-proof-avatars img:first-child {
  margin-left: 0;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--text-subtle);
  font-size: 0.8125rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-link {
  text-align: center;
  margin-top: 16px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.auth-link a {
  color: var(--primary);
  font-weight: 600;
}

/* Social login buttons */
.btn-social {
  width: 100%;
  padding: 12px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.9375rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  margin-bottom: 10px;
}

.btn-google {
  border-color: rgba(255, 255, 255, 0.15);
}

/* --- Upload Page (Subir prenda) --- */
.upload-page {}

.upload-images {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

.upload-image-slot {
  aspect-ratio: 1;
  border-radius: var(--radius);
  background: var(--surface);
  border: 2px dashed var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--text-subtle);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all var(--transition);
  overflow: hidden;
  position: relative;
}

.upload-image-slot:hover,
.upload-image-slot:focus {
  border-color: var(--primary);
  color: var(--primary);
}

.upload-image-slot.has-image {
  border-style: solid;
  border-color: var(--primary);
}

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

.upload-image-slot .remove-image {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}

.upload-image-slot .add-icon {
  font-size: 1.5rem;
}

/* Price input */
.price-input-wrapper {
  position: relative;
}

.price-input-wrapper .currency {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 700;
  color: var(--text-muted);
}

.price-input-wrapper .form-input {
  padding-left: 32px;
  font-size: 1.125rem;
  font-weight: 700;
}

/* ============================================================
   7. ANIMATIONS
   ============================================================ */

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideDown {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes recording {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.3); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes scaleIn {
  from {
    transform: scale(0.85);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* ============================================================
   8. RESPONSIVE
   ============================================================ */

/* Small tablets and large phones */
@media (min-width: 640px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  .hero-title {
    font-size: 2.25rem;
  }

  .page {
    padding: 20px 24px;
  }

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

  .profile-stats {
    gap: 16px;
  }

  .quick-actions {
    grid-template-columns: repeat(3, 1fr);
  }

  .store-stats {
    gap: 32px;
  }
}

/* Tablets and small desktops */
@media (min-width: 1024px) {
  .app-container {
    flex-direction: row;
  }

  .header {
    position: sticky;
  }

  /* Convert bottom nav to sidebar */
  .bottom-nav {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: auto;
    width: 72px;
    height: 100%;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: calc(var(--header-height) + 24px);
    padding-bottom: 24px;
    border-top: none;
    border-right: 1px solid var(--border);
  }

  .nav-item {
    flex: 0;
    padding: 12px 0;
  }

  .nav-center-btn {
    margin-top: 0;
    width: 48px;
    height: 48px;
  }

  .nav-item-label {
    display: none;
  }

  .main-content {
    padding-bottom: 24px;
    padding-left: 72px;
  }

  .product-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }

  .page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 32px;
  }

  .modal-overlay {
    align-items: center;
  }

  .modal-content {
    border-radius: var(--radius-xl);
    max-height: 80vh;
  }

  .product-detail-actions {
    position: sticky;
    bottom: 0;
    left: 72px;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.0625rem;
  }

  .chat-bubble {
    max-width: 60%;
  }

  .store-banner {
    height: 240px;
  }

  .store-profile-logo {
    width: 100px;
    height: 100px;
  }

  .auth-page {
    flex-direction: row;
    gap: 64px;
  }

  .auth-form {
    max-width: 400px;
  }
}

/* Large desktops */
@media (min-width: 1280px) {
  .product-grid {
    grid-template-columns: repeat(5, 1fr);
  }

  .bottom-nav {
    width: 200px;
  }

  .nav-item {
    flex-direction: row;
    gap: 10px;
    padding: 12px 20px;
    justify-content: flex-start;
  }

  .nav-item-label {
    display: block;
    font-size: 0.875rem;
  }

  .main-content {
    padding-left: 200px;
  }

  .page {
    max-width: 1400px;
  }

  .product-detail-actions {
    left: 200px;
  }
}

/* ============================================================
   9. UTILITIES
   ============================================================ */

/* Flexbox */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }

/* Gap */
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-5 { gap: 20px; }
.gap-6 { gap: 24px; }

/* Padding */
.p-0 { padding: 0; }
.p-1 { padding: 4px; }
.p-2 { padding: 8px; }
.p-3 { padding: 12px; }
.p-4 { padding: 16px; }
.px-2 { padding-left: 8px; padding-right: 8px; }
.px-3 { padding-left: 12px; padding-right: 12px; }
.px-4 { padding-left: 16px; padding-right: 16px; }
.py-2 { padding-top: 8px; padding-bottom: 8px; }
.py-3 { padding-top: 12px; padding-bottom: 12px; }
.py-4 { padding-top: 16px; padding-bottom: 16px; }

/* Margin */
.m-auto { margin: auto; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.ml-auto { margin-left: auto; }

/* Text */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-white { color: var(--text); }
.text-muted { color: var(--text-muted); }
.text-subtle { color: var(--text-subtle); }
.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-error { color: var(--error); }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }

/* Gradient text */
.text-gradient {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-accent {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Truncate */
.truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Visibility */
.hidden { display: none !important; }
.invisible { visibility: hidden; }
.opacity-0 { opacity: 0; }
.opacity-50 { opacity: 0.5; }

/* Width / Height */
.w-full { width: 100%; }
.h-full { height: 100%; }
.min-h-screen { min-height: 100vh; min-height: 100dvh; }

/* Overflow */
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }

/* Position */
.relative { position: relative; }
.absolute { position: absolute; }
.sticky { position: sticky; }

/* Border */
.border { border: 1px solid var(--border); }
.border-b { border-bottom: 1px solid var(--border); }
.border-t { border-top: 1px solid var(--border); }
.rounded { border-radius: var(--radius); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: var(--radius-full); }

/* Background */
.bg-surface { background: var(--surface); }
.bg-elevated { background: var(--surface-elevated); }
.bg-transparent { background: transparent; }

/* Cursor */
.cursor-pointer { cursor: pointer; }

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg,
    var(--surface) 25%,
    var(--surface-elevated) 50%,
    var(--surface) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

.skeleton-text {
  height: 14px;
  margin-bottom: 8px;
  border-radius: 4px;
}

.skeleton-text:last-child {
  width: 60%;
}

.skeleton-circle {
  border-radius: 50%;
}

.skeleton-image {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* Loading spinner */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.spinner-lg {
  width: 40px;
  height: 40px;
  border-width: 4px;
}

/* ============================================================
   10. PWA / APP FEEL
   ============================================================ */

/* Prevent pull-to-refresh on overscroll */
html, body {
  overscroll-behavior-y: none;
}

/* Smooth scroll containers */
.main-content,
.chat-messages,
.modal-content {
  -webkit-overflow-scrolling: touch;
}

/* Snap scroll for horizontal containers */
.hscroll,
.categories-scroll,
.filter-chips,
.related-products-scroll {
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
}

/* Disable long-press context menu on images */
img {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

/* Interactive elements feel native */
button,
a,
.nav-item,
.product-card,
.chat-item,
.settings-item,
.quick-action,
.filter-chip,
.category-item {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* iOS input zoom prevention */
@media screen and (max-width: 768px) {
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  input[type="tel"],
  input[type="url"],
  input[type="search"],
  select,
  textarea {
    font-size: 16px;
  }
}

/* Standalone PWA — hide browser chrome artifacts */
@media (display-mode: standalone) {
  .header {
    padding-top: var(--safe-top);
    height: calc(var(--header-height) + var(--safe-top));
  }

  .main-content {
    padding-top: calc(var(--header-height) + var(--safe-top));
  }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* Dark theme forced for consistency */
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: dark;
  }
}

/* High contrast mode adjustments */
@media (forced-colors: active) {
  .btn-primary,
  .nav-center-btn {
    border: 2px solid ButtonText;
  }

  .badge-condition {
    border: 1px solid;
  }
}

/* Notch-safe horizontal spacing */
@supports (padding: max(0px)) {
  .header,
  .bottom-nav,
  .page,
  .product-detail-actions,
  .chat-input-bar {
    padding-left: max(16px, var(--safe-left));
    padding-right: max(16px, var(--safe-right));
  }
}

/* ============================================================
   BAZARDROP — Missing Layout & Component Styles
   ============================================================ */

/* --- Home Page --- */
.home-page {
  padding-bottom: 24px;
}

.hero {
  text-align: center;
  padding: 32px 0 24px;
}

.hero-title {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text);
}

.hero-subtitle {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-top: 8px;
}

.text-gradient {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 12px 20px;
  margin-top: 20px;
  cursor: pointer;
  transition: border-color var(--transition);
}

.search-bar:hover {
  border-color: var(--primary);
}

/* --- Stats Bar --- */
.stats-bar {
  display: flex;
  justify-content: center;
  gap: 32px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 0 0 24px;
}

.stats-bar .stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.stats-bar .stat strong {
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stats-bar .stat span {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* --- Section Layout --- */
.section {
  margin-bottom: 28px;
}

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

.section-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.text-accent {
  color: var(--accent);
  font-size: 0.875rem;
  cursor: pointer;
  text-decoration: none;
}

.text-accent:hover {
  text-decoration: underline;
}

/* --- Scroll Container (horizontal) --- */
.scroll-container {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.scroll-container::-webkit-scrollbar {
  display: none;
}

/* --- Category Pills --- */
.category-pill {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.8125rem;
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--transition);
}

.category-pill:hover,
.category-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* --- Products Grid --- */
.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 640px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

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

/* --- Stores List --- */
.stores-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* --- CTA Section --- */
.cta-section {
  text-align: center;
  padding: 40px 20px;
  margin-top: 16px;
  background: var(--surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
}

.cta-section h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.cta-section p {
  margin: 8px 0 20px;
}

/* --- Favorite Button (on card) --- */
.favorite-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  z-index: 2;
  transition: transform var(--transition);
}

.favorite-btn:active {
  transform: scale(1.3);
}

/* --- Badges --- */
.badge {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  letter-spacing: 0.3px;
}

.badge-new {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
}

.badge-like-new {
  background: rgba(34, 211, 238, 0.15);
  color: var(--accent);
}

.badge-good {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}

.badge-used {
  background: rgba(156, 163, 175, 0.15);
  color: var(--text-muted);
}

.badge-vintage {
  background: rgba(236, 72, 153, 0.15);
  color: var(--secondary);
}

.badge-pro {
  background: var(--gradient);
  color: #fff;
  font-size: 0.625rem;
  padding: 2px 8px;
}

.badge-verified {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
  font-size: 0.625rem;
  padding: 2px 8px;
}

/* --- Product Card child classes (JS naming) --- */
.product-card-name {
  font-size: 0.875rem;
  color: var(--text);
  margin-top: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-weight: 500;
}

.product-card-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 4px;
}

.product-card-price .price {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
}

.product-card-price .original-price {
  font-size: 0.75rem;
  color: var(--text-subtle);
  text-decoration: line-through;
}

.product-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
}

.product-card-meta .store-name {
  font-size: 0.75rem;
  color: var(--text-subtle);
}

.negotiable-tag {
  font-size: 0.625rem;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  background: rgba(139, 92, 246, 0.15);
  color: var(--primary-light);
}

/* --- Discount Badge --- */
.discount-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: var(--success);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  z-index: 2;
}

/* --- Sold / Reserved Overlay --- */
.sold-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-weight: 800;
  font-size: 1.125rem;
  letter-spacing: 2px;
  z-index: 3;
}

.sold-overlay.reserved {
  background: rgba(245, 158, 11, 0.3);
}

/* --- Store Card child classes (JS naming) --- */
.store-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.store-card-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.store-card-meta {
  display: flex;
  gap: 12px;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.store-initial {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.store-card-bio {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- Explore Page --- */
.explore-page {
  padding-bottom: 24px;
}

.search-section {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.search-input-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 10px 16px;
}

.search-input-wrapper input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 0.875rem;
}

.search-section select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  color: var(--text);
  font-size: 0.8125rem;
  cursor: pointer;
}

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

.pagination button {
  padding: 8px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: all var(--transition);
}

.pagination button:hover {
  border-color: var(--primary);
}

.pagination button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.pagination span {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* --- Skeleton --- */
.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-elevated) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================================================
   ADMIN PANEL
   ============================================================ */

.admin-page {
  padding-bottom: 24px;
}

.admin-title {
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
}

.admin-tabs {
  display: flex;
  gap: 4px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 4px;
  margin-bottom: 20px;
  overflow-x: auto;
}

.admin-tab {
  flex: 1;
  padding: 10px 12px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.admin-tab.active {
  background: var(--primary);
  color: #fff;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.admin-stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  border: 1px solid var(--border);
}

.admin-stat-card.pro {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(139,92,246,0.1), rgba(236,72,153,0.1));
}

.admin-stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
}

.admin-stat-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.admin-stat-badge {
  font-size: 0.6875rem;
  color: var(--success);
  margin-top: 8px;
  font-weight: 600;
}

.admin-section {
  margin-bottom: 24px;
}

.admin-section h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.admin-status-bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-status-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--text-muted);
  padding: 8px 12px;
  background: var(--surface);
  border-radius: var(--radius-sm);
}

.admin-status-row strong {
  margin-left: auto;
  color: var(--text);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dot-green { background: var(--success); }
.dot-yellow { background: #EAB308; }
.dot-orange { background: var(--warning); }
.dot-gray { background: var(--text-subtle); }
.dot-red { background: var(--error); }

.admin-search {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.admin-search input {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  color: var(--text);
  font-size: 0.875rem;
  outline: none;
}

.admin-search input:focus {
  border-color: var(--primary);
}

.admin-table {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-table-header {
  display: none;
}

@media (min-width: 768px) {
  .admin-table-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 12px;
    padding: 8px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-subtle);
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
}

.admin-table-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

@media (min-width: 768px) {
  .admin-table-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    align-items: center;
    gap: 12px;
  }
}

.admin-user-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-product-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-thumb {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.admin-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.text-sm {
  font-size: 0.8125rem;
}

.btn-xs {
  padding: 4px 10px;
  font-size: 0.6875rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
}

.btn-xs.btn-primary {
  background: var(--gradient);
  color: #fff;
}

.btn-xs.btn-secondary {
  background: var(--surface-elevated);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.btn-xs:hover {
  opacity: 0.85;
}

/* ============================================================
   PRODUCT DETAIL PAGE
   ============================================================ */

.product-detail-page {
  padding-bottom: 24px;
}

.gallery {
  position: relative;
  width: 100%;
}

.gallery-main {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--surface);
}

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

.back-btn {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
}

.favorite-btn-lg {
  position: absolute;
  bottom: 12px;
  left: 12px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  transition: transform var(--transition);
}

.favorite-btn-lg:active {
  transform: scale(1.2);
}

.gallery-thumbs {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  overflow-x: auto;
}

.gallery-thumb {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 2px solid transparent;
  cursor: pointer;
  opacity: 0.6;
  transition: all var(--transition);
}

.gallery-thumb.active {
  border-color: var(--primary);
  opacity: 1;
}

.product-detail-content {
  padding: 16px;
}

.product-detail-top {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.product-detail-name {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.product-detail-price {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.price-lg {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
}

.original-price-lg {
  font-size: 1rem;
  color: var(--text-subtle);
  text-decoration: line-through;
}

.badge-discount {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
}

.badge-trade {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}

.negotiable-label {
  font-size: 0.875rem;
  color: var(--primary-light);
}

.product-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 16px;
  padding: 16px;
  background: var(--surface);
  border-radius: var(--radius);
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-label {
  font-size: 0.75rem;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-value {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
}

.product-description {
  margin-top: 16px;
}

.product-description h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.product-description p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tag {
  font-size: 0.8125rem;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: rgba(139, 92, 246, 0.1);
  color: var(--primary-light);
}

/* --- Seller Card --- */
.seller-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  background: var(--surface);
  border-radius: var(--radius);
  margin-top: 16px;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: border-color var(--transition);
}

.seller-card:hover {
  border-color: var(--primary);
}

.seller-card-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.seller-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.seller-avatar.seller-initial {
  background: var(--surface-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary-light);
}

.seller-name {
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}

.verified-check {
  color: var(--success);
  font-size: 0.875rem;
}

.seller-meta {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.product-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 20px;
}

.btn-full {
  width: 100%;
  text-align: center;
}

.btn-secondary {
  padding: 14px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--transition);
  text-decoration: none;
  display: block;
}

.btn-secondary:hover {
  border-color: var(--primary);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.8125rem;
}

.sold-overlay-lg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 3px;
  z-index: 4;
}

/* --- Related products scroll --- */
.products-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
}

.products-scroll::-webkit-scrollbar { display: none; }

.product-card-mini {
  flex-shrink: 0;
  width: 130px;
  cursor: pointer;
}

.product-card-mini img {
  width: 130px;
  height: 160px;
  border-radius: var(--radius);
  object-fit: cover;
}

.product-card-mini-name {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-mini-price {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text);
  margin-top: 2px;
}

/* ============================================================
   STORE DETAIL PAGE
   ============================================================ */

.store-detail-page {
  padding-bottom: 24px;
}

.store-banner {
  width: 100%;
  height: 160px;
  background-size: cover;
  background-position: center;
  background-color: var(--surface);
  position: relative;
}

.store-detail-header {
  padding: 0 16px 16px;
  margin-top: -20px;
  position: relative;
}

.store-detail-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid var(--bg);
  overflow: hidden;
  background: var(--surface-elevated);
  margin-bottom: 8px;
}

.store-detail-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.store-initial-lg {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--gradient);
  color: #fff;
}

.store-detail-header h1 {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.store-stats {
  display: flex;
  gap: 24px;
  margin-top: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.store-stats .stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.store-stats .stat strong {
  font-size: 0.9375rem;
  color: var(--text);
}

.store-stats .stat span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.store-social {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.social-link {
  font-size: 0.8125rem;
  color: var(--accent);
  text-decoration: none;
}

.social-link:hover {
  text-decoration: underline;
}

.store-full-desc {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-top: 12px;
}

.store-products-section {
  padding: 0 16px;
  margin-top: 20px;
}

.store-products-section h2 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
}

/* AI Chat FAB */
.ai-chat-fab {
  position: fixed;
  bottom: calc(var(--nav-height) + 20px + var(--safe-bottom));
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: var(--shadow-glow);
  z-index: 50;
  transition: transform var(--transition);
}

.ai-chat-fab:active {
  transform: scale(0.9);
}

/* ============================================================
   PROFILE PAGE
   ============================================================ */

.profile-page {
  padding-bottom: 24px;
}

.profile-header {
  text-align: center;
  padding: 24px 0;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 12px;
  overflow: hidden;
  border: 3px solid var(--primary);
  background: var(--surface-elevated);
}

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

.profile-initial {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient);
  color: #fff;
}

.profile-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.text-subtle {
  color: var(--text-subtle);
  font-size: 0.8125rem;
}

/* --- Dashboard Section --- */
.dashboard-section {
  margin-bottom: 24px;
}

.dashboard-section h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.plan-card {
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 16px;
}

.plan-card.pro {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(139,92,246,0.08), rgba(236,72,153,0.08));
}

.plan-card.free {
  background: var(--surface);
}

.plan-info strong {
  font-size: 1rem;
  color: var(--text);
}

.plan-info p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.stat-card {
  padding: 14px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  text-align: center;
}

.stat-card strong {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  display: block;
}

.stat-card span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.quick-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* --- Profile Menu --- */
.profile-menu {
  margin-top: 16px;
}

.menu-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: var(--surface);
  border-radius: var(--radius);
  margin-bottom: 4px;
  cursor: pointer;
  transition: background var(--transition);
  font-size: 0.9375rem;
  color: var(--text);
}

.menu-item:hover {
  background: var(--surface-elevated);
}

/* --- Empty State --- */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}

.empty-state p:first-child {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

/* --- Text Helpers --- */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
