/* =====================
   יָם פָּתוּחַ — Stylesheet
   Nautical Luxury Aesthetic
   ===================== */

:root {
    --navy: #0d2137;
    --deep-sea: #1a3a5c;
    --ocean: #1e6091;
    --sky: #4a9fd4;
    --sand: #f5f0e8;
    --warm-white: #faf8f4;
    --gold: #c9a84c;
    --gold-light: #f0d68a;
    --text-dark: #1a1a2e;
    --text-mid: #4a5568;
    --text-light: #718096;
    --border: #e2d9c8;
    --shadow: 0 4px 20px rgba(13,33,55,0.12);
    --shadow-lg: 0 12px 40px rgba(13,33,55,0.18);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Heebo', sans-serif;
    background: var(--warm-white);
    color: var(--text-dark);
    direction: rtl;
    overflow-x: hidden;
}

/* ── Header ── */
.site-header {
    position: relative;
    background: var(--navy);
    overflow: hidden;
}

.header-bg {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(30,96,145,0.4) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(74,159,212,0.2) 0%, transparent 50%);
    pointer-events: none;
}

.navbar {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 4rem;
    border-bottom: 1px solid rgba(201,168,76,0.3);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
}

.logo-icon {
    font-size: 1.6rem;
    filter: drop-shadow(0 0 8px rgba(201,168,76,0.5));
}

.logo-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: var(--gold);
    letter-spacing: 0.05em;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 400;
    transition: color 0.2s;
    letter-spacing: 0.03em;
}

.nav-links a:hover {
    color: var(--gold-light);
}

/* ── Hero ── */
.hero {
    position: relative;
    padding: 6rem 4rem 4rem;
    text-align: center;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.8rem, 6vw, 5rem);
    color: #fff;
    line-height: 1.1;
    font-weight: 900;
    margin-bottom: 1.2rem;
}

.hero-title em {
    font-style: italic;
    color: var(--gold);
    display: block;
}

.hero-sub {
    color: rgba(255,255,255,0.7);
    font-size: 1.1rem;
    font-weight: 300;
    max-width: 500px;
    margin: 0 auto;
}

.wave-divider {
    position: relative;
    margin-bottom: -2px;
    margin-top: 3rem;
    line-height: 0;
}

.wave-divider svg {
    width: 100%;
    display: block;
}

.site-header--small .hero {
    display: none;
}

.site-header--small .navbar {
    border-bottom: none;
}

.site-header--small {
    padding-bottom: 0;
}

/* ── Main ── */
.main-content {
    min-height: 60vh;
}

/* ── Search Section ── */
.search-section {
    background: var(--sand);
    padding: 2.5rem 4rem;
    border-bottom: 1px solid var(--border);
}

.search-form {
    max-width: 900px;
    margin: 0 auto;
}

.search-bar {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.search-bar input {
    flex: 1;
    padding: 0.9rem 1.2rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-family: 'Heebo', sans-serif;
    font-size: 1rem;
    background: #fff;
    color: var(--text-dark);
    transition: border-color 0.2s;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--ocean);
}

.btn-search {
    padding: 0.9rem 2rem;
    background: var(--navy);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: 'Heebo', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.btn-search:hover {
    background: var(--deep-sea);
}

.filters {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.filters select,
.filters input[type="number"] {
    padding: 0.65rem 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-family: 'Heebo', sans-serif;
    font-size: 0.9rem;
    background: #fff;
    color: var(--text-dark);
    transition: border-color 0.2s;
}

.filters select:focus,
.filters input:focus {
    outline: none;
    border-color: var(--ocean);
}

.btn-clear {
    padding: 0.65rem 1rem;
    background: transparent;
    color: var(--text-mid);
    border: 2px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.btn-clear:hover {
    border-color: #e53e3e;
    color: #e53e3e;
}

/* ── Listings ── */
.listings-section {
    padding: 3rem 4rem;
    max-width: 1400px;
    margin: 0 auto;
}

.listings-header {
    margin-bottom: 2rem;
}

.listings-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    color: var(--navy);
}

/* ── Boat Cards ── */
.boats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.75rem;
}

.boat-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: inherit;
    transition: transform 0.25s, box-shadow 0.25s;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.boat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-image {
    position: relative;
    height: 210px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

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

.badge {
    position: absolute;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.badge-type {
    top: 0.75rem;
    right: 0.75rem;
    background: var(--navy);
    color: #fff;
}

.badge-featured {
    top: 0.75rem;
    left: 0.75rem;
    background: var(--gold);
    color: var(--navy);
}

.badge-condition {
    position: static;
    background: #e8f4f0;
    color: #276749;
    margin-right: 0.5rem;
}

.card-body {
    padding: 1.2rem 1.4rem 1.4rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    color: var(--navy);
    margin-bottom: 0.5rem;
}

.card-meta {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    font-size: 0.82rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
}

.card-desc {
    font-size: 0.88rem;
    color: var(--text-mid);
    line-height: 1.55;
    flex: 1;
    margin-bottom: 1rem;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.price {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--ocean);
}

.card-cta {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gold);
    transition: letter-spacing 0.2s;
}

.boat-card:hover .card-cta {
    letter-spacing: 0.05em;
}

/* ── No Results ── */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-mid);
}

