body {
  font-family: 'Poppins', sans-serif;
  background-color: #f8f9fa;
  color: #333;
}

.deals-section {
  padding: 80px 0;
  background: linear-gradient(135deg, #f9f9f9 0%, #e8eaed 100%);
  position: relative;
}

.deals-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 10px;
  background: linear-gradient(90deg, #e74c3c, #c0392b, #e74c3c);
}

.deals-title {
  text-align: center;
  margin-bottom: 60px;
  position: relative;
}

.deals-title::after {
  content: "";
  display: block;
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, #e74c3c, #c0392b);
  margin: 25px auto 0;
  border-radius: 2px;
}

.deals-title h2 {
  font-size: 42px;
  font-weight: 800;
  color: #222;
  margin-bottom: 25px;
  letter-spacing: -0.5px;
  position: relative;
  display: inline-block;
  font-family: 'Poppins', sans-serif;
}

.deals-title h4 {
  font-weight: bold;
  color: #333;
  margin-bottom: 20px;
  margin-top: 20px;
}

.deals-section h4 {
  font-weight: 700;
  color: #333;
  font-size: 28px;
  margin: 30px 0 25px;
  position: relative;
  padding-left: 15px;
}

.deals-section h4::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  background: linear-gradient(to bottom, #e74c3c, #c0392b);
  border-radius: 4px;
}

.deals-section h3 {
  font-size: 32px;
  font-weight: 700;
  margin: 60px 0 30px;
  color: #222;
  text-align: center;
  position: relative;
  padding-bottom: 15px;
}

.deals-section h3::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #e74c3c, #c0392b);
  border-radius: 3px;
}

.deals-title p {
  font-size: 18px;
  color: #555;
  margin-bottom: 0;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
  font-family: 'Poppins', sans-serif;
}

.deals-section p {
  margin-bottom: 15px;
}

.deal-card {
  background: #fff;
  border: none;
  border-radius: 12px;
  padding: 25px;
  text-align: center;
  margin-bottom: 35px; /* Consistent bottom margin */
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.07), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.deal-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #e74c3c, #c0392b);
  transform: scaleX(0);
  transition: transform 0.4s ease;
  transform-origin: left;
}

.deal-card:hover {
  transform: translateY(-10px); /* Reduced from -15px to prevent overlap */
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.deal-card:hover::before {
  transform: scaleX(1);
}

/* .deal-card img {
  max-width: 100%;
  height: 200px;
  object-fit: contain;
  border-radius: 8px;
  margin-bottom: 15px;
} */

/* Centered products row for subcategories with fewer items */
.centered-products-row {
  display: flex;
  justify-content: center;
  gap: 30px;
}

/* Make sure images have consistent height */
.deal-card img {
  max-width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  margin-bottom: 20px;
  transition: transform 0.5s ease;
  transform-origin: center;
}

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

/* Allow the content area to expand */
.deal-card-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  padding-top: 10px;
}

/* Adjust spacing for the two-product layout */
.two-products-container .col-lg-5 {
  margin: 0;
}

.deal-card h4 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 15px;
  color: #222;
  position: relative;
  padding-left: 0;
  transition: color 0.3s ease;
  font-family: 'Poppins', sans-serif;
}

.deal-card h4::before {
  display: none;
}

.deal-card:hover h4 {
  color: #e74c3c;
}

.deal-card p {
  font-size: 15px;
  color: #666;
  margin-bottom: 15px;
  line-height: 1.6;
  font-family: 'Poppins', sans-serif;
}

.deal-card .price {
  font-size: 24px;
  font-weight: 700;
  color: #e74c3c;
  margin-bottom: 20px;
  position: relative;
  display: inline-block;
  font-family: 'Poppins', sans-serif;
}

.deal-card .price::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 2px;
  background: rgba(231, 76, 60, 0.3);
  border-radius: 2px;
}

