/* ═══════════════════════════════════════════════════════════════
   INVENTORY DETAIL — Page-Specific Components
   Depends on design-system.css for variables, reset, base type, hero/header.
   site.css provides legacy variable aliases (--space-md, --header-h, etc.).
   ═══════════════════════════════════════════════════════════════ */

/* Accordion Specifications Section */
.accordion-specs-section {
    padding: var(--space-xl) 0 var(--space-3xl);
    background: var(--paper);
}

.accordion-item {
    border-top: 2px solid var(--gold);
}

.accordion-item:last-child {
    border-bottom: 1px solid var(--ash);
}

.accordion-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) var(--space-sm);
    min-height: 56px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 400;
    color: var(--ink);
    text-align: left;
    transition: all var(--transition-fast);
}

.accordion-header:hover {
    color: var(--charcoal);
    background: var(--bone);
}

.accordion-header:active {
    background: var(--ash);
}

.accordion-title {
    font-size: 0.9375rem;
    font-weight: 400;
}

.accordion-icon {
    font-size: 1.5rem;
    font-weight: 300;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bone);
    border-radius: 50%;
    color: var(--charcoal);
    transition: all var(--transition-fast);
}

.accordion-header[aria-expanded="true"] .accordion-icon {
    background: var(--gold);
    color: var(--paper);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding: 0;
}

.accordion-content p {
    padding: 0 0 var(--space-xs) 0;
    margin: 0;
}

.accordion-item-text {
    font-size: 0.875rem;
    color: var(--charcoal);
    line-height: 1.6;
}

.accordion-header[aria-expanded="true"] + .accordion-content {
    padding-bottom: var(--space-md);
}

/* Inquiry Form */
.inquiry-form-section {
    padding: var(--space-xl);
    background: var(--bone);
    border-radius: 8px;
    margin-top: var(--space-xl);
    border: 1px solid var(--ash);
}

.inquiry-form-section h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: var(--space-md);
    color: var(--ink);
}

.inquiry-form {
    display: grid;
    gap: var(--space-md);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
}

@media (min-width: 640px) {
    .form-row { grid-template-columns: 1fr 1fr; }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--charcoal);
}

.form-group input,
.form-group textarea {
    padding: 0.875rem 1rem;
    font-family: var(--font-body);
    font-size: 1rem;
    border: 1px solid var(--ash);
    border-radius: 4px;
    background: var(--paper);
    color: var(--ink);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(139, 115, 85, 0.2);
}

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

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--stone);
}

.form-submit {
    display: flex;
    gap: var(--space-md);
    align-items: center;
    flex-wrap: wrap;
}

.form-submit .btn {
    flex-shrink: 0;
}

.form-note {
    font-size: 0.8125rem;
    color: var(--charcoal);
}

.form-success {
    display: none;
    padding: var(--space-lg);
    background: rgba(45, 106, 79, 0.1);
    border: 1px solid var(--positive);
    border-radius: 8px;
    text-align: center;
    color: var(--positive);
}

.form-success.show {
    display: block;
}

.form-success h4 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    margin-bottom: var(--space-xs);
}

/* Aircraft Prev/Next Navigation */
.aircraft-nav {
    padding: var(--space-xl) 0;
    border-top: 1px solid var(--ash);
    background: var(--paper);
}

.aircraft-nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    text-decoration: none;
    color: var(--charcoal);
    font-size: 0.9375rem;
    transition: color var(--transition-fast);
}

.nav-link:hover { color: var(--ink); }

.nav-link--disabled {
    opacity: 0.3;
    pointer-events: none;
}

.nav-link svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.nav-link-text {
    display: flex;
    flex-direction: column;
}

.nav-link-label {
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--stone);
}

.nav-link-title {
    font-weight: 500;
    color: var(--ink);
}

/* Gallery Section */
.gallery-section {
    padding: var(--space-3xl) 0;
    background: var(--bone);
}

.gallery-section h2 {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-md);
    max-width: 1000px;
    margin: 0 auto;
}

.gallery-item {
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: 8px;
    background: var(--paper);
    cursor: pointer;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

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

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
}

.lightbox.active { display: flex; }

.lightbox img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
}

.lightbox-close {
    position: absolute;
    top: var(--space-lg);
    right: var(--space-lg);
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 20px;
    cursor: pointer;
}

.lightbox-prev { left: var(--space-lg); }
.lightbox-next { right: var(--space-lg); }

/* Media Sections — Video & 3D Tour */
.media-section {
    padding: var(--space-3xl) 0;
    background: var(--paper);
}

.media-section h2 {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.video-container,
.tour-container {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
}

.video-container iframe,
.tour-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.media-caption {
    text-align: center;
    margin-top: var(--space-md);
    font-size: 0.875rem;
    color: var(--charcoal);
}

/* Mobile Bottom Navigation */
.mobile-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--paper);
    border-top: 1px solid var(--ash);
    padding: var(--space-xs) 0;
    padding-bottom: calc(var(--space-xs) + env(safe-area-inset-bottom, 0));
    z-index: 100;
}

@media (min-width: 768px) { .mobile-nav { display: none; } }

.mobile-nav a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: var(--space-xs);
    min-height: 48px;
    text-decoration: none;
    color: var(--charcoal);
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 150ms ease;
    position: relative;
}

.mobile-nav a:hover,
.mobile-nav a.active { color: var(--ink); }

.mobile-nav a:active {
    background: var(--ash);
    transform: scale(0.95);
}

.mobile-nav a.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 2px;
    background: var(--gold);
}

.mobile-nav svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    stroke-width: 1.5;
    fill: none;
}

@media (max-width: 767px) {
    body { padding-bottom: 80px; }
}

/* ═══════════════════════════════════════════════════════════════
   DARK MODE OVERRIDES — Inventory Detail Components
   ═══════════════════════════════════════════════════════════════ */

html[data-theme="dark"] .gallery-item:hover {
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .inquiry-form-section {
    background: #1A1A1A;
    border-color: #2A2A2A;
}

html[data-theme="dark"] .mobile-nav {
    background: #121212;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