.no-results-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.no-results h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: var(--navy);
}

/* ── CTA Section ── */
.cta-section {
    background: var(--navy);
    padding: 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(74,159,212,0.15) 0%, transparent 70%);
}

.cta-box {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.cta-box h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    color: #fff;
    margin-bottom: 0.75rem;
}

.cta-box p {
    color: rgba(255,255,255,0.7);
    font-size: 1.05rem;
    margin-bottom: 2rem;
}

/* ── Buttons ── */
.btn-primary {
    display: inline-block;
    padding: 0.85rem 2.2rem;
    background: var(--gold);
    color: var(--navy);
    border: none;
    border-radius: 8px;
    font-family: 'Heebo', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}

.btn-primary:hover {
    background: var(--gold-light);
    transform: translateY(-1px);
}

.btn-primary.btn-large {
    padding: 1rem 2.8rem;
    font-size: 1.1rem;
}

.btn-secondary {
    display: inline-block;
    padding: 0.85rem 2.2rem;
    background: transparent;
    color: var(--text-mid);
    border: 2px solid var(--border);
    border-radius: 8px;
    font-family: 'Heebo', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    border-color: var(--navy);
    color: var(--navy);
}

.btn-whatsapp {
    display: inline-block;
    padding: 0.85rem 2.2rem;
    background: #25d366;
    color: #fff;
    border-radius: 8px;
    font-family: 'Heebo', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    transition: background 0.2s;
}

.btn-whatsapp:hover {
    background: #1da851;
}

/* ── Boat Detail ── */
.boat-detail {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 4rem;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
    align-items: start;
}

.detail-main-image {
    width: 100%;
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    display: block;
    max-height: 480px;
    object-fit: cover;
}

.detail-badges {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.detail-badges .badge {
    position: static;
    font-size: 0.85rem;
    padding: 0.35rem 0.9rem;
}

.detail-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    color: var(--navy);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.detail-price {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--ocean);
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border);
}

.detail-specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.spec-item {
    background: var(--sand);
    padding: 0.75rem 1rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.spec-icon {
    font-size: 1rem;
}

.spec-label {
    font-size: 0.78rem;
    color: var(--text-light);
    display: block;
    line-height: 1;
}

.spec-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--navy);
}

.spec-item {
    flex-direction: column;
    align-items: flex-start;
}

.detail-description {
    margin-bottom: 2rem;
}

.detail-description h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    color: var(--navy);
    margin-bottom: 0.75rem;
}

.detail-description p {
    color: var(--text-mid);
    line-height: 1.7;
}

.contact-card {
    background: var(--navy);
    padding: 1.5rem;
    border-radius: 14px;
    color: #fff;
}

.contact-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.contact-info {
    color: rgba(255,255,255,0.8);
    margin-bottom: 1.2rem;
    font-size: 0.95rem;
}

.contact-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* ── Form Page ── */
.form-page {
    max-width: 780px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.form-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.form-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    color: var(--navy);
    margin-bottom: 0.5rem;
}

.form-header p {
    color: var(--text-mid);
}

.form-section {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.75rem;
    margin-bottom: 1.5rem;
}

