/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #f5f5f5;
  color: #333;
  line-height: 1.5;
}

/* ── Navigation ── */
.site-header {
  background: #4a2c8a;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand a {
  color: #fff;
  text-decoration: none;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Notification bell */
.nav-notifications {
  position: relative;
}

.nav-notification-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.nav-notification-trigger:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
}

.nav-notification-icon {
  line-height: 1;
}

.notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  background: #ef4444;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.25rem;
  text-align: center;
  border-radius: 999px;
  border: 2px solid #4a2c8a;
}

.notifications-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  width: 320px;
  max-height: 400px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  border: 1px solid #e5e7eb;
  overflow: hidden;
  z-index: 100;
}

.notifications-dropdown.is-open {
  display: block;
}

.notifications-dropdown-header {
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.notifications-clear-all {
  background: transparent;
  border: none;
  padding: 0;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #7c3aed;
  cursor: pointer;
}

.notifications-clear-all:hover {
  color: #6d28d9;
  text-decoration: underline;
}

.notifications-list {
  max-height: 320px;
  overflow-y: auto;
  padding: 0.5rem 0;
}

.notifications-empty {
  padding: 1.5rem 1rem;
  text-align: center;
  font-size: 0.9rem;
  color: #9ca3af;
}

.notifications-list:has(.notification) .notifications-empty {
  display: none;
}

.notification {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f3f4f6;
  transition: background 0.1s;
  text-decoration: none;
  color: inherit;
}

.notification-link {
  text-decoration: none;
  color: inherit;
  flex: 1 1 auto;
  min-width: 0;
}

.notification-actions {
  flex: 0 0 auto;
}

.notification-delete {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #9ca3af;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}

.notification-delete:hover {
  background: #fef2f2;
  border-color: #fecaca;
  color: #ef4444;
}

.notification:last-child {
  border-bottom: none;
}

.notification:hover {
  background: #f9fafb;
}

.notification--unread {
  background: #f0f9ff;
}

.notification--unread:hover {
  background: #e0f2fe;
}

.notification--read {
  background: #fff;
}

.notification-message {
  font-size: 0.875rem;
  color: #111827;
  margin-bottom: 0.2rem;
  line-height: 1.4;
}

.notification-message a {
  color: #7c3aed;
  text-decoration: none;
}

.notification-message a:hover {
  text-decoration: underline;
}

.notification-meta {
  font-size: 0.75rem;
  color: #9ca3af;
}

.nav-username {
  color: #e0d4f7;
  font-size: 0.9rem;
}

.nav-link {
  color: #e0d4f7;
  text-decoration: none;
  font-size: 0.9rem;
}

.nav-link:hover { color: #fff; }

/* ── Buttons ── */
.btn-primary {
  display: inline-block;
  padding: 0.45rem 1rem;
  background: #7c3aed;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}

.btn-primary:hover { background: #6d28d9; }

.btn-secondary {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  background: transparent;
  color: #e0d4f7;
  border: 1px solid #a78bfa;
  border-radius: 6px;
  font-size: 0.875rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.btn-secondary:hover { background: rgba(255,255,255,0.1); color: #fff; }

.btn-admin {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  background: transparent;
  color: #fbcf0e;
  border: 1px solid #da9201;
  border-radius: 6px;
  font-size: 0.875rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.admin-dashboard-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-admin:hover { background: #fcc500; color: #fff; }

.admin-badge {
  position: absolute;
  top: 0;
  right: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.65rem;
  height: 1.25rem;
  padding: 0 0.4rem;
  background: #ef4444;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  border-radius: 999px;
  border: 2px solid #4a2c8a;
  transform: translate(35%, -35%);
}

/* ── Flash messages ── */
.flash {
  padding: 0.75rem 1.25rem;
  font-size: 0.9rem;
  text-align: center;
}

.flash-notice {
  background: #d1fae5;
  color: #065f46;
  border-bottom: 1px solid #6ee7b7;
}

.flash-warning {
  background-color: #fff3cd; /* Yellow background */
  color: #856404;           /* Darker text */
  padding: 1rem;
  border: 1px solid #ffeeba;
  border-radius: 4px;
  text-align: center;
}

.flash-alert {
  background: #fee2e2;
  color: #991b1b;
  border-bottom: 1px solid #fca5a5;
}

/* ── Main content ── */
.main-content {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 1.25rem;
}

/* ── Auth pages ── */
.auth-container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 2rem;
}

.auth-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 440px;
}

.auth-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #1e1b4b;
  margin-bottom: 0.25rem;
}

.auth-subtitle {
  color: #6b7280;
  font-size: 0.9rem;
  margin-bottom: 1.75rem;
}

.auth-form .form-group {
  margin-bottom: 1.1rem;
}

.auth-form label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.3rem;
}

.auth-form input[type="email"],
.auth-form input[type="text"],
.auth-form input[type="password"],
.auth-form select {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.9rem;
  color: #111827;
  background: #fafafa;
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: auto;
}

.auth-form input:focus,
.auth-form select:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124,58,237,0.15);
  background: #fff;
}

.auth-form .btn-primary {
  width: 100%;
  padding: 0.65rem;
  font-size: 1rem;
  margin-top: 0.5rem;
  border-radius: 6px;
}

.auth-footer {
  text-align: center;
  margin-top: 1.25rem;
  font-size: 0.875rem;
  color: #6b7280;
}

.auth-footer a { color: #7c3aed; text-decoration: none; font-weight: 600; }
.auth-footer a:hover { text-decoration: underline; }

/* ── Error messages ── */
.error-messages {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
  color: #b91c1c;
}

.error-messages ul {
  margin-top: 0.4rem;
  padding-left: 1.25rem;
}

.error-messages li { margin-bottom: 0.2rem; }

/* ── Page header (index) ── */
.page-header {
  margin-bottom: 1.75rem;
}

.page-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.page-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #1e1b4b;
}

.page-subtitle {
  color: #6b7280;
  font-size: 0.875rem;
  margin-top: 0.15rem;
}

/* ── Search / filter bar ── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  background: #f9f7ff;
  border: 1px solid #ede9fe;
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin-bottom: 1.5rem;
}

.filter-input,
.filter-select {
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 0.45rem 0.75rem;
  font-size: 0.875rem;
  color: #1e1b4b;
  background: #fff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.filter-input {
  flex: 1 1 200px;
  min-width: 0;
}

.filter-select {
  flex: 0 1 auto;
}

.filter-input:focus,
.filter-select:focus {
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.filter-submit {
  background: #7c3aed;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.45rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.filter-submit:hover { background: #6d28d9; }

.filter-clear {
  font-size: 0.8rem;
  color: #6b7280;
  text-decoration: none;
  padding: 0.45rem 0.25rem;
  white-space: nowrap;
}

.filter-clear:hover { color: #7c3aed; text-decoration: underline; }

@media (max-width: 600px) {
  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-input,
  .filter-select,
  .filter-submit { width: 100%; }
}

/* ── Products grid ── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

/* ── Product card ── */
.product-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.15s, box-shadow 0.15s;
}

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

.product-thumbnail-wrapper {
  position: relative;
  height: 180px;
  background: #f3f4f6;
}

.product-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-thumbnail-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e5e7eb;
  color: #9ca3af;
  font-size: 0.875rem;
}

.product-card-body {
  padding: 0.85rem 1rem;
}

.product-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.4rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.product-price {
  font-weight: 700;
  color: #1e1b4b;
}

.price-free {
  color: #059669;
  font-weight: 700;
}

.product-seller {
  color: #9ca3af;
  font-size: 0.8rem;
}

.verified-badge {
  display: inline-block;
  vertical-align: middle;
  margin-left: 0.25rem;
  width: 14px;
  height: 14px;
}

.verified-badge svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* ── Status badge ── */
.status-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.status-available { background: #d1fae5; color: #065f46; }
.status-reserved  { background: #fef3c7; color: #92400e; }
.status-sold      { background: #e5e7eb; color: #4b5563; }
.status-pending   { background-color: #fce8b2; color: #916a00}

/* Inline badge (show page) */
.status-badge:not(.status-available):not(.status-reserved):not(.status-sold) {
  position: static;
}

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 4rem 1rem;
  color: #6b7280;
}

.empty-state-icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state h2 { font-size: 1.3rem; font-weight: 600; color: #374151; margin-bottom: 0.5rem; }
.empty-state p { margin-bottom: 1.25rem; }

/* ── Product show page ── */
.product-show {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

@media (max-width: 720px) {
  .product-show { grid-template-columns: 1fr; }
}

.show-thumbnail {
  width: 100%;
  border-radius: 10px;
  object-fit: cover;
  max-height: 480px;
  display: block;
}

.show-thumbnail-placeholder {
  width: 100%;
  height: 320px;
  border-radius: 10px;
  background: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
}

.show-header {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.show-header .status-badge {
  position: static;
  font-size: 0.75rem;
}

.listing-type-badge {
  background: #ede9fe;
  color: #5b21b6;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.show-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.6rem;
}

.show-price {
  margin-bottom: 1.25rem;
}

.price-amount {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e1b4b;
}

.show-section {
  margin-bottom: 1.25rem;
}

.show-section-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9ca3af;
  margin-bottom: 0.35rem;
}

.show-description {
  color: #374151;
  font-size: 0.95rem;
  line-height: 1.65;
}

.show-seller {
  color: #374151;
  font-size: 0.95rem;
}

.show-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.btn-chat { width: 100%; justify-content: center; }
.btn-chat:disabled { opacity: 0.55; cursor: not-allowed; }

.show-meta {
  font-size: 0.8rem;
  color: #9ca3af;
}

.show-back {
  margin-top: 2rem;
}

.show-back a { color: #7c3aed; text-decoration: none; font-size: 0.9rem; }
.show-back a:hover { text-decoration: underline; }

.show-back .btn-admin-back {
  margin-right: 0.4rem;
}

.show-back a.btn-admin {
  color: #fbcf0e;
  border: 1px solid #da9201;
  text-decoration: none;
}

.show-back a.btn-admin:hover {
  background: #fcc500;
  color: #fff;
  text-decoration: none;
}

/* ── Product form page ── */
.form-page {
  max-width: 600px;
  margin: 0 auto;
}

.form-page-header {
  margin-bottom: 1.75rem;
}

.form-page-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e1b4b;
  margin-bottom: 0.25rem;
}

.form-page-header p { color: #6b7280; font-size: 0.9rem; }

.product-form .form-group {
  margin-bottom: 1.1rem;
}

.product-form label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.3rem;
}

.product-form input[type="text"],
.product-form input[type="number"],
.product-form textarea,
.product-form select {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.9rem;
  color: #111827;
  background: #fafafa;
  transition: border-color 0.15s, box-shadow 0.15s;
  font-family: inherit;
}

.product-form input:focus,
.product-form textarea:focus,
.product-form select:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124,58,237,0.15);
  background: #fff;
}

.product-form .btn-submit {
  width: 100%;
  padding: 0.65rem;
  font-size: 1rem;
  margin-top: 0.5rem;
}

.radio-group {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.25rem;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 400;
  cursor: pointer;
  color: #374151;
}

.current-thumbnail {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: #6b7280;
}

.current-thumbnail img {
  border-radius: 4px;
  object-fit: cover;
}

.form-page-back {
  margin-top: 1rem;
  font-size: 0.875rem;
}

.form-page-back a { color: #7c3aed; text-decoration: none; }
.form-page-back a:hover { text-decoration: underline; }

/* ── Profile page ── */
.profile-page {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 820px;
  margin: 0 auto;
}

.profile-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.07);
  padding: 2rem;
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 600px) {
  .profile-card { grid-template-columns: 1fr; text-align: center; }
  .profile-actions { justify-content: center; }
}

.profile-avatar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.profile-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: #7c3aed;
  color: #fff;
  font-size: 1.6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.03em;
  overflow: hidden;
}

.profile-avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}

.profile-college {
  font-size: 0.8rem;
  color: #6b7280;
  text-align: center;
  line-height: 1.3;
}

.profile-since {
  font-size: 0.75rem;
  color: #9ca3af;
}

.profile-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e1b4b;
  margin-bottom: 1rem;
}

