/**
 * Elite Auto Vault - Custom Premium Stylesheet
 * Brand Theme: Luxury Black + Brushed Gold, Apple-inspired glassmorphism, mobile-only shell.
 */

/* Google Fonts - Inter and Playfair Display (for headlines) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,600;0,700;1,400&display=swap');

/* Color Variables */
:root {
    --bg-main: #0a0a0a;
    --bg-card: rgba(21, 21, 21, 0.75);
    --border-card: rgba(212, 175, 55, 0.15);
    --gold: #D4AF37;
    --gold-glow: rgba(212, 175, 55, 0.35);
    --gold-gradient: linear-gradient(135deg, #D4AF37 0%, #AA7C11 100%);
    --gold-gradient-hover: linear-gradient(135deg, #e5c04f 0%, #c4921b 100%);
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-serif: 'Playfair Display', Georgia, serif;
    --shadow-premium: 0 8px 32px 0 rgba(0, 0, 0, 0.8);
    --glass-blur: blur(20px);
    
    /* Device wrapper settings */
    --device-width: 430px;
    --device-height: 932px; /* standard iPhone 14/15 Pro Max aspect ratio */
}

/* Dark/Light settings - Force Dark mode but support toggles */
.light-mode {
    --bg-main: #f5f5f7;
    --bg-card: rgba(255, 255, 255, 0.85);
    --border-card: rgba(212, 175, 55, 0.25);
    --text-primary: #1d1d1f;
    --text-secondary: #515154;
    --text-muted: #86868b;
    --shadow-premium: 0 8px 32px 0 rgba(0, 0, 0, 0.08);
}

/* Core Resets */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: #ececec; /* Light grey desktop backdrop */
    font-family: var(--font-sans);
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Mobile iOS-Like App Shell Frame */
.app-container {
    width: 100%;
    max-width: var(--device-width);
    height: 100vh;
    background-color: var(--bg-main);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    scrollbar-width: none; /* Hide scrollbar for Firefox */
    box-shadow: var(--shadow-premium);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Hide scrollbar for Chrome/Safari */
.app-container::-webkit-scrollbar {
    display: none;
}

/* On desktops, give it a floating native app appearance */
@media (min-width: 440px) {
    body {
        padding: 20px 0;
    }
    .app-container {
        height: var(--device-height);
        border-radius: 40px;
        border: 12px solid #1a1a1a; /* Thick bezel for premium feel */
        outline: 4px solid #333;
    }
}

/* Sticky Header styling */
header.app-header {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header.app-header .logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

header.app-header .logo-text {
    font-family: var(--font-sans);
    font-weight: 800;
    font-size: 18px;
    letter-spacing: 0.5px;
    color: var(--text-primary);
}

header.app-header .logo-text span {
    color: var(--gold);
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

header.app-header .actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.icon-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 20px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    transition: background 0.2s;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Navigation Bottom bar */
nav.app-nav {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-around;
    padding: 8px 4px 12px 4px;
}

nav.app-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 500;
    gap: 4px;
    flex: 1;
    transition: color 0.2s;
}

nav.app-nav .nav-item i {
    font-size: 20px;
}

nav.app-nav .nav-item.active {
    color: var(--gold);
}

/* Page content area */
main.app-content {
    flex: 1;
    padding: 16px;
    padding-bottom: 40px; /* Add safety space above bottom nav */
}

/* Premium Typography Elements */
h1.hero-title {
    font-family: var(--font-serif);
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 8px;
}

h2.section-title {
    font-size: 20px;
    font-weight: 700;
    margin: 24px 0 12px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-primary);
}

h2.section-title span {
    font-size: 12px;
    color: var(--gold);
    font-weight: 500;
    text-decoration: none;
}

/* Premium Button Gradients */
.btn-primary {
    background: var(--gold-gradient);
    color: #000000;
    border: none;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.2);
    text-decoration: none;
    text-align: center;
}

.btn-primary:active {
    transform: scale(0.96);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s;
    text-decoration: none;
    text-align: center;
}

.btn-secondary:active {
    background: rgba(255, 255, 255, 0.12);
}

/* Glassmorphism Cards styling */
.premium-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 18px;
    padding: 16px;
    margin-bottom: 16px;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}

.premium-card:active {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(212, 175, 55, 0.1);
}

/* Hero Section Banner */
.hero-banner {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    margin-bottom: 20px;
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-banner::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.4) 60%, rgba(0,0,0,0) 100%);
    z-index: 1;
}

.hero-banner-content {
    position: relative;
    z-index: 2;
}

.hero-badge {
    background: var(--gold-gradient);
    color: #000;
    font-size: 10px;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 8px;
}

/* Search engine layout */
.search-bar-container {
    position: relative;
    margin-bottom: 20px;
}

.search-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 14px 16px 14px 44px;
    font-size: 14px;
    color: #fff;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.search-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 10px var(--gold-glow);
}

.search-bar-container i.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 16px;
}

.search-bar-container i.voice-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gold);
    font-size: 16px;
    cursor: pointer;
}

/* Carousel/Horizontal Horizontal sliders */
.horizontal-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 12px;
    margin: 0 -16px;
    padding-left: 16px;
    padding-right: 16px;
    scrollbar-width: none;
}

.horizontal-scroll::-webkit-scrollbar {
    display: none;
}

