:root {
  --bg: #fff9fb;
  --panel: #ffffff;
  --panel-soft: #f7f3f5;
  --soft-pink: #ffe2ef;
  --soft-purple: #efe8ff;
  --soft-blue: #e8f4ff;
  --primary: #5e3b5c;
  --primary-strong: #3d253d;
  --secondary: #ff7aa2;
  --secondary-strong: #f15192;
  --text: #2b1f2b;
  --muted: #6d5f6d;
  --line: #eadfe6;
  --success: #198754;
  --warning: #d97706;
  --shadow: 0 18px 45px rgba(92, 57, 72, 0.10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", Arial, sans-serif;
  background: linear-gradient(180deg, #fff9fb 0%, #fff5f7 24%, #fffafc 100%);
  color: var(--text);
}

.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 1em;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
  vertical-align: middle;
}

.map-placeholder-icon {
  font-size: 2.2rem;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
input, textarea, select, button { font: inherit; }

.container {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255,255,255,0.78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(127,107,119,0.10);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 18px;
  position: relative;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 0 0 auto;
  font-weight: 800;
  color: var(--primary-strong);
  letter-spacing: 0.02em;
}

.brand span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--secondary), #f7d7e6);
  color: #fff;
  box-shadow: 0 10px 25px rgba(241, 81, 146, 0.25);
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  flex: 1 1 auto;
  color: var(--muted);
  font-weight: 600;
}

.nav-links a:hover { color: var(--primary); }

.mobile-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  display: none;
  width: min(92vw, 320px);
  flex-direction: column;
  gap: 16px;
  padding: 18px 16px 16px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 22px;
  box-shadow: 0 22px 50px rgba(62, 48, 64, 0.18);
  z-index: 1200;
}

.mobile-menu-panel.is-open {
  display: flex;
  animation: mobileMenuIn 0.24s ease;
}

.mobile-nav-links,
.mobile-menu-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mobile-nav-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(106, 76, 101, 0.10);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(255,245,249,0.7));
  color: var(--primary-strong);
  font-weight: 700;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 6px 18px rgba(94, 59, 92, 0.04);
}

.mobile-nav-links a::after {
  content: none;
}

.mobile-nav-links a:hover {
  transform: translateY(-1px);
  border-color: rgba(241, 81, 146, 0.24);
  background: linear-gradient(180deg, rgba(255,255,255,1), rgba(255,239,246,0.92));
  box-shadow: 0 10px 22px rgba(94, 59, 92, 0.08);
}

.mobile-menu-actions {
  padding-top: 12px;
  border-top: 1px solid rgba(106, 76, 101, 0.12);
}

.mobile-menu-actions .btn {
  width: 100%;
  justify-content: center;
}

.nav-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-shrink: 0;
}

.header-actions-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-left: auto;
}

.header-menu-toggle {
  display: none;
}

.mobile-menu-toggle {
  display: none;
  position: relative;
  z-index: 2;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 46px;
  height: 46px;
  padding: 11px 10px;
  border: 1px solid rgba(106, 76, 101, 0.14);
  border-radius: 14px;
  background: linear-gradient(135deg, #ffffff, #fff2f7);
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(62, 48, 64, 0.10);
  margin-left: auto;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.mobile-menu-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(62, 48, 64, 0.12);
  border-color: rgba(241, 81, 146, 0.24);
}

.mobile-menu-toggle span {
  display: block;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 99px;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.mobile-menu-toggle.is-active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.mobile-menu-toggle.is-active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.is-active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  color: white;
  box-shadow: 0 12px 26px rgba(241, 81, 146, 0.22);
}
.btn-secondary {
  background: white;
  color: var(--primary);
  border-color: rgba(106, 76, 101, 0.18);
}
.btn-soft {
  background: var(--soft-pink);
  color: var(--primary);
}
.btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.5);
  border-top-color: white;
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.8s linear infinite;
}

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

@keyframes mobileMenuIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.97);
  }
  65% {
    opacity: 1;
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.hero {
  padding: 48px 0 28px;
}

.kinetic-hero-shell {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  display: grid;
  place-items: center;
  border-radius: 36px;
  background: #171a1e;
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 30px 80px rgba(15, 16, 22, 0.35);
}

.kinetic-grid-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

.kinetic-hero-content {
  position: relative;
  z-index: 1;
  max-width: 880px;
  text-align: center;
  padding: 52px 30px 42px;
}

.eyebrow {
  display: inline-block;
  padding: 8px 12px;
  background: var(--soft-pink);
  color: var(--primary);
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 800;
}

.eyebrow.dark {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.88);
}

