/* Masonry Grid for Multiple Media */
/* Gallery Layout */
.gallery-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  max-height: 600px;
}

.main-media {
  grid-column: 1;
  border-radius: 10px;
  overflow: hidden;
  height: 100%;
  cursor: pointer;
  aspect-ratio: 16/9;
}

.main-media img,
.main-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sub-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 15px;
}

.sub-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 16/9;
}

.sub-item img,
.sub-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.sub-item:hover img,
.sub-item:hover video {
  transform: scale(1.05);
}

.show-all-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  cursor: pointer;
  overflow: hidden;
  aspect-ratio: 16/9;
}

.show-all-btn img,
.show-all-btn video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.6);
}

.show-all-overlay {
  position: absolute;
  color: white;
  font-size: 1.2em;
  text-align: center;
  background: rgba(0, 0, 0, 0.5);
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.show-all-btn:hover {
  background: rgba(0, 0, 0, 0.9);
}

/* Keep your existing lightbox styles */
/* Single Media Centered Display */
.single-media {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 60%;
  margin: auto;
  cursor: pointer;
}

.single-media img,
.single-media video {
  width: 100%;
  max-height: 400px;
  object-fit: contain;
  border-radius: 10px;
  transition: transform 0.3s ease-in-out;
}

.single-media:hover img,
.single-media:hover video {
  transform: scale(1.03);
}

/* Lightbox (Popup) */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.lightbox-content {
  max-width: 90vw;
  max-height: 90vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox img,
.lightbox video {
  max-width: 100%;
  max-height: 100vh;
  /* Full height but maintains aspect ratio */
  object-fit: contain;
  /* Ensures the full image/video fits inside */
  border-radius: 10px;
}

/* Navigation & Close Buttons */
.lightbox .close-btn,
.lightbox .prev-btn,
.lightbox .next-btn {
  position: absolute;
  font-size: 30px;
  color: white;
  cursor: pointer;
  padding: 10px;
}

.lightbox .close-btn {
  top: 10px;
  right: 20px;
}

.lightbox .prev-btn {
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox .next-btn {
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}

#lightbox video {
  pointer-events: auto;
  /* Allow interactions */
  z-index: 1001;
  /* Ensure it's above the overlay */
}

#lightbox {
  z-index: 1000;
  /* Make sure it's below video */
  background: rgba(0, 0, 0, 0.8);
  /* Keep background dimmed */
}

.lightbox-content {
  pointer-events: none;
}

#lightbox-video {
  pointer-events: auto;
}

@media (max-width: 767px) {
  .gallery-container {
    grid-template-columns: 1fr; /* Single column on mobile */
    max-height: none; /* Remove the fixed max-height */
    margin-bottom: 20px; /* Add spacing below the gallery */
  }

  /* Adjust the gallery items if necessary */
  .main-media,
  .sub-item,
  .show-all-btn {
    aspect-ratio: auto; /* Remove fixed aspect ratio */
    height: auto;
  }

  .product-detail-container {
    margin-top: 20px; /* Ensure product details have spacing on top */
  }

  .single-media {
    width: 100%;
  }

  .lightbox-content {
    max-width: 95vw;
    max-height: 80vh;
  }
}
/* Product Detail Page Styles */
.product-detail-container {
  margin: 0 auto;
}

/* Product Header */
.product-header {
  margin-bottom: 30px;
  position: relative;
}

.product-type-badge {
  display: inline-block;
  background-color: #f0f0f0;
  color: #666;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 10px;
}

.product-title {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 10px 0;
  color: #000000;
  text-align: left;
}

/* Override any other product title styles */
.product-title,
h1.product-title,
.card-title.product-title {
  color: #000000 !important;
  text-shadow: none !important;
}

.product-subcategory {
  color: #000000 !important;
  font-size: 16px;
  margin-bottom: 10px;
  font-weight: 500;
}

.product-views {
  position: absolute;
  top: 0;
  right: 0;
  color: #aaa;
  font-size: 14px;
}

/* Product Content Layout */
.product-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
}

@media (max-width: 768px) {
  .product-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1200px) {
  .product-content {
    display: block !important;
    grid-template-columns: 1fr !important;
    width: 100% !important;
  }
  .product-main,
  .business-info {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 20px !important;
    box-sizing: border-box !important;
  }
}

/* Product Main Content */
.product-main {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  padding: 25px;
}

.product-price {
  font-size: 30px;
  color: #2e7d32;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: baseline;
}

.product-price .currency {
  font-size: 18px;
  margin-right: 2px;
}

.product-price .unit {
  font-size: 17px;
  color: #666;
  font-weight: normal;
  margin-left: 4px;
}

.product-description {
  margin-bottom: 25px;
}

.product-description h3 {
  font-size: 18px;
  margin-bottom: 12px;
  color: #333;
  font-weight: 600;
}

.description-content {
  line-height: 1.6;
  color: #555;
}

/* Inventory Status */
.product-inventory {
  margin: 20px 0;
  padding: 15px;
  background-color: #f9f9f9;
  border-radius: 6px;
}

.stock-status {
  display: flex;
  align-items: center;
  font-weight: 500;
  margin-bottom: 10px;
}

