body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #020617;
  color: #e2e8f0;
}

/* HEADER */
header {
  text-align: center;
  padding: 25px;
  background: linear-gradient(90deg, #0ea5e9, #22c55e);
  font-size: 34px;
  font-weight: bold;
}

.subheader {
  text-align: center;
  font-size: 14px;
  background: linear-gradient(90deg, #0ea5e9, #22c55e);
  margin-top: -10px;
  margin-bottom: 10px;
  padding-bottom: 10px;
}

/* HERO */
.hero {
  text-align: center;
  padding: 40px 20px;
}

.hero h1 {
  font-size: 30px;
}

.hero p {
  color: #94a3b8;
}

/* TRUST BAR */
.trust {
  text-align: center;
  color: #22c55e;
  font-size: 14px;
  margin-bottom: 25px;
  padding: 0 10px;
}

/* NAV */
nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap; /* Allows nav to wrap on tiny screens */
  gap: 15px;
  background: #111827;
  padding: 12px;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: bold;
}

/* CONTAINER */
.container {
  max-width: 1100px;
  margin: auto;
  padding: 30px 15px;
}

h2 {
  border-bottom: 2px solid #22c55e;
  padding-bottom: 10px;
}

/* FLEXBOX PRODUCTS LAYOUT */
.products {
  display: flex;
  flex-wrap: wrap; /* This makes items drop to the next line */
  gap: 25px;
  justify-content: center; /* Centers the cards on the screen */
}

/* CARD */
.card {
  background: #111827;
  padding: 15px;
  border-radius: 14px;
  text-align: center;
  position: relative;
  transition: 0.3s;
  /* Flex-basis: sets the "ideal" width; flex-grow: allows it to fill space */
  flex: 1 1 300px; 
  max-width: 350px; /* Prevents cards from getting awkwardly wide on desktop */
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

/* SOLD OUT & LABELS */
.sold-out {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  background: red;
  color: white;
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 6px;
  font-weight: bold;
}

.card.sold img {
  filter: grayscale(100%);
  opacity: 0.5;
}

.img-container {
  overflow: hidden;
  border-radius: 10px;
}

.img-container img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  transition: 0.4s;
}

.img-container:hover img {
  transform: scale(1.15);
}

.grade, .grade1, .grade2 {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  padding: 5px 10px;
  font-size: 12px;
  border-radius: 6px;
  font-weight: bold;
}

.grade { background: #0ea5e9; }
.grade1 { background: #07c204; }
.grade2 { background: #aba005; }

.badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: orange;
  color: black;
  padding: 5px 10px;
  font-size: 11px;
  border-radius: 6px;
  font-weight: bold;
}

/* PRICE & BUTTON */
.price {
  color: #22c55e;
  font-size: 22px;
  margin: 10px 0;
}

.button {
  display: block;
  width: 100%;
  box-sizing: border-box; /* Ensures padding doesn't break width */
  padding: 15px;
  font-size: 18px;
  background: #22c55e;
  color: black;
  text-decoration: none;
  border-radius: 12px;
  font-weight: bold;
}

.button:hover {
  background: #16a34a;
}

.stock {
  color: #facc15;
  font-weight: bold;
  font-size: 14px;
}

/* SHIPPING BANNER */
.free-ship {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  background: #22c55e;
  color: black;
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: bold;
  font-size: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

/* FOOTER */
footer {
  background: #020617;
  padding: 40px 20px;
  text-align: center;
  margin-top: 40px;
  border-top: 1px solid #1e293b;
}

/* MOBILE OPTIMIZATION */
@media (max-width: 600px) {
  header { font-size: 26px; }
  .free-ship { position: relative; top: 0; left: 0; text-align: center; margin: 10px; display: block; }
  .card { flex: 1 1 100%; } /* Cards take full width on small phones */
}