h1, h2, h3, h4 {
  margin: 0;
  color: var(--primary-strong);
}

.hero h1 {
  margin-top: 18px;
  font-size: clamp(3.2rem, 7vw, 6.2rem);
  line-height: 0.9;
  letter-spacing: -0.06em;
  color: #f3f5fa;
}

.highlight {
  display: inline-block;
  padding: 0.04em 0.3em;
  border-radius: 18px;
  color: #f9f9fb;
  background: linear-gradient(135deg, rgba(255, 122, 162, 0.18), rgba(147, 131, 255, 0.18));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1);
}

.lead {
  margin: 26px auto 0;
  color: rgba(255,255,255,0.72);
  font-size: 1.2rem;
  line-height: 1.7;
  max-width: 720px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 28px;
}

.meta-row {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 18px;
  color: rgba(255,255,255,0.8);
  font-size: 0.95rem;
  font-weight: 600;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  padding: 10px 14px;
  backdrop-filter: blur(10px);
}

.hero-visual {
  position: relative;
  min-height: 470px;
  display: grid;
  place-items: center;
}

.glass-card {
  background: rgba(255,255,255,0.73);
  border: 1px solid rgba(255,255,255,0.75);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.hero-visual .feature-panel {
  width: min(420px, 96%);
  min-height: 420px;
  padding: 18px;
  border-radius: 32px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.feature-item {
  background: rgba(255,255,255,0.7);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 14px;
}

.feature-item .thumb {
  height: 110px;
  background: linear-gradient(135deg, #f3dce7, #e8ebff);
  border-radius: 16px;
  margin-bottom: 10px;
  display: grid;
  place-items: center;
  font-size: 2rem;
}

.feature-item h4 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.feature-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  background: rgba(255, 122, 162, 0.12);
  color: var(--primary);
  padding: 7px 12px;
  font-size: 0.76rem;
  font-weight: 800;
}

.section {
  padding: 32px 0 26px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.section-head h2 {
  font-size: clamp(1.8rem, 2.8vw, 2.6rem);
  letter-spacing: -0.04em;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.filter-pill {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.5);
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
}
.filter-pill.active {
  background: var(--soft-pink);
  border-color: rgba(241, 81, 146, 0.12);
  color: var(--primary);
}

.grid-products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  align-items: stretch;
}

.product-carousel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.product-carousel-track {
  width: 100%;
}

.product-carousel-slide {
  display: none;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.product-carousel-slide.is-active {
  display: grid;
}

.product-carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.product-carousel-btn {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(241, 81, 146, 0.12);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  color: var(--primary);
  font-size: 1.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.product-carousel-btn:hover {
  background: var(--soft-pink);
  transform: translateY(-1px);
}

.product-carousel-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.product-carousel-dot {
  width: 10px;
  height: 10px;
  border: none;
  border-radius: 50%;
  background: rgba(81, 62, 88, 0.2);
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.product-carousel-dot.is-active {
  width: 28px;
  border-radius: 999px;
  background: var(--primary);
}

.product-carousel-empty {
  padding: 24px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
}

.product-loading-state {
  display: block;
}

.product-loading-indicator {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(241, 81, 146, 0.08);
  color: var(--primary);
  border: 1px solid rgba(241, 81, 146, 0.12);
  font-weight: 700;
  font-size: 0.92rem;
}

.product-loading-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(241, 81, 146, 0.22);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.product-loading-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  align-items: stretch;
}

.product-loading-card {
  pointer-events: none;
  border: 1px solid rgba(233, 216, 225, 0.8);
  background: rgba(255, 255, 255, 0.75);
}

.product-loading-image,
.product-loading-line,
.product-loading-avatar {
  position: relative;
  overflow: hidden;
  background: linear-gradient(90deg, #f3edf1 0%, #f8f4f7 50%, #f3edf1 100%);
  background-size: 200% 100%;
  animation: product-loading-shimmer 1.2s linear infinite;
}

.product-loading-image {
  height: 220px;
  border-bottom: 1px solid rgba(234,223,230,0.9);
}

.product-loading-body {
  padding: 16px 16px 18px;
}

.product-loading-line {
  height: 14px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.product-loading-price {
  width: 42%;
  height: 22px;
}

.product-loading-line-short {
  width: 64%;
}

.product-loading-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}

.product-loading-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.product-loading-meta-line {
  width: 52%;
  display: inline-block;
  height: 12px;
  margin-bottom: 0;
}

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

.product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: rgba(255,255,255,0.80);
  border: 1px solid rgba(234,223,230,0.9);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(88, 69, 88, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(88, 69, 88, 0.1);
  border-color: rgba(241, 81, 146, 0.18);
}

.compact-card .product-body {
  padding: 12px 12px 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.compact-card .image {
  height: 176px;
}

.compact-card .product-head {
  align-items: flex-start;
}

.compact-card h3 {
  margin-top: 8px;
  font-size: 1rem;
  min-height: 2.4em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.compact-row {
  margin-top: 8px;
  font-size: 0.8rem;
  flex-wrap: wrap;
}

.compact-actions {
  margin-top: auto;
  padding-top: 10px;
}

.compact-actions .btn {
  padding: 9px 10px;
  font-size: 0.84rem;
}

.product-card .image {
  position: relative;
  height: 220px;
  background: linear-gradient(135deg, #f9dfe9, #e5e9ff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  overflow: hidden;
}

.product-card .image img,
.detail-slide img,
.uploaded-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  background: #fffafc;
}

.product-card .image .chip {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(255,255,255,0.8);
  border: 1px solid rgba(255,255,255,0.8);
  color: var(--primary);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
}

.product-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 16px 16px 18px;
}

.product-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.price {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary-strong);
  line-height: 1.2;
}

.condition {
  display: inline-flex;
  border-radius: 999px;
  background: rgba(25, 135, 84, 0.1);
  color: var(--success);
  padding: 6px 9px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.product-body h3 {
  margin-top: 12px;
  font-size: 1.15rem;
  line-height: 1.45;
  min-height: 3.2em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-body p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.seller-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin-top: 16px;
  min-height: 54px;
  justify-content: flex-end;
  font-size: 0.92rem;
  color: var(--muted);
}

.seller-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.seller-meta .seller-name,
.seller-row > span:last-child {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seller-meta .seller-name {
  flex: 1 1 auto;
  min-width: 0;
}

.seller-row > span:last-child {
  width: 100%;
  font-size: 0.8rem;
  line-height: 1.4;
}
.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd7e9, #dfe7ff);
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid rgba(241, 81, 146, 0.08);
}

.avatar img,
.avatar-lg img,
[data-user-avatar] img,
[data-detail-seller-initial] img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar-lg {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd7e9, #dfe7ff);
  display: grid;
  place-items: center;
  color: var(--primary);
  font-weight: 800;
  overflow: hidden;
  border: 1px solid rgba(241, 81, 146, 0.08);
}

.profile-photo-picker {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(234,223,230,0.9);
  border-radius: 18px;
  background: rgba(255,255,255,0.7);
}

.profile-photo-preview-image {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #ffe1ef, #e8ebff);
  border: 1px solid rgba(241, 81, 146, 0.12);
  flex-shrink: 0;
}

.profile-photo-preview-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-photo-picker-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.profile-photo-picker-body .btn {
  width: fit-content;
}

.profile-photo-picker input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.profile-photo-picker small {
  font-size: 0.78rem;
  line-height: 1.5;
}

.card-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.card-actions .btn {
  flex: 1;
  padding: 11px 14px;
  min-width: 0;
}

.value-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 8px;
}

.value-box {
  background: rgba(255,255,255,0.75);
  border: 1px solid rgba(234,223,230,0.9);
  border-radius: 24px;
  padding: 20px;
}

.value-box .big {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-strong);
}

.value-box p {
  margin: 8px 0 0;
  color: var(--muted);
}

.cta-strip {
  margin: 32px auto 18px;
  background: linear-gradient(135deg, rgba(255, 122, 162, 0.18), rgba(157, 129, 255, 0.16));
  border: 1px solid rgba(111, 91, 122, 0.10);
  border-radius: 30px;
  padding: 28px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35);
}

.cta-strip .inner {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.step-layout {
  width: 100%;
}

.how-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.how-header h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.05em;
  color: var(--primary-strong);
}

.how-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.how-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 16px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(111, 91, 122, 0.12);
  border-radius: 20px;
  box-shadow: 0 10px 22px rgba(79, 57, 77, 0.06);
}

.step-no {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  font-size: 0.92rem;
  flex-shrink: 0;
}

.how-step h3 {
  margin: 0 0 6px;
  font-size: 1rem;
  color: var(--primary-strong);
}

.how-step p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.93rem;
}

.how-warning {
  margin-top: 4px;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(111, 91, 122, 0.12);
  color: var(--muted);
  line-height: 1.7;
  font-size: 0.95rem;
}

.how-warning strong {
  color: var(--primary-strong);
}

@media (max-width: 980px) {
  .how-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .cta-strip {
    padding: 20px 16px;
  }

  .how-steps {
    grid-template-columns: 1fr;
  }

  .how-header {
    align-items: flex-start;
  }
}

footer {
  padding: 34px 0 44px;
  color: var(--muted);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(24, 18, 26, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  width: min(480px, 100%);
  background: white;
  border-radius: 24px;
  border: 1px solid #e8dfe6;
  box-shadow: 0 20px 55px rgba(53, 31, 47, 0.18);
  padding: 22px 22px 20px;
  animation: popupIn 0.22s ease;
}

.modal-card[data-tone='success'] {
  background: linear-gradient(180deg, #f4fff7 0%, #ffffff 100%);
  border-color: #cfead8;
}

.modal-card[data-tone='error'] {
  background: linear-gradient(180deg, #fff6f6 0%, #ffffff 100%);
  border-color: #f3d7d7;
}

.modal-card[data-tone='info'] {
  background: linear-gradient(180deg, #f6f8ff 0%, #ffffff 100%);
  border-color: #dfe7ff;
}

.modal-card h3 {
  margin-bottom: 8px;
  font-size: 1.15rem;
}

.modal-card[data-tone='success'] h3 { color: #146c43; }
.modal-card[data-tone='error'] h3 { color: #a92626; }
.modal-card[data-tone='info'] h3 { color: #2b3d7c; }
.modal-card[data-tone='warning'] h3 { color: #8c5a14; }

.modal-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.modal-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(255, 122, 162, 0.12);
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.modal-card-confirm {
  max-width: 420px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.modal-actions-split {
  justify-content: space-between;
  gap: 12px;
}

.modal-actions-split .btn {
  flex: 1;
}

.btn-danger {
  background: linear-gradient(135deg, #ef4b74, #c72852);
  color: white;
  box-shadow: 0 12px 24px rgba(199, 40, 82, 0.22);
  border-color: transparent;
}

.btn-danger:hover {
  filter: brightness(0.98);
}

@keyframes popupIn {
  from {
    transform: translateY(8px) scale(0.98);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.footer-line {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 20px;
}

.auth-card {
  max-width: 1060px;
  width: 100%;
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(255,255,255,0.9);
  border-radius: 30px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.auth-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
}

.auth-visual {
  position: relative;
  padding: 32px;
  background: linear-gradient(160deg, rgba(255, 122, 162, 0.14), rgba(204, 182, 255, 0.12));
}

.auth-visual .stack {
  display: grid;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.auth-visual .mini-card {
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(255,255,255,0.8);
  border-radius: 22px;
  padding: 16px;
}

.auth-form {
  padding: 30px 26px 28px;
}

.auth-form .head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.auth-form h2 {
  font-size: clamp(1.9rem, 3vw, 2.5rem);
  letter-spacing: -0.04em;
}

.form-grid {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  font-weight: 700;
  color: var(--primary);
  font-size: 0.9rem;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,0.9);
  padding: 12px 14px;
  color: var(--text);
  outline: none;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: rgba(241, 81, 146, 0.5);
  box-shadow: 0 0 0 4px rgba(241, 81, 146, 0.09);
}

.field textarea { min-height: 110px; resize: vertical; }

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 42px;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}

.password-toggle:hover {
  color: var(--primary);
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.92rem;
}

.check-row input { accent-color: var(--secondary); }

.auth-form .btn { width: 100%; }

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

.user-layout {
  padding: 32px 0 50px;
}

.user-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 22px;
}

.sidebar {
  background: rgba(255,255,255,0.8);
  border: 1px solid rgba(234,223,230,0.9);
  border-radius: 28px;
  padding: 18px;
  height: fit-content;
  position: sticky;
  top: 96px;
}

.sidebar .profile-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}

.sidebar .avatar-lg {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: linear-gradient(135deg, #ffdfe9, #e3eaff);
  display: grid;
  place-items: center;
  font-weight: 800;
  color: var(--primary);
}

.sidebar nav {
  display: grid;
  gap: 8px;
}

.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px;
  border-radius: 14px;
  color: var(--muted);
  font-weight: 700;
}

.sidebar .logout-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, #fff1f6, #ffe1ee);
  color: var(--primary);
  font-weight: 800;
  border: 1px solid rgba(94, 59, 92, 0.12);
}

.sidebar nav a.active,
.sidebar nav a:hover {
  background: var(--soft-pink);
  color: var(--primary);
}

.main-panel {
  display: grid;
  gap: 22px;
}

.panel {
  background: rgba(255,255,255,0.8);
  border: 1px solid rgba(234,223,230,0.9);
  border-radius: 28px;
  padding: 22px;
}

.top-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.search-box {
  max-width: 440px;
  width: 100%;
}

.search-box input {
  width: 100%;
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 12px 14px;
  background: rgba(255,255,255,0.9);
}

.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.stat-card {
  border-radius: 22px;
  padding: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,0.85), rgba(248,244,247,0.90));
}

.stat-card .label {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.stat-card .value {
  margin-top: 16px;
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-strong);
}

.stat-card .delta {
  margin-top: 10px;
  color: var(--success);
  font-weight: 700;
}

.listing-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 22px;
}

.listing-card {
  border: 1px solid var(--line);
  border-radius: 26px;
  overflow: hidden;
  background: rgba(255,255,255,0.8);
}

.listing-hero {
  height: 210px;
  background: linear-gradient(135deg, #f8dfe9, #e7ebff);
  display: grid;
  place-items: center;
  font-size: 4rem;
}

.detail-gallery {
  position: relative;
  overflow: hidden;
  height: 320px;
  background: linear-gradient(135deg, #f8dfe9, #e7ebff);
  border-bottom: 1px solid rgba(125, 109, 117, 0.12);
}

.detail-gallery-track {
  position: relative;
  width: 100%;
  height: 100%;
}

.detail-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.detail-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.detail-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #fffafc;
}

.detail-image-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 4.5rem;
  color: var(--primary);
  background: linear-gradient(135deg, #f8dfe9, #e7ebff);
}

.detail-gallery-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.8);
  color: var(--primary-strong);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(60, 55, 70, 0.12);
}

.detail-gallery-btn.prev { left: 12px; }
.detail-gallery-btn.next { right: 12px; }

.detail-gallery-dots {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  align-items: center;
  background: rgba(17, 17, 26, 0.18);
  backdrop-filter: blur(8px);
  border-radius: 999px;
  padding: 6px 10px;
}

.detail-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.65);
}

.detail-dot.active {
  background: white;
  transform: scale(1.2);
}

.listing-body { padding: 18px; }

.listing-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }

.meta-tag {
  background: var(--soft-purple);
  color: var(--primary);
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 0.76rem;
  font-weight: 800;
}

.timeline {
  display: grid;
  gap: 16px;
}

.activity-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.8);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  margin-top: 7px;
  flex-shrink: 0;
}

