/**
 * DCH Yacht Manager Frontend Styles
 * 
 * Styles for yacht listing pages, single yacht pages, and yacht components
 */

/* ====================================
   YACHT CARDS & LISTINGS
   ==================================== */

.dch-yacht-list {
    display: grid;
    gap: 2rem;
    margin: 2rem 0;
}

.dch-yacht-list.columns-1 {
    grid-template-columns: 1fr;
}

.dch-yacht-list.columns-2 {
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
}

.dch-yacht-list.columns-3 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.dch-yacht-list.columns-4 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.dch-yacht-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.dch-yacht-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.dch-yacht-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.dch-yacht-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.dch-yacht-card:hover .dch-yacht-image img {
    transform: scale(1.05);
}

.dch-yacht-info {
    padding: 1.5rem;
}

.dch-yacht-source {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.dch-yacht-source.saxdor {
    background: rgba(0, 102, 204, 0.1);
    color: #0066cc;
}

.dch-yacht-source.sunseeker {
    background: rgba(196, 30, 58, 0.1);
    color: #C41E3A;
}

.dch-yacht-source.williams {
    background: rgba(255, 107, 53, 0.1);
    color: #FF6B35;
}

.dch-yacht-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
}

.dch-yacht-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.3s ease;
}

.dch-yacht-title a:hover {
    color: #0066cc;
}

.dch-yacht-model {
    margin: 0 0 0.75rem 0;
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
}

.dch-yacht-excerpt {
    margin: 0 0 1rem 0;
    color: #555;
    font-size: 0.9rem;
    line-height: 1.5;
}

.dch-read-more {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: #0066cc;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.3s ease;
}

.dch-read-more:hover {
    background: #0052a3;
    color: white;
}

.dch-no-yachts {
    text-align: center;
    padding: 3rem;
    color: #666;
    font-size: 1.1rem;
    background: #f8f9fa;
    border-radius: 12px;
    margin: 2rem 0;
}

/* ====================================
   YACHT SPECIFICATIONS
   ==================================== */

.dch-yacht-specifications {
    display: grid;
    gap: 2rem;
    margin: 2rem 0;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 12px;
}

.dch-yacht-specifications.columns-1 {
    grid-template-columns: 1fr;
}

.dch-yacht-specifications.columns-2 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.dch-specs-column h4 {
    margin: 0 0 1rem 0;
    color: #1a1a1a;
    font-size: 1.1rem;
    font-weight: 600;
}

.dch-specs-list {
    margin: 0;
}

.dch-specs-list dt {
    font-weight: 600;
    color: #333;
    margin: 0.5rem 0 0.25rem 0;
    font-size: 0.9rem;
}

.dch-specs-list dd {
    margin: 0 0 0.5rem 0;
    color: #666;
    font-size: 0.9rem;
}

.no-specifications {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 1rem 0;
}

/* ====================================
   YACHT GALLERY
   ==================================== */

.dch-yacht-gallery {
    display: grid;
    gap: 1rem;
    margin: 2rem 0;
}

.dch-yacht-gallery.columns-1 {
    grid-template-columns: 1fr;
}

.dch-yacht-gallery.columns-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.dch-yacht-gallery.columns-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.dch-yacht-gallery.columns-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.dch-gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: #f8f9fa;
    aspect-ratio: 4/3;
}

.dch-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.dch-lightbox .dch-gallery-item:hover img {
    transform: scale(1.05);
    cursor: pointer;
}

.dch-gallery-link {
    display: block;
    width: 100%;
    height: 100%;
}

.no-gallery {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 1rem 0;
}

/* ====================================
   YACHT LAYOUTS GALLERY
   ==================================== */

.dch-yacht-layouts {
    display: grid;
    gap: 1.5rem;
    margin: 2rem 0;
}

.dch-yacht-layouts.columns-1 {
    grid-template-columns: 1fr;
}

.dch-yacht-layouts.columns-2 {
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
}

.dch-yacht-layouts.columns-3 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.dch-layout-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dch-layout-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.dch-layout-item img {
    width: 100%;
    height: auto;
    display: block;
}

.dch-layout-caption {
    padding: 1rem;
    margin: 0;
    color: #555;
    font-size: 0.9rem;
    line-height: 1.4;
    background: #f8f9fa;
}

.no-layouts {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 1rem 0;
}

/* ====================================
   YACHT META DATA
   ==================================== */

.dch-yacht-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.dch-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.dch-meta-label {
    font-weight: 600;
    color: #333;
}

.dch-meta-value {
    color: #666;
}

.dch-meta-value.dch-source-saxdor {
    color: #0066cc;
    font-weight: 600;
}

.dch-meta-value.dch-source-sunseeker {
    color: #C41E3A;
    font-weight: 600;
}

.dch-meta-value.dch-source-williams {
    color: #FF6B35;
    font-weight: 600;
}

/* ====================================
   YACHT BREADCRUMBS
   ==================================== */

.dch-yacht-breadcrumbs {
    margin: 1rem 0 2rem 0;
    font-size: 0.9rem;
    color: #666;
}

