/* ============================================================
   Pre-owned Yachts Block --- style.css
   Matched to Figma design
   ============================================================ */

/* ------ Section ------ */
.myb-preowned-block.pre-owned {
    padding: 72px 0 88px;
    background: #ffffff;
}

/* ------ Section title ------ */
.myb-preowned-block .myb-section-title {
    font-family: 'Playfair Display', Georgia, serif !important;
    font-size: 44px !important;
    font-weight: 600 !important;
    color: #917240 !important;
    text-align: left !important;
    margin: 0 0 12px !important;
    line-height: 1.15 !important;
    text-transform: none !important;
}

/* ------ Gold underline --- wider to match Figma ------ */
.myb-section-underline {
    width: 140px;
    height: 4px;
    background: #031D41;
    margin: 0 0 48px;
}

/* ------ Grid ------ */
.myb-po-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 52px;
}

/* ------ Card ------ */
.myb-preowned-block .pre-owned-meta {
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.myb-preowned-block .pre-owned-meta:hover {
    box-shadow: 0 8px 32px rgba(0,0,0,0.10);
    transform: translateY(-4px);
}

/* ------------------------------------------------------------------------------------
   SLIDER
   ------------------------------------------------------------------------------------ */
.myb-slider {
    position: relative;
    overflow: hidden;
    background: #d8d8d8;
    aspect-ratio: 5 / 3;   /* taller than before to match Figma */
    line-height: 0;
}

.myb-slides-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.myb-slide {
    display: none;
    position: absolute;
    inset: 0;
    text-decoration: none;
}

.myb-slide.is-active {
    display: block;
}

.myb-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.myb-preowned-block .pre-owned-meta:hover .myb-slide.is-active img {
    transform: scale(1.04);
}

.myb-no-image {
    width: 100%;
    height: 100%;
    background: #d0d0d0;
}

/* ------ Prev / Next arrows ------ */
.myb-sl-prev,
.myb-sl-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    border: none;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    font-size: 24px;
    line-height: 1;
    color: #222;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    opacity: 0;
    transition: opacity 0.25s, color 0.2s, background 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    background-color: transparent !important;
}

    /* .myb-preowned-block .pre-owned-meta:hover .myb-sl-prev,
    .myb-preowned-block .pre-owned-meta:hover .myb-sl-next {
        opacity: 1;
    } */

.myb-sl-prev { left: 10px; opacity: 1;}
.myb-sl-next { right: 10px; opacity: 1;}

.myb-sl-prev:hover,
.myb-sl-next:hover {
    background: #ffffff00;
    color: #031D41;
}

/* ------ Dots ------ */
.myb-sl-dots {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 10;
}

.myb-sl-dot {
    display: block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #917240a6;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    flex-shrink: 0;
}

.myb-sl-dot.is-active,
.myb-sl-dot:hover {
    background: #b8945a;
    transform: scale(1.35);
}

/* ------------------------------------------------------------------------------------
   TOP-RIGHT ICON BADGES (Figma: wave + bed)
   ------------------------------------------------------------------------------------ */
.myb-top-icons {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 12;
    display: flex;
    flex-direction: column;
    pointer-events: none;
}
.myb-top-icons .topbtn{
    background-color: #fff;
    color: #98723D;
}
.myb-top-icons .btmbtn{
    background-color: #98723D;
    color: #fff;
}
.myb-top-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    backdrop-filter: blur(2px);
}

.myb-top-icon svg {
    flex-shrink: 0;
}

/* ------------------------------------------------------------------------------------
   BOTTOM INFO STRIP
   Year -- Length -- Location
   ------------------------------------------------------------------------------------ */
.myb-img-badges {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 11;
    display: flex;
    align-items: center;
    gap: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.0) 100%);
    padding: 20px 12px 10px;
    pointer-events: none;
}

.myb-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #ffffff;
    font-family: inherit;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.myb-badge + .myb-badge::before {
    content: '\00B7';
    margin-right: 4px;
    opacity: 0.7;
}