.stock-status i {
  margin-right: 8px;
}

.in-stock {
  color: #2e7d32;
}

.out-of-stock {
  color: #c62828;
}

.stock-message {
  color: #666;
  font-size: 14px;
  margin-top: 5px;
}

/* Quantity Selector */
.quantity-selector {
  margin: 15px 0;
}

.quantity-selector label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #333;
}

.quantity-controls {
  display: flex;
  align-items: center;
  width: fit-content;
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
}

.quantity-btn {
  background-color: #f5f5f5;
  border: none;
  color: #333;
  font-size: 16px;
  font-weight: bold;
  width: 36px;
  height: 36px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.quantity-btn:hover {
  background-color: #e0e0e0;
}

.quantity-controls input {
  width: 50px;
  height: 36px;
  text-align: center;
  border: none;
  border-left: 1px solid #ddd;
  border-right: 1px solid #ddd;
  font-size: 14px;
}

.quantity-controls input:focus {
  outline: none;
}

/* Booking Section */
.booking-section {
  margin: 25px 0;
}

.booking-section h3 {
  font-size: 20px;
  margin-bottom: 10px;
  color: #333;
}

.booking-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 15px;
}

@media (max-width: 600px) {
  .booking-container {
    grid-template-columns: 1fr;
  }
}

.booking-calendar-wrap,
.booking-timeslots {
  background-color: #f9f9f9;
  padding: 15px;
  border-radius: 6px;
}

.booking-calendar-wrap h4,
.booking-timeslots h4 {
  font-size: 16px;
  margin-bottom: 10px;
  color: #333;
}

.business-hours {
  font-size: 14px;
  color: #666;
  margin-bottom: 15px;
}

.time-slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
}

.select-date-prompt {
  grid-column: 1 / -1;
  color: #888;
  font-style: italic;
}

.person-count {
  margin-top: 20px;
}

.feedback-message {
  color: #d32f2f;
  font-size: 13px;
  margin-top: 8px;
}

/* Product Actions */
.product-actions {
  margin-top: 30px;
}

.primary-btn {
  background-color: #2e7d32; /* Green color - can be adjusted to match your brand */
  color: white;
  border: none;
  border-radius: 4px;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
  display: inline-flex;
  align-items: center;
}

.primary-btn i {
  margin-right: 8px;
}

.primary-btn:hover {
  background-color: #1b5e20;
}

.secondary-btn {
  background-color: #f5f5f5;
  color: #333;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 10px 20px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
  display: inline-block;
  text-decoration: none;
  text-align: center;
  margin-top: 10px;
}

.secondary-btn:hover {
  background-color: #e0e0e0;
}

.login-prompt {
  background-color: #fff3e0;
  border-left: 4px solid #ff9800;
  padding: 15px;
  border-radius: 4px;
}

.login-prompt p {
  margin-bottom: 10px;
  color: #333;
}

.cart-feedback {
  margin-top: 10px;
  padding: 10px;
  border-radius: 4px;
}

/* Business Info */
.business-info {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  padding: 25px;
}

.business-info h3 {
  font-size: 20px;
  margin-bottom: 20px;
  color: #333;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.business-address {
  margin-bottom: 20px;
}

.business-address h4 {
  margin-bottom: 12px;
  color: #333;
  font-size: 18px;
}

.business-address .address-link {
  display: block;
  text-decoration: none;
  color: #1976d2;
  cursor: pointer;
  padding: 12px 15px;
  background-color: #f8f9fa;
  border-radius: 4px;
  line-height: 1.5;
  transition: all 0.2s ease;
  border: 1px solid #e9ecef;
}

.business-address .address-link:hover {
  background-color: #e9ecef;
  color: #0d47a1;
  border-color: #dee2e6;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.business-address .address-link i {
  margin-right: 8px;
  font-size: 14px;
  vertical-align: middle;
  position: relative;
  top: -1px;
  color: #1976d2;
}

.business-address .address-link:hover i {
  color: #0d47a1;
}

/* Modal Styles */
.modal-content {
  border-radius: 8px;
  overflow: hidden;
}

.modal-header {
  background-color: #f5f5f5;
  border-bottom: 1px solid #e0e0e0;
}

.modal-footer {
  border-top: 1px solid #e0e0e0;
}

/* Add these to your existing styles to make calendar events more attractive */
#booking-calendar .fc-day-today {
  background-color: #e8f5e9 !important;
}

#booking-calendar .fc-day-header {
  background-color: #f5f5f5;
  padding: 10px 0;
}

#booking-calendar .fc-event {
  border-radius: 4px;
  border: none;
  padding: 2px 4px;
}

/* Force product title to always be black, even if other CSS or parent color interferes */
.product-header .product-title,
.product-header h1.product-title {
  color: #000 !important;
  text-shadow: none !important;
  background: none !important;
}

.product-detail-title {
    font-size: 2rem !important;
    font-weight: 700 !important;
    color: #000 !important;
    line-height: 1.2 !important;
}

@media (max-width: 768px) {
    .product-detail-title {
        font-size: 2rem !important;
    }
}

/* Only justify product description and details */
.product-description p,
.description-content p,
.section-content p {
    text-align: justify;
}
