/**
 * Custom Yacht Manager - Frontend CSS
 * Styling for yacht cards, listings, and detail pages
 */

/* ==================== YACHT CARD STYLES ==================== */
.yacht-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.yacht-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.yacht-image {
    position: relative;
    height: 250px;
    overflow: hidden;
    background: #f5f5f5;
}

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

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

.yacht-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #999;
    font-size: 14px;
}

.yacht-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.yacht-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.yacht-header h3 {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: 1px;
    margin: 0;
}

.rating {
    display: flex;
    gap: 2px;
}

.rating .star {
    color: #FFB800;
    font-size: 14px;
}

.yacht-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    gap: 15px;
}

.yacht-title-row h2 {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.3;
    margin: 0;
    flex: 1;
}

.yacht-price {
    text-align: right;
    white-space: nowrap;
}

.yacht-price .amount {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    display: block;
}

.yacht-price .period {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.yacht-info {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
    flex-wrap: wrap;
}

.yacht-info .info-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #666;
}

.yacht-info svg {
    opacity: 0.7;
}

.yacht-buttons {
    display: flex;
    gap: 12px;
    margin-top: auto;
}

.btn-outline {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #1a1a1a;
    background: transparent;
    color: #1a1a1a;
    font-weight: 600;
    text-align: center;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
    cursor: pointer;
}

.btn-outline:hover {
    background: #1a1a1a;
    color: #fff;
}

.btn-primary {
    flex: 1;
    padding: 12px 20px;
    background: #00BCD4;
    color: #fff;
    font-weight: 600;
    text-align: center;
    border-radius: 8px;
    border: none;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
    cursor: pointer;
}

.btn-primary:hover {
    background: #00ACC1;
    transform: translateX(2px);
}

.btn-large {
    padding: 16px 32px;
    font-size: 16px;
}

/* ==================== GRID LAYOUTS ==================== */
.yachts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 30px;
    padding: 20px 0;
}

/* ==================== FILTERS ==================== */
.yacht-filters-wrapper {
    margin-bottom: 40px;
}

.yacht-filters {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.filter-row:last-child {
    margin-bottom: 0;
}

.filter-item {
    display: flex;
    flex-direction: column;
}

.filter-item label {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
    color: #333;
}

.filter-item input[type="text"],
.filter-item input[type="number"],
.filter-item select {
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.filter-item input:focus,
.filter-item select:focus {
    border-color: #00BCD4;
    outline: none;
}

.filter-price {
    grid-column: span 2;
}

.price-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
}

.price-inputs .separator {
    color: #666;
}

.filter-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 20px;
}

.filter-actions button {
    padding: 12px 30px;
}