.form-section h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    color: var(--navy);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group--full {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-mid);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-family: 'Heebo', sans-serif;
    font-size: 0.95rem;
    color: var(--text-dark);
    background: #fff;
    transition: border-color 0.2s;
    width: 100%;
}

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

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--ocean);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    padding-top: 0.5rem;
}

.error-box {
    background: #fff5f5;
    border: 2px solid #fc8181;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    color: #c53030;
}

.error-box ul {
    margin: 0.5rem 0 0 1rem;
}

.success-message {
    text-align: center;
    padding: 3rem 2rem;
    background: #fff;
    border-radius: 14px;
    border: 1px solid var(--border);
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.success-message h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--navy);
    margin-bottom: 0.5rem;
}

.success-message p {
    color: var(--text-mid);
    margin-bottom: 2rem;
}

.success-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* ── Footer ── */
.site-footer {
    background: var(--text-dark);
    color: rgba(255,255,255,0.7);
    padding: 3rem 4rem 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 3rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand .logo-text {
    color: var(--gold);
}

.footer-brand p {
    margin-top: 0.75rem;
    font-size: 0.88rem;
    color: rgba(255,255,255,0.5);
}

.footer-links,
.footer-contact {
    display: flex;
    flex-direction: column;
}

.footer-links h4,
.footer-contact h4 {
    color: #fff;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer-links a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 0.88rem;
    margin-bottom: 0.5rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--gold);
}

.footer-contact p {
    font-size: 0.88rem;
    margin-bottom: 0.5rem;
}

.footer-bottom {
    text-align: center;
    padding: 1.25rem;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.4);
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .navbar {
        padding: 1rem 1.5rem;
    }
    
    .hero {
        padding: 3rem 1.5rem 2rem;
    }

    .search-section {
        padding: 1.5rem;
    }

    .listings-section {
        padding: 2rem 1.5rem;
    }
    
    .cta-section {
        padding: 2.5rem 1.5rem;
    }

    .boats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .boat-detail {
        grid-template-columns: 1fr;
        padding: 2rem 1.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 2rem 0;
    }

    .site-footer {
        padding: 1.5rem;
    }
}

@media (max-width: 600px) {
    .logo-text {
        display: none;
    }

    .boats-grid {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .nav-links {
        gap: 1rem;
    }

    .hero-title {
        font-size: 2.2rem;
    }
}

/* ── Admin Styles ── */
.nav-admin {
    color: var(--gold) !important;
    font-weight: 600 !important;
}

.admin-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.admin-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--navy);
}

.admin-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.2rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 120px;
}

.stat-num {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--ocean);
}

