/* --- PRODUCT GRID (HOME) --- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.product-card {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgb(0 0 0 / 10%);
  overflow: hidden;
  text-align: center;
  padding-bottom: 15px;
  cursor: pointer;
  transition: transform 0.2s;
}

.product-card:hover {
  transform: translateY(-5px);
}

.product-card a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.product-card img {
  max-width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  margin-bottom: 10px;
}

.product-card h3 {
  margin: 10px 0;
  color: #555;
  font-size: 1.2em;
}

.product-card p {
  color: #777;
  font-size: 0.9em;
  padding: 0 15px;
  margin-bottom: 10px;
}

.product-card .price {
  font-size: 1.1em;
  color: #007bff;
  font-weight: bold;
}

.product-card .promo-price {
  font-size: 1.1em;
  color: #dc3545;
  font-weight: bold;
  margin-left: 5px;
}

.product-card .original-price {
  text-decoration: line-through;
  color: #888;
  font-size: 0.9em;
  margin-left: 5px;
}

/* --- PRODUCT DETAILS PAGE --- */
.product-header {
  text-align: center;
  margin-bottom: 30px;
}

.product-header h1 {
  color: #333;
  font-size: 2.5em;
  margin-bottom: 10px;
}

.product-header .category {
  font-size: 1.1em;
  color: #666;
}

.product-content {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  align-items: flex-start;
}

.product-image-container {
  flex: 1;
  min-width: 300px;
  text-align: center;
}

.product-image-container img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgb(0 0 0 / 8%);
}

.product-details {
  flex: 2;
  min-width: 400px;
}

.product-details p {
  font-size: 1.1em;
  color: #555;
  margin-bottom: 15px;
}

.price-section {
  margin: 20px 0;
  font-size: 1.5em;
  font-weight: bold;
}

.display-price {
  color: #007bff;
}

.display-original-price {
  text-decoration: line-through;
  color: #888;
  margin-left: 10px;
  font-size: 0.8em;
}

.product-id-stock-info p {
  margin: 8px 0;
  font-size: 1em;
  color: #444;
}

.product-options-selector-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.product-options-selector-section h2 {
  color: #333;
  font-size: 1.8em;
  margin-bottom: 15px;
}

.product-option-group {
  margin-bottom: 15px;
}

.product-option-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: #444;
}

.product-option-group select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  background-color: white;
  font-size: 1em;
}

.product-option-group .single-option-text {
  font-size: 1em;
  color: #333;
  margin: 0;
  padding: 5px 0;
}

.quantity-selector-section {
  margin-top: 20px;
  margin-bottom: 20px;
}

.quantity-selector-section label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  color: #444;
}

.quantity-selector-section input[type="number"] {
  width: 80px;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1em;
  text-align: center;
  box-sizing: border-box;
}

#placeholder-add-to-cart-btn {
  background-color: #28a745;
  color: white;
  border: none;
  padding: 12px 20px;
  font-size: 1.1em;
  border-radius: 5px;
  cursor: pointer;
  text-align: center;
  flex: 1;
  box-sizing: border-box;
  margin-bottom: 20px;
}

#placeholder-add-to-cart-btn:hover {
  background-color: #218838;
}

#placeholder-add-to-cart-btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

/* --- RELATED PRODUCTS --- */
.related-products-section {
  margin-top: 30px;
  border-top: 1px solid #eee;
  padding-top: 20px;
}

.related-products-section h2 {
  color: #333;
  font-size: 1.8em;
  margin-bottom: 20px;
}

.related-product-card {
  background-color: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 15px;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.related-product-card img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 4px;
}

.related-product-info {
  flex-grow: 1;
}

.related-product-info a {
  text-decoration: none;
  color: #0056b3;
  font-weight: bold;
}

.related-product-info a:hover {
  text-decoration: underline;
}

.related-product-info p {
  margin: 5px 0;
  font-size: 0.95em;
}

.related-product-info .current-price,
.related-product-info .promo-price {
  font-weight: bold;
  color: #333;
}

.related-product-info .promo-price {
  color: #dc3545;
}

.related-product-info .original-price {
  text-decoration: line-through;
  color: #888;
  font-size: 0.9em;
  margin-right: 5px;
}
