.record-detail-bg {
  background: url("/static/images/productBG.png");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.record-detail-main {
  display: flex;
  flex-direction: row;
  background: rgba(0, 32, 24, 0.95);
  border-radius: 24px;
  box-shadow: 0 4px 24px #0008;
  margin-bottom: 2.5rem;
  margin-top: 2.5rem;
  width: 900px;
  max-width: 90%;
  color: #fff;
  gap: 2.5rem;
  padding: 2%;
  flex-wrap: wrap;
}

.record-detail-cover {
  flex: 1 1 200px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 1rem;
}

.record-detail-cover img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.record-cover-info {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  width: 100%;

}

.record-cover-info p {
  font-size: 1rem;
  padding: 0;
  margin: 0;
}

.record-detail-info {
  flex: 4 1 260px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.7rem;
}

.record-detail-type {
  font-size: 1.1rem;
  font-weight: 700;
  color: #EB7904;
  margin-bottom: 0.2rem;
}

.record-detail-title {
  font-size: 2.2rem;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.record-detail-meta {
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 0.5rem;
  display: flex;
  gap: 1.5rem;
}

.record-detail-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: #EB7904;
  margin-bottom: 0.2rem;
}

.record-detail-label {
  font-size: 1rem;
  color: #fff;
  margin-bottom: 0.7rem;
}

.record-detail-fav {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
}

.action-container {
  display: flex;
  flex-direction: row;
  gap: 1rem;
}

.record-detail-cart,
.record-detail-edit,
.record-detail-unavailable {
  background: #4b8f6e;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0.7rem 2.5rem;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 0.5rem;
  transition: background 0.2s;
  flex: 1;
}

.record-detail-edit {
  background-color: #EB7904;
}

.record-detail-cart:hover {
  background: #357a57;
}

.in-cart {
  background-color: #EB7904;
}

.in-cart:hover {
  background: #d16a04;
}


.record-detail-fav {
  color: #EB7904;
  font-size: 1.1rem;
  margin-bottom: 0.7rem;
  cursor: pointer;
  text-decoration: none;
}

.record-detail-description {
  font-size: 1rem;
  color: #fff;
  margin-top: 0.7rem;
  line-height: 1.5;
  white-space: pre-line;
}

.fav-row {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  text-decoration: none;
}


.record-detail-related {
  width: 900px;
  max-width: 98vw;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.related-section {
  background: rgba(0, 0, 0, 0.45);
  border-radius: 18px;
  padding: 1.5rem 2rem;
  margin-bottom: 0.5rem;
}

.related-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1rem;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1.2rem;
}

@media (max-width: 400px) {
  .related-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}

@media (min-width: 600px) {
  .related-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}


.record-detail-unavailable {
  background-color: transparent;
  color: #C5172E;
  border: 1px solid #C5172E;
  cursor: not-allowed;
  text-align: center;
}

/* The Modal Background */
.modal {
  display: none; /* Hidden by default */
  position: fixed;
  z-index: 2000; /* High z-index to stay on top of everything */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: hidden; 
  background-color: rgba(0, 0, 0, 0.9); /* Darker backdrop */
  backdrop-filter: blur(5px); /* Optional: blurs the background content */
}

.modal-content {
  margin: auto;
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80vmin;
  height:80vmin;
  object-fit: contain;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

/* Animation */
.modal-content {  
  animation-name: zoom;
  animation-duration: 0.3s;
}

@keyframes zoom {
  from {transform: translate(-50%, -50%) scale(0.8); opacity: 0;} 
  to {transform: translate(-50%, -50%) scale(1); opacity: 1;}
}

/* The Close Button */
.close-modal {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #fff;
  font-size: 50px;
  font-weight: 300;
  transition: 0.3s;
  cursor: pointer;
  z-index: 2001;
  line-height: 1;
}

.close-modal:hover {
  color: #ff4444;
  transform: rotate(90deg);
}

/* Caption Text */
#caption {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 700px;
  text-align: center;
  color: #ccc; /* Light grey text */
  padding: 10px 0;
  position: absolute;
  bottom: 20px; /* Positions it at the bottom */
  left: 50%;
  transform: translateX(-50%);
  font-size: 20px;
}

/* Disable scrolling on body when modal is open */
.modal-open {
  overflow: hidden;
}