.seller-page {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.seller-header-card {
  background: #020617;
  color: #f9fafb;
  border-radius: 999px;
  padding: 1.2rem 1.75rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.seller-avatar {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  background: #4b5563;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 0.03em;
  overflow: hidden;
  flex-shrink: 0;
}

.seller-avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 999px;
}

.seller-header-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.seller-name {
  font-size: 1.1rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.seller-college {
  font-size: 0.85rem;
  color: #d1d5db;
}

.seller-meta {
  font-size: 0.8rem;
  color: #9ca3af;
}

.seller-products-section {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.07);
  padding: 1.5rem 1.75rem;
}

.seller-products-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 1rem;
}

.seller-empty {
  text-align: center;
  color: #6b7280;
  padding: 2rem 1rem;
}

@media (max-width: 640px) {
  .seller-header-card {
    flex-direction: column;
    align-items: flex-start;
  }
}

.profile-fields {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-bottom: 1.5rem;
}

.profile-field {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.profile-field-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9ca3af;
}

.profile-field-value {
  font-size: 0.95rem;
  color: #111827;
}

.profile-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.profile-stripe-section {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e7eb;
}

.profile-stripe-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #374151;
}

.profile-stripe-status {
  font-size: 0.9rem;
  color: #6b7280;
  margin-bottom: 0.75rem;
}