/* ==================== LOADING SPINNER ==================== */
.yacht-loading {
    text-align: center;
    padding: 40px;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #00BCD4;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==================== SINGLE YACHT PAGE ==================== */
.yacht-detail-page {
    padding: 40px 0;
}

.yacht-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.yacht-hero {
    margin-bottom: 60px;
}

.yacht-featured-image {
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 30px;
}

.yacht-featured-image img {
    width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: cover;
}

.yacht-hero-content {
    text-align: center;
}

.yacht-meta-top {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.yacht-badge {
    background: #1a1a1a;
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.yacht-title {
    font-size: 48px;
    font-weight: 700;
    margin: 15px 0;
    color: #1a1a1a;
}

.yacht-location {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #666;
    margin-bottom: 20px;
    font-size: 16px;
}

.yacht-price-hero {
    font-size: 42px;
    font-weight: 700;
    color: #00BCD4;
    margin: 20px 0;
}

.yacht-price-hero .price-period {
    font-size: 18px;
    color: #666;
    font-weight: 400;
}

.yacht-actions {
    margin-top: 30px;
}

.yacht-section {
    margin-bottom: 60px;
}

.yacht-section h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 25px;
    color: #1a1a1a;
}

.yacht-content-text {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.spec-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.spec-label {
    font-weight: 600;
    color: #666;
}

.spec-value {
    font-weight: 700;
    color: #1a1a1a;
}

.features-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.features-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    color: #333;
}

.features-list svg {
    color: #00BCD4;
    flex-shrink: 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.gallery-item {
    border-radius: 12px;
    overflow: hidden;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.05);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.yacht-inquiry {
    background: #f8f9fa;
    padding: 40px;
    border-radius: 16px;
    text-align: center;
}

.yacht-inquiry h2 {
    margin-bottom: 15px;
}

.yacht-inquiry p {
    font-size: 16px;
    color: #666;
    margin-bottom: 25px;
}

.yacht-inquiry .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

/* ==================== ARCHIVE PAGE ==================== */
.yacht-archive-page {
    padding: 40px 0;
}

.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-title {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #1a1a1a;
}

.yacht-count {
    font-size: 16px;
    color: #666;
}

.yacht-pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.yacht-pagination a,
.yacht-pagination span {
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
}

.yacht-pagination a:hover,
.yacht-pagination span.current {
    background: #00BCD4;
    border-color: #00BCD4;
    color: #fff;
}

.no-yachts {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

/* ==================== WIDGET STYLES ==================== */
.yacht-widget-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.yacht-widget-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.yacht-widget-item:hover {
    transform: translateX(5px);
}

.yacht-widget-image {
    flex-shrink: 0;
    width: 100px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
}

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

.yacht-widget-content {
    flex: 1;
}

.yacht-widget-content h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
}

.yacht-widget-content h4 a {
    color: #1a1a1a;
    text-decoration: none;
}

.yacht-widget-content h4 a:hover {
    color: #00BCD4;
}

.yacht-widget-price {
    font-size: 14px;
    font-weight: 700;
    color: #00BCD4;
    margin-bottom: 5px;
}

.yacht-widget-capacity {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}

.yacht-widget-link {
    font-size: 12px;
    color: #00BCD4;
    text-decoration: none;
    font-weight: 600;
}

.yacht-widget-link:hover {
    text-decoration: underline;
}

/* ==================== RESPONSIVE STYLES ==================== */
@media (max-width: 1024px) {
    .yachts-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .yachts-grid {
        grid-template-columns: 1fr;
    }
    
    .yacht-title-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .yacht-price {
        text-align: left;
    }
    
    .yacht-info {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .yacht-buttons {
        flex-direction: column;
    }
    
    .filter-row {
        grid-template-columns: 1fr;
    }
    
    .filter-price {
        grid-column: span 1;
    }
    
    .yacht-title {
        font-size: 32px;
    }
    
    .specs-grid {
        grid-template-columns: 1fr;
    }
    
    .features-list {
        grid-template-columns: 1fr;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .yacht-card {
        margin: 0 10px;
    }
}

/* ==================== FRONTEND SUBMISSION FORM ==================== */
.yacht-submission-wrapper {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

.yacht-submission-header {
    text-align: center;
    margin-bottom: 40px;
}

.yacht-submission-header h2 {
    font-size: 36px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 15px;
}

.yacht-submission-header p {
    font-size: 16px;
    color: #666;
}

.yacht-submission-form {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 40px;
}

.form-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section h3 {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #00BCD4;
    outline: none;
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.form-group input[type="file"] {
    padding: 10px 0;
}

.form-group .description {
    font-size: 13px;
    color: #666;
    margin-top: 5px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.feature-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease;
    font-size: 14px;
}

.feature-checkbox:hover {
    background: #e9ecef;
}

.feature-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-actions {
    text-align: center;
    margin-top: 30px;
}

.form-actions button {
    min-width: 250px;
}

.submission-message {
    margin-top: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    text-align: center;
}

.submission-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.submission-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.yacht-submission-success {
    max-width: 600px;
    margin: 60px auto;
    padding: 40px;
    background: #d4edda;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.yacht-submission-success h2 {
    font-size: 32px;
    color: #155724;
    margin-bottom: 15px;
}

.yacht-submission-success p {
    font-size: 16px;
    color: #155724;
    margin-bottom: 25px;
}

.yacht-submission-success .btn-primary {
    display: inline-block;
}

/* Loading state */
.yacht-submission-form.loading {
    opacity: 0.6;
    pointer-events: none;
}

.yacht-submission-form.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #00BCD4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Responsive */
@media (max-width: 768px) {
    .yacht-submission-form {
        padding: 25px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
}
