@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Poppins', sans-serif;
  background-color: #f2f4f7;
  color: #222;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
}

/* HEADER */
header {
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}
header h1 {
  color: #111;
  font-weight: 600;
}
nav a {
  margin-left: 20px;
  color: #555;
  text-decoration: none;
  font-weight: 500;
}
nav a:hover {
  color: #007bff;
}

/* CATEGORY TITLE */
.category-title {
  text-align: center;
  font-size: 1.8rem;
  margin: 2rem 0 1rem;
  color: #333;
}

/* GRID */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}

/* PRODUCT CARD */
.product-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
  padding: 1rem;
  transition: all 0.3s ease;
  text-align: center;
}
.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

/* IMAGE SLOT */
.card-image {
  width: 100%;
  height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 10px;
  background: #f9fafb;
  margin-bottom: 1rem;
}
.card-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  cursor: pointer;
  transition: transform 0.3s ease;
}
.card-image img:hover {
  transform: scale(1.05);
}

/* CONTENT */
.card-content h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}
.card-content .price {
  font-size: 1.2rem;
  font-weight: 600;
  color: #007bff;
  margin-bottom: 1rem;
}
.btn-buy {
  background-color: #007bff;
  border: none;
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
.btn-buy:hover {
  background-color: #0056b3;
}

/* FOOTER */
footer {
  margin-top: 3rem;
  background: #fff;
  text-align: center;
  padding: 1rem;
  color: #666;
  font-size: 0.9rem;
  border-top: 1px solid #eaeaea;
}

/* 🔍 IMAGE MODAL */
.img-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  padding-top: 80px;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.9);
}
.img-modal .modal-content {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 600px;
  border-radius: 10px;
}
#caption {
  text-align: center;
  color: #ccc;
  margin-top: 15px;
}
.close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #fff;
  font-size: 40px;
  cursor: pointer;
  font-weight: bold;
}
.close:hover {
  color: #f00;
}

/* 🛒 BUY POPUP */
.buy-popup {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
}
.popup-content {
  background: #fff;
  padding: 2rem;
  border-radius: 10px;
  text-align: center;
  width: 300px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
.popup-buttons {
  display: flex;
  justify-content: space-around;
  margin-top: 1.5rem;
}
.popup-buttons button {
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
}
#confirmBuy {
  background-color: #007bff;
  color: white;
}
#confirmBuy:hover {
  background-color: #0056b3;
}
#cancelBuy {
  background-color: #e0e0e0;
}
#cancelBuy:hover {
  background-color: #ccc;
}
* {
  user-select: none;
}