/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;500;600;700&family=EB+Garamond:wght@400&display=swap');

:root {
    --primary-bg: #021422;
    /* Dark Blue/Black */
    --secondary-bg: #032036;
    /* Slightly lighter for cards/sidebar */
    --accent-color: #C0A162;
    /* Gold */
    --text-color: #F7F6F3;
    /* Off-white */
    --text-muted: #94a3b8;
    --border-color: #1e3a52;
    --sidebar-width: 260px;
    --success-color: #10b981;
    --error-color: #ef4444;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'DM Sans', sans-serif;
    background-color: var(--primary-bg);
    background-image: linear-gradient(rgba(2, 20, 34, 0.40), rgba(2, 20, 34, 0.40)), url('https://thejetfinder.com/wp-content/uploads/2025/11/flightlines-scaled.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    margin: 0;
    color: var(--text-color);
    line-height: 1.6;
}

/* Auth Body Helper */
body.auth-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    /* Background inherited from body */
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 0;
    font-weight: 500;
    color: var(--text-color);
}

h1,
h2,
h3 {
    font-family: 'EB Garamond', serif;
    font-weight: 400 !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #d4b87d;
}

/* Dashboard Layout */
.dashboard-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background-color: var(--primary-bg);
    border-right: 1px solid var(--border-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    padding: 24px;
    position: fixed;
    height: 100%;
    z-index: 2000;
}

.sidebar-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
    /* Ensure height matches main content header */
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-logo {
    max-width: 160px;
    height: auto;
    display: block;
}

.nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
}

.nav-links li {
    margin-bottom: 8px;
}

.nav-links a,
.nav-btn {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    font-size: 0.95rem;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
}

.nav-links a:hover,
.nav-btn:hover {
    background-color: rgba(192, 161, 98, 0.1);
    color: var(--accent-color);
}

.nav-links a.active {
    background-color: var(--accent-color);
    color: var(--primary-bg);
    font-weight: 700;
}

.main-content {
    flex-grow: 1;
    margin-left: var(--sidebar-width);
    padding: 24px 40px;
    /* Match top/bot padding with sidebar, keep ample side padding */
    background-color: transparent;
}

.header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    /* Ensure height matches sidebar header */
    min-height: 80px;
}

.header-bar h1 {
    font-size: 1.8rem;
    margin: 0;
}

/* Cards & Grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.card {
    background: var(--secondary-bg);
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.card h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
    color: var(--accent-color);
}

/* Buttons */
.btn-primary {
    background-color: var(--accent-color);
    color: var(--primary-bg);
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    display: inline-block;
    transition: transform 0.1s, filter 0.2s;
}

.btn-primary:hover {
    background-color: #d4b87d;
    color: var(--primary-bg);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Authentication Pages */
.auth-container {
    background: var(--secondary-bg);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    width: 100%;
    max-width: 420px;
    margin: 20px;
    border: 1px solid var(--border-color);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-logo {
    max-width: 200px;
    margin-bottom: 20px;
}

.auth-header h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.auth-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 14px;
    background-color: var(--primary-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.auth-footer {
    margin-top: 24px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.error-message {
    color: #ef4444;
    background-color: rgba(239, 68, 68, 0.1);
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: none;
    text-align: center;
    font-size: 0.9rem;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Utilities */
.text-accent {
    color: var(--accent-color);
}


/* --- Add Listing Hub Styles --- */

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

.module-card {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    min-height: 180px;
}

.module-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-color: var(--accent-color);
}

.module-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.module-icon {
    font-size: 1.5rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    padding: 10px;
    border-radius: 8px;
}

.module-status {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
}

.status-open {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
}

.status-done {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success-color);
}

.status-active {
    background: rgba(192, 161, 98, 0.2);
    color: var(--accent-color);
}

.module-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-color);
}

.module-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
    flex-grow: 1;
}

