/* ============================================================================
   DJY Boats Details - Complete Styles
   Includes: Image Carousel + Lightbox + Price Calendar Swiper
   ============================================================================ */

/* ============================================================================
   GALLERY - 2 ROW SLIDER
   ============================================================================ */

/* Gallery container */
#nanogallery2 {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 20px 0;
  position: relative;
  overflow: hidden; /* Prevent slides from expanding viewport */
}

/* Gallery swiper wrapper */
.gallery-swiper-wrapper {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: hidden; /* Contain oversized slides */
}

/* Gallery swiper container */
.gallery-swiper {
  width: 100% !important;
  max-width: 100% !important;
  height: auto;
  overflow: hidden;
}

/* Gallery slide */
.gallery-slide {
  height: auto;
  width: 100%;
  overflow: hidden;
  border-radius: 8px;
  background-color: #f0f0f0;
}

/* Gallery image - centered and stretched */
.gallery-image {
  width: 100%;
  height: 300px;
  display: block;
  object-fit: cover;
  object-position: center;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-image:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* Gallery navigation arrows */
.gallery-prev,
.gallery-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: rgba(0, 24, 58, 0.8);
  border-radius: 50%;
  color: white !important;
  z-index: 10;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.gallery-prev {
  left: 10px;
  top: 65%;
}

.gallery-next {
  right: 10px;
  top: 65%;
}

.gallery-prev:hover,
.gallery-next:hover {
  background: rgba(0, 24, 58, 1);
  transform: translateY(-50%) scale(1.1);
}

.gallery-prev::after,
.gallery-next::after {
  font-size: 24px;
  font-weight: bold;
  color: white;
}

.swiper-button-disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.swiper-button-disabled:hover {
  transform: translateY(-50%);
}

/* Lightbox overlay */
#lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.8);
}

.lightbox-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 0;
  cursor: pointer;
}

#lightbox-img {
  max-width: 90%;
  max-height: 90%;
  z-index: 1;
  cursor: zoom-out;
  border-radius: 8px;
  object-fit: contain;
}

/* Lightbox navigation arrows */
.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: rgba(0, 24, 58, 0.8);
  border: none;
  border-radius: 50%;
  color: white;
  z-index: 2;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: 0;
  padding: 0;
}

.lightbox-prev::before,
.lightbox-next::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 24px;
  background: currentColor;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

.lightbox-prev {
  left: 20px;
}

.lightbox-prev::before {
  -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"/></svg>');
  mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"/></svg>');
}

.lightbox-next {
  right: 20px;
}

.lightbox-next::after {
  -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/></svg>');
  mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/></svg>');
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(0, 24, 58, 1);
  transform: translateY(-50%) scale(1.1);
}

.lightbox-arrow-disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.lightbox-arrow-disabled:hover {
  background: rgba(0, 24, 58, 0.8);
  transform: translateY(-50%);
}

/* Responsive adjustments for gallery */
@media (max-width: 768px) {
  .gallery-image {
    height: 200px;
  }

  .gallery-prev,
  .gallery-next {
    width: 40px;
    height: 40px;
  }

  .gallery-prev::after,
  .gallery-next::after {
    font-size: 20px;
  }

  .lightbox-prev,
  .lightbox-next {
    width: 40px;
    height: 40px;
  }

  .lightbox-prev::before,
  .lightbox-next::after {
    width: 20px;
    height: 20px;
  }

  .lightbox-prev {
    left: 15px;
  }

  .lightbox-next {
    right: 15px;
  }
}

@media (max-width: 480px) {
  .gallery-image {
    height: 150px;
  }

  /* Force proper slide width on mobile - 2 per view */
  .gallery-swiper .swiper-slide {
    width: calc(50% - 4px) !important;
    max-width: calc(50% - 4px) !important;
  }

  .gallery-prev,
  .gallery-next {
    width: 36px;
    height: 36px;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .gallery-prev::after,
  .gallery-next::after {
    font-size: 18px;
  }

  .gallery-prev {
    left: 5px;
  }

  .gallery-next {
    right: 5px;
  }

  .lightbox-prev,
  .lightbox-next {
    width: 36px;
    height: 36px;
  }

  .lightbox-prev::before,
  .lightbox-next::after {
    width: 18px;
    height: 18px;
  }

  .lightbox-prev {
    left: 10px;
  }

  .lightbox-next {
    right: 10px;
  }
}

/* ============================================================================
   PRICE CALENDAR SWIPER STYLES
   ============================================================================ */

/* Swiper container */
.pricecalendarwrapper {
  position: relative;
  width: 100%;
  max-width: 100%; /* Constrain in flex parents */
  min-width: 0; /* Allow shrinking in flex */
  margin: 3rem 0;
  margin-top: 150px;
  overflow: hidden; /* Contain the swiper */
}

.pricecalendarwrapper .swiper {
  max-width: 100%;
  overflow: hidden;
  padding-bottom: 10px;
}

.pricecalendarwrapper h2 {
  margin-bottom: 1.5rem;
}

.swiper-wrapper {
  padding-top: 10px;
}

/* Swiper slide styling */
.pricecalendarwrapper .swiper-slide {
  height: auto;
  width: 200px; /* Fixed width for proper centering */
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 8px;
  border: 2px solid transparent;
  position: relative;
  flex-shrink: 0; /* Prevent shrinking */
}

.pricecalendarwrapper .swiper-slide:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Active slide (currently selected) */
.pricecalendarwrapper .swiper-slide-active {
  border-color: #00183a;
  box-shadow: 0 4px 16px rgba(0, 24, 58, 0.2);
}

.pricecalendarwrapper .swiper-slide.unavailable {
  opacity: 0.5;
  cursor: not-allowed;
  position: relative;
}

.pricecalendarwrapper .swiper-slide.unavailable::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    45deg,
    rgba(255, 0, 0, 0.1),
    rgba(255, 0, 0, 0.1) 10px,
    transparent 10px,
    transparent 20px
  );
  pointer-events: none;
  border-radius: 6px;
  z-index: 1;
}