.profile-stripe-connected {
  color: #065f46;
}

.btn-security {
  color: #374151;
  border-color: #d1d5db;
}

.btn-security:hover { background: #f9fafb; color: #111827; }

/* Destructive button (secondary-style) */
.btn-delete {
  color: #b91c1c;
  border-color: #fecaca;
}

.btn-delete:hover {
  background: #fef2f2;
  color: #7f1d1d;
}

/* ── Profile listings section ── */
.profile-listings-section {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.07);
  padding: 1.5rem 2rem;
}

.profile-listings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.profile-listings-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1e1b4b;
}

.btn-sm {
  padding: 0.35rem 0.8rem;
  font-size: 0.825rem;
}

.profile-listings-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.profile-listing-row {
  display: grid;
  grid-template-columns: 60px 1fr auto auto;
  gap: 1rem;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f3f4f6;
}

.profile-listing-row:last-child { border-bottom: none; }

.profile-listing-thumb img,
.listing-thumb-placeholder {
  width: 60px;
  height: 60px;
  border-radius: 6px;
  object-fit: cover;
  background: #e5e7eb;
  display: block;
}

.profile-listing-info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.profile-listing-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #111827;
  text-decoration: none;
}

.profile-listing-title:hover { color: #7c3aed; }

.status-inline {
  position: static;
  font-size: 0.7rem;
}

.profile-listing-price {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1e1b4b;
  white-space: nowrap;
}

.profile-listing-actions .link-edit {
  font-size: 0.825rem;
  color: #7c3aed;
  text-decoration: none;
  white-space: nowrap;
}

.profile-listing-actions .link-edit:hover { text-decoration: underline; }

.profile-listing-actions .link-delete {
  font-size: 0.825rem;
  color: #ef4444;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  text-decoration: none;
  white-space: nowrap;
}

.profile-listing-actions .link-delete:hover {
  text-decoration: underline;
}

.profile-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: #6b7280;
}