.activity-item p { margin: 0 0 5px; }
.activity-item small { color: var(--muted); }

.muted { color: var(--muted); }

.form-panel {
  display: grid;
  gap: 18px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.form-actions .btn {
  position: relative;
  z-index: 2;
  pointer-events: auto;
}

.map-preview {
  height: 220px;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(135deg, #edf2ff, #e8fbf3);
  position: relative;
}

.map-preview .map-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 4rem;
  color: #5364d7;
}

.map-preview iframe,
.map-preview img {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.image-upload-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: stretch;
  margin-top: 8px;
  max-width: 700px;
  width: 100%;
}

.upload-dropzone {
  position: relative;
  min-height: 240px;
  border: 2px dashed rgba(18, 113, 190, 0.75);
  border-radius: 18px;
  background: rgba(255,255,255,0.45);
  display: grid;
  place-items: center;
  overflow: hidden;
  width: 100%;
}

.upload-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  gap: 12px;
  color: var(--primary-strong);
}

.upload-icon {
  font-size: 3.6rem;
  line-height: 1;
  color: var(--primary);
  transform: translateY(4px);
}

.btn-upload {
  min-width: 200px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 1rem;
}

.upload-hint {
  font-size: 1.05rem;
  color: var(--muted);
  font-style: italic;
}

