/* 
 * MRF Tyres - Modern Styles CSS
 * A comprehensive stylesheet for all MRF Tyres pages
 */

:root {
  --primary-color: #e50000;
  --primary-dark: #c50000;
  --secondary-color: #212529;
  --text-color: #343a40;
  --text-light: #6c757d;
  --light-gray: #f8f9fa;
  --medium-gray: #e9ecef;
  --border-color: #dee2e6;
  --card-shadow: 0 4px 12px rgba(0,0,0,0.08);
  --card-shadow-hover: 0 8px 24px rgba(0,0,0,0.15);
  --transition-speed: 0.3s;
}

/* Typography */
body {
  font-family: 'Segoe UI', Roboto, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-color);
  line-height: 1.6;
  background-color: var(--light-gray);
  overflow-x: hidden;
}

h1, .h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

h2, .h2 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

h3, .h3 {
  font-size: 1.75rem;
  font-weight: 600;
}

h4, .h4 {
  font-size: 1.5rem;
  font-weight: 600;
}

h5, .h5 {
  font-size: 1.25rem;
  font-weight: 600;
}

h6, .h6 {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

p {
  margin-bottom: 1rem;
}

.text-primary {
  color: var(--primary-color) !important;
}

.bg-primary {
  background-color: var(--primary-color) !important;
}

.section-title {
  position: relative;
  margin-bottom: 1.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.section-title:after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 3px;
  background-color: var(--primary-color);
}

.section-subtitle {
  color: var(--primary-color);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

/* Layout */
.container {
  max-width: 1300px;
  padding: 0 1.5rem;
}

.section-padding {
  padding: 5rem 0;
}

.section-margin {
  margin: 5rem 0;
}

/* Modern Grid and Card Layout */
.card {
  border: none;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: transform var(--transition-speed) ease, 
              box-shadow var(--transition-speed) ease;
  height: 100%;
  background-color: #fff;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--card-shadow-hover);
}

.card-img-top {
  height: 220px;
  object-fit: cover;
}

.card-body {
  padding: 1.5rem;
}

.card-title {
  font-weight: 600;
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}

.card-text {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* Advanced Grid Layout */
.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.grid-container-small {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.25rem;
}

.grid-container-large {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.75rem;
}

/* Featured Item Grid (for product highlights) */
.featured-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .featured-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .featured-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1200px) {
  .featured-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Hero Sections */
.hero-banner {
  position: relative;
  background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), 
              url('../images/hero-bg.jpg') no-repeat center center;
  background-size: cover;
  color: white;
  padding: 8rem 0;
  margin-bottom: 3rem;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-hero {
  padding: 0.8rem 2rem;
  font-weight: 600;
  border-radius: 4px;
  transition: all 0.3s;
  min-width: 180px;
  text-align: center;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

/* Page Headers */
.page-header {
  background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), 
              url('../images/page-header-bg.jpg') no-repeat center center;
  background-size: cover;
  padding: 5rem 0;
  color: white;
  text-align: center;
  position: relative;
}

/* Buttons */
.btn {
  font-weight: 500;
  border-radius: 4px;
  padding: 0.6rem 1.5rem;
  transition: all var(--transition-speed) ease;
}

.btn-danger, 
.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-danger:hover, 
.btn-primary:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn-outline-danger {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.btn-outline-danger:hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-lg {
  padding: 0.8rem 2rem;
  font-size: 1.1rem;
}

/* Product Cards */
.product-card {
  height: 100%;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: transform var(--transition-speed) ease,
              box-shadow var(--transition-speed) ease;
  background-color: #fff;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--card-shadow-hover);
}

.product-image {
  height: 220px;
  background-color: var(--light-gray);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-img {
  max-width: 100%;
  max-height: 200px;
  object-fit: contain;
  transition: transform var(--transition-speed) ease;
}

.product-card:hover .product-img {
  transform: scale(1.05);
}

.product-category {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: var(--primary-color);
  color: white;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
  z-index: 2;
}

.product-content {
  padding: 1.5rem;
}

.product-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.product-description {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Testimonials */
.testimonial-card {
  padding: 2rem;
  border-radius: 10px;
  box-shadow: var(--card-shadow);
  background-color: white;
  position: relative;
  margin-top: 1.5rem;
}

.testimonial-card:before {
  content: '"';
  position: absolute;
  top: -15px;
  left: 20px;
  font-size: 6rem;
  color: var(--primary-color);
  opacity: 0.2;
  line-height: 1;
}

/* Features */
.feature-box {
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
  padding: 1.5rem;
  border-radius: 10px;
  background-color: var(--primary-color);
  color: white;
  box-shadow: var(--card-shadow);
  transition: transform var(--transition-speed) ease;
}

.feature-box:hover {
  transform: translateY(-5px);
}

.feature-icon {
  font-size: 1.75rem;
  color: white;
  margin-right: 1rem;
  min-width: 40px;
  text-align: center;
}

.feature-text h5 {
  color: white;
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.feature-text small {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.85rem;
}

/* Loader */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.95);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

.loader-hidden {
  opacity: 0;
  pointer-events: none;
}

.loader-img {
  width: 80px;
  height: 80px;
}

/* Breadcrumb */
.breadcrumb {
  background: none;
  padding: 0.75rem 0;
}

.breadcrumb-item a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color var(--transition-speed) ease;
}

.breadcrumb-item a:hover {
  color: var(--primary-dark);
}

.breadcrumb-item.active {
  color: var(--text-light);
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
  .hero-title {
    font-size: 2.5rem;
  }
  
  .section-padding {
    padding: 3rem 0;
  }
}

@media (max-width: 767.98px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
  }
  
  .btn-hero {
    width: 100%;
    margin-right: 0;
  }
  
  .section-padding {
    padding: 2.5rem 0;
  }
}

/* Animation classes */
.fade-in {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.slide-up {
  animation: slideUp 0.5s ease-in-out;
}

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