.myb-badge svg {
    flex-shrink: 0;
    opacity: 0.9;
}

/* ------------------------------------------------------------------------------------
   INFO ROW  (below image)
   ------------------------------------------------------------------------------------ */
.myb-preowned-block .pp-flx {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 18px 18px;
    gap: 10px;
}

.myb-preowned-block .pp-lft {
    flex: 1;
    min-width: 0;
}

/* Boat name */
.myb-preowned-block .pp-lft h4 {
    font-family:  'Inter', sans-serif;
    font-size: 20px !important;
    font-weight: 600 !important;
    color: #917240 !important;
    margin: 0 0 12px !important;
    line-height: 1.3 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.05em !important;
    text-transform: uppercase !important;
}

/* Price --- "1.850.000 --- INCL.VAT" format */
.myb-preowned-block .pre-owned-price {
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.4;
    letter-spacing: 0.01em;
}

.myb-preowned-block .price-cur {
    font-weight: 400;
    color: #1a1a1a;
    margin-left: 3px;
}

.myb-preowned-block .price-vat {
    font-weight: 400;
    margin-left: 4px;
    letter-spacing: 0.04em;
}

/* ------ View button ------ */
.myb-preowned-block .pp-right {
    flex-shrink: 0;
}

.myb-preowned-block .view-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    color: #031D41 !important;
    text-decoration: none !important;
    letter-spacing: 0.02em;
    transition: color 0.2s;
    white-space: nowrap;
}

.myb-preowned-block .view-btn .view-arrow {
    transition: transform 0.25s ease;
    flex-shrink: 0;
}

.myb-preowned-block .view-btn:hover {
    color: #b8945a !important;
}

.myb-preowned-block .view-btn:hover .view-arrow {
    transform: translateX(4px);
}

/* ------ CTA "VIEW ALL" button ------ */
.yacht-btn-wrap {
    text-align: center;
    margin-top: 8px;
}



/* ------ Error / placeholder ------ */
.myb-api-error,
.myb-preowned-editor-placeholder {
    padding: 24px;
    background: #f9f9f9;
    border: 1px dashed #ccc;
    border-radius: 4px;
    color: #666;
    font-size: 14px;
    text-align: center;
}

/* ------------------------------------------------------------------------------------
   EDITOR PREVIEW
   ------------------------------------------------------------------------------------ */
.myb-preowned-editor-wrap {
    padding: 28px 24px;
    background: #fff;
    border: 1px dashed #c5c5c5;
    border-radius: 4px;
}

.myb-preowned-editor-header { margin-bottom: 24px; }

.myb-preowned-editor-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 10px;
    text-align: left;
}

.myb-preowned-editor-underline {
    width: 52px;
    height: 3px;
    background: #b8945a;
    border-radius: 2px;
}

.myb-preowned-editor-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.myb-preowned-editor-card {
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    overflow: hidden;
}

.myb-preowned-editor-img-placeholder {
    aspect-ratio: 4 / 3;
    background: #eaeaea;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.myb-preowned-editor-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px 14px;
    gap: 8px;
}

.myb-preowned-editor-left h4 {
    font-size: 11px;
    font-weight: 700;
    color: #b8945a;
    margin: 0 0 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.myb-preowned-editor-price {
    font-size: 12px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.myb-preowned-editor-view {
    font-size: 11px;
    color: #1a1a1a;
}

.myb-preowned-editor-footer { text-align: center; }

.myb-preowned-editor-btn {
    display: inline-block;
    padding: 10px 30px;
    background: transparent;
    color: #0d2742;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    border-radius: 30px;
    border: 2px solid #0d2742;
}

/* ------------------------------------------------------------------------------------
   RESPONSIVE
   ------------------------------------------------------------------------------------ */
@media (max-width: 1024px) {
    .myb-preowned-block .myb-section-title { font-size: 32px !important; }
}

@media (max-width: 900px) {
    .myb-po-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .myb-preowned-editor-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .myb-preowned-block.pre-owned { padding: 48px 0 60px; }
    .myb-preowned-block .myb-section-title { font-size: 26px !important; text-align: center !important; }
    .myb-section-underline { margin: 0 auto 32px; }
    .myb-po-grid { grid-template-columns: 1fr; gap: 16px; }
    .myb-preowned-editor-grid { grid-template-columns: 1fr; }
}
/* ============================================================
   Gallery Lightbox Modal — matches SS1 design
   ============================================================ */
.myb-gallery-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.myb-gallery-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .88);
    backdrop-filter: blur(6px);
}

