/* ===============================================
   Astravon Mercura — ProductCard Component Styles
   Author: House Astravon
   =============================================== */

.product-card {
  background-color: #ffffff;
  width: 100%;
  height: 320px;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  text-align: center;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  padding: 1rem;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

/* Product Image */
.product-image {
  width: 190px;
  height: 175px;
  object-fit: cover;
  border-bottom: 1px solid #e0e0e0;
}



/* Product Details */
.product-details {
  margin-top: 0.8rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Product Name */
.product-title {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.view-details-btn {
  background: none;
  border: none;
  margin-left: 6px;
  font-size: 1.1rem;
  cursor: pointer;
  color: #007bff;
  transition: color 0.2s ease;
}

.view-details-btn:hover {
  color: #0056b3;
}

/* Modal styling */
.product-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.product-modal.hidden {
  display: none;
}

.product-modal-content {
  background: #fff;
  border-radius: 10px;
  padding: 2rem;
  max-width: 420px;
  width: 90%;
  position: relative;
  text-align: center;
}

.modal-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 10px;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Product Description */
.product-description {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Product Price */
.product-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-color);
  /* margin-top: 5px; */
}

.price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
}


/* Action Buttons */
.product-card .product-actions {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 1rem 1rem 1rem;
  gap: 0.5rem;
}

.product-card .btn {
  flex: 1;
  padding: 0.5rem;
  text-align: center;
  border-radius: var(--border-radius);
  font-weight: 600;
  transition: all 0.3s ease;
}

.product-card .btn-add {
  background-color: var(--primary-color);
  color: #ffffff;
}

.product-card .btn-add:hover {
  background-color: var(--accent-color);
}

.product-card .btn-favorite {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.product-card .btn-favorite:hover {
  background-color: var(--primary-color);
  color: #ffffff;
}

.product-grid-sm {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); /* Responsive columns */
  gap: 1.5rem; /* Space between items */
  padding: 1rem; /* Extra padding on the right */
  overflow: hidden;
}

.pagination {
  padding: 16px;
}

#pageIndicator {
  padding-right: 16px;
}

/* Responsive */
@media (max-width: 768px) {
  .product-card {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .product-card .product-name {
    font-size: 0.95rem;
  }
  
  .product-card .product-price {
    font-size: 1rem;
  }
}
