/* ==============================
   FIXED YACHTS SECTION CSS
   ============================== */

.yachts-section {
  background: white;
  padding: 40px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  margin-bottom: 40px;
}

.yachts-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
}

.yachts-container {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 10px 0;
  width: 100%;
}

.yachts-container::-webkit-scrollbar {
  display: none;
}

/* ================= CARD BASE STYLES ================= */
.yacht-card {
  flex: 0 0 100%; /* Default: full width for mobile */
  scroll-snap-align: start;
  background: #fafafa;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  border-top: 4px solid var(--gold);
  min-height: 400px;
}

.yacht-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.yacht-content {
  padding: 20px;
}

.yacht-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--gold-dark);
}

.yacht-details {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 15px;
  font-style: italic;
}

.yacht-features {
  list-style: none;
  padding: 0;
  margin: 0;
}

.yacht-features li {
  padding: 6px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.9rem;
  position: relative;
  padding-left: 15px;
}

.yacht-features li:before {
  content: "•";
  color: var(--gold);
  position: absolute;
  left: 0;
}

.yacht-features li:last-child {
  border-bottom: none;
}

/* ================= ARROW STYLES ================= */
.scroll-arrow {
  position: absolute;
  top: 140px; /* Middle of 220px images */
  background: rgba(0, 0, 0, 0.3);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s;
  backdrop-filter: blur(5px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.scroll-arrow:hover {
  background: rgba(0, 0, 0, 0.5);
  color: white;
  transform: scale(1.05);
}

.scroll-arrow.left {
  left: 15px;
}

.scroll-arrow.right {
  right: 15px;
}

.scroll-arrow.disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.scroll-arrow.disabled:hover {
  background: rgba(0, 0, 0, 0.3);
  color: white;
  transform: none;
}

/* Hide arrows when not needed */
.yachts-wrapper.hide-arrows .scroll-arrow {
  display: none !important;
}

/* ================= LAYOUT VARIANTS ================= */

/* SINGLE YACHT LAYOUT */
.yacht-single-layout {
  display: flex;
  gap: 30px;
  align-items: stretch;
  background: #fafafa;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  border-top: 4px solid var(--gold);
  width: 100%;
}

.yacht-single-image {
  flex: 0 0 50%;
}

.yacht-single-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.yacht-single-content {
  flex: 0 0 50%;
  padding: 25px 30px 25px 25px;
  display: flex;
  flex-direction: column;
}

/* TWO YACHTS LAYOUT */
.yachts-container.two-yachts .yacht-card {
  flex: 0 0 calc(50% - 10px);
}

/* THREE YACHTS LAYOUT - FIX FOR YOUR ISSUE */
.yachts-container:not(.single-layout):not(.two-yachts) .yacht-card {
  flex: 0 0 calc(33.333% - 14px);
}

/* ================= RESPONSIVE DESIGN ================= */

/* Desktop (769px and above) - Show multiple columns */
@media (min-width: 769px) {
  .yachts-container:not(.single-layout):not(.two-yachts) .yacht-card {
    flex: 0 0 calc(33.333% - 14px);
  }
}

/* Tablet (768px and below) */
@media (max-width: 768px) {
  .yachts-section {
    padding: 30px 20px;
  }
  
  .yachts-container {
    gap: 15px;
  }
  
  /* Single yacht becomes vertical */
  .yacht-single-layout {
    flex-direction: column;
  }
  
  .yacht-single-image {
    flex: 0 0 auto;
    width: 100%;
  }
  
  .yacht-single-image img {
    height: 220px;
  }
  
  .yacht-single-content {
    flex: 0 0 auto;
    width: 100%;
    padding: 20px 25px;
  }
  
  /* Two yachts become vertical */
  .yachts-container.two-yachts .yacht-card {
    flex: 0 0 100%;
  }
  
  /* Three yachts become vertical on tablet */
  .yachts-container:not(.single-layout):not(.two-yachts) .yacht-card {
    flex: 0 0 100%;
  }
  
  /* Adjust arrows */
  .scroll-arrow {
    width: 35px;
    height: 35px;
    top: 140px; /* Maintain image-relative positioning */
  }
  
  .scroll-arrow.left {
    left: 10px;
  }
  
  .scroll-arrow.right {
    right: 10px;
  }
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
  .yachts-section {
    padding: 25px 15px;
  }
  
  /* Hide arrows on mobile */
  .scroll-arrow {
    display: none !important;
  }
}