* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f1f3f6;
}

/* NAVBAR */
.navbar {
  background: #2874f0;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  color: white;
}

.logo {
  font-size: 22px;
  font-weight: bold;
}

#search {
  flex: 1;
  padding: 10px;
  border-radius: 4px;
  border: none;
}

.cart {
  font-weight: bold;
}

/* FILTERS */
.filters {
  padding: 15px;
  display: flex;
  gap: 10px;
}

select {
  padding: 8px;
}

/* PRODUCTS */
.products {
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.card {
  background: white;
  padding: 15px;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.card img {
  width: 100%;
  height: 180px;
  object-fit: contain;
}

.card h3 {
  font-size: 14px;
  height: 40px;
  overflow: hidden;
}

.price {
  color: #388e3c;
  font-weight: bold;
}

/* LOADER */
.loader {
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.skeleton {
  height: 260px;
  background: linear-gradient(90deg,#ddd,#eee,#ddd);
  animation: load 1.2s infinite;
}

@keyframes load {
  0% { background-position: 0 }
  100% { background-position: 200px }
}

/* MODAL */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
}

.modal-content {
  background: white;
  margin: 10% auto;
  padding: 20px;
  width: 300px;
  border-radius: 6px;
}

.modal-content img {
  width: 100%;
  height: 200px;
  object-fit: contain;
}

#close {
  float: right;
  cursor: pointer;
  font-size: 22px;
}

button {
  width: 100%;
  padding: 10px;
  background: #ff9f00;
  border: none;
  color: white;
  font-weight: bold;
  cursor: pointer;
}
