/**
 * WP Boat Search - Frontend Styles
 * Inspired by Ewer Marine Group design
 */

/* ========================================
   Container & Layout
   ======================================== */

.yacht-archive-container,
.brand-page-container,
.yacht-single-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.yacht-archive-header,
.brand-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-title,
.brand-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #1a1a1a;
}

.page-description {
    font-size: 1.1rem;
    color: #666;
}

/* ========================================
   Filter Bar
   ======================================== */

.yacht-filter-bar {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.filter-title {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: #1a1a1a;
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.filter-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 0.9rem;
}

.filter-group select,
.filter-group input[type="text"],
.filter-group input[type="number"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.95rem;
    transition: border-color 0.3s;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: #0066cc;
}

.filter-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-weight: normal;
}

.filter-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.filter-range {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-range input {
    flex: 1;
}

.filter-input-small {
    width: 100px;
}

.filter-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.button-primary,
.button-secondary {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.button-primary {
    background: #0066cc;
    color: #fff;
}

.button-primary:hover {
    background: #0052a3;
}

.button-secondary {
    background: #fff;
    color: #333;
    border: 1px solid #ddd;
}

.button-secondary:hover {
    background: #f5f5f5;
}

.filter-results-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.results-count {
    font-size: 1rem;
    color: #666;
}

.results-count span {
    font-weight: 700;
    color: #0066cc;
}

.results-sort {
    display: flex;
    align-items: center;
    gap: 10px;
}

.results-sort select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* ========================================
   Yacht Grid
   ======================================== */

.yacht-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

@media (max-width: 992px) {
    .yacht-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .yacht-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   Yacht Card - Matching Ewer Marine Group Design
   ======================================== */

.yacht-card,
.boat-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    max-width: 100%;
    width: 100%;
}

.yacht-card:hover,
.boat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.yacht-card-image,
.boat-card-image {
    position: relative;
    overflow: hidden;
    height: 250px;
    /* Fixed height for consistent image display */
}

.yacht-card-image img,
.boat-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.yacht-card:hover .yacht-card-image img,
.boat-card:hover .boat-card-image img {
    transform: scale(1.05);
}

.yacht-status-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
}

.yacht-status-active {
    background: #28a745;
}

.yacht-status-on-order {
    background: #ffc107;
}

.yacht-status-inactive {
    background: #6c757d;
}

.yacht-status-sale-pending {
    background: #ff6b6b;
}

.yacht-card-content,
.boat-card-content {
    padding: 20px;
}

/* Title - Raleway 500, Default Grey, Hover Blue */
.yacht-card-title,
.boat-card-title {
    margin: 0 0 8px 0;
    font-family: 'Raleway', sans-serif;
    font-size: 18px;
    font-weight: 500;
    line-height: 28px;
    font-style: normal;
}

.yacht-card-title a,
.boat-card-title a {
    color: rgb(85, 85, 85);
    /* Default Grey */
    text-decoration: none;
    transition: color 0.3s;
}

.boat-card:hover .boat-card-title a,
.yacht-card:hover .yacht-card-title a {
    color: rgb(23, 64, 120);
    /* Blue on hover */
}

/* Subtitle/Date - Raleway 400 */
.boat-card-subtitle {
    font-family: 'Raleway', sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 26px;
    font-style: normal;
    color: rgb(85, 85, 85);
    margin-bottom: 12px;
}

/* Location/Brand - Raleway 400 */
.boat-card-location,
.boat-card-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Raleway', sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 26px;
    font-style: normal;
    color: rgb(85, 85, 85);
    margin-bottom: 8px;
}

/* Icons - Font Awesome 5 Free */
.boat-card-location i,
.boat-card-brand i {
    font-family: "Font Awesome 5 Free", sans-serif;
    font-weight: 900;
    font-size: 14px;
    line-height: 14px;
    color: rgb(85, 85, 85);
}

/* Price - Raleway 400 */
.yacht-price,
.boat-card-price {
    font-family: 'Raleway', sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 26px;
    font-style: normal;
    color: rgb(85, 85, 85);
    margin: 15px 0;
}

/* Footer Logo - Centered at bottom of card */
.boat-card-footer-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 5px 20px;
    background: #eee;
    border-top: 1px solid #ddd;
}