.deal-card .btn {
  display: inline-block;
  padding: 14px 28px;
  margin-top: auto;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
  font-family: 'Poppins', sans-serif;
}

.deal-card .btn:hover {
  background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%);
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

.ud-page-banner {
  background: linear-gradient(135deg, #020c4d 0%, #1a237e 100%);
  position: relative;
  color: #fff;
  padding: 120px 0 100px;
  text-align: center;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.ud-page-banner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ffffff' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
  opacity: 0.6;
}

.ud-page-banner h1 {
  font-size: 50px;
  font-weight: 800;
  margin-bottom: 15px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  letter-spacing: 0.5px;
  position: relative;
  z-index: 1;
  background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  font-family: 'Poppins', sans-serif;
}

.ud-page-banner p {
  font-size: 24px;
  font-weight: 500;
  line-height: 1.6;
  margin-bottom: 25px;
  position: relative;
  z-index: 1;
  opacity: 0.9;
  font-family: 'Poppins', sans-serif;
}

.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background-color: #fff;
  margin: 15% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  max-width: 600px;
  border-radius: 8px;
  position: relative;
}

.close {
  position: absolute;
  right: 20px;
  top: 10px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.modal-body {
  padding: 20px;
}

.modal-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 15px;
}

.coupon-section {
  margin-top: 20px;
}

.coupon-section input {
  padding: 10px;
  width: 70%;
  margin-right: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.coupon-section button {
  padding: 10px 20px;
  background-color: #e74c3c;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.coupon-section button:hover {
  background-color: #c0392b;
}

.discounted-price {
  font-size: 20px;
  font-weight: bold;
  color: #27ae60;
  margin-top: 15px;
}

#refurbished-laptops-section .deal-card {
  margin-bottom: 35px !important; /* Use !important to override any conflicting styles */
}

/* Make sure the last card in a column doesn't have extra margin if it's the last row */
/* #refurbished-laptops-section .row > div:last-child .deal-card {
  margin-bottom: 0;
} */

/* Fix for spacing between cards and hover overlap */

/* 1. First fix the general card spacing */
.deal-card {
  background: #fff;
  border: none;
  border-radius: 12px;
  padding: 25px;
  text-align: center;
  margin-bottom: 35px; /* Consistent bottom margin */
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.07), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* 2. Fix the hover effect to prevent overlapping */
.deal-card:hover {
  transform: translateY(-10px); /* Reduced from -15px to prevent overlap */
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* 3. Add padding to card container to accommodate hover */
.row > [class*="col"] {
  padding-top: 5px; /* Add padding to accommodate upward hover movement */
  padding-bottom: 10px; /* Extra padding at bottom for hover effect */
}

/* 4. Fix for refurbished laptops section specifically */
#refurbished-laptops-section .deal-card {
  margin-top: 0; /* Remove the top margin that was added */
  margin-bottom: 25px !important; /* Keep consistent bottom margin */
}

/* 5. Fix for custom PCs section to match */
#custom-pcs-section .deal-card {
  margin-bottom: 25px !important; /* Match the laptops section */
}

/* 6. Fix for the syntax error in comment bracket */
/* Make sure the last card in a column doesn't have extra margin if it's the last row */
/* #refurbished-laptops-section .row > div:last-child .deal-card {
  margin-bottom: 0;
} */

/* 7. Adjust responsive styles to be consistent */
@media (max-width: 768px) {
  .deal-card {
    margin-bottom: 25px !important; /* Consistent across all cards */
  }

  .deal-card img {
    margin-bottom: 10px;
  }

  /* Remove conflicting styles */
  #refurbished-laptops-section .deal-card {
    margin-top: 0 !important; /* This is the key fix - remove the 20px top margin */
    margin-bottom: 40px !important;
  }

  #custom-pcs-section .deal-card {
    margin-bottom: 40px !important;
  }

  /* Add extra spacing between rows */
  .row {
    margin-bottom: 10px;
  }

  /* Reduce hover movement on mobile */
  .deal-card:hover {
    transform: translateY(-5px);
  }
}

