/**
 * Listing (Classified) Detail Page Styles
 */

/* ============================================
   LISTING DETAIL CONTAINER
   ============================================ */
.listing-detail {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.listing-detail__title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1a365d;
  margin: 0 0 15px 0;
  line-height: 1.3;
}

/* ============================================
   BADGES
   ============================================ */
.listing-detail__badges {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.listing-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.listing-badge--for-sale {
  background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
  color: white;
}

.listing-badge--featured {
  background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
  color: white;
}

/* ============================================
   TWO-COLUMN LAYOUT
   ============================================ */
.listing-detail__layout {
  display: flex;
  flex-direction: column;
  gap: 30px;
  margin-bottom: 30px;
}

@media (min-width: 992px) {
  .listing-detail__layout {
    flex-direction: row;
    gap: 40px;
  }
}

/* ============================================
   LEFT COLUMN: GALLERY
   ============================================ */
.listing-detail__gallery {
  flex: 0 0 auto;
  width: 100%;
}

@media (min-width: 992px) {
  .listing-detail__gallery {
    width: 450px;
    max-width: 450px;
    position: sticky;
    top: 100px;
    align-self: flex-start;
  }
}

.listing-detail__gallery .gallery-images {
  background: #f8f9fa;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
}

.listing-detail__gallery img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
  margin: 0 auto 15px;
}

.listing-detail__gallery img:last-child {
  margin-bottom: 0;
}

.listing-detail__gallery .gallery-hint {
  text-align: center;
  font-size: 12px;
  color: #718096;
  margin-top: 15px;
  margin-bottom: 0;
}

.gallery-placeholder {
  background: #f8f9fa;
  border: 2px dashed #e2e8f0;
  border-radius: 12px;
  padding: 60px 20px;
  text-align: center;
  color: #a0aec0;
}

.gallery-placeholder .placeholder-icon {
  font-size: 48px;
  display: block;
  margin-bottom: 10px;
}

.gallery-placeholder .placeholder-text {
  font-size: 14px;
}

/* ============================================
   RIGHT COLUMN: INFO
   ============================================ */
.listing-detail__info {
  flex: 1;
  min-width: 0;
}

/* Price Box */
.listing-detail__price-box {
  background: linear-gradient(135deg, #f6f8fa 0%, #edf2f7 100%);
  border: 2px solid #48bb78;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  text-align: center;
}

.listing-detail__price-box .price-label {
  display: block;
  font-size: 0.85rem;
  color: #718096;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 5px;
}

.listing-detail__price-box .price-value {
  display: block;
  font-size: 2.25rem;
  font-weight: 700;
  color: #2d3748;
}

.listing-detail__price-box .price-offers {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.85rem;
  color: #48bb78;
  font-weight: 500;
}

/* Quick Info */
.listing-detail__quick-info {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 15px 20px;
  margin-bottom: 20px;
}

.listing-detail__quick-info .info-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
}

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

.listing-detail__quick-info .info-label {
  font-weight: 600;
  color: #4a5568;
  font-size: 0.9rem;
}

.listing-detail__quick-info .info-value {
  color: #2d3748;
  font-size: 0.9rem;
}

/* Actions */
.listing-detail__actions {
  margin-bottom: 20px;
}

.listing-contact-btn {
  display: block;
  width: 100%;
  padding: 14px 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white !important;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  text-align: center;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
  transition: all 0.2s ease;
}

.listing-contact-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Seller Info */
.listing-detail__seller {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
}

.listing-detail__seller .seller-label {
  display: block;
  font-size: 0.8rem;
  color: #718096;
  margin-bottom: 5px;
}

.listing-detail__seller .seller-name {
  font-weight: 600;
  color: #1a365d;
  text-decoration: none;
}

.listing-detail__seller .seller-name:hover {
  text-decoration: underline;
}

.listing-detail__seller .listing-date {
  display: block;
  font-size: 0.85rem;
  color: #a0aec0;
  margin-top: 5px;
}

/* Expires */
.listing-detail__expires {
  font-size: 0.85rem;
  color: #718096;
  padding: 10px 15px;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 6px;
}

/* ============================================
   DESCRIPTION SECTION
   ============================================ */
.listing-detail__description {
  margin-top: 30px;
  padding-top: 30px;
  border-top: 1px solid #e2e8f0;
}

.listing-detail__description h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1a365d;
  margin: 0 0 15px 0;
}

.listing-detail__description .description-content {
  color: #4a5568;
  line-height: 1.7;
}

.listing-detail__description .description-content p {
  margin-bottom: 1em;
}

/* ============================================
   SOURCE APPRAISAL SECTION
   ============================================ */
.listing-detail__source {
  margin-top: 30px;
  padding: 25px;
  background: linear-gradient(135deg, #ebf8ff 0%, #f0fff4 100%);
  border: 1px solid #90cdf4;
  border-radius: 12px;
}

.listing-detail__source h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1a365d;
  margin: 0 0 10px 0;
}

.listing-detail__source p {
  color: #4a5568;
  margin: 0 0 15px 0;
  font-size: 0.95rem;
}

.listing-detail__source .btn-secondary {
  display: inline-block;
  padding: 10px 20px;
  background: white;
  color: #4299e1;
  border: 1px solid #4299e1;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
}

.listing-detail__source .btn-secondary:hover {
  background: #4299e1;
  color: white;
}

/* ============================================
   NAVIGATION
   ============================================ */
.listing-detail__nav {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
}

.listing-detail__nav .back-link {
  color: #4299e1;
  text-decoration: none;
  font-weight: 500;
}

.listing-detail__nav .back-link:hover {
  text-decoration: underline;
}

/* ============================================
   LISTING CARD (Teaser View)
   ============================================ */
.listing-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

.listing-card:hover {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.listing-card__image {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #f8f9fa;
}

.listing-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.listing-card__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: #a0aec0;
  font-size: 48px;
  text-decoration: none;
}

.listing-card__content {
  padding: 15px;
}

.listing-card__title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 8px 0;
  line-height: 1.3;
}

.listing-card__title a {
  color: #1a365d;
  text-decoration: none;
}

.listing-card__title a:hover {
  color: #4299e1;
}

.listing-card__price {
  font-size: 1.25rem;
  font-weight: 700;
  color: #48bb78;
  margin-bottom: 8px;
}

.listing-card__meta {
  display: flex;
  gap: 10px;
  font-size: 0.85rem;
  color: #718096;
}

/* ============================================
   MOBILE OPTIMIZATIONS
   ============================================ */
@media (max-width: 767px) {
  .listing-detail {
    padding: 15px;
  }

  .listing-detail__title {
    font-size: 1.5rem;
  }

  .listing-detail__price-box .price-value {
    font-size: 1.75rem;
  }
}