.uploaded-files {
  display: grid;
  gap: 10px;
  width: 100%;
}

.uploaded-files-title {
  font-weight: 800;
  color: var(--primary-strong);
  text-align: center;
  margin-bottom: 6px;
}

.uploaded-file-list {
  display: grid;
  gap: 10px;
  max-height: 260px;
  overflow-y: auto;
  padding-right: 4px;
}

.uploaded-item {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 8px 4px;
}

.uploaded-item-thumb {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(135deg, #dfeaff, #edf3ff);
  border: 1px solid rgba(75, 122, 255, 0.18);
}

.uploaded-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.uploaded-item-name {
  font-size: 0.9rem;
  color: var(--primary-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.uploaded-item-remove {
  border: none;
  background: rgba(255, 93, 93, 0.12);
  color: #ef4444;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  font-size: 1.1rem;
  cursor: pointer;
}

.upload-progress {
  height: 5px;
  border-radius: 999px;
  background: rgba(65, 127, 255, 0.12);
  overflow: hidden;
}

.upload-progress-bar {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--secondary), var(--primary));
}

.chat-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  min-height: 70vh;
}

.chat-list, .chat-conversation {
  background: rgba(255,255,255,0.8);
  border: 1px solid rgba(234,223,230,0.9);
  border-radius: 24px;
  padding: 18px;
}

