/**
 * Sales MLS Frontend Styles
 *
 * Supplements existing theme yacht styles for yacht_listing pages.
 * Most yacht component styles (.header-yacht-static, .yacht-specification,
 * .yacht-gallery-overlay, etc.) are inherited from the theme via the
 * single-master_yachts body class.
 */

/* ── Hero header image — responsive <picture> with art-directed crops ── */
/* Theme SCSS handles the base styles (.background-image picture img).
   Bare <img> fallback for local dev where <picture> is not available. */
.single-yacht_listing.single-master_yachts .header-yacht-static .background-image > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* ── Gallery background image (non-picture element) ── */
.single-yacht_listing.single-master_yachts .yacht-gallery-overlay .background-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

/* ── Gallery Thumbnails ── */
/* Body has both .single-yacht_listing and .single-master_yachts;
   theme main.css sets height:auto on .single-master_yachts img,
   so we need higher specificity to override. */
.single-yacht_listing.single-master_yachts .yacht-gallery-overlay .fancy-box-image {
    display: block;
    position: relative;
    aspect-ratio: 680 / 480;
    overflow: hidden;
}

.single-yacht_listing.single-master_yachts .yacht-gallery-overlay .fancy-box-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ── Section Navigation (sticky scroll-spy bar) ── */

.smls-section-nav {
    position: sticky;
    top: 60px;
    z-index: 999;
    background: #111;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

@media (min-width: 576px) {
    .smls-section-nav { top: 90px; }
}

@media (min-width: 992px) {
    .smls-section-nav { top: 100px; }
}

/* WP admin bar offsets (46px mobile, 32px desktop at 783px+) */
.admin-bar .smls-section-nav { top: 106px; }

@media (min-width: 576px) {
    .admin-bar .smls-section-nav { top: 136px; }
}

@media (min-width: 783px) {
    .admin-bar .smls-section-nav { top: 122px; }
}

@media (min-width: 992px) {
    .admin-bar .smls-section-nav { top: 132px; }
}

.smls-section-nav-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 15px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.smls-section-nav-inner::-webkit-scrollbar {
    display: none;
}

.smls-section-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 22px 24px;
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    transition: color 0.3s ease;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.smls-section-nav-link:last-child {
    border-right: none;
}

/* Icon sizing */
.smls-section-nav-link svg {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
}

.smls-section-nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: #b08d57;
    transition: width 0.3s ease, left 0.3s ease, transform 0.3s ease;
}

.smls-section-nav-link:hover {
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
}

.smls-section-nav-link.active {
    color: #fff;
}

.smls-section-nav-link.active::after {
    width: 100%;
    left: 0;
    transform: none;
}

/* Enquire CTA — gold accent */
.smls-section-nav-cta {
    color: #b08d57;
}

.smls-section-nav-cta:hover {
    color: #d4a94f;
}

.smls-section-nav-cta.active {
    color: #fff;
}

/* Short labels: hidden on desktop, shown on mobile */
.smls-nav-short { display: none; }

/* Mobile: horizontally scrollable, compact links */
@media (max-width: 767px) {
    .smls-section-nav-inner {
        justify-content: flex-start;
        padding: 0 8px;
    }

    .smls-section-nav-link {
        padding: 20px 15px;
        font-size: 10px;
        letter-spacing: 1.5px;
        gap: 5px;
    }

    .smls-section-nav-cta {
        border-right: none;
    }

    .smls-section-nav-link svg {
        width: 13px;
        height: 13px;
    }

    .smls-nav-full { display: none; }
    .smls-nav-short { display: inline; }

    /* Enquire CTA — filled gold pill on mobile */
    .smls-section-nav-cta {
        background: #b08d57;
        color: #fff;
        border-radius: 3px;
        padding: 10px 16px;
        margin: 8px 6px 8px auto;
        flex-shrink: 0;
    }
    .smls-section-nav-cta:hover {
        background: #d4a94f;
        color: #fff;
    }
    .smls-section-nav-cta::after {
        display: none;
    }
}

/* ── Similar Yachts Section ── */
.smls-similar-yachts {
    padding: 60px 0;
    background: #f5f5f5;
}

