/* =========================== */
/* Global Reset & Base Styles  */
/* =========================== */

body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', sans-serif; 
  background: #ffffff;
  color: #1a1a1a;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

footer {
  text-align: center;
  padding: 40px;
  font-size: 0.9rem;
  color: #aaa;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  border-bottom: 1px solid #eaeaea;
}

header h1 {
  font-size: 1.5rem;
  margin: 0;
}

header nav a {
  margin-left: 20px;
  text-decoration: none;
  color: #1a1a1a;
  font-weight: 500;
}

.setup-account-btn {
  padding: 0.5em 1em;
  background-color: #000;
  color: #fff;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  margin-left: 1em;
  transition: background-color 0.3s ease;
  display: inline-block;
  text-align: center;
}
.setup-account-btn:hover {
  background-color: #444;
}

@media (max-width: 768px) {
  html {
    font-size: 14px;
  }
  header {
    position: relative;  
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    padding: 10px 20px;
  }
  header h1 {
    font-size: 1.2rem;
    order: 1;
  }
  .setup-account-btn {
    position: absolute;
    top: 10px;
    right: 20px;
    margin-left: 0;
    order: 2;
  }
  header nav {
    order: 3;
    width: 100%;
    text-align: center;
    margin-top: 40px;
  }
}

.container {
  display: flex;
  gap: 2rem;
  margin-top: 1rem;
  margin-left: 1rem;
  align-items: flex-start;
}

.filters {
  width: 250px;
  padding: 1.5rem;
  background: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 0 20px rgba(0,0,0,0.1);
  box-sizing: border-box;
  transform: translateX(-300px);
  opacity: 0;
  transition: transform 0.4s ease-out, opacity 0.4s ease-out;
}

.filters.slide-in {
  transform: translateX(0);
  opacity: 1;
}

.grid {
  flex: 1;
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
  box-sizing: border-box;
}

.filter-block {
  margin-bottom: 20px;
}
.filter-block label,
.filter-block p {
  font-weight: bold;
  margin-bottom: 7px;
}
.filter-block input[type="checkbox"],
.filter-block input[type="number"] {
  margin-right: 5px;
}
.filter-block input[type="text"],
.filter-block select {
  width: 100%;
  box-sizing: border-box;
  padding: 5px;
}

.card {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 0.75rem;
  box-shadow: 0 0 20px rgba(0,0,0,0.1);
  padding: 1.5rem;
  /* Changed from `text-align: center;` to `text-align: left;` */
  text-align: left;
  position: relative;
  max-width: 240px; 
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  /* START invisible */
  transform: translateX(-50px);
  opacity: 0;
  transition: transform 0.2s ease-out, opacity 0.2s ease-out;
}

/* When .slide-in is added, it becomes visible */
.card.slide-in {
  transform: translateX(0);
  opacity: 1;
}

.product-img {
  display: block;
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 16px;
}

.label {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background-color: #10b981;
  color: white;
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
  font-weight: bold;
}
.discount {
  background-color: #dc2626;
}

.price {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.old-price {
  text-decoration: line-through;
  color: #9ca3af;
  margin-left: 0.4rem;
  font-size: 0.9rem;
}

.name {
  font-size: 1rem;
  font-weight: 600;
  margin: 0.25rem 0;
}

.stars {
  color: #000;
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
}

.desc {
  font-size: 0.85rem;
  color: #6b7280;
  margin-bottom: 0.75rem;
  min-height: 0.2rem;
}

button {
  padding: 0.5rem 1.5rem;
  border: 1px solid #000;
  border-radius: 10px;
  background: #000;
  color: #fff;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
  margin-bottom: 1rem;
}
button:hover {
  background: #fff;
  color: #000;
}

.availability {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: auto;
  display: block;
}

.filters input[type="number"],
.filters input[type="text"] {
  margin-bottom: 1rem;
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 0.5rem;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  background: #fff;
}

.filters input[type="number"]:focus,
.filters input[type="text"]:focus {
  border-color: #10b981;
  box-shadow: 0 0 5px rgba(16, 185, 129, 0.5);
}