/* Vehicle card styles */
.car-card-mini {
    flex: 0 0 180px;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: #fff;
    display: flex;
    flex-direction: column;
}

.car-card-mini img {
    width: 100%;
    height: 110px;
    object-fit: cover;
}

.car-card-mini-info {
    padding: 10px;
}

.car-card-mini-brand {
    font-size: 10px;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 700;
}

.car-card-mini-name {
    font-size: 13px;
    font-weight: 600;
    margin: 2px 0 6px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary);
}

.car-card-mini-price {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
}

/* Brand circle indicators */
.brand-circle {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 500;
    gap: 6px;
    flex: 0 0 70px;
}

.brand-circle-logo {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: #151515;
    border: 1px solid var(--border-card);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    padding: 10px;
    transition: transform 0.2s;
}

.brand-circle:active .brand-circle-logo {
    transform: scale(0.92);
}

.brand-circle-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: brightness(0.9) contrast(1.1);
}

/* Specification detail grid layouts */
.spec-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 15px 0;
}

.spec-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 10px;
}

.spec-label {
    font-size: 10px;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 2px;
}

.spec-value {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Dynamic Comparer Columns */
.compare-selector-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.compare-col {
    background: #151515;
    border: 1px dashed var(--border-card);
    border-radius: 14px;
    padding: 15px 10px;
    text-align: center;
    cursor: pointer;
    min-height: 110px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 12px;
    transition: all 0.2s;
}

.compare-col.selected {
    border-style: solid;
    background: rgba(212, 175, 55, 0.05);
}

/* Hub category tiles */
.hub-tile {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 10px;
    text-decoration: none;
    color: #fff;
    transition: background 0.2s;
}

.hub-tile:active {
    background: rgba(212, 175, 55, 0.08);
}

.hub-tile-icon {
    width: 40px;
    height: 40px;
    background: var(--gold-gradient);
    color: #000;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
}

.hub-tile-info h4 {
    font-size: 14px;
    font-weight: 600;
}

.hub-tile-info p {
    font-size: 11px;
    color: var(--text-secondary);
}

/* Article & News lists layout */
.article-row {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    text-decoration: none;
    color: #fff;
}

.article-row img {
    width: 90px;
    height: 70px;
    object-fit: cover;
    border-radius: 10px;
}

.article-row-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.article-row-tag {
    font-size: 9px;
    font-weight: 700;
    color: var(--gold);
    text-transform: uppercase;
}

.article-row-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    margin: 2px 0;
}

.article-row-date {
    font-size: 10px;
    color: var(--text-muted);
}

/* Accordion FAQs */
.faq-accordion {
    margin-bottom: 12px;
}

.faq-header {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 14px 16px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
}

.faq-content {
    display: none;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.01);
    font-size: 12.5px;
    color: var(--text-secondary);
    line-height: 1.5;
    border-left: 2px solid var(--gold);
    margin-top: -2px;
    border-radius: 0 0 10px 10px;
}

.faq-accordion.open .faq-content {
    display: block;
}

.faq-accordion.open .faq-header {
    border-radius: 10px 10px 0 0;
    border-bottom: none;
}

/* Auto-calculator input sliders and metrics */
.calculator-container label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 6px;
    margin-top: 14px;
}

.input-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #252525;
    outline: none;
    margin: 8px 0;
}

.input-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--gold);
    cursor: pointer;
    box-shadow: 0 0 6px var(--gold-glow);
}

.calculator-results {
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid var(--gold);
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    margin-top: 20px;
}

.calc-output {
    font-size: 24px;
    font-weight: 800;
    color: var(--gold);
    margin-top: 4px;
}

/* 360 viewer style */
.viewer-360-container {
    height: 200px;
    background: #111;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 10px;
    position: relative;
    cursor: grab;
    overflow: hidden;
}

.viewer-360-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.8);
    border: 1px solid var(--gold);
    color: var(--gold);
    font-size: 9px;
    padding: 3px 6px;
    border-radius: 4px;
    font-weight: 700;
}

.viewer-circle-indicator {
    width: 50px;
    height: 50px;
    border: 2px dashed var(--gold);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 16px;
    animation: rotate 8s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Comparison Detail Table styling */
.compare-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.compare-row {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.compare-label-header {
    background: rgba(255, 255, 255, 0.02);
    font-size: 11px;
    font-weight: 700;
    color: var(--gold);
    padding: 8px 10px;
    text-transform: uppercase;
}

.compare-cell-val {
    padding: 10px;
    font-size: 12px;
    vertical-align: top;
    color: var(--text-primary);
}

.compare-sub-label {
    font-size: 10px;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 2px;
}

/* PWA update popup */
.pwa-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gold-gradient);
    color: #000;
    padding: 12px 20px;
    border-radius: 12px;
    z-index: 1000;
    font-weight: 700;
    font-size: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Admin Dashboard panel styling */
.admin-card-metric {
    background: #151515;
    border-left: 4px solid var(--gold);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 12px;
}

/* Breadcrumb Styling */
.breadcrumb {
    font-size: 10px;
    color: var(--text-secondary);
    display: flex;
    gap: 4px;
    align-items: center;
    margin-bottom: 12px;
}

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

.breadcrumb span {
    color: var(--text-muted);
}