.module-action {
    margin-top: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--accent-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.module-action:hover {
    text-decoration: underline;
}

/* Completion Bar Override */
.completion-bar-hub {
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    overflow: hidden;
    margin-top: 20px;
    margin-bottom: 40px;
}

.completion-fill {
    height: 100%;
    background: var(--accent-color);
    width: 0%;
    transition: width 0.5s ease;
}

/* Editor Header */
.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.editor-back {
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.editor-back:hover {
    color: var(--text-color);
}

.editor-box {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

@media(min-width: 992px) {
    .editor-box {
        width: 75%;
        margin: 0 auto;
    }
}


/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-color);
    -webkit-transition: .4s;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: var(--text-muted);
    -webkit-transition: .4s;
    transition: .4s;
}

input:checked+.slider {
    background-color: var(--accent-color);
}

input:focus+.slider {
    box-shadow: 0 0 1px var(--accent-color);
}

input:checked+.slider:before {
    -webkit-transform: translateX(26px);
    -ms-transform: translateX(26px);
    transform: translateX(26px);
    background-color: var(--primary-bg);
}

input:disabled+.slider {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Rounded sliders */
.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Custom Checkbox Styling */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-color);
    transition: color 0.2s;
    user-select: none;
    position: relative;
    /* Context for absolute input */
}

.checkbox-wrapper:hover {
    color: var(--accent-color);
}

.checkbox-wrapper input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 5;
    margin: 0;
}

.checkbox-custom {
    position: relative;
    height: 18px;
    width: 18px;
    background-color: rgba(255, 255, 255, 0.05);
    /* Slight background */
    border: 1px solid rgba(255, 255, 255, 0.3);
    /* Lighter border for visibility */
    border-radius: 3px;
    margin-right: 12px;
    transition: all 0.2s;
    flex-shrink: 0;
}

/* On mouse-over, add a accent border color */
.checkbox-wrapper:hover input~.checkbox-custom {
    border-color: var(--accent-color);
}

/* When the checkbox is checked, add accent background */
.checkbox-wrapper input:checked~.checkbox-custom {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

/* Create the checkmark/indicator (hidden when not checked) */
.checkbox-custom:after {
    content: "";
    position: absolute;
    display: none;
}

/* Show the checkmark when checked */
.checkbox-wrapper input:checked~.checkbox-custom:after {
    display: block;
}

/* Style the checkmark/indicator */
.checkbox-wrapper .checkbox-custom:after {
    left: 5px;
    top: 1px;
    width: 6px;
    height: 11px;
    border: solid #0f172a;
    /* Dark background color for contrast against Gold accent */
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Image Management */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.image-card {
    position: relative;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    background: var(--secondary-bg);
    aspect-ratio: 16/9;
    cursor: grab;
    transition: transform 0.2s, box-shadow 0.2s;
}

.image-card:active {
    cursor: grabbing;
}

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

.image-card.dragging {
    opacity: 0.5;
    border: 2px dashed var(--accent-color);
}

.image-card .actions {
    position: absolute;
    top: 5px;
    right: 5px;
    display: flex;
    gap: 5px;
    background: rgba(0, 0, 0, 0.6);
    padding: 4px;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.2s;
}

.image-card:hover .actions {
    opacity: 1;
}

.image-card button {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 4px;
    font-size: 0.9rem;
}

.image-card button:hover {
    color: var(--accent-color);
    transform: scale(1.1);
}

.image-card .featured-badge {
    position: absolute;
    top: 5px;
    left: 5px;
    background: var(--accent-color);
    color: var(--primary-bg);
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
    display: none;
}

.image-card.is-featured {
    border: 2px solid var(--accent-color);
}

.image-card.is-featured .featured-badge {
    display: block;
}

.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s;
}


/* --- Landing Page Styles --- */

.landing-body {
    background-color: var(--primary-bg);
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.landing-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    width: 100%;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Header & Navigation Redesign */
.header-nav {
    display: flex;
    justify-content: space-between;
    /* Space between Hamburg, Logo, Phone */
    align-items: center;
    padding: 20px 40px;
    background: transparent;
    /* Or a slight gradient if needed */
    position: relative;
    z-index: 1000;
}

.nav-left,
.nav-right {
    width: 60px;
    /* Balance the center logo */
    display: flex;
    justify-content: center;
}

.nav-left i {
    font-size: 1.5rem;
    color: #fff;
    cursor: pointer;
    transition: color 0.2s;
}

.nav-right i {
    font-size: 1.2rem;
    color: #fff;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px;
    border-radius: 50%;
    transition: all 0.2s;
}

.nav-left i:hover,
.nav-right i:hover {
    color: var(--accent-color);
    border-color: var(--accent-color);
}

.header-logo img {
    height: 50px;
    width: auto;
}

/* Mobile Sidebar Menu */
.mobile-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 340px;
    background: var(--primary-bg);
    border-right: 1px solid #bfa163;
    z-index: 2000;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    padding: 40px;
    display: flex;
    flex-direction: column;
}

.mobile-sidebar.active {
    transform: translateX(0);
}

.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(2, 20, 34, 0.77);
    z-index: 1999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.mobile-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.sidebar-brand {
    margin-bottom: 50px;
}

.sidebar-brand img {
    height: 50px;
}

.sidebar-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-links li {
    margin-bottom: 25px;
}

.sidebar-links a {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 500;
    transition: color 0.2s;
}

.sidebar-links a:hover {
    color: var(--accent-color);
}

/* CTA Card in Sidebar */
.sidebar-promo {
    margin-top: auto;
    background: url('https://thejetfinder.com/wp-content/uploads/2021/04/Falcon-7X-For-Sale.jpg') center/cover;
    height: 150px;
    border-radius: 8px;
    display: flex;
    align-items: flex-end;
    position: relative;
    overflow: hidden;
}

.sidebar-promo::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
}