.stat-label {
    font-size: 0.82rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

.admin-table-wrap {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.admin-table th {
    background: var(--sand);
    padding: 0.9rem 1rem;
    text-align: right;
    font-weight: 600;
    color: var(--navy);
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

.admin-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table tr:hover td {
    background: #fafaf8;
}

.admin-thumb {
    width: 64px;
    height: 44px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

.btn-toggle {
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    opacity: 0.4;
    transition: opacity 0.2s, transform 0.15s;
    padding: 0;
}

.btn-toggle.active { opacity: 1; }
.btn-toggle:hover  { transform: scale(1.2); }

.admin-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.btn-edit {
    padding: 0.35rem 0.8rem;
    background: #ebf8ff;
    color: #2b6cb0;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
    transition: background 0.2s;
    white-space: nowrap;
}
.btn-edit:hover { background: #bee3f8; }

.btn-delete {
    padding: 0.35rem 0.8rem;
    background: #fff5f5;
    color: #c53030;
    border: none;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}
.btn-delete:hover { background: #fed7d7; }

.alert {
    padding: 0.9rem 1.2rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.alert-success {
    background: #f0fff4;
    border: 1px solid #9ae6b4;
    color: #276749;
}

/* ── Login Page ── */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
    padding: 2rem;
}

.login-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2.5rem;
    width: 100%;
    max-width: 380px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.login-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.login-card h1 {
    font-family: 'Playfair Display', serif;
    font-size: 1.7rem;
    color: var(--navy);
    margin-bottom: 0.4rem;
}

.login-card p {
    color: var(--text-mid);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.login-card .form-group {
    text-align: right;
    margin-bottom: 1.2rem;
}

.btn-block {
    width: 100%;
    display: block;
    text-align: center;
}

.back-link {
    display: block;
    margin-top: 1.2rem;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.88rem;
    transition: color 0.2s;
}
.back-link:hover { color: var(--navy); }

/* ── Image Upload Area ── */
.image-edit-area {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 1.5rem;
    align-items: start;
}

.image-preview {
    width: 200px;
    height: 140px;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid var(--border);
    display: block;
}

.image-inputs {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.divider-or {
    text-align: center;
    color: var(--text-light);
    font-size: 0.85rem;
}

@media (max-width: 600px) {
    .image-edit-area {
        grid-template-columns: 1fr;
    }
    .image-preview {
        width: 100%;
        height: 180px;
    }
    .admin-table { font-size: 0.8rem; }
    .admin-table th, .admin-table td { padding: 0.6rem 0.6rem; }
}

/* ── Gallery Viewer (boat.php) ── */
.gallery-viewer {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.gallery-main-wrap {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    background: #0d2137;
    aspect-ratio: 16/10;
}

.gallery-main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.2s;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(13,33,55,0.7);
    color: #fff;
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: 1.4rem;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.gallery-nav:hover { background: rgba(13,33,55,0.95); }
.gallery-prev { right: 0.75rem; }
.gallery-next { left: 0.75rem; }

.gallery-counter {
    position: absolute;
    bottom: 0.75rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.55);
    color: #fff;
    font-size: 0.8rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
}

.gallery-thumbs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.gallery-thumb {
    width: 68px;
    height: 50px;
    object-fit: cover;
    border-radius: 7px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.15s, opacity 0.15s;
    opacity: 0.65;
}

.gallery-thumb:hover { opacity: 0.9; }
.gallery-thumb.active {
    border-color: var(--gold);
    opacity: 1;
}

/* ── Gallery Grid (edit_boat.php) ── */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.gallery-item {
    position: relative;
    aspect-ratio: 4/3;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--border);
    transition: opacity 0.2s;
}

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

.gallery-item-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.35rem;
    background: linear-gradient(to bottom, rgba(0,0,0,0.35) 0%, transparent 50%);
}

.badge-main {
    background: var(--gold);
    color: var(--navy);
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.btn-delete-img {
    background: rgba(197,48,48,0.85);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    margin-right: auto;
}

.btn-delete-img input { display: none; }
.btn-delete-img:hover { background: rgba(197,48,48,1); }

.gallery-item.marked-deleted {
    opacity: 0.35;
    border-color: #fc8181;
}

.gallery-hint {
    font-size: 0.82rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

/* ── Upload Area ── */
.upload-area {
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 0.5rem;
    transition: border-color 0.2s;
}

.upload-area:hover { border-color: var(--ocean); }

.upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    cursor: pointer;
    gap: 0.4rem;
}

.upload-icon { font-size: 2rem; }

.upload-text {
    font-weight: 600;
    color: var(--navy);
    font-size: 1rem;
}

.upload-sub {
    font-size: 0.82rem;
    color: var(--text-light);
    text-align: center;
}

.new-previews {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0 0.5rem 0.75rem;
}

.new-preview-item {
    position: relative;
    width: 80px;
    height: 60px;
    border-radius: 7px;
    overflow: hidden;
    border: 2px solid var(--ocean);
}

.new-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.new-badge {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(30,96,145,0.85);
    color: #fff;
    font-size: 0.65rem;
    text-align: center;
    padding: 0.1rem;
    font-weight: 600;
}

/* ── SEO / Accessibility ── */
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0);
    white-space: nowrap; border: 0;
}

.breadcrumb {
    background: var(--sand);
    border-bottom: 1px solid var(--border);
    padding: 0.6rem 4rem;
    font-size: 0.82rem;
    color: var(--text-light);
}

.breadcrumb ol {
    list-style: none;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
}

.breadcrumb li + li::before {
    content: '←';
    margin-left: 0.5rem;
    color: var(--border);
}

.breadcrumb a {
    color: var(--ocean);
    text-decoration: none;
}

.breadcrumb a:hover { text-decoration: underline; }

@media (max-width: 900px) {
    .breadcrumb { padding: 0.5rem 1.5rem; }
}