.chat-thread-list {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.chat-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 10px;
  border-radius: 14px;
  cursor: pointer;
  width: 100%;
  max-width: 100%;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  overflow: hidden;
}
.chat-item.active, .chat-item:hover {
  background: var(--soft-pink);
  border-color: rgba(241, 81, 146, 0.08);
}

.chat-item-body {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.chat-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.chat-item-head strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-item-product {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-strong);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-item-body .muted {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-badge {
  min-width: 21px;
  height: 21px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  color: white;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  padding: 0 6px;
}

.chat-conversation {
  display: flex;
  flex-direction: column;
  min-height: 500px;
  height: 70vh;
}

.chat-product-context {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(241, 81, 146, 0.08);
  border: 1px solid rgba(241, 81, 146, 0.18);
  color: var(--text);
}

.chat-product-context-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.chat-product-context-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--primary-strong);
  font-weight: 700;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-product-context-link img {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border-radius: 8px;
  object-fit: cover;
}

.chat-date-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0;
  color: var(--muted);
  font-size: 0.78rem;
}

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

.chat-thread {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 18px 0;
  overflow-y: auto;
  min-height: 0;
  flex: 1;
  padding-right: 4px;
}

.bubble-message {
  max-width: 75%;
  padding: 12px 14px;
  border-radius: 18px;
  line-height: 1.5;
  word-break: break-word;
}