.smls-similar-yachts h2 {
    margin-bottom: 30px;
    font-family: 'Playfair Display', serif;
    font-weight: 300;
}

/* Similar Yachts nav arrows — override theme's .single-master_yachts icomoon
   arrow styles to match the homepage featured-yachts-carousel arrows exactly.
   The theme uses 2-class specificity (.single-master_yachts .swiper-button-*)
   with !important on font-family; we use 3-class specificity to override. */

.smls-similar-yachts .featured-yachts-carousel-wrapper .swiper-button-prev,
.smls-similar-yachts .featured-yachts-carousel-wrapper .swiper-button-next {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 50px !important;
    height: 50px !important;
    background: rgba(0, 0, 0, 0.8) !important;
    border-radius: 50%;
    border: none !important;
    overflow: visible !important;
    color: #fff;
    top: 50%;
    margin-top: -25px;
    z-index: 10;
    transition: all 0.25s ease-in-out;
}

.smls-similar-yachts .featured-yachts-carousel-wrapper .swiper-button-prev::after,
.smls-similar-yachts .featured-yachts-carousel-wrapper .swiper-button-next::after {
    font-family: swiper-icons !important;
    font-size: 18px !important;
    font-weight: bold;
    color: #fff;
    line-height: 1;
    /* Reset theme's icomoon absolute positioning */
    position: static !important;
    width: auto !important;
    height: auto !important;
    display: inline !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    text-align: center;
}

.smls-similar-yachts .featured-yachts-carousel-wrapper .swiper-button-prev::after {
    content: 'prev' !important;
}

.smls-similar-yachts .featured-yachts-carousel-wrapper .swiper-button-next::after {
    content: 'next' !important;
}

.smls-similar-yachts .featured-yachts-carousel-wrapper .swiper-button-prev:hover,
.smls-similar-yachts .featured-yachts-carousel-wrapper .swiper-button-next:hover {
    background: #b08d57 !important;
    border: none !important;
    color: #000;
}

.smls-similar-yachts .featured-yachts-carousel-wrapper .swiper-button-prev:hover::after,
.smls-similar-yachts .featured-yachts-carousel-wrapper .swiper-button-next:hover::after {
    color: #000;
}

.smls-similar-yachts .featured-yachts-carousel-wrapper .swiper-button-prev {
    left: 15px;
}

.smls-similar-yachts .featured-yachts-carousel-wrapper .swiper-button-next {
    right: 15px;
}

.smls-similar-yachts .featured-yachts-carousel-wrapper .swiper-button-disabled {
    opacity: 0.3 !important;
    cursor: not-allowed;
    pointer-events: none;
}

@media (max-width: 767px) {
    .smls-similar-yachts .featured-yachts-carousel-wrapper .swiper-button-prev,
    .smls-similar-yachts .featured-yachts-carousel-wrapper .swiper-button-next {
        display: none !important;
    }
}

/* ── Archive Listing Page ── */
.listing .archive-description {
    margin-bottom: 20px;
    color: #666;
    line-height: 1.7;
}

/* ── Video & Virtual Tour Sections ── */
.yacht-video-section,
.yacht-virtual-tour-section {
    padding: 60px 0;
}

.smls-video-wrapper,
.smls-tour-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
}

.smls-video-wrapper iframe,
.smls-tour-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Feature lists converted from "- item" lines */
.single-yacht_listing .yacht-description-2-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.single-yacht_listing .yacht-description-2-col ul li {
    padding: 0 0 12px 20px;
    position: relative;
    line-height: 1.7;
}

.single-yacht_listing .yacht-description-2-col ul li::before {
    content: '\2014';
    position: absolute;
    left: 0;
}

/* ── Description Read More ── */
.smls-desc-wrap {
    position: relative;
}

.smls-desc-collapsed {
    max-height: 280px;
    overflow: hidden;
}

.smls-desc-fade {
    display: none;
}

.smls-desc-collapsed .smls-desc-fade {
    display: block;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%);
    pointer-events: none;
}

.smls-read-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: fit-content;
    background: none;
    border: none;
    padding: 10px 0;
    margin: 8px auto 0;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: #666;
    position: relative;
    transition: color 0.3s ease;
}

