/* Engine Parts Page Styling - Modern Clean UI */

:root {
  --primary-color: #E53935;
  --primary-hover: #D32F2F;
  --secondary-color: #1E88E5;
  --secondary-hover: #1976D2;
  --text-dark: #333333;
  --text-medium: #555555;
  --text-light: #757575;
  --spacing-xs: 10px;
  --spacing-sm: 15px;
  --spacing-md: 25px;
  --spacing-lg: 40px;
  --spacing-xl: 60px;
}

/* Section Spacing & Layout */
.section-md {
  padding: 80px 0;
}

.section-sm {
  padding: 50px 0;
}

/* Page Header */
.engine-page-title {
  position: relative;
}

.engine-page-title h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
  color: var(--text-dark);
}

.engine-page-title .subtitle {
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--text-medium);
  max-width: 800px;
  margin-bottom: var(--spacing-md);
}

/* Engine Type Display */
.engine-type {
  margin-bottom: var(--spacing-lg);
  padding: var(--spacing-md);
  position: relative;
  transition: all 0.3s ease;
  background-color: #fff;
}

.engine-type::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 3px;
  width: 80px;
  background-color: var(--secondary-color);
  transition: width 0.3s ease;
}

.engine-type:hover::after {
  width: 120px;
}

.engine-type__title {
  color: var(--primary-color);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
}

.engine-type__spec {
  margin-bottom: var(--spacing-xs);
}

.engine-type__spec strong {
  color: var(--text-dark);
}

/* Engine Parts Categories */
.parts-category {
  margin-bottom: var(--spacing-xl);
  padding-bottom: var(--spacing-md);
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.parts-category__title {
  color: var(--primary-color);
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
  position: relative;
  padding-bottom: var(--spacing-xs);
}

.parts-category__title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 60px;
  height: 3px;
  background-color: var(--secondary-color);
}

.parts-category__desc {
  color: var(--text-medium);
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: var(--spacing-md);
  max-width: 950px;
}

/* Parts Gallery */
.parts-gallery {
  margin-top: var(--spacing-md);
}

.part-image-wrapper {
  margin-bottom: var(--spacing-md);
  overflow: hidden;
}

.part-image {
  max-height: 180px;
  width: auto;
  object-fit: contain;
  object-position: center;
  transition: transform 0.3s ease;
  padding: var(--spacing-xs);
  background-color: #fff;
}

.part-image:hover {
  transform: scale(1.05);
}

.part-caption {
  margin-top: 1.25rem;
  font-size: 0.9rem;
  color: #495057; /* Updated from var(--text-medium) */
  font-weight: 500;
}

/* Styles moved from engine-parts.blade.php */
.part-image-wrapper {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.part-image-wrapper:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.part-image {
    max-height: 170px; /* Was 180px in products.css, inline was 170px */
    max-width: 100%;
    object-fit: contain;
    /* Removed object-position: center; as it's default for flex items */
    /* Removed padding: var(--spacing-xs); and background-color: #fff; from existing .part-image */
    /* transition: transform 0.3s ease; is already on .part-image in products.css */
}

/* Merging .parts-category */
.parts-category {
    margin-bottom: 4rem; /* From inline, overrides var(--spacing-xl) */
    padding-bottom: var(--spacing-md); /* Kept from existing */
    border-bottom: 1px solid rgba(0,0,0,0.08); /* Kept from existing */
}

/* Merging .parts-category__title */
.parts-category__title {
    color: #E53935; /* From inline, overrides var(--primary-color) */
    margin-bottom: 1rem; /* From inline, overrides var(--spacing-sm) */
    font-weight: 600; /* Consistent */
    font-size: 1.75rem; /* Kept from existing */
    position: relative; /* Kept from existing */
    padding-bottom: var(--spacing-xs); /* Kept from existing */
}

.parts-category__title::after { /* Kept from existing */
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background-color: #E53935; /* Assuming var(--primary-color) resolves to this */
}

.parts-category__desc {
    margin-bottom: 2rem;
    color: #495057;
    line-height: 1.6;
}

.subtle-divider {
    height: 1px;
    background-color: rgba(0, 0, 0, 0.1);
    margin: 3rem 0;
}

.compatible-models__title {
    font-size: 1.15rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.models-list li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.text-primary {
    color: #E53935 !important; /* Added !important as it was in inline style, might conflict with Bootstrap */
}

.parts-gallery .row {
    justify-content: center;
}

/* Compatible Models Section */
.compatible-models {
  margin-top: var(--spacing-md);
}

.compatible-models__title {
  color: var(--secondary-color);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
}

.models-list {
  columns: 2;
  column-gap: var(--spacing-md);
}

.models-list li {
  margin-bottom: var(--spacing-xs);
  break-inside: avoid;
  display: flex;
  align-items: flex-start;
}

.models-list li i {
  color: var(--secondary-color);
  margin-right: 8px;
  font-size: 0.9rem;
  position: relative;
  top: 4px;
}

/* Inquiry Section */
.inquiry-section {
  background-color: #f8f9fa;
  padding: var(--spacing-xl) 0;
}

.inquiry-title {
  color: var(--primary-color);
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
}

.inquiry-subtitle {
  color: var(--secondary-color);
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: var(--spacing-md);
}

.inquiry-form-container {
  background-color: #fff;
  padding: var(--spacing-md);
  box-shadow: 0 5px 30px rgba(0,0,0,0.05);
}

/* Quality Info Section */
.quality-info-section {
  padding: var(--spacing-xl) 0;
}

.quality-info-item {
  margin-bottom: var(--spacing-md);
  display: flex;
  align-items: flex-start;
}

.quality-info-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: rgba(30, 136, 229, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: var(--spacing-sm);
  flex-shrink: 0;
}

.quality-info-icon i {
  color: var(--secondary-color);
  font-size: 1.2rem;
}

.quality-info-content h4 {
  color: var(--primary-color);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 5px;
}

.quality-info-content p {
  color: var(--text-medium);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  .section-md {
    padding: 50px 0;
  }
  
  .section-sm {
    padding: 30px 0;
  }
  
  .engine-page-title h1 {
    font-size: 2rem;
  }
  
  .parts-category__title {
    font-size: 1.5rem;
  }
  
  .models-list {
    columns: 1;
  }
}

/* Animation for page elements */
.fade-in {
  animation: fadeIn 0.8s ease forwards;
  opacity: 0;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* For section dividers */
.subtle-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(0,0,0,0.1), transparent);
  margin: var(--spacing-lg) 0;
}