.profile-empty p { margin-bottom: 1rem; }

/* ── Avatar upload (edit profile) ── */
.avatar-upload-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.avatar-upload-preview {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #7c3aed;
  color: #fff;
  font-size: 1.4rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  letter-spacing: 0.03em;
  margin-bottom: 0.25rem;
}

.avatar-upload-current {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}

.avatar-upload-initials {
  line-height: 1;
}

.avatar-upload-input {
  font-size: 0.875rem;
  max-width: 100%;
  color: #374151;
}

/* ── Styled file inputs ── */
input[type="file"] {
  font-size: 0.875rem;
  color: #374151;
  cursor: pointer;
}

input[type="file"]::file-selector-button {
  padding: 0.4rem 0.85rem;
  background: #7c3aed;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
  margin-right: 0.6rem;
}

input[type="file"]::file-selector-button:hover {
  background: #6d28d9;
}

/* ── Avatar crop modal ── */
.avatar-crop-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.avatar-crop-dialog {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  width: 90vw;
  max-width: 520px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.avatar-crop-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1e1b4b;
  margin: 0;
}

.avatar-crop-image-wrap {
  width: 100%;
  height: 360px;
  overflow: hidden;
  background: #f3f4f6;
  border-radius: 8px;
}

.avatar-crop-image-wrap img {
  display: block;
  max-width: 100%;
}

/* Circular crop box overlay — makes Cropper.js show a round crop area */
.avatar-crop-image-wrap .cropper-view-box,
.avatar-crop-image-wrap .cropper-face {
  border-radius: 50%;
}

.avatar-crop-image-wrap .cropper-view-box {
  outline-color: #7c3aed;
}

.avatar-crop-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

/* ── Edit profile static field ── */
.form-group-static {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 0.65rem 0.75rem;
}

.static-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9ca3af;
  margin-bottom: 0.2rem;
}

.static-value {
  display: block;
  font-size: 0.95rem;
  color: #374151;
  font-weight: 600;
}

.static-hint {
  display: block;
  font-size: 0.78rem;
  color: #9ca3af;
  margin-top: 0.2rem;
}

/* ── Security notice ── */
.security-notice {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  padding: 0.65rem 0.85rem;
  font-size: 0.85rem;
  color: #1e40af;
  margin-bottom: 0.75rem;
}

/* ── Like system ── */
.product-card-footer {
  padding: 0.5rem 1rem;
  border-top: 1px solid #f3f4f6;
  background: #fafafa;
}

.like-count {
  font-size: 0.8rem;
  color: #9ca3af;
  user-select: none;
}

.like-count-static {
  font-size: 0.9rem;
  color: #6b7280;
  display: inline-block;
  padding: 0.45rem 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
}

