/* ================= THEME SYNC & RESPONSIVE GRID ================= */
:root {
  --v-blue: #3b82f6;
  --v-orange: #ff6b00;
  --v-glass: rgba(30, 27, 75, 0.4);
  --v-dark: #020617;
}

/* Base Body Sync */
body {
  background-color: var(--v-dark);
}

/* --- Hero Section Sync --- */
.home-section {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 80px 5%;
  background: radial-gradient(circle at center, #1e1b4b 0%, var(--v-dark) 100%);
  color: #fff;
  gap: 30px; /* Space between text and image on wrap */
}

.home-hero-image {
  max-width: 500px;
  width: 100%; /* Responsive width */
  height: auto;
  display: block;
  border-radius: 12px;
  box-shadow: 0 0 30px rgba(59, 130, 246, 0.2);
  flex: 1 1 400px;
  object-fit: cover;
}

.home-text {
  flex: 1 1 500px;
  padding: 10px;
}

.home-text h1 {
  font-size: clamp(2rem, 5vw, 2.8rem); /* Responsive font size */
  font-weight: 800;
  margin-bottom: 20px;
  line-height: 1.2;
}

.home-text p {
  font-size: 1.1rem;
  color: #94a3b8;
  margin-bottom: 30px;
  max-width: 600px;
}

.home-btn-primary {
  display: inline-block;
  background: #d63600;
  color: #ffffff;
  padding: 14px 35px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  transition: 0.3s;
  box-shadow: 0 4px 15px rgba(255, 107, 0, 0.3);
}

.home-btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(255, 107, 0, 0.5);
}

/* --- Grid Fix: Desktop var 5 items --- */
.home-products-grid {
  display: grid;
  /* बदल: 1fr ऐवजी तुमच्या कार्डची max-width (350px) इथे वापरा */
  grid-template-columns: repeat(auto-fit, minmax(250px, 350px)); 
  gap: 25px;
  max-width: 1400px;
  margin: 40px auto;
  padding: 0 20px;
  /* यामुळे कार्ड्स ग्रिडच्या सेंटरला येतील */
  justify-content: center; 
}

/* --- Card Styling --- */
.home-product-card {
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.9), var(--v-glass));
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 15px;
  transition: all 0.3s ease;
  display: flex;
  justify-content: flex-start;
  height: 100%;
  flex-direction: column;
  position: relative;
  max-width: 350px; 
  width: 100%;
  /* सुरक्षिततेसाठी margin auto ठेवा */
  margin: 0 auto; 
}

.home-product-card:hover {
  transform: translateY(-8px);
  border-color: var(--v-blue);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Image & Placeholder Fix */
.home-card-img-container {
  height: 160px;
  background: #0b1120;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
}

.home-card-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-no-image-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--v-blue);
  text-align: center;
  width: 100%;
}

/* Typography */
.home-product-title {
  color: white;
  font-size: 1.1rem;
  margin: 15px 0 8px;
  font-weight: 700;
  line-height: 1.3;
  min-height: 2.6rem; /* (1.3 line-height * 2 lines) */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.home-product-desc {
  color: #94a3b8;
  font-size: 0.85rem;
  margin-bottom: 15px;
  flex-grow: 1;
  line-height: 1.4;
  min-height: 2.8rem;
}

.home-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.home-price-tag {
  color: whitesmoke;
  font-weight: 800;
  font-size: 1.2rem;
}

.home-btn-secondary {
  background: linear-gradient(90deg, #6a00ff, #e600ff);
  color: white;
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  transition: 0.3s;
}

.home-badge-new {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #ff6b00;
  color: #ffffff;
  font-size: 10px;
  font-weight: bold;
  padding: 3px 10px;
  border-radius: 4px;
  z-index: 5;
  text-transform: uppercase;
}

.home-section-title {
  text-align: center;
  color: white;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  margin: 60px 0 20px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* ================= MOBILE/TABLET RESPONSIVENESS ================= */

@media (max-width: 1024px) {
  .home-section {
    padding: 60px 5%;
    flex-direction: column; /* Stack image below text on tablet */
    text-align: center;
  }

  .home-text {
    order: 1;
    flex: 1 1 100%;
  }

  .home-hero-image {
    order: 2;
    max-width: 80%;
  }

  .home-text p {
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 768px) {
  .home-products-grid {
    grid-template-columns: repeat(2, 1fr); /* Tablet var 2 items */
    gap: 15px;
  }

  .home-section-title {
    margin-top: 40px;
  }
}

@media (max-width: 480px) {
  .home-products-grid {
    grid-template-columns: 1fr; /* Mobile var single column */
  }

  .home-hero-image {
    max-width: 100%;
  }

  .home-text h1 {
    font-size: 1.8rem;
  }

  .home-section {
    padding: 40px 20px;
  }
}