.boat-card-footer-logo img {
    max-width: 120px;
    max-height: 40px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.yacht-view-details {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #0066cc;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: gap 0.3s;
}

.yacht-view-details:hover {
    gap: 8px;
}

/* Boats Grid Container */
.boats-grid {
    display: grid;
    gap: 30px;
    margin-bottom: 40px;
}

.boats-grid.boats-columns-1 {
    grid-template-columns: 1fr;
}

.boats-grid.boats-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.boats-grid.boats-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.boats-grid.boats-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 992px) {

    .boats-grid.boats-columns-3,
    .boats-grid.boats-columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {

    .boats-grid.boats-columns-2,
    .boats-grid.boats-columns-3,
    .boats-grid.boats-columns-4 {
        grid-template-columns: 1fr;
    }
}

/* Pagination */
.boats-pagination {
    margin-top: 40px;
    text-align: center;
}

.boats-pagination .page-numbers {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 4px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s;
}

.boats-pagination .page-numbers:hover,
.boats-pagination .page-numbers.current {
    background: #0066cc;
    color: #fff;
    border-color: #0066cc;
}

.boats-no-results {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 1.1rem;
    color: #666;
}

/* ========================================
   Single Yacht Page
   ======================================== */

.yacht-hero {
    margin-bottom: 40px;
}

.yacht-hero-image {
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

.yacht-hero-image img {
    width: 100%;
    height: auto;
}

.yacht-title {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.yacht-price-status {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
}

.yacht-price-large {
    font-size: 2rem;
    font-weight: 700;
    color: #0066cc;
}

.yacht-status-badge-large {
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
}

.yacht-content-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

@media (max-width: 992px) {
    .yacht-content-wrapper {
        grid-template-columns: 1fr;
    }
}

.yacht-specifications,
.yacht-description {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.yacht-specifications h2,
.yacht-description h2 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
}

.specs-table tr {
    border-bottom: 1px solid #eee;
}

.specs-table th,
.specs-table td {
    padding: 12px 0;
    text-align: left;
}

.specs-table th {
    font-weight: 600;
    color: #666;
    width: 40%;
}

.specs-table td {
    color: #1a1a1a;
}

.yacht-contact-card,
.yacht-brand-card {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.yacht-contact-card h3,
.yacht-brand-card h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.yacht-contact-card .button-primary,
.yacht-brand-card .button-secondary {
    display: block;
    width: 100%;
    text-align: center;
    text-decoration: none;
    margin-top: 15px;
}

/* ========================================
   Brand Page
   ======================================== */

.brand-logo {
    margin-bottom: 20px;
}

.brand-logo img {
    max-width: 200px;
    height: auto;
}

.brand-description,
.brand-custom-description {
    max-width: 800px;
    margin: 20px auto;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

.brand-contact-info {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.brand-contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-contact-item a {
    color: #0066cc;
    text-decoration: none;
    font-weight: 600;
}

.brand-yachts-section {
    margin-top: 60px;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 30px;
    text-align: center;
}

.brand-contact-section {
    max-width: 600px;
    margin: 60px auto;
    text-align: center;
}

.brand-contact-form {
    margin-top: 30px;
    text-align: left;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

/* ========================================
   Pagination
   ======================================== */

.yacht-pagination {
    margin-top: 40px;
    text-align: center;
}

.yacht-pagination .page-numbers {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 4px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s;
}

.yacht-pagination .page-numbers:hover,
.yacht-pagination .page-numbers.current {
    background: #0066cc;
    color: #fff;
    border-color: #0066cc;
}

/* ========================================
   Loading & Empty States
   ======================================== */

.yacht-loading {
    text-align: center;
    padding: 60px 20px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0066cc;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.no-yachts-found {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.no-yachts-found h2 {
    margin-bottom: 15px;
}

.no-yachts-found p {
    color: #666;
    font-size: 1.1rem;
}

/* ========================================
   Photo Gallery
   ======================================== */

.yacht-gallery-section {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 40px;
}

.yacht-gallery-section h2 {
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 1.5rem;
    color: #1a1a1a;
}

.yacht-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

@media (max-width: 992px) {
    .yacht-gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .yacht-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .yacht-gallery-grid {
        grid-template-columns: 1fr;
    }
}

.boat-search-gallery-item {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.boat-search-gallery-item:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.boat-search-gallery-item a {
    display: block;
    width: 100%;
    height: 100%;
}

.yacht-gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.boat-search-gallery-item:hover .yacht-gallery-image {
    transform: scale(1.1);
}

/* Lightbox overlay effect */
.boat-search-gallery-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s;
    pointer-events: none;
}

.boat-search-gallery-item:hover::after {
    background: rgba(0, 0, 0, 0.1);
}

/* ========================================
   Premium Single Yacht Layout
   ======================================== */

.yacht-single-premium {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #333;
}

.yacht-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 30px;
    border-bottom: 2px solid #eee;
    padding-bottom: 20px;
}

.yacht-header-main h1,
.yacht-header-main h2 {
    margin: 0 0 10px 0;
    font-size: 2.8rem;
    font-weight: 800;
    color: #1a1a1a;
}

.yacht-location-tag {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
    font-size: 1.1rem;
}

.yacht-header-price {
    text-align: right;
}

.yacht-header-price .price-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: #0066cc;
    line-height: 1;
}

.status-badge {
    display: inline-block;
    padding: 6px 15px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-top: 10px;
    background: #000;
    color: #fff;
}

.status-active {
    background: #2ecc71;
}

.status-sale-pending {
    background: #f1c40f;
}

.yacht-top-row {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    margin-bottom: 40px;
}

.yacht-gallery-main .main-image img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.yacht-thumbnails {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    position: relative;
}

.yacht-thumbnails img {
    width: 100px;
    height: 70px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    transition: opacity 0.3s;
}

.yacht-thumbnails img:hover {
    opacity: 0.8;
}

.more-images {
    width: 100px;
    height: 70px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-weight: 700;
}

.yacht-quick-specs {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.spec-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid #eee;
}

.spec-card .spec-label {
    display: block;
    font-size: 0.8rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.spec-card .spec-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: #1a1a1a;
}

.yacht-section {
    margin-bottom: 50px;
}

.yacht-section h3 {
    font-size: 1.8rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 25px;
}

.engine-info-box {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    overflow: hidden;
}

.engine-summary {
    background: #f8f9fa;
    padding: 15px 25px;
    border-bottom: 1px solid #ddd;
    display: flex;
    gap: 30px;
}

.engine-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 25px;
}

.engine-item h4 {
    margin: 0 0 15px 0;
    color: #0066cc;
    font-size: 1.1rem;
}

.engine-item ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.engine-item li {
    padding: 5px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.95rem;
}

.specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.specs-box h4 {
    background: #1a1a1a;
    color: #fff;
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.specs-box table {
    width: 100%;
    border-collapse: collapse;
}

.specs-box th,
.specs-box td {
    padding: 12px 10px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.specs-box th {
    font-weight: 600;
    color: #666;
    width: 45%;
}

.sidebar-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
}

.sidebar-card h4 {
    margin: 0 0 20px 0;
    font-size: 1.2rem;
    color: #1a1a1a;
}

.broker-details .company {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0066cc;
    margin-bottom: 5px;
}

.broker-phone {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a1a1a;
    text-decoration: none;
    margin: 15px 0;
}

.button-contact {
    display: block;
    background: #0066cc;
    color: #fff;
    text-align: center;
    padding: 12px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
}

.meta-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.meta-list li {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
}

.meta-list li span {
    color: #999;
}

@media (max-width: 992px) {
    .yacht-top-row {
        grid-template-columns: 1fr;
    }

    .yacht-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .yacht-header-price {
        text-align: left;
        margin-top: 20px;
    }

    .specs-grid {
        grid-template-columns: 1fr;
    }
}

.wp-singular.yacht-template-default .page-title {
    display: none;
}

/* ========================================
   Boats Carousel
   ======================================== */

.boats-carousel {
    position: relative;
    padding: 0 40px;
}

.boats-carousel .owl-nav button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: #0066cc !important;
    color: #fff !important;
    border-radius: 50% !important;
    font-size: 24px !important;
    line-height: 40px !important;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.boats-carousel .owl-nav button:hover {
    background: #0052a3 !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.boats-carousel .owl-nav button.owl-prev {
    left: -20px;
}

.boats-carousel .owl-nav button.owl-next {
    right: -20px;
}

.boats-carousel .owl-dots {
    margin-top: 30px;
    text-align: center;
}

.boats-carousel .owl-dots .owl-dot span {
    width: 10px;
    height: 10px;
    margin: 5px 7px;
    background: #ddd;
    display: block;
    transition: all 0.3s;
    border-radius: 30px;
}

.boats-carousel .owl-dots .owl-dot.active span,
.boats-carousel .owl-dots .owl-dot:hover span {
    background: #0066cc;
    width: 25px;
}

.boats-carousel .item {
    padding: 10px;
}

/* Adjust boat card for carousel */
.boats-carousel .boat-card {
    margin: 0;
}