.btn-like {
  display: inline-block;
  padding: 0.45rem 1rem;
  background: transparent;
  color: #7c3aed;
  border: 1.5px solid #7c3aed;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.btn-like:hover { background: #f5f3ff; }

.btn-liked {
  background: #7c3aed;
  color: #fff;
  border-color: #7c3aed;
}

.btn-liked:hover { background: #6d28d9; border-color: #6d28d9; }

.liked-count-badge {
  font-size: 0.8rem;
  color: #6b7280;
  background: #f3f4f6;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}

.link-unlike {
  font-size: 0.825rem;
  color: #ef4444;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}

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

/* ── Category tag ── */
.category-tag {
  display: inline-block;
  padding: 0.18rem 0.55rem;
  background: #ede9fe;
  color: #5b21b6;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 0.35rem;
}

/* ── Conversations (chat) ── */
.conversations-page {
  max-width: 720px;
  margin: 0 auto;
}

.conversations-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e1b4b;
  margin-bottom: 0.25rem;
}

.conversations-header p {
  color: #6b7280;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.conversations-list {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.07);
  overflow: hidden;
}

.conversation-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid #f3f4f6;
  text-decoration: none;
  color: inherit;
}

.conversation-row:last-child {
  border-bottom: none;
}

.conversation-row:hover {
  background: #f9fafb;
}

.conversation-product-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #111827;
}

.conversation-status-badge {
  margin-left: 0.5rem;
  font-size: 0.7rem;
}

.conversation-unread-badge {
  margin-left: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
}

.conversation-meta {
  font-size: 0.85rem;
  color: #6b7280;
  margin-top: 0.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.conversation-time {
  font-size: 0.8rem;
  color: #9ca3af;
  white-space: nowrap;
}

.conversation-snippet {
  font-size: 0.8rem;
  color: #9ca3af;
}

.conversation-show {
  max-width: 820px;
  margin: 0 auto;
}

.conversation-show-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.conversation-show-header h1 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #1e1b4b;
  margin-bottom: 0.25rem;
}

.conversation-show-header p {
  color: #6b7280;
  font-size: 0.9rem;
}

.conversation-layout {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.07);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 360px;
}

.offer-panel {
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 0.8rem;
}

.offer-form-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.offer-input,
.offer-counter-input {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 0.45rem 0.65rem;
  font-size: 0.875rem;
}

.offer-input {
  width: 220px;
  max-width: 100%;
}

.offer-hint {
  color: #6b7280;
  font-size: 0.85rem;
}

.offer-list {
  margin-top: 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.offer-card {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
  background: #f8fafc;
}

.offer-card-text {
  font-size: 0.86rem;
  color: #1f2937;
}

.offer-card-meta {
  color: #6b7280;
  font-size: 0.75rem;
}

.offer-status-label {
  color: #6b7280;
  font-size: 0.8rem;
}

.offer-card-actions {
  margin-top: 0.45rem;
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  align-items: center;
}

.offer-counter-form {
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
}

.offer-counter-input {
  width: 120px;
}

.conversation-messages {
  flex: 1 1 auto;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 0.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.conversation-empty-hint {
  text-align: center;
  color: #9ca3af;
  font-size: 0.9rem;
  margin-top: 1rem;
}

.conversation-form {
  border-top: 1px solid #e5e7eb;
  padding-top: 0.6rem;
}

.message-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nav-link-messages {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.messages-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  padding: 0 0.3rem;
  background: #ef4444;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
}

.message-form-field {
  width: 100%;
}

.message-input {
  width: 100%;
  min-height: 48px;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  font-size: 0.9rem;
  resize: vertical;
  font-family: inherit;
}

.message-input:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124,58,237,0.15);
  background: #fff;
}

.message-form-actions {
  display: flex;
  justify-content: flex-end;
}

