/* ================================
   HEADER SCROLL BUG FIX FOR INDEX.HTML
  ================================*/
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}
main {
  margin-top: 0;
  padding-top: 0;
}
#header {
  position: relative;
  top: 0;
  width: 100%;
  z-index: 100;
}
.site-header {
  position: static;
  width: 100%;
}

/* ================================
   HERO SECTION
  ================================*/
main section:first-of-type {
  text-align: center;
  margin-top: 40px;
  padding-top: 20px;
}
main section:first-of-type h1 {
  margin-top: 0;
  padding-top: 0;
}
main section:first-of-type button {
  display: inline-block;
  margin: 10px 15px;
}

/* ================================
   FEATURE CONTAINERS - RESPONSIVE GRID
  ================================*/
.feature-containers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 30px;
  padding: 0 10px;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

/* 1400px+ screens - 4 cards per row */
@media (min-width: 1400px) {
  .feature-containers {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Mobile - minimum 2 cards side-by-side */
@media (max-width: 600px) {
  .feature-containers {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
}

/* Very small screens - still 2 cards */
@media (max-width: 400px) {
  .feature-containers {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

.feature-card {
  background-color: #1e1e2f;
  padding: 20px;
  border-radius: 10px;
  transition: transform 0.3s;
  box-shadow: 0 0 10px rgba(0, 255, 208, 0.2);
  text-align: center;
  min-width: 0; /* Prevents overflow */
}

.feature-card:hover {
  transform: translateY(-5px);
}

.icon {
  font-size: 2rem;
  margin-bottom: 10px;
}

.feature-card h3 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 0.85rem;
  line-height: 1.4;
}

/* Adjust text on very small screens */
@media (max-width: 400px) {
  .feature-card {
    padding: 15px 10px;
  }
  
  .icon {
    font-size: 1.5rem;
  }
  
  .feature-card h3 {
    font-size: 0.9rem;
  }
  
  .feature-card p {
    font-size: 0.75rem;
  }
}

/* ================================
   TRENDING SECTION
  ================================*/
.trending-header {
  text-align: center;
  margin: 40px 0px 10px;
}

/* TRENDING PRODUCTS - RESPONSIVE GRID */
.trending-products {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 30px;
  padding: 0 10px 40px;
  max-width: 1600px;
  margin-left: auto;
  margin-right: auto;
}

/* Single card centering */
.trending-products .product-card {
  flex: 0 0 auto;
  max-width: 300px;
}

/* Multiple cards - responsive grid behavior */
@media (min-width: 1400px) {
  .trending-products {
    gap: 30px;
  }
  .trending-products .product-card {
    flex: 0 1 calc(20% - 24px); /* 5 cards per row */
  }
}

@media (min-width: 900px) and (max-width: 1399px) {
  .trending-products .product-card {
    flex: 0 1 calc(25% - 23px); /* 4 cards per row */
  }
}

@media (min-width: 600px) and (max-width: 899px) {
  .trending-products {
    gap: 20px;
  }
  .trending-products .product-card {
    flex: 0 1 calc(33.333% - 14px); /* 3 cards per row */
  }
}

/* Mobile - minimum 2 cards side-by-side */
@media (max-width: 599px) {
  .trending-products {
    gap: 15px;
  }
  .trending-products .product-card {
    flex: 0 1 calc(50% - 8px); /* 2 cards per row */
  }
}

/* Very small screens */
@media (max-width: 400px) {
  .trending-products {
    gap: 12px;
  }
  .trending-products .product-card {
    flex: 0 1 calc(50% - 6px); /* 2 cards per row */
  }
}

.product-card {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 0 15px rgba(0, 255, 208, 0.1);
  cursor: pointer;
  transition: transform 0.3s ease;
  min-width: 0;
}

.product-card:hover {
  transform: translateY(-5px);
}

.product-card img {
  width: 100%;
  height: auto;
  display: block;
}

.product-card h2,
.product-card button {
  position: absolute;
  text-align: center;
  transform: translateX(-50%);
  left: 50%;
  text-shadow: 0 0 10px #000;
  color: #fff;
}

.product-card button {
  bottom: 15px;
}

.product-card h2 {
  top: 15px;
  font-size: 1.1rem;
  background-color: rgba(0, 0, 0, 0.6);
  padding: 5px 10px;
  border-radius: 5px;
}

/* Adjust product card text on mobile */
@media (max-width: 599px) {
  .product-card h2 {
    font-size: 0.85rem;
    padding: 4px 8px;
  }
  
  .product-card button {
    font-size: 0.85rem;
    padding: 8px 15px;
    bottom: 10px;
  }
}

@media (max-width: 400px) {
  .product-card h2 {
    font-size: 0.75rem;
    padding: 3px 6px;
  }
  
  .product-card button {
    font-size: 0.75rem;
    padding: 6px 12px;
  }
}

/* ================================
   CATEGORIES SECTION
  ================================*/
.category {
  margin-top: 55px;
}

.category-text {
  text-align: center;
}

/* CATEGORIES GRID - RESPONSIVE */
.categories-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 25px;
  margin: 30px auto;
  max-width: 1000px;
  padding: 0 10px;
}

/* 1400px+ screens - 4 cards */
@media (min-width: 1400px) {
  .categories-container {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Desktop/Tablet - 4 cards */
@media (min-width: 900px) and (max-width: 1399px) {
  .categories-container {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Tablet - 3 cards */
@media (min-width: 600px) and (max-width: 899px) {
  .categories-container {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Mobile - 2 cards side-by-side */
@media (max-width: 599px) {
  .categories-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
}

.category-card {
  overflow: hidden;
  background-color: #1e1e2f;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 255, 208, 0.15);
  transition: transform 0.3s ease;
  cursor: pointer;
  text-align: center;
  min-width: 0;
}

.category-card:hover {
  transform: translateY(-5px);
}

.category-card img {
  width: 100%;
  display: block;
}

.category-card h3 {
  padding: 10px;
  font-size: 1rem;
}

@media (max-width: 400px) {
  .category-card h3 {
    font-size: 0.85rem;
    padding: 8px;
  }
}

.category-button {
  display: block;
  margin: 20px auto;
  padding: 12px 28px;
}

/* ================================
   GENERAL BUTTON STYLES
  ================================*/
button {
  background-color: #00ffd0;
  color: #000;
  font-size: 1rem;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  padding: 12px 25px;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
}

button:hover {
  background-color: #00c2a6;
  transform: scale(1.05);
}

@media (max-width: 400px) {
  button {
    font-size: 0.9rem;
    padding: 10px 20px;
  }
}