@media (max-width: 576px) {
  .deal-card {
    margin-bottom: 25px !important;
    padding: 15px; /* Smaller padding on mobile */
  }

  /* Ensure consistent spacing */
  #refurbished-laptops-section .deal-card,
  #custom-pcs-section .deal-card {
    margin-top: 0 !important; /* Force no top margin */
    margin-bottom: 40px !important;
  }

  /* Add more space for last card */
  .row > div:last-child .deal-card {
    margin-bottom: 35px !important;
  }
}

/* Responsive Styles */
@media (max-width: 1200px) {
  .deals-title h2 {
    font-size: 32px;
  }

  .deal-card h4 {
    font-size: 20px;
  }

  .deal-card p {
    font-size: 14px;
  }

  .deal-card .price {
    font-size: 18px;
  }

  .deal-card .btn {
    font-size: 14px;
  }

  .ud-page-banner h1 {
    font-size: 40px;
  }

  .ud-page-banner p {
    font-size: 20px;
  }
}

@media (max-width: 992px) {
  .deals-title h2 {
    font-size: 28px;
  }

  .deal-card h4 {
    font-size: 18px;
  }

  .deal-card p {
    font-size: 13px;
  }

  .deal-card .price {
    font-size: 16px;
  }

  .deal-card .btn {
    font-size: 13px;
  }

  .ud-page-banner h1 {
    font-size: 36px;
  }

  .ud-page-banner p {
    font-size: 18px;
  }
}

@media (max-width: 768px) {
  .deals-title h2 {
    font-size: 24px;
  }

  .deal-card h4 {
    font-size: 16px;
  }

  .deal-card p {
    font-size: 12px;
  }

  .deal-card .price {
    font-size: 14px;
  }

  .deal-card .btn {
    font-size: 12px;
  }

  .ud-page-banner h1 {
    font-size: 32px;
  }

  .ud-page-banner p {
    font-size: 16px;
  }

  .deal-card {
    margin-bottom: 20px;
  }

  .deal-card img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 10px;
  }

  #refurbished-laptops-section .deal-card {
    margin-top: 0 !important; /* THIS IS THE KEY FIX - Changed from 20px to 0 */
    margin-bottom: 40px !important;
  }

  /* #refurbished-laptops-section .row > div:last-child .deal-card {
    margin-bottom: 0;
  } */
}

@media (max-width: 576px) {
  .deals-title h2 {
    font-size: 20px;
  }

  .deal-card h4 {
    font-size: 14px;
  }

  .deal-card p {
    font-size: 11px;
  }

  .deal-card .price {
    font-size: 12px;
  }

  .deal-card .btn {
    font-size: 11px;
  }

  .ud-page-banner h1 {
    font-size: 28px;
  }

  .ud-page-banner p {
    font-size: 14px;
  }

  /* .deal-card {
    margin-bottom: 20px;
  } */

  .deal-card img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 10px;
  }

  #refurbished-laptops-section .deal-card {
    margin-top: 0 !important; /* Force no top margin */
    margin-bottom: 40px !important;
  }

  /* On very small screens, even the last card should have some margin */
  /* #refurbished-laptops-section .row > div:last-child .deal-card {
    margin-bottom: 10px !important;
  } */
}

/* Add these styles at the end of your existing CSS file */

/* Responsive adjustments for the centered layout */
@media (min-width: 992px) {
  .two-products-container .col-lg-5 {
    flex: 0 0 auto;
    width: 45%;
    max-width: 500px;
  }
}

@media (max-width: 991px) {
  .centered-products-row {
    justify-content: space-around;
  }

  .two-products-container .col-md-6 {
    flex: 0 0 auto;
    width: 48%;
  }
}

@media (max-width: 767px) {
  .two-products-container .col-sm-12 {
    flex: 0 0 auto;
    width: 100%;
  }
}