.message-bubble {
  max-width: 75%;
  padding: 0.5rem 0.75rem;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.message-bubble-outgoing {
  align-self: flex-end;
  background: #7c3aed;
  color: #fff;
  border-bottom-right-radius: 4px;
}

.message-bubble-incoming {
  align-self: flex-start;
  background: #f3f4f6;
  color: #111827;
  border-bottom-left-radius: 4px;
}

.message-meta {
  margin-top: 0.15rem;
  font-size: 0.75rem;
  color: #9ca3af;
  display: flex;
  gap: 0.4rem;
}

.message-sender {
  font-weight: 500;
}

.message-time {
  opacity: 0.9;
}

.message-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.message-attachment-link {
  display: block;
  line-height: 0;
}

.message-attachment-image {
  max-width: 100%;
  max-height: 280px;
  width: auto;
  height: auto;
  border-radius: 8px;
  display: block;
  object-fit: contain;
}

.message-attachment-file {
  font-size: 0.875rem;
  color: inherit;
  text-decoration: underline;
  word-break: break-all;
}

.message-bubble-incoming .message-attachment-file {
  color: #7c3aed;
}

.message-bubble-incoming .message-attachment-file:hover {
  color: #6d28d9;
}

.message-form-hint {
  font-size: 0.8rem;
  color: #9ca3af;
  margin-top: 0.25rem;
  margin-bottom: 0;
}

.message-file-input {
  font-size: 0.875rem;
  max-width: 100%;
  color: #374151;
}

@media (max-width: 640px) {
  .conversation-show-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .message-bubble {
    max-width: 100%;
  }
}

/* ── Orders (checkout / escrow) ── */
.order-preview {
  background: #fff;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.order-preview-product {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.order-preview-thumb {
  width: 200px;
  height: 150px;
  object-fit: cover;
  border-radius: 6px;
}

.order-preview-thumb-placeholder {
  width: 200px;
  height: 150px;
  background: #e5e7eb;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
}

.order-preview-details h2 {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.order-preview-seller {
  color: #6b7280;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.order-preview-price {
  font-size: 1.25rem;
  font-weight: 600;
  color: #4a2c8a;
}

.order-escrow-notice {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.btn-large {
  padding: 0.6rem 1.25rem;
  font-size: 1rem;
}

.order-show {
  max-width: 560px;
}

.order-status-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
  font-weight: 600;
  margin-bottom: 1rem;
}

.order-status-pending { background: #fef3c7; color: #92400e; }
.order-status-paid { background: #dbeafe; color: #1e40af; }
.order-status-completed { background: #d1fae5; color: #065f46; }
.order-status-cancelled { background: #f3f4f6; color: #6b7280; }

.order-details {
  background: #fff;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.order-details p {
  margin-bottom: 0.5rem;
}

.order-confirm-received {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.order-window-hint {
  font-size: 0.9rem;
  color: #6b7280;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.order-success-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.stripe-connect-prompt {
  margin-bottom: 0.75rem;
}

.orders-index h1 {
  margin-bottom: 1rem;
}

.orders-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.order-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: #fff;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.order-list-main {
  flex: 1;
}

.order-list-link {
  color: inherit;
  text-decoration: none;
}

.order-list-link:hover {
  text-decoration: underline;
}

.order-list-status {
  font-size: 0.85rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.order-list-action .btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.9rem;
}

.orders-empty {
  color: #6b7280;
  margin-bottom: 1rem;
}

/* Container for horizontal scrolling if table is too wide */
.table-container {
  overflow-x: auto;
  margin-top: 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.moderation-table {
  width: 100%;
  border-collapse: collapse; /* Removes double borders */
  font-size: 0.95rem;
}

/* Header Styling (Like Excel) */
.moderation-table th {
  background-color: #f8f9fa;
  color: #495057;
  font-weight: 600;
  text-align: left;
  padding: 12px 15px;
  border-bottom: 2px solid #dee2e6;
}

/* Row Styling */
.moderation-table td {
  padding: 12px 15px;
  border-bottom: 1px solid #eee;
  vertical-align: middle;
}

/* Zebra Striping (Light gray on every second row) */
.moderation-table tbody tr:nth-child(even) {
  background-color: #fcfcfc;
}

/* Hover effect for rows */
.moderation-table tbody tr:hover {
  background-color: #f1f3f5;
}

/* Column width control */
.actions-column { width: 200px; }
.actions-cell {
  display: flex;
  gap: 8px;
}

.text-muted {
  color: #6c757d;
  font-size: 0.85rem;
}

/* --- eBay-style refresh foundation --- */
:root {
  --ui-bg: #f6f7f9;
  --ui-surface: #ffffff;
  --ui-surface-muted: #f8fafc;
  --ui-border: #dbe0e6;
  --ui-text: #111827;
  --ui-text-muted: #5b6472;
  --ui-primary: #3665f3;
  --ui-primary-hover: #2e54c8;
  --ui-success: #15803d;
  --ui-danger: #b91c1c;
  --ui-radius-md: 10px;
  --ui-radius-lg: 16px;
  --ui-shadow-sm: 0 2px 6px rgba(15, 23, 42, 0.08);
}

body {
  background: var(--ui-bg);
  color: var(--ui-text);
}

.main-content {
  max-width: 1240px;
  margin: 1.5rem auto 2.75rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--ui-surface);
  border-bottom: 1px solid var(--ui-border);
  box-shadow: var(--ui-shadow-sm);
}

.nav-container {
  max-width: 1280px;
  min-height: 72px;
  height: auto;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.85rem 1.25rem;
}

.nav-brand a {
  color: #1f2937;
  font-size: 1.25rem;
}

.nav-search {
  flex: 1 1 420px;
  min-width: 240px;
}

.nav-search-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-search-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 42px;
  border: 1px solid #9ca3af;
  border-radius: 999px;
  padding: 0 1rem;
  font-size: 0.92rem;
  background: #fff;
}

.nav-search-input:focus {
  outline: 2px solid rgba(54, 101, 243, 0.25);
  border-color: var(--ui-primary);
}

.nav-search-button {
  height: 42px;
  border-radius: 999px;
  padding: 0 1.15rem;
}

.nav-links {
  gap: 0.45rem;
}

.nav-link {
  color: #334155;
  border-radius: 999px;
  padding: 0.5rem 0.8rem;
}

.nav-link:hover {
  color: #111827;
  background: #e2e8f0;
}

.btn-primary {
  background: var(--ui-primary);
  border-radius: 999px;
}

.btn-primary:hover {
  background: var(--ui-primary-hover);
}

.btn-secondary {
  color: #334155;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
}

.btn-secondary:hover {
  color: #111827;
  background: #f1f5f9;
}

.notifications-dropdown {
  margin-top: 0.75rem;
}

.flash-wrap {
  max-width: 1240px;
  margin: 0.75rem auto 0;
  padding: 0 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.flash {
  border-radius: var(--ui-radius-md);
  border: 1px solid transparent;
  padding: 0.8rem 0.95rem;
  text-align: left;
}

.flash-notice {
  border-color: #86efac;
}

.flash-alert,
.flash-warning {
  border-color: #fecaca;
}

.market-shell {
  display: grid;
  grid-template-columns: minmax(210px, 250px) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.market-filter-card,
.market-results-card {
  background: var(--ui-surface);
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius-lg);
}

.market-filter-card {
  padding: 1rem;
  position: sticky;
  top: 5.5rem;
}

.market-filter-title {
  font-size: 0.88rem;
  text-transform: uppercase;
  color: var(--ui-text-muted);
  letter-spacing: 0.04em;
  margin-bottom: 0.55rem;
}

.market-results-card {
  padding: 1rem;
}

.market-results-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 0.9rem;
  margin-bottom: 1rem;
}

.market-results-count {
  font-size: 0.9rem;
  color: var(--ui-text-muted);
}

.filter-input,
.filter-select {
  width: 100%;
  border-radius: 8px;
}

.products-grid {
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}

.product-card {
  border: 1px solid #dce2ea;
  border-radius: 12px;
  box-shadow: none;
}

.product-card:hover {
  transform: none;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.1);
}

.product-card-body {
  padding: 0.9rem;
}

.product-title {
  white-space: normal;
  line-height: 1.35;
  min-height: 2.55em;
}

.product-meta {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
}

.product-card-footer {
  background: var(--ui-surface);
}

.product-show {
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 1.25rem;
}

.product-show-details {
  background: var(--ui-surface);
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius-lg);
  padding: 1.2rem;
}

.show-title {
  font-size: 1.7rem;
}

.show-actions {
  display: grid;
  grid-template-columns: 1fr;
}

.btn-buy,
.btn-chat,
.btn-like {
  width: 100%;
  text-align: center;
  border-radius: 999px;
}

.trust-hint {
  margin-top: 0.45rem;
  color: var(--ui-text-muted);
  font-size: 0.8rem;
}

.profile-card,
.profile-listings-section,
.seller-products-section,
.order-preview,
.order-details,
.order-list-item {
  border: 1px solid var(--ui-border);
  box-shadow: none;
  border-radius: var(--ui-radius-lg);
}

.orders-index h1,
.order-show h1 {
  margin-bottom: 0.75rem;
}

.order-list-item {
  margin-bottom: 0.75rem;
}

.form-page,
.order-show {
  max-width: 760px;
}

@media (max-width: 960px) {
  .market-shell {
    grid-template-columns: 1fr;
  }

  .market-filter-card {
    position: static;
  }
}

@media (max-width: 760px) {
  .nav-container {
    flex-direction: column;
    align-items: stretch;
  }

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

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

body[data-theme="dark"] {
  --ui-bg: #0f172a;
  --ui-surface: #111827;
  --ui-surface-muted: #1f2937;
  --ui-border: #334155;
  --ui-text: #e5e7eb;
  --ui-text-muted: #9ca3af;
  --ui-primary: #4f7dff;
  --ui-primary-hover: #3f6bea;
  --ui-success: #22c55e;
  --ui-danger: #f87171;
  --ui-shadow-sm: 0 2px 10px rgba(2, 6, 23, 0.55);
}

body[data-theme="dark"] .nav-brand a,
body[data-theme="dark"] .page-title,
body[data-theme="dark"] .show-title,
body[data-theme="dark"] .order-preview-details h2,
body[data-theme="dark"] .profile-name,
body[data-theme="dark"] .seller-products-header h2 {
  color: var(--ui-text);
}

body[data-theme="dark"] .nav-link,
body[data-theme="dark"] .product-seller,
body[data-theme="dark"] .page-subtitle,
body[data-theme="dark"] .show-meta,
body[data-theme="dark"] .profile-field-label,
body[data-theme="dark"] .order-preview-seller {
  color: var(--ui-text-muted);
}

body[data-theme="dark"] .nav-link:hover {
  color: #ffffff;
  background: #334155;
}

body[data-theme="dark"] .btn-secondary {
  background: transparent;
  color: var(--ui-text);
  border-color: #475569;
}

body[data-theme="dark"] .btn-secondary:hover {
  background: #334155;
  color: #ffffff;
}

body[data-theme="dark"] .auth-card,
body[data-theme="dark"] .profile-card,
body[data-theme="dark"] .profile-listings-section,
body[data-theme="dark"] .seller-products-section,
body[data-theme="dark"] .order-preview,
body[data-theme="dark"] .order-details,
body[data-theme="dark"] .order-list-item,
body[data-theme="dark"] .conversations-list,
body[data-theme="dark"] .conversation-layout,
body[data-theme="dark"] .market-filter-card,
body[data-theme="dark"] .market-results-card,
body[data-theme="dark"] .product-show-details,
body[data-theme="dark"] .product-card {
  background: var(--ui-surface);
  border-color: var(--ui-border);
}

body[data-theme="dark"] .filter-input,
body[data-theme="dark"] .filter-select,
body[data-theme="dark"] .nav-search-input,
body[data-theme="dark"] .auth-form input[type="email"],
body[data-theme="dark"] .auth-form input[type="text"],
body[data-theme="dark"] .auth-form input[type="password"],
body[data-theme="dark"] .auth-form select,
body[data-theme="dark"] .product-form input[type="text"],
body[data-theme="dark"] .product-form input[type="number"],
body[data-theme="dark"] .product-form textarea,
body[data-theme="dark"] .product-form select,
body[data-theme="dark"] .message-input {
  background: var(--ui-surface-muted);
  color: var(--ui-text);
  border-color: #475569;
}

body[data-theme="dark"] .filter-input:focus,
body[data-theme="dark"] .filter-select:focus,
body[data-theme="dark"] .nav-search-input:focus,
body[data-theme="dark"] .auth-form input:focus,
body[data-theme="dark"] .auth-form select:focus,
body[data-theme="dark"] .product-form input:focus,
body[data-theme="dark"] .product-form textarea:focus,
body[data-theme="dark"] .product-form select:focus,
body[data-theme="dark"] .message-input:focus {
  background: #0b1220;
}

body[data-theme="dark"] .flash {
  background: var(--ui-surface);
  color: var(--ui-text);
}

body[data-theme="dark"] .flash-notice {
  border-color: #16a34a;
}

body[data-theme="dark"] .flash-alert,
body[data-theme="dark"] .flash-warning {
  border-color: #ef4444;
}

body[data-theme="dark"] .product-card-footer,
body[data-theme="dark"] .conversation-row:hover,
body[data-theme="dark"] .notification:hover {
  background: var(--ui-surface-muted);
}

body[data-theme="dark"] .product-title,
body[data-theme="dark"] .product-price,
body[data-theme="dark"] .show-description,
body[data-theme="dark"] .show-seller,
body[data-theme="dark"] .profile-field-value,
body[data-theme="dark"] .static-value,
body[data-theme="dark"] .auth-title,
body[data-theme="dark"] .auth-form label,
body[data-theme="dark"] .form-page-header h1,
body[data-theme="dark"] .seller-name,
body[data-theme="dark"] .conversation-product-title,
body[data-theme="dark"] .notification-message,
body[data-theme="dark"] .notifications-dropdown-header,
body[data-theme="dark"] .profile-listings-header h2,
body[data-theme="dark"] .profile-listing-title {
  color: var(--ui-text);
}

body[data-theme="dark"] a {
  color: #93c5fd;
}

body[data-theme="dark"] .btn-primary,
body[data-theme="dark"] .btn-secondary,
body[data-theme="dark"] .btn-like,
body[data-theme="dark"] .btn-admin,
body[data-theme="dark"] .notifications-clear-all {
  color: inherit;
}

body[data-theme="dark"] .btn-primary {
  color: #ffffff;
}

body[data-theme="dark"] .notification-meta,
body[data-theme="dark"] .show-section-title,
body[data-theme="dark"] .profile-college,
body[data-theme="dark"] .profile-since {
  color: var(--ui-text-muted);
}

body[data-theme="dark"] .profile-listing-title:hover {
  color: #bfdbfe;
}

body[data-theme="dark"] .notifications-dropdown,
body[data-theme="dark"] .notifications-dropdown-header,
body[data-theme="dark"] .notifications-list,
body[data-theme="dark"] .notification {
  background: var(--ui-surface);
  border-color: var(--ui-border);
}