.promo-content {
    position: relative;
    z-index: 2;
    padding: 15px;
    width: 100%;
}

.promo-btn {
    display: block;
    background: var(--accent-color);
    color: #000;
    text-align: center;
    padding: 8px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.landing-header {
    text-align: center;
    margin-top: 40px;
    margin-bottom: 60px;
    animation: fadeInDown 1s ease-out;
}

/* Hide old logo since it is in nav now */
.landing-logo {
    display: none;
}

.landing-header h1 {
    font-size: 3.5rem;
    background: linear-gradient(to right, #C0A162, #e6d3a3, #C0A162);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
}

.landing-header p {
    font-size: 1.2rem;
    color: var(--text-muted);
}

.category-selection {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 60px;
}

.category-card {
    position: relative;
    height: 500px;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s, box-shadow 0.3s;
    background-size: cover;
    background-position: center;
    border: 1px solid var(--border-color);
}

/* Specific Backgrounds (Placeholders updated to nice ones) */
#cat-jet {
    background-image: url('https://thejetfinder.com/wp-content/uploads/2021/04/G650ER-Main-Image.jpg');
}

#cat-turboprop {
    background-image: url('https://thejetfinder.com/wp-content/uploads/2021/04/PC-12-NGX-Exterior.jpg');
}

#cat-helicopter {
    background-image: url('https://images.unsplash.com/photo-1542259695-88891f73752e?q=80&w=1920&auto=format&fit=crop');
}

/* Fallbacks if external images fail or for better local dev */
#cat-jet,
#cat-turboprop,
#cat-helicopter {
    background-color: var(--secondary-bg);
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
    border-color: var(--accent-color);
}

.cat-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(2, 20, 34, 0.95), rgba(2, 20, 34, 0.2));
    transition: background 0.3s;
}

.category-card:hover .cat-overlay {
    background: linear-gradient(to top, rgba(2, 20, 34, 0.8), rgba(2, 20, 34, 0.1));
}

.cat-content {
    position: absolute;
    bottom: 40px;
    left: 40px;
    right: 40px;
    z-index: 10;
}

.cat-content h2 {
    font-size: 2rem;
    color: #fff;
    margin-bottom: 15px;
    font-weight: 700;
}