.smls-read-more::before {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: #b5b5b5;
    transform: scaleX(0.55);
    transform-origin: center;
    transition: transform 0.4s ease, background-color 0.3s ease;
}

.smls-read-more::after {
    content: '\2193';
    font-size: 14px;
    font-weight: 300;
    transition: transform 0.3s ease, color 0.3s ease;
}

.smls-read-more:focus:not(:focus-visible) {
    outline: none;
}

.smls-read-more:hover,
.smls-read-more:focus-visible {
    color: #333;
    outline: none;
}

.smls-read-more:hover::before,
.smls-read-more:focus-visible::before {
    transform: scaleX(1);
    background-color: #999;
}

.smls-read-more:hover::after,
.smls-read-more:focus-visible::after {
    color: #333;
    transform: translateY(2px);
}

.smls-read-more[aria-expanded="true"] {
    color: #999;
}

.smls-read-more[aria-expanded="true"]::after {
    content: '\2191';
}

.smls-read-more[aria-expanded="true"]::before {
    transform: scaleX(0.25);
    background-color: #ccc;
}

.smls-read-more[aria-expanded="true"]:hover {
    color: #555;
}

.smls-read-more[aria-expanded="true"]:hover::before {
    transform: scaleX(0.7);
    background-color: #aaa;
}

@media (max-width: 767px) {
    .smls-read-more {
        font-size: 11px;
        letter-spacing: 2px;
        padding: 8px 0;
        margin-top: 6px;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .smls-read-more {
        font-size: 11.5px;
        letter-spacing: 2.2px;
    }
}

@media (min-width: 992px) {
    .smls-desc-collapsed {
        max-height: 220px;
    }
}

/* ── Location Sentence ── */
.smls-location-sentence {
    margin-top: 20px;
    font-style: italic;
    color: #666;
}

/* ── Card Adjustments ── */
.card-yacht .meta .spec .card-dollars.active,
.card-yacht .meta .spec .card-euros.active {
    display: inline;
}

/* ── Archive Status Tabs ── */
.smls-status-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 25px;
    border-bottom: 1px solid #ddd;
}

.smls-tab {
    padding: 10px 20px;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-decoration: none;
    color: #888;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.smls-tab:hover {
    color: #333;
    text-decoration: none;
}

.smls-tab.active {
    color: #333;
    border-bottom-color: #b08d57;
}

/* ── Archive Filter Bar ── */
.smls-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
    padding: 15px 0;
}

.smls-filter-bar select {
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.5px;
    padding: 8px 32px 8px 12px;
    border: 1px solid #ddd;
    background: #fff url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="8"><path d="M1 1l5 5 5-5" stroke="%23666" stroke-width="1.5" fill="none"/></svg>') right 10px center no-repeat;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
    min-width: 160px;
    color: #333;
    transition: border-color 0.2s;
}

.smls-filter-bar select:hover,
.smls-filter-bar select:focus {
    border-color: #b08d57;
    outline: none;
}

.smls-filter-submit {
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 9px 20px;
    background: #333;
    color: #fff;
    border: 1px solid #333;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.smls-filter-submit:hover {
    background: #b08d57;
    border-color: #b08d57;
}

.smls-filter-clear {
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.5px;
    color: #888;
    text-decoration: none;
    transition: color 0.2s;
}

.smls-filter-clear:hover {
    color: #b08d57;
    text-decoration: none;
}

@media (max-width: 767px) {
    .smls-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .smls-filter-bar select {
        min-width: 100%;
    }

    .smls-filter-submit {
        width: 100%;
    }
}

/* ── Spec Column Padding (inner edges of left/right col-lg-6) ── */
@media (min-width: 992px) {
    .single-yacht_listing .yacht-specification .row > .col-lg-6:first-child {
        padding-right: 25px;
    }
    .single-yacht_listing .yacht-specification .row > .col-lg-6:last-child {
        padding-left: 25px;
    }
}

/* ── Spec tables now use theme .yacht-table-specification markup ──
   All sizing/layout handled by theme _yacht-table-specification.scss.
   Only SMLS-specific overrides below. */

/* ── Sold Hero Category ── */
.single-yacht_listing .header-yacht-static .category {
    text-transform: uppercase;
    letter-spacing: 2px;
}