.slide-unavailable-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 0, 0, 0.9);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: bold;
  z-index: 2;
  white-space: nowrap;
}

/* Slide date */
.swipperslidedate {
  font-size: 0.875rem;
  font-weight: 600;
  color: #576375;
  margin-bottom: 0.5rem;
  text-align: center;
}

/* Slide block */
.swipperslideblock {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 6px;
}

/* Slide prices */
.swipperslideprice {
  font-size: 1rem;
  font-weight: 600;
  color: #576375;
  text-decoration: line-through;
  text-align: center;
}

.swipperslidediscount {
  font-size: 1.25rem;
  font-weight: 700;
  color: #00183a;
  text-align: center;
}

.swipperslidediscountsign {
  font-size: 0.875rem;
  font-weight: 700;
  color: #28a745;
  background: #d4edda;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  text-align: center;
}

/* Swiper navigation buttons */
.pricecalendarwrapper .swiper-button-prev,
.pricecalendarwrapper .swiper-button-next {
  width: 44px;
  height: 44px;
  background: #00183a;
  border-radius: 50%;
  color: white !important;
  transition: all 0.3s ease;
}

.pricecalendarwrapper .swiper-button-prev:hover,
.pricecalendarwrapper .swiper-button-next:hover {
  background: #001f4d;
  transform: scale(1.1);
}

.pricecalendarwrapper .swiper-button-prev::after,
.pricecalendarwrapper .swiper-button-next::after {
  font-size: 20px;
  font-weight: bold;
}

.pricecalendarwrapper .swiper-button-disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.pricecalendarwrapper .swiper-button-disabled:hover {
  transform: none;
}

/* ============================================================================
   DATEPICKER STYLES
   ============================================================================ */

/* Apply white background to the date input field */
.date.date-field.input.style---bg-white {
  background-color: white;
  color: #576375;
}

/* Style the placeholder text */
.date.date-field.input.style---bg-white::placeholder {
  color: #576375;
}

/* ============================================================================
   UTILITY STYLES
   ============================================================================ */

/* Hide Webflow badge */
.w-webflow-badge {
  display: none !important;
}

/* Loading state */
.pricecalendarwrapper.loading .swiper-wrapper {
  opacity: 0.5;
  pointer-events: none;
}

.pricecalendarwrapper.loading::after {
  content: 'Loading...';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.125rem;
  font-weight: 600;
  color: #00183a;
  z-index: 10;
}

/* ============================================================================
   RESPONSIVE ADJUSTMENTS
   ============================================================================ */

@media (max-width: 768px) {
  .pricecalendarwrapper .swiper-button-prev,
  .pricecalendarwrapper .swiper-button-next {
    width: 36px;
    height: 36px;
  }

  .pricecalendarwrapper .swiper-button-prev::after,
  .pricecalendarwrapper .swiper-button-next::after {
    font-size: 16px;
  }

  .pricecalendarwrapper .swiper-slide {
    width: 180px; /* Slightly smaller on tablets */
  }

  .swipperslideblock {
    padding: 0.75rem;
  }

  .swipperslidediscount {
    font-size: 1.125rem;
  }
}

@media (max-width: 480px) {
  .pricecalendarwrapper .swiper-button-prev {
    left: 4px;
  }

  .pricecalendarwrapper .swiper-button-next {
    right: 4px;
  }

  .pricecalendarwrapper {
    margin: 2rem 0;
  }

  .pricecalendarwrapper .swiper-slide {
    width: 160px; /* Smaller on mobile */
  }
}