.view-btn {
    display: inline-block;
    padding: 10px 20px;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    border-radius: 30px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.category-card:hover .view-btn {
    background: var(--accent-color);
    color: var(--primary-bg);
}

.landing-footer {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: auto;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 992px) {
    .category-selection {
        grid-template-columns: 1fr;
    }

    .landing-header h1 {
        font-size: 2.5rem;
    }
}

/* --- Inventory Page Styles --- */

.inventory-body {
    background-color: var(--primary-bg);
    color: var(--text-color);
    min-height: 100vh;
}

.inv-nav {
    background: rgba(2, 20, 34, 0.95);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 40px;
    display: flex;
    justify-content: center;
    /* Center the logo */
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.inv-logo {
    position: relative;
    /* Ensure it stays in flow for checking sizes if needed, or just normal block */
    z-index: 10;
}

.inv-logo img {
    height: 50px;
    /* Slightly larger for center prominent view? or keep 40 */
}

.inv-nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
    position: absolute;
    right: 40px;
    /* Pin to right */
    top: 50%;
    transform: translateY(-50%);
}

.inv-nav-links a {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
}

.inv-nav-links a.active,
.inv-nav-links a:hover {
    color: var(--accent-color);
}

.nav-btn-outline {
    border: 1px solid var(--border-color);
    padding: 8px 18px;
    border-radius: 6px;
    transition: all 0.2s;
}

.nav-btn-outline:hover {
    border-color: var(--accent-color);
    color: var(--accent-color) !important;
}

.inv-layout {
    display: flex;
    flex-direction: row;
    min-height: calc(100vh - 80px);
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
    padding: 0 40px;
    /* Outer gutter */
}

.inv-sidebar {
    width: 300px;
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 95px 20px 30px 0;
    align-self: flex-start;
    position: sticky;
    top: 110px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

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

.filter-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-color);
}

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

.filter-group label {
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.filter-group select {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 10px;
    border-radius: 6px;
    width: 100%;
    cursor: pointer;
}

.filter-group select:focus {
    border-color: var(--accent-color);
    outline: none;
}

/* Common button styles */
.btn-primary.full-width {
    width: 100%;
}

#reset-filters-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-decoration: underline;
    cursor: pointer;
}


.inv-content {
    flex: 1;
    padding: 40px;
    width: 100%;
}

/* Ensure grid responsivness */
.inv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.inv-content {
    flex-grow: 1;
    padding: 30px 40px;
}

.inv-actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.inv-actions-bar h1 {
    font-size: 1.5rem;
    margin: 0;
}

.sort-wrapper select {
    background: var(--secondary-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    border-radius: 6px;
    margin-left: 10px;
    cursor: pointer;
}

/* Grid */
.inv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.inv-card {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.inv-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: var(--accent-color);
}

.inv-card-img {
    height: 220px;
    position: relative;
}

.inv-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.inv-category-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    text-transform: capitalize;
    /* jet -> Jet */
}

.inv-card-body {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.inv-card-body h3 {
    margin: 0 0 10px 0;
    font-size: 1.4rem;
    color: #fff;
}

.inv-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 15px;
    line-height: 1.4;
    /* Removed fixed height */
}

.inv-specs {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.inv-specs i {
    color: var(--accent-color);
    margin-right: 5px;
}

.inv-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 10px;
}

.inv-location {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
    border-top: 1px solid var(--border-color);
    padding-top: 10px;
    margin-top: auto;
}

.inv-btn {
    display: block;
    text-align: center;
    background: transparent;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    padding: 10px;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.2s;
}

.inv-btn:hover {
    background: var(--accent-color);
    color: var(--primary-bg);
}

.no-results,
.loading,
.error {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px;
    color: var(--text-muted);
    font-size: 1.2rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
}

/* Header Override for Inventory/Listing */
.inv-header-bg {
    background-color: var(--primary-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-logo img {
    max-height: 40px;
}

/* Footer Styles */
.site-footer {
    width: 100%;
    margin-top: auto;
    background: var(--primary-bg);
    color: var(--text-color);
    padding-top: 60px;
}

.footer-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, rgba(30, 58, 82, 0) 0%, rgba(30, 58, 82, 1) 50%, rgba(30, 58, 82, 0) 100%);
    margin-bottom: 40px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 60px 20px;
}

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

.footer-col h4 {
    color: var(--accent-color);
    margin-bottom: 20px;
    font-size: 1.1rem;
}

