/**
 * Luxury marketplace & product detail – glassmorphism, high contrast, Orania orange accent.
 * Used on product-detail and marketplace for a premium feel.
 * Light theme uses root variables (--bg-page, --bg-card, etc.); dark uses lux defaults.
 */
:root {
  --lux-bg: #12181f;
  --lux-card: #1c252e;
  --lux-accent: #f39c12;
  --lux-accent-hover: #e67e22;
  --lux-text: #ffffff;
  --lux-text-muted: #8b97a2;
  --lux-border: #2c3641;
  --lux-glass: rgba(255, 255, 255, 0.05);
  --lux-verified: #4da3ff;
}

html[data-theme='light'] {
  --lux-bg: var(--bg-page);
  --lux-card: var(--bg-card);
  --lux-accent: var(--brand-orange-500);
  --lux-accent-hover: var(--brand-orange-600);
  --lux-text: var(--text-main);
  --lux-text-muted: var(--text-muted);
  --lux-border: var(--border-default);
  --lux-glass: rgba(0, 0, 0, 0.04);
  --lux-verified: #4da3ff;
}

body.marketplace-luxury,
body.marketplace-luxury .app-main {
  background: var(--lux-bg);
  color: var(--lux-text);
}

/* Product stage: grid layout */
.product-stage {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  padding: 24px;
  max-width: 1100px;
  margin: 0 auto;
  background: var(--lux-card);
  border: 1px solid var(--lux-border);
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

@media (max-width: 900px) {
  .product-stage {
    grid-template-columns: 1fr;
    padding: 20px;
    gap: 24px;
  }
}

/* Mobile: full-width hero image, better thumbnails for small screens */
@media (max-width: 768px) {
  .product-stage {
    padding: 12px;
    gap: 20px;
    margin: 0 12px;
    max-width: none;
  }
  .main-img-card {
    border-radius: 12px;
    aspect-ratio: 4 / 3;
    min-height: 200px;
  }
  .main-img-card .detail-hero-img {
    object-fit: contain;
    object-position: center;
  }
  .thumbnail-row {
    gap: 8px;
  }
  .thumbnail-row img,
  .product-gallery-thumb img {
    width: 56px;
    height: 56px;
    min-width: 56px;
    min-height: 56px;
  }
  .product-gallery-thumb {
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    padding: 0;
    border-radius: 8px;
    overflow: hidden;
  }
}

@media (max-width: 400px) {
  .product-stage {
    padding: 10px;
    margin: 0 8px;
  }
  .thumbnail-row img,
  .product-gallery-thumb img {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
  }
  .product-gallery-thumb {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
  }
}

.gallery-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.main-img-card {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: var(--lux-glass);
  aspect-ratio: 4/3;
  position: relative;
}

.main-img-card .detail-hero-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.status-overlay {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--lux-text);
  text-align: center;
}

.thumbnail-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.thumbnail-row img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid var(--lux-border);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.thumbnail-row img:hover,
.thumbnail-row img.active {
  border-color: var(--lux-accent);
  box-shadow: 0 0 0 2px var(--lux-accent);
}

.info-column {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.price-prime {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--lux-accent);
  margin-bottom: 4px;
}

.item-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 12px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.category-tag {
  background: var(--lux-glass);
  padding: 4px 12px;
  font-size: 0.8rem;
  border-radius: 50px;
  color: var(--lux-text-muted);
  font-weight: 500;
}

.action-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}

.btn-primary-lux {
  background: var(--lux-accent);
  border: none;
  color: var(--neutral-900, #17212b);
  padding: 14px 24px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  text-decoration: none;
  display: inline-block;
}

.btn-primary-lux:hover {
  background: var(--lux-accent-hover);
  transform: translateY(-2px);
}

.btn-outline-lux {
  background: transparent;
  border: 2px solid var(--lux-accent);
  color: var(--lux-accent);
  padding: 12px 22px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-outline-lux:hover {
  background: var(--lux-glass);
}

/* Seller trust card */
.seller-card-mini {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  background: var(--lux-glass);
  padding: 16px;
  border-radius: 15px;
  margin: 16px 0;
  border: 1px solid var(--lux-border);
}

.seller-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--lux-accent);
  flex-shrink: 0;
}

.seller-avatar-link {
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

.seller-avatar-placeholder {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--lux-accent), var(--lux-accent-hover));
  color: var(--neutral-900, #17212b);
  font-weight: 700;
  font-size: 1.25rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.seller-avatar-img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}

.seller-details {
  flex: 1;
  min-width: 0;
}

