/* ==========================================================================
   DAVS FARM EQUIPMENT — EQUIPMENT DETAIL STYLES (EQUIPMENT-DETAIL.CSS)
   ========================================================================== */

.detail-top-section {
  background-color: #ffffff;
  border-bottom: 1.5px solid var(--steel-200);
  padding: 2rem 0;
}

.detail-breadcrumbs {
  font-size: 0.85rem;
  font-family: var(--font-mono);
  color: var(--steel-600);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.detail-breadcrumbs a {
  color: var(--steel-600);
  transition: color 0.15s ease;
}

.detail-breadcrumbs a:hover {
  color: var(--forest-800);
}

.detail-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
}

.detail-title {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 900;
  color: var(--forest-900);
  line-height: 1.15;
  margin-bottom: 0.75rem;
}

.detail-price-box {
  background-color: var(--forest-50);
  border: 1.5px solid var(--forest-100);
  border-radius: var(--radius-md);
  padding: 1.15rem 2rem;
  text-align: right;
  flex-shrink: 0;
}

.detail-price-label {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--forest-700);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.detail-price-val {
  font-family: var(--font-heading);
  font-size: 2.35rem;
  font-weight: 900;
  color: var(--forest-900);
  line-height: 1.1;
}

/* Detail Main Layout Grid */
.detail-layout-section {
  padding: 3.5rem 0 5rem;
  background-color: var(--parchment-base);
}

.detail-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 3rem;
  align-items: flex-start;
}

/* Photo Stage */
.detail-image-stage {
  background-color: #ffffff;
  border: 1.5px solid var(--steel-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
  position: relative;
}

.detail-main-img-wrap {
  position: relative;
  background-color: var(--steel-950);
  overflow: hidden;
  width: 100%;
}

.detail-main-img {
  width: 100%;
  max-height: 520px;
  min-height: 260px;
  object-fit: cover;
  cursor: zoom-in;
  transition: opacity 0.25s ease, transform 0.35s ease;
  display: block;
}

.detail-main-img.switching {
  opacity: 0.65;
}

.stage-zoom-trigger {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  z-index: 5;
}

.stage-zoom-trigger:hover {
  background: rgba(217, 119, 6, 0.9);
  transform: scale(1.04);
}

/* Interactive Multi-Image Thumbnails */
.detail-gallery-strip {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background-color: var(--parchment);
  border-top: 1.5px solid var(--steel-200);
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--steel-300) transparent;
  -webkit-overflow-scrolling: touch;
}

.detail-gallery-strip::-webkit-scrollbar {
  height: 6px;
}

.detail-gallery-strip::-webkit-scrollbar-thumb {
  background: var(--steel-300);
  border-radius: 4px;
}

.gallery-thumb-btn {
  position: relative;
  flex: 0 0 100px;
  height: 72px;
  padding: 0;
  border: 2.5px solid var(--steel-200);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background-color: var(--steel-900);
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.gallery-thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.2s ease, transform 0.25s ease;
}

.gallery-thumb-btn:hover {
  transform: translateY(-2px);
  border-color: var(--amber-500);
}

.gallery-thumb-btn:hover img {
  transform: scale(1.05);
}

.gallery-thumb-btn.active {
  border-color: var(--amber-500);
  outline: 2px solid var(--amber-500);
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.25), var(--shadow-sm);
  transform: translateY(-2px);
}

.gallery-thumb-badge {
  position: absolute;
  bottom: 3px;
  right: 3px;
  background: rgba(15, 23, 42, 0.85);
  color: #fbbf24;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 3px;
  line-height: 1;
}

.gallery-thumb-btn.active .gallery-thumb-badge {
  background: var(--amber-500);
  color: #ffffff;
}

.gallery-counter-label {
  background: rgba(255, 255, 255, 0.12);
  color: #fbbf24;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.detail-image-tools {
  padding: 0.85rem 1.25rem;
  background-color: var(--steel-950);
  color: #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 600;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Rich Description Showcase (Anti-AI Grounded Formatting) */
.description-container {
  background-color: #ffffff;
  border: 1.5px solid var(--steel-200);
  border-radius: var(--radius-md);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2.5rem;
}

.description-heading {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--forest-900);
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--forest-100);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Styled HTML content entered by client */
.equipment-rich-description {
  color: #1e293b;
  font-size: 1.05rem;
  line-height: 1.7;
}

.equipment-rich-description p {
  margin-bottom: 1.25rem;
  color: #334155;
}

.equipment-rich-description h3,
.equipment-rich-description h4 {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--forest-900);
  margin-top: 2rem;
  margin-bottom: 0.85rem;
  padding-left: 0.75rem;
  border-left: 4px solid var(--amber-500);
}

.equipment-rich-description ul,
.equipment-rich-description ol {
  margin: 1.25rem 0 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.equipment-rich-description li {
  padding-left: 0.35rem;
  color: #334155;
}

.equipment-rich-description strong {
  color: var(--forest-900);
  font-weight: 700;
}

.equipment-rich-description blockquote {
  background: var(--parchment-dark);
  border-left: 4px solid var(--forest-700);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  margin: 1.5rem 0;
  color: #1e293b;
}

/* Sidebar Inquiry Card */
.detail-sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: sticky;
  top: 96px;
}

.inquiry-card {
  background-color: #ffffff;
  border: 1.5px solid var(--steel-200);
  border-top: 5px solid var(--amber-500);
  border-radius: var(--radius-md);
  padding: 2.25rem;
  box-shadow: var(--shadow-md);
}

.inquiry-card-title {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--forest-900);
  margin-bottom: 0.5rem;
}

.inquiry-card-desc {
  font-size: 0.9rem;
  color: var(--steel-600);
  margin-bottom: 1.5rem;
  line-height: 1.55;
}

/* Quick Hotline Card in Sidebar */
.hotline-card {
  background-color: var(--steel-950);
  color: #ffffff;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Related Equipment */
.related-section {
  padding: 4rem 0 5rem;
  background-color: var(--parchment-dark);
  border-top: 1px solid var(--parchment-border);
}

/* Lightbox Modal */
.image-modal {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(11, 15, 25, 0.95);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.image-modal.active {
  display: flex;
}

.modal-image-wrapper {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.image-modal img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-xl);
}

.modal-caption {
  margin-top: 0.75rem;
  color: #fbbf24;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
}

.image-modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #ffffff;
  font-size: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 1;
  transition: background 0.2s ease, transform 0.2s ease;
  z-index: 2010;
}

.image-modal-close:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.08);
}

.modal-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 2010;
}

.modal-nav-btn:hover {
  background: var(--amber-500);
  transform: translateY(-50%) scale(1.1);
}

.modal-nav-btn.prev-btn {
  left: 1.5rem;
}

.modal-nav-btn.next-btn {
  right: 1.5rem;
}

/* Responsive */
@media (max-width: 1024px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .detail-sidebar {
    position: static;
  }
}

@media (max-width: 768px) {
  .detail-header-row {
    flex-direction: column;
    gap: 1.25rem;
  }
  .detail-price-box {
    text-align: left;
    width: 100%;
    padding: 1.15rem;
  }
  .detail-price-val {
    font-size: 2rem;
  }
  .detail-main-img {
    max-height: 320px;
    min-height: 220px;
  }
  .gallery-thumb-btn {
    flex: 0 0 80px;
    height: 60px;
  }
  .description-container {
    padding: 1.5rem;
  }
  .modal-nav-btn {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
  .modal-nav-btn.prev-btn {
    left: 0.5rem;
  }
  .modal-nav-btn.next-btn {
    right: 0.5rem;
  }
}
