/* ===================== GLOBAL ===================== */
body {
  margin: 0;
  padding-top: 60px;
  font-family: Arial, sans-serif;
  background: #f9fafb;
  color: #111;
}
@media (min-width: 1024px) {
    body {
        padding-top: 60px;
    }
}

a {
  text-decoration: none;
  color: inherit;
}

/* ===================== AFFILIATE PRODUCTS - HORIZONTAL GRID ===================== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  padding: 1rem;
  justify-content: center;
  align-items: start;
}

/* CARD DESIGN */
.product-card {
  background: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  overflow: hidden;
  text-align: center;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.12);
}

/* PRODUCT IMAGE */
.product-card img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  background-color: #f9f9f9;
  transition: transform 0.3s ease;
}

.product-card:hover img {
  transform: scale(1.05);
}

/* PRODUCT DETAILS */
.product-info {
  padding: 0.75rem 0.8rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.product-info h2 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  height: 2.6em;
  overflow: hidden;
  text-overflow: ellipsis;
}

.price {
  color: #2563eb;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

/* BUTTONS */
.see-more {
  background: #f3f4f6;
  border: none;
  border-radius: 6px;
  padding: 0.35rem 0.6rem;
  cursor: pointer;
  font-size: 0.75rem;
  margin-bottom: 0.3rem;
  transition: background 0.2s ease;
}

.see-more:hover {
  background: #e5e7eb;
}

/* DESCRIPTION */
.description {
  font-size: 0.8rem;
  color: #555;
  margin: 0.3rem 0;
  display: none;
  text-align: left;
}

.description.show {
  display: block;
}

/* BUY BUTTON */
.buy-btn {
  background: #ff4d4d;
  color: #fff;
  text-decoration: none;
  font-size: 0.8rem;
  border-radius: 5px;
  padding: 0.5rem 0.9rem;
  transition: background 0.25s ease;
}

.buy-btn:hover {
  background: #e03636;
}

/* RESPONSIVE TWEAKS */
@media (max-width: 480px) {
  .product-card img {
    height: 150px;
  }
  .product-info h2 {
    font-size: 0.8rem;
  }
}

/* ===================== NEWS SECTION ===================== */
.news-card {
  background: #fff;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.news-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.12);
}

.news-card img,
.news-card video {
  width: 100%;
  aspect-ratio: 16 / 9; /* keeps all images same height proportionally */
  object-fit: cover;
}

.news-card h2 {
  font-weight: 600;
  margin: 0.5rem;
  font-size: 1rem;
}

.news-card p {
  font-size: 0.875rem;
  color: #555;
  margin: 0.25rem 0.5rem 0.5rem;
}

/* ===================== RESPONSIVE ===================== */
@media (min-width: 768px) {
  .product-card {
    flex: 0 0 220px;
  }
}

@media (min-width: 1024px) {
  .split-container {
    display: flex;
    gap: 1.5rem;
  }

  .left-side {
    flex: 3;
  }

  .right-side {
    flex: 1;
  }

  .product-card {
    flex: 0 0 200px; /* adjust for desktop */
  }

  .product-grid {
    gap: 1rem;
  }
}

/* ===================== SCROLLBAR FOR DESKTOP ===================== */
@media (hover: hover) and (pointer: fine) {
  .product-grid::-webkit-scrollbar-thumb {
    background-color: rgba(0,0,0,0.4);
  }
}
.description {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}
.description.show {
  max-height: 120px; /* or auto with JS measurement */
}
.filter-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem 0.5rem;
  background: #f8f9fa;
  border-radius: 8px;
  margin: 1rem;
  flex-wrap: wrap;
}

.filter-bar select {
  padding: 0.4rem 0.6rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 0.85rem;
  background: white;
  cursor: pointer;
  transition: border 0.2s ease;
}

.filter-bar select:hover {
  border-color: #2563eb;
}