.seller-name {
  font-weight: 600;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.verified-icon {
  color: var(--lux-verified);
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
}

.rating-row {
  margin-top: 4px;
  font-size: 0.875rem;
  color: var(--lux-text-muted);
}

.rating-row .stars {
  color: var(--lux-accent);
}

.review-count {
  margin-left: 6px;
}

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

.btn-text-lux {
  background: none;
  border: none;
  color: var(--lux-accent);
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
  text-decoration: none;
  font-size: 0.9375rem;
}

.btn-text-lux:hover {
  text-decoration: underline;
}

/* Description box */
.description-box {
  background: var(--lux-glass);
  border: 1px solid var(--lux-border);
  border-radius: 15px;
  padding: 20px;
  margin-top: 16px;
}

.description-box h3 {
  margin: 0 0 12px 0;
  font-size: 1rem;
  font-weight: 700;
}

.description-box p {
  margin: 0 0 12px 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--lux-text-muted);
}

.spec-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.875rem;
  color: var(--lux-text-muted);
}

.spec-list li {
  padding: 4px 0;
}

.spec-list span {
  color: var(--lux-text);
  font-weight: 500;
  margin-right: 6px;
}

/* Market card status overlay (grid) */
.market-card .image-wrapper {
  position: relative;
}

.market-card .status-overlay-blur {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--lux-text);
  text-align: center;
  z-index: 1;
}

.market-card .status-overlay-blur.sold {
  background: rgba(0, 0, 0, 0.55);
}

/* Make offer modal */
.make-offer-modal .modal-title {
  margin: 0 0 8px 0;
  font-size: 1.25rem;
}

.make-offer-modal .form-group {
  margin: 14px 0;
}

.make-offer-modal label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.make-offer-modal input[type="number"],
.make-offer-modal textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--lux-border);
  background: var(--lux-card);
  color: var(--lux-text);
  font-size: 1rem;
  box-sizing: border-box;
}

.make-offer-modal textarea {
  min-height: 80px;
  resize: vertical;
}

.make-offer-modal .modal-form-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}

/* Profile: stats bar & feedback section */
.profile-container-lux {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px;
  background: var(--lux-card);
  border: 1px solid var(--lux-border);
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.profile-header-lux {
  margin-bottom: 24px;
}

.profile-main-lux {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.profile-main-lux .large-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--lux-accent), var(--lux-accent-hover));
  color: var(--neutral-900, #17212b);
  font-weight: 800;
  font-size: 2rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.profile-avatar-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  flex-shrink: 0;
}

.profile-avatar-label {
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: inherit;
}

.profile-avatar-label:hover .profile-avatar-edit {
  text-decoration: underline;
}

.profile-avatar-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.profile-avatar-initial {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--lux-accent), var(--lux-accent-hover));
  color: var(--neutral-900, #17212b);
  font-weight: 800;
  font-size: 2rem;
  display: grid;
  place-items: center;
}

.profile-avatar-edit {
  font-size: 0.8125rem;
  color: var(--brand-teal-700, var(--lux-accent));
  font-weight: 600;
}

.profile-avatar-feedback {
  font-size: 0.8125rem;
  margin: 0;
}

.profile-info-lux h2 {
  margin: 0 0 4px 0;
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-info-lux .verified-icon {
  color: var(--lux-verified);
  font-size: 1.25rem;
}

.profile-info-lux p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--lux-text-muted);
}

.stats-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  padding: 16px 20px;
  background: var(--lux-glass);
  border-radius: 15px;
  border: 1px solid var(--lux-border);
  justify-content: center;
}

.stats-bar .stat {
  text-align: center;
  font-size: 0.875rem;
  color: var(--lux-text-muted);
}

.stats-bar .stat strong {
  display: block;
  font-size: 1.5rem;
  color: var(--lux-accent);
  margin-bottom: 2px;
}

.feedback-section {
  margin-top: 28px;
}

.feedback-section h3 {
  margin: 0 0 16px 0;
  font-size: 1.1rem;
  font-weight: 700;
}

.feedback-card {
  background: var(--lux-glass);
  border: 1px solid var(--lux-border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
}

.feedback-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.875rem;
}

.feedback-header .user {
  font-weight: 600;
  color: var(--lux-text);
}

.feedback-header .date {
  color: var(--lux-text-muted);
}

.feedback-card p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--lux-text-muted);
}

.feedback-card .feedback-comment {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--lux-text-muted, var(--text-muted));
}

.feedback-card .stars {
  color: var(--lux-accent);
  font-size: 0.875rem;
  margin-right: 8px;
}