.dch-yacht-breadcrumbs a {
    color: #0066cc;
    text-decoration: none;
}

.dch-yacht-breadcrumbs a:hover {
    text-decoration: underline;
}

.dch-yacht-breadcrumbs .separator {
    margin: 0 0.5rem;
    color: #ccc;
}

.dch-yacht-breadcrumbs .current {
    color: #333;
    font-weight: 600;
}

/* ====================================
   YACHT SEARCH
   ==================================== */

.dch-yacht-search {
    margin: 2rem 0;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.dch-search-form {
    display: grid;
    gap: 1rem;
    grid-template-columns: 2fr 1fr auto;
    align-items: end;
}

.search-input-wrapper,
.source-filter-wrapper,
.search-submit-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.yacht-search-input,
.yacht-source-filter {
    padding: 0.75rem 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background: white;
}

.yacht-search-input:focus,
.yacht-source-filter:focus {
    outline: none;
    border-color: #0066cc;
}

.yacht-search-submit {
    padding: 0.75rem 2rem;
    background: #0066cc;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.yacht-search-submit:hover {
    background: #0052a3;
}

.yacht-search-results {
    margin-top: 2rem;
}

.search-results-header {
    margin-bottom: 1.5rem;
}

.search-results-header h3 {
    margin: 0;
    color: #1a1a1a;
    font-size: 1.25rem;
}

.loading {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
}

.error {
    text-align: center;
    padding: 1rem;
    background: #fee;
    color: #c33;
    border-radius: 8px;
    border: 1px solid #fcc;
}

.no-results {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
    background: #f8f9fa;
    border-radius: 8px;
}

/* ====================================
   YACHT PAGINATION
   ==================================== */

.dch-yacht-pagination {
    margin: 3rem 0;
    text-align: center;
}

.dch-yacht-pagination .pagination {
    display: inline-flex;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.dch-yacht-pagination .page-numbers {
    display: inline-block;
    padding: 0.5rem 0.75rem;
    background: white;
    color: #666;
    text-decoration: none;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.dch-yacht-pagination .page-numbers:hover,
.dch-yacht-pagination .page-numbers.current {
    background: #0066cc;
    color: white;
    border-color: #0066cc;
}

/* ====================================
   BUTTONS & ACTIONS
   ==================================== */

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    line-height: 1;
    margin: 0 0.5rem 0.5rem 0;
}

.btn-primary {
    background: #0066cc;
    color: white;
}

.btn-primary:hover {
    background: #0052a3;
    color: white;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
    color: white;
}

.btn-tertiary {
    background: white;
    color: #0066cc;
    border: 2px solid #0066cc;
}

.btn-tertiary:hover {
    background: #0066cc;
    color: white;
}

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

@media (max-width: 768px) {
    .dch-yacht-list.columns-2,
    .dch-yacht-list.columns-3,
    .dch-yacht-list.columns-4 {
        grid-template-columns: 1fr;
    }
    
    .dch-yacht-gallery.columns-2,
    .dch-yacht-gallery.columns-3,
    .dch-yacht-gallery.columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dch-yacht-layouts.columns-2,
    .dch-yacht-layouts.columns-3 {
        grid-template-columns: 1fr;
    }
    
    .dch-yacht-specifications.columns-2 {
        grid-template-columns: 1fr;
    }
    
    .dch-search-form {
        grid-template-columns: 1fr;
    }
    
    .dch-yacht-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .dch-yacht-card {
        margin-bottom: 1rem;
    }
    
    .yacht-nav {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .dch-yacht-gallery.columns-2,
    .dch-yacht-gallery.columns-3,
    .dch-yacht-gallery.columns-4 {
        grid-template-columns: 1fr;
    }
    
    .btn {
        display: block;
        margin: 0.5rem 0;
    }
    
    .dch-yacht-card {
        border-radius: 8px;
    }
    
    .dch-yacht-info {
        padding: 1rem;
    }
}

/* ====================================
   UTILITY CLASSES
   ==================================== */

.text-center {
    text-align: center;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mb-1 {
    margin-bottom: 1rem !important;
}

.mb-2 {
    margin-bottom: 2rem !important;
}

.mt-0 {
    margin-top: 0 !important;
}

.mt-1 {
    margin-top: 1rem !important;
}

.mt-2 {
    margin-top: 2rem !important;
}

.p-0 {
    padding: 0 !important;
}

.p-1 {
    padding: 1rem !important;
}

.p-2 {
    padding: 2rem !important;
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* ====================================
   PRINT STYLES
   ==================================== */

@media print {
    .dch-yacht-search,
    .yacht-search-submit,
    .btn,
    .yacht-nav,
    .dch-yacht-pagination {
        display: none !important;
    }
    
    .dch-yacht-card {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
        margin-bottom: 1rem;
    }
    
    .dch-yacht-gallery {
        display: block;
    }
    
    .dch-gallery-item {
        display: inline-block;
        width: 48%;
        margin: 1%;
        vertical-align: top;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
}