/* for section grid  */

 section.grid {
  margin: -111px auto 40px;
  padding: 0 20px;

  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* for card */

.card {
  padding: 16px;

}

.card h3 {
  font-weight: bold;
  font-size: 18px;
   min-height: 48px;
  line-height: 1.3;
  margin-bottom: 12px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.card-item img {
  width: auto;
  height: 120px;
  object-fit: cover;
  background: var(--border-light);
}

.card-item p {
  font-size: 15px;
  color: var(--text-muted);
  margin-top: 5px;
}

.card a {
  display: inline-block;
  margin-top: 12px;
  color: var(--link-alt);
}

/* for button  */

.btn-primary {
  background: var(--btn-primary-bg);
  border: 1px solid var(--btn-primary-border);
  padding: 6px;
  cursor: pointer;
  font-weight: 600;
  border-radius: 25px;
}

.btn-primary:hover {
  background: var(--btn-primary-hover);
}

/* for slider view of products  */

/*  SLIDER SECTION */
.product-slider {
  max-width: 1480px;
  margin: 30px auto;
  padding: 0 20px;
}

.slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.slider-header a {
  color: var(--link-alt);
  text-decoration: none;
}

/*  WRAPPER */
.slider-wrapper {
  position: relative;
}

/*  TRACK  */
.slider-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: 10px;

  scrollbar-color: var(--border-dark) transparent;
  scrollbar-width: thin;
}

.slider-track::-webkit-scrollbar {
  height: 6px;
}

.slider-track::-webkit-scrollbar-thumb {
  background: var(--border-dark);
  border-radius: 10px;
}

/* PRODUCT CARD  */
.product-card {
  min-width: 200px;
  padding: 12px;
}

.product-card img {
  width: 100%;
  height: 180px;
  object-fit: contain;
}

.product-card .title {
  font-size: 16px;
  color: var(--product-text);
  margin: 8px 0 4px;
}

.product-card .price {
  font-size: 16px;
  font-weight: bold;
  color: var(--text-dark);
}

/* ARROWS */
.slider-btn {
  position: absolute;
  top: 35%;
  transform: translateY(-50%);
  background: var(--surface-color);
  border: 1px solid var(--border-default);
  width: 40px;
  height: 80px;
  font-size: 20px;
  z-index: 10;
}

.slider-btn.left {
  left: -10px;
}

.slider-btn.right {
  right: -10px;
}

.slider-btn:hover {
  background: var(--background-color);
}

/* ===== MOBILE ===== */
@media (max-width: 600px) {
  .slider-btn {
    display: none;
  }

  .slider-track {
    flex-wrap: wrap;
    overflow: visible;
  }

  .product-card {
    min-width: 100%;
  }
}

 section.grid-repeat{
      margin: 0 auto 40px;
  padding: 0 20px;

  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
 }

 .card-wrapper {
  position: relative;
}

/* responsive  */

@media (max-width: 1024px) {
  section.grid,
  section.grid-repeat {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {

  section.grid,
  section.grid-repeat {
    grid-template-columns: 1fr;
  }
}

.grid-wrapper {
  max-width: 1480px;
  margin: 0 auto;
}

/* for sponsered  */

/* Wrapper column */
#sponsoredWrapper {
  display: flex;
  flex-direction: column;
  gap: 16px; /* space between sign-in & sponsored product */
}

/* Common card styling */
#sponsoredWrapper .card {
  border-radius: 6px;
  padding: 14px;
}

/* Sponsored product card */
.sponsored-card {
  padding: 12px;
}

/* Sponsored product image (smaller box) */
.sponsored-card img {
  width: 100%;
  height: 160px;            /* smaller image */
  object-fit: contain;
  border-radius: 4px;
}

/* Price */
#sponsoredPrice {
  font-size: 16px;
  font-weight: 600;
  color: var(--danger); /* Amazon red */
  margin-bottom: 8px;
}

/* for click cursor pointer  */

.card-grid div.card-item.home-product,
.slider-track div.product-card
{
  cursor: pointer;
}