.bubble-message small {
  display: block;
  margin-top: 5px;
  opacity: 0.7;
  font-size: 0.7rem;
  text-align: right;
}

.bubble-message.me {
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 6px;
}

.bubble-message.other {
  background: rgba(240,233,238,0.95);
  color: var(--text);
  align-self: flex-start;
  border-bottom-left-radius: 6px;
}

.chat-composer {
  display: flex;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.chat-composer input,
.chat-composer textarea {
  flex: 1;
  min-width: 0;
  min-height: 46px;
  resize: vertical;
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 10px 14px;
}

.toast-stack {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: grid;
  gap: 10px;
  z-index: 2000;
}

.toast {
  min-width: 240px;
  max-width: 320px;
  background: rgba(30, 35, 50, 0.92);
  color: white;
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 18px 38px rgba(28, 23, 31, 0.18);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.toast.success { background: rgba(25, 135, 84, 0.94); }
.toast.error { background: rgba(176, 42, 42, 0.94); }
.toast.info { background: rgba(39, 84, 168, 0.94); }

@media (max-width: 980px) {
  .hero-grid,
  .auth-grid,
  .listing-layout,
  .chat-shell {
    grid-template-columns: 1fr;
  }

  .header-menu-toggle {
    display: flex;
    margin-left: auto;
  }

  .nav-actions {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    left: auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    min-width: 180px;
    padding: 12px;
    background: rgba(255,255,255,0.96);
    border: 1px solid rgba(106, 76, 101, 0.12);
    border-radius: 16px;
    box-shadow: 0 18px 44px rgba(62, 48, 64, 0.14);
    z-index: 1200;
  }

  .nav-actions.is-open {
    display: flex;
  }

  .header-menu-toggle {
    margin-left: 8px;
  }

  .nav-actions .btn {
    width: 100%;
  }

  .mobile-menu-toggle {
    display: flex;
    margin-left: auto;
  }

  .mobile-menu-panel {
    top: calc(100% + 12px);
    right: 0;
    left: auto;
    width: min(86vw, 300px);
    padding: 14px;
    margin-left: auto;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(106, 76, 101, 0.12);
    box-shadow: 0 18px 40px rgba(62, 48, 64, 0.14);
  }

  .mobile-nav-links {
    gap: 10px;
  }

  .mobile-nav-links a {
    padding: 11px 12px;
    border-radius: 12px;
    justify-content: center;
    text-align: center;
  }

  .mobile-menu-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding-top: 10px;
  }

  .mobile-menu-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .nav > .nav-actions {
    display: none;
  }

  .user-shell {
    position: relative;
    display: block;
  }

  .sidebar {
    position: fixed;
    top: 82px;
    right: 12px;
    left: auto;
    width: min(82vw, 280px);
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    transform: translateX(120%);
    transition: transform 0.22s ease;
    z-index: 1100;
    box-shadow: 0 24px 60px rgba(58, 42, 52, 0.20);
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(29, 18, 27, 0.36);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1000;
  }

  .sidebar-backdrop.is-visible {
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-carousel-slide {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .grid-products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards-3, .value-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .image-upload-shell { max-width: 100%; }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 16px, 1200px);
  }

  .grid-products,
  .feature-grid,
  .form-row,
  .cards-3 { grid-template-columns: 1fr; }

  .product-carousel-slide {
    grid-template-columns: 1fr;
  }

  .nav {
    flex-wrap: wrap;
    min-height: auto;
    padding: 12px 0;
    gap: 10px;
  }

  .brand {
    flex: 1 1 100%;
    min-width: 0;
    font-size: 1.05rem;
    justify-content: flex-start;
  }

  .brand span:last-child {
    max-width: calc(100vw - 120px);
  }

  .nav-actions {
    width: 100%;
    justify-content: stretch;
    gap: 8px;
  }

  .nav-actions .btn {
    flex: 1;
    min-width: 0;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .hero { padding-top: 24px; }
  .hero h1 { letter-spacing: -0.04em; }
  .btn { padding: 11px 14px; }
  .top-panel {
    flex-direction: column;
    align-items: stretch;
  }

  .panel {
    padding: 16px;
    border-radius: 22px;
  }

  .grid-products {
    grid-template-columns: 1fr;
  }

  .product-card .image {
    height: 180px;
  }

  .product-body h3 {
    min-height: auto;
  }

  .sidebar nav {
    grid-template-columns: 1fr;
  }

  .sidebar .profile-box {
    padding: 8px 4px 12px;
  }

  .search-box {
    max-width: none;
  }

  .upload-dropzone { min-height: 210px; }
  .upload-inner { padding: 16px; }
  .btn-upload { min-width: 160px; }
  .detail-gallery { height: 220px; }
  .bubble-message { max-width: 88%; }

  .chat-shell {
    grid-template-columns: 1fr;
    gap: 12px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .chat-list,
  .chat-conversation {
    padding: 12px;
    border-radius: 18px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  .chat-conversation {
    min-height: 420px;
    height: auto;
    padding-bottom: 10px;
  }

  .chat-thread {
    min-height: 240px;
    max-height: 46vh;
    margin: 12px 0;
    gap: 12px;
  }

  .chat-item {
    padding: 10px 8px;
    min-width: 0;
    border-radius: 18px;
  }

  .chat-item-product,
  .chat-item-body .muted,
  .chat-product-context-link {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .chat-item-head strong {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .chat-composer {
    flex-wrap: nowrap;
    gap: 8px;
    align-items: center;
    padding-top: 10px;
  }

  .chat-composer input {
    width: auto;
    flex: 1 1 auto;
    min-width: 0;
    height: 46px;
    border-radius: 999px;
    padding: 0 16px;
  }

  .chat-composer .btn {
    width: auto;
    min-width: 88px;
    height: 46px;
    padding: 0 18px;
    border-radius: 999px;
  }

  .bubble-message {
    max-width: 80%;
    padding: 12px 14px;
    border-radius: 20px;
  }

  .bubble-message.me {
    border-bottom-right-radius: 8px;
  }

  .bubble-message.other {
    border-bottom-left-radius: 8px;
  }

  .user-shell,
  .main-panel,
  .container,
  .user-layout {
    min-width: 0;
    max-width: 100%;
  }
}
