/* ============================= */
/* Base Reset - Ensures consistency across browsers */
/* ============================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, sans-serif;
  background: #ffffff;
  color: #333;
  line-height: 1.6;
}

/* Header */
.main-header {
  background-color: #fff;
  padding: 10px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 10;
}

/* Left Section: Logo and Channel Name */
.left-section {
  display: flex;
  align-items: center;
}

.logo {
  height: 40px;
  margin-right: 10px;
}

.channel-name {
  font-size: 18px;
  font-weight: bold;
}

/* Center Section: Search Input */
.center-section {
  flex: 1;
  display: flex;
  justify-content: center;
  position: relative; /* Needed for suggestion box positioning */
}

.center-section input {
  padding: 8px 12px;
  border-radius: 20px;
  border: 1px solid #ccc;
  width: 100%;
  max-width: 300px;
  font-size: 14px;
  outline: none;
}

.input-wrapper {
  position: relative;
  width: 100%;
  max-width: 300px;
}

.input-wrapper input {
  width: 100%;
  padding: 8px 36px 8px 12px; /* space for the clear button */
  border-radius: 20px;
  border: 1px solid #ccc;
  box-sizing: border-box;
}

/* Suggestions Dropdown */
.suggestions {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  margin-top: 4px;
  transform: translateX(-50%);
  width: 100%;
  max-width: 300px;
  background-color: #fff;
  border-radius: 5px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  list-style: none;
  padding: 0;
  z-index: 999;
}

.suggestions li {
  padding: 10px 14px;
  cursor: pointer;
  border: 1px solid #ff9900;
  font-size: 14px;
  color: #333;
  border-radius: 5px;
  transition: background-color 0.2s;
}

.suggestions li:hover {
  background-color: #f2f2f2;
}

.clear-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: #999;
  cursor: pointer;
  display: none;
  background-color: transparent;
  z-index: 2;
}

/* Right Section: Navigation */
.right-section {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  gap: 12px;
}

.nav-link {
  text-decoration: none;
  color: #333;
  font-weight: bold;
  padding: 6px 10px;
  white-space: nowrap;
}

.right-section a:hover {
  color: #ff9900;
}

/* Section Title */
.section-title {
  text-align: center;
  font-size: 28px;
  margin: 2px 0;
  color: #333;
}

/* Product Grid and Cards */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  justify-items: center;
  margin: 0 auto;
  padding: 10px;
  max-width: 2000px;
}

.product-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  padding: 25px 20px;
  text-align: center;
  transition: transform 0.3s ease;
  width: 100%;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

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

.amazon-title {
  font-size: 18px;
  font-weight: bold;
  margin: 1px 0 1px;
  color: #222;
  text-align: left;
}

.amazon-btn {
  display: inline-block;
  padding: 10px 16px;
  background-color: #ff9900;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-weight: bold;
  margin-top: 10px;
  transition: background-color 0.3s;
  text-align: center;
}

.amazon-btn:hover {
  background-color: #e68a00;
}

/* Go Back Link */
.go-back-home {
    text-align: center;
    margin: 40px 0;
}

.go-back-home a {
    text-decoration: none;
    color: #007BFF;
    font-weight: bold;
    font-size: 16px;
    transition: color 0.2s ease;
}

.go-back-home a:hover {
    color: #0056b3;
}

/* =============================
   Footer
============================= */
.footer{
  text-align:center; padding:24px var(--page-pad);
  background:#fafafa; border-top:1px solid #ddd; margin-top:40px;
}
.footer-icons{
  display:flex; justify-content:center; align-items:center;
  gap:18px; margin:8px 0 0;
}
.footer-icons a{
  display:inline-flex; align-items:center; justify-content:center;
  width:40px; height:40px;
}
.footer-icons img{ width:24px; height:24px; }
.copyright{
  margin-top: 10px;
  font-size: 14px;
  color: #444;
  line-height: 1.5;
}
.disclaimer{ margin-top:6px; font-size:10px; color:#666; }

/* ============================= */
/* Mobile Responsive Adjustments */
/* ============================= */
@media (max-width: 768px) {
  .main-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .center-section {
    width: 100%;
    justify-content: center;
  }

  .center-section input {
    max-width: 90%;
  }

  .right-section {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* ⬅️ center nav buttons */
    gap: 8px; /* ⬅️ spacing between buttons */
    padding: 0 10px;
  }

  .nav-link {
    font-size: 14px;
    padding: 6px 10px;
    white-space: nowrap;
  }
}