/* Main box */
.myb-gallery-modal__box {
    position: relative;
    z-index: 1;
    width: min(96vw, 620px);
    background: #111a24;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 32px 80px rgba(0, 0, 0, .7);
}

/* ── Stage: image fills full width, overlays on top ── */
.myb-gallery-modal__stage {
    position: relative;
    width: 100%;
    background: #000;
    /* fixed aspect ratio so the image area is tall and clean */
    aspect-ratio: 4 / 3;
    overflow: hidden;
    flex-shrink: 0;
}

/* Label — top-left overlay on image */
.myb-gallery-modal__label {
    position: absolute;
    top: 0;
    left: 0;
    right: 48px; /* don't overlap close btn */
    z-index: 4;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: 14px 16px;
    background: linear-gradient(180deg, rgba(0,0,0,.65) 0%, transparent 100%);
    pointer-events: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Close — top-right overlay */
.myb-gallery-modal__close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 5;
    background: rgba(0, 0, 0, .45) !important;
    border: none !important;
    color: #fff !important;
    cursor: pointer;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: background .2s;
    padding: 0 !important;
}
.myb-gallery-modal__close:hover {
    background: rgba(0, 0, 0, .75) !important;
}
.myb-gallery-modal__close svg {
    display: block;
    stroke: #fff !important;
    flex-shrink: 0;
}

/* Image fills the stage */
.myb-gallery-modal__img-wrap {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.myb-gallery-modal__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity .2s;
}

/* Prev / Next — float over image sides */
.myb-gallery-modal__prev,
.myb-gallery-modal__next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    background: #00000078 !important;
    border: none !important;
    color: #fff !important;
    cursor: pointer;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: background .2s;
    padding: 0 !important;
    line-height: 1;
}
.myb-gallery-modal__prev { left: 10px; }
.myb-gallery-modal__next { right: 10px; }
.myb-gallery-modal__prev:hover,
.myb-gallery-modal__next:hover { background: #000000a2  !important; }
.myb-gallery-modal__prev svg,
.myb-gallery-modal__next svg {
    display: block;
    stroke: #fff !important;
    flex-shrink: 0;
}

/* Counter — bottom-right corner over image */
.myb-gallery-modal__counter {
    position: absolute;
    bottom: 12px;
    right: 14px;
    z-index: 4;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    background: rgba(0, 0, 0, .45);
    padding: 3px 9px;
    border-radius: 20px;
    pointer-events: none;
}

/* ── Thumbnails row below image ── */
.myb-gallery-modal__thumbs {
    display: flex;
    gap: 6px;
    padding: 10px 12px 12px;
    overflow-x: auto;
    flex-shrink: 0;
    background: #111a24;
    scrollbar-width: none; /* hide scrollbar — cleaner look */
}
.myb-gallery-modal__thumbs::-webkit-scrollbar { display: none; }

.myb-gth {
    width: 68px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    flex-shrink: 0;
    opacity: .55;
    border: 2px solid transparent;
    transition: opacity .18s, border-color .18s;
}
.myb-gth:hover    { opacity: .85; }
.myb-gth.is-active { opacity: 1; border-color: #b8945a; }

/* Mobile */
@media (max-width: 540px) {
    .myb-gallery-modal { padding: 0; }
    .myb-gallery-modal__box { width: 100%; border-radius: 0; min-height: 100dvh; justify-content: center; }
    .myb-gallery-modal__stage { aspect-ratio: 4 / 3; }
    .myb-gth { width: 54px; height: 40px; }
}