
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #1f2937;
  line-height: 1.6;
  font-size: 16px;
}


header {
  background-color: #047857;
  color: #ffffff;
  padding: 30px 20px;
  text-align: center;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(4, 120, 87, 0.5);
  user-select: none;
  position: relative;
  top: 0;
  z-index: 10;
}


.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  padding: 60px 40px;
  max-width: 1200px;
  margin: 40px auto 80px auto;
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
}

.product-grid:hover {
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.15);
}

.product-card {
  background: #ffffff;
  border-radius: 0.5rem;
  padding: 24px 20px 30px 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  border: 1px solid transparent;
  cursor: default;
}

.product-card:hover,
.product-card:focus-within {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  transform: translateY(-5px);
  border-color: #047857;
  cursor: pointer;
  outline: none;
}


.product-card img {
  width: 100%;
  height: 200px;
  object-fit: container;
  border-radius: 0.5rem;
  margin-bottom: 20px;
  transition: transform 0.3s ease;
}

.product-card:hover img,
.product-card:focus-within img {
  transform: scale(1.03);
}


.product-title {
  font-size: 20px;
  font-weight: 700;
  color: #065f46;
  margin-bottom: 10px;
  text-align: center;
  letter-spacing: 0.5px;
  user-select: text;
}


.product-description {
  font-size: 14px;
  color: #4b5563;
  margin-bottom: 18px;
  text-align: center;
  line-height: 1.5;
  min-height: 60px;
  user-select: text;
}


.product-price {
  font-weight: 700;
  font-size: 18px;
  color: #10b981;
  margin-bottom: 24px;
  user-select: text;
}


.buy-btn {
  background-color: #047857;
  color: white;
  padding: 12px 28px;
  border: none;
  border-radius: 0.375rem;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  width: 100%;
  max-width: 260px;
  user-select: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 4px 6px rgba(4, 120, 87, 0.4);
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
  margin-top: 12px; 
}

.buy-btn:hover,
.buy-btn:focus {
  background-color: #065f46;
  box-shadow: 0 6px 12px rgba(4, 120, 87, 0.6);
  outline: none;
}

.buy-btn:active {
  transform: scale(0.97);
  box-shadow: 0 3px 10px rgba(4, 120, 87, 0.5);
}
.product-card:focus-within .buy-btn {
  outline: 3px solid #10b981;
  outline-offset: 3px;
}


.product-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background-color: #ef4444; 
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  user-select: none;
  pointer-events: none;
  z-index: 10;
}


.product-rating {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 20px;
}


.product-rating svg {
  width: 18px;
  height: 18px;
  fill: #fbbf24; 
  filter: drop-shadow(0 0 1px rgba(0,0,0,0.15));
  transition: transform 0.3s ease;
}

.product-rating svg:hover {
  transform: scale(1.2);
  cursor: pointer;
}


.mt-10 { margin-top: 10px !important; }
.mt-15 { margin-top: 15px !important; }
.mt-20 { margin-top: 20px !important; }
.mb-10 { margin-bottom: 10px !important; }
.mb-15 { margin-bottom: 15px !important; }
.mb-20 { margin-bottom: 20px !important; }
.p-10 { padding: 10px !important; }
.p-15 { padding: 15px !important; }
.p-20 { padding: 20px !important; }


@media (max-width: 1024px) {
  .product-grid {
    max-width: 90%;
    padding: 40px 20px;
  }
  .product-card {
    width: 280px;
  }
}

@media (max-width: 768px) {
  .product-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 15px;
  }
  .product-card {
    width: 90%;
    max-width: 350px;
  }
}

@media (max-width: 480px) {
  header {
    font-size: 24px;
    padding: 18px 15px;
  }
  .product-card {
    width: 100%;
    padding: 20px 15px 25px 15px;
  }
  .product-title {
    font-size: 18px;
  }
  .product-description {
    font-size: 14px;
    min-height: auto;
  }
  .product-price {
    font-size: 18px;
  }
  .buy-btn {
    font-size: 14px;
    padding: 12px 20px;
    max-width: 100%;
  }
}


.product-grid::-webkit-scrollbar {
  height: 8px;
}

.product-grid::-webkit-scrollbar-track {
  background: #ffffff;
  border-radius: 10px;
}

.product-grid::-webkit-scrollbar-thumb {
  background: #10b981;
  border-radius: 10px;
}


.buy-btn-tooltip {
  position: relative;
  display: inline-block;
}

.buy-btn-tooltip .tooltip-text {
  visibility: hidden;
  width: 140px;
  background-color: #047857;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 8px 10px;
  position: absolute;
  z-index: 20;
  bottom: 125%;
  left: 50%;
  margin-left: -70px;
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 13px;
  user-select: none;
}

.buy-btn-tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}


.buy-btn:disabled {
  background: #d1d5db;
  cursor: not-allowed;
  box-shadow: none;
}


.buy-btn .spinner {
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top: 3px solid white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  animation: spin 1s linear infinite;
  margin-left: 10px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}


.text-center { text-align: center !important; }
.text-uppercase { text-transform: uppercase !important; }
.font-bold { font-weight: 700 !important; }
.font-semibold { font-weight: 600 !important; }
.cursor-pointer { cursor: pointer !important; }
.user-select-none { user-select: none !important; }