/* Breadcrumbs */
.breadcrumbs {
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-col a {
    display: block;
    color: var(--text-muted);
    margin-bottom: 10px;
    transition: color 0.2s;
    font-size: 0.95rem;
}

.footer-col a:hover {
    color: var(--accent-color);
}

.footer-copyright {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

/* Autofill Override */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px var(--primary-bg) inset !important;
    -webkit-text-fill-color: var(--text-color) !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* Landing Page Styles */
.landing-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    min-height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.landing-content-centered {
    margin: auto;
    width: 100%;
}

.landing-header {
    text-align: center;
    margin-bottom: 60px;
    margin-top: 40px;
}

.landing-header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    color: var(--accent-color);
}

.landing-header p {
    color: var(--text-muted);
    font-size: 1.2rem;
}

.category-selection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.category-card {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    text-decoration: none;
    transition: transform 0.3s, box-shadow 0.3s;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 420px;
    /* Reduced from 500px for better proportion */
    position: relative;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: var(--accent-color);
}

.card-img {
    height: 50%;
    /* Strictly half the card as requested */
    width: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.3s;
}

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

.cat-content {
    flex-grow: 1;
    width: 100%;
    /* Ensure full width */
    padding: 50px 20px 0 20px;
    /* Push content down safely */
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Vertically center within the reduced space */
    align-items: center;
    gap: 15px;
    text-align: center;
    position: relative;
    z-index: 1;
    left: 0 !important;
    right: 0 !important;
    margin: 0 !important;
}

.cat-content h2 {
    font-size: 1.5rem;
    margin: 0 !important;
    /* Remove margin, rely on gap */
    width: 100%;
    /* Ensure text block is full width */
    color: #fff;
    text-align: center !important;
    line-height: 1.2;
    font-weight: 400 !important;
    /* Tighter line height for better bounding box */
}

.view-btn {
    color: var(--accent-color);
    font-weight: 600;
    border: 1px solid var(--accent-color);
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.2s;
}

.category-card:hover .view-btn {
    background: var(--accent-color);
    color: var(--primary-bg);
}

.landing-footer {
    text-align: center;
    padding: 40px 0;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

/* Fix Filter Input Style */
#filter-manufacturer {
    background-color: var(--secondary-bg);
    color: #fff;
    border: 1px solid var(--border-color);
    padding: 10px;
    border-radius: 6px;
}

#filter-manufacturer:focus {
    border-color: var(--accent-color);
    outline: none;
}

/* Autocomplete Styles */
.autocomplete-items {
    position: absolute;
    border: 1px solid var(--border-color);
    border-bottom: none;
    border-top: none;
    z-index: 10000 !important;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--secondary-bg) !important;
    border-radius: 0 0 6px 6px;
    max-height: 250px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.autocomplete-items div {
    padding: 12px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
    background-color: var(--secondary-bg);
}

.autocomplete-items div:hover {
    background-color: var(--accent-color) !important;
    color: var(--primary-bg) !important;
}

.autocomplete-active {
    background-color: var(--accent-color) !important;
    color: var(--primary-bg) !important;
}

/* Mobile Sidebar Styles */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.mobile-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 320px;
    height: 100%;
    background: var(--primary-bg);
    z-index: 3000;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    padding: 20px;
    border-right: 1px solid var(--accent-color);
}

.mobile-sidebar.active {
    transform: translateX(0);
}

.sidebar-brand {
    text-align: center;
    margin-bottom: 30px;
}

.sidebar-brand img {
    max-width: 260px;
    width: 100%;
    height: auto;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mobile-nav-links a {
    color: var(--text-color);
    font-size: 1.1rem;
    text-decoration: none;
    padding: 10px;
    border-radius: 6px;
    transition: background 0.2s;
}

.mobile-nav-links a:hover,
.mobile-nav-links a.active {
    background: rgba(255, 255, 255, 0.05);
    color: var(--accent-color);
}

.mobile-divider {
    height: 1px;
    background: var(--border-color);
    margin: 10px 0;
}

.sidebar-promo {
    margin-top: auto;
    text-align: center;
}

.promo-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: var(--accent-color);
    color: var(--primary-bg);
    font-weight: bold;
    border-radius: 6px;
    text-align: center;
}

/* Inner Card for Uploads Split */
.inner-card {
    background: var(--primary-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
}

.inner-card h4 {
    margin-top: 0 !important;
}

/* Quill Editor Overrides */
.ql-toolbar.ql-snow {
    background: #e9ecef;
    /* Standard grey toolbar */
    border-color: var(--border-color) !important;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.ql-container.ql-snow {
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    background: #fff;
    color: #000;
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    height: 300px;
    /* Default height */
    min-height: 150px;
    resize: vertical;
    overflow: hidden !important;
    /* Important for resize handle to show properly */
}

/* Ensure toolbar icons are visible */
.ql-snow .ql-stroke {
    stroke: #333 !important;
}

.ql-snow .ql-fill {
    fill: #333 !important;
}

.ql-snow .ql-picker {
    color: #333 !important;
}