/* =============================================
   AUTOMARKET - Estilos principales
   ============================================= */
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600;700;800&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
    --primary: #0a2540;
    --secondary: #e85d04;
    --accent: #00b4d8;
    --success: #06d6a0;
    --danger: #ef233c;
    --bg: #f0f4f8;
    --card: #ffffff;
    --text: #1a2332;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --shadow: 0 4px 24px rgba(10,37,64,0.10);
    --shadow-lg: 0 12px 48px rgba(10,37,64,0.16);
    --radius: 14px;
    --radius-sm: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

h1,h2,h3,h4,h5 { font-family: 'Sora', sans-serif; }

a { text-decoration: none; color: inherit; }

/* =============================================
   HEADER
   ============================================= */
.header {
    background: var(--primary);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 20px rgba(0,0,0,0.2);
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    height: 68px;
    gap: 24px;
}

.logo {
    font-family: 'Sora', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.logo span { color: var(--secondary); }

.search-bar {
    flex: 1;
    max-width: 520px;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 10px 20px 10px 44px;
    border-radius: 50px;
    border: none;
    background: rgba(255,255,255,0.12);
    color: #fff;
    font-size: 0.92rem;
    font-family: 'DM Sans', sans-serif;
    outline: none;
    transition: background 0.2s;
}

.search-bar input::placeholder { color: rgba(255,255,255,0.55); }
.search-bar input:focus { background: rgba(255,255,255,0.2); }

.search-bar svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,0.55);
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 20px;
    border-radius: 50px;
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary { background: var(--secondary); color: #fff; }
.btn-primary:hover { background: #c44e03; transform: translateY(-1px); }

.btn-outline {
    background: transparent;
    color: #fff;
    border: 1.5px solid rgba(255,255,255,0.3);
}
.btn-outline:hover { background: rgba(255,255,255,0.1); }

.btn-sm { padding: 6px 14px; font-size: 0.8rem; }

/* =============================================
   HERO BANNER
   ============================================= */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, #1a4480 50%, #0077b6 100%);
    padding: 60px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content { position: relative; z-index: 1; max-width: 700px; margin: 0 auto; }

.hero h1 {
    font-size: 2.8rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.15;
    margin-bottom: 16px;
}

.hero h1 span { color: var(--secondary); }

.hero p {
    color: rgba(255,255,255,0.8);
    font-size: 1.1rem;
    margin-bottom: 32px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
}

.hero-stat { text-align: center; }
.hero-stat strong {
    display: block;
    font-family: 'Sora', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: var(--secondary);
}
.hero-stat span { color: rgba(255,255,255,0.7); font-size: 0.85rem; }

/* =============================================
   LAYOUT PRINCIPAL
   ============================================= */
.main-layout {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px 24px;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 28px;
    align-items: start;
}

/* =============================================
   SIDEBAR FILTROS
   ============================================= */
.sidebar {
    background: var(--card);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    position: sticky;
    top: 88px;
}

.sidebar-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.filter-group {
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
}

.filter-group:last-child { border-bottom: none; }

.filter-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    color: var(--text);
}

.filter-label svg { transition: transform 0.2s; }
.filter-group.open .filter-label svg { transform: rotate(180deg); }

.filter-body { display: none; margin-top: 12px; }
.filter-group.open .filter-body { display: block; }

.filter-select {
    width: 100%;
    padding: 8px 12px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.88rem;
    color: var(--text);
    background: #fff;
    outline: none;
}

.filter-select:focus { border-color: var(--accent); }

.filter-range {
    display: flex;
    gap: 8px;
    align-items: center;
}

.filter-range input {
    flex: 1;
    padding: 7px 10px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    outline: none;
    font-family: 'DM Sans', sans-serif;
}

.filter-range input:focus { border-color: var(--accent); }

.toggle-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
}

.toggle-label { font-weight: 500; font-size: 0.9rem; }

.toggle {
    width: 44px; height: 24px;
    background: var(--border);
    border-radius: 50px;
    position: relative;
    cursor: pointer;
    transition: background 0.2s;
    border: none;
    outline: none;
}

.toggle::after {
    content: '';
    position: absolute;
    width: 18px; height: 18px;
    background: #fff;
    border-radius: 50%;
    top: 3px; left: 3px;
    transition: left 0.2s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.toggle.active { background: var(--secondary); }
.toggle.active::after { left: 23px; }

.btn-filter {
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    margin-top: 16px;
    transition: background 0.2s;
}

.btn-filter:hover { background: var(--secondary); }

/* =============================================
   GRILLA DE AUTOS
   ============================================= */
.catalog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 12px;
}

.catalog-title {
    font-family: 'Sora', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
}

.catalog-title span { color: var(--text-muted); font-weight: 400; font-size: 0.9rem; }

.sort-select {
    padding: 8px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    outline: none;
    background: #fff;
}

.cars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 20px;
}

/* =============================================
   CARD AUTO
   ============================================= */
.car-card {
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

.car-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.car-img-wrap {
    position: relative;
    aspect-ratio: 16/10;
    background: #f1f5f9;
    overflow: hidden;
}

.car-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.car-card:hover .car-img-wrap img { transform: scale(1.04); }

.car-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e2e8f0, #f8fafc);
    color: #94a3b8;
    font-size: 3rem;
}

.badge-reciente {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--primary);
    color: #fff;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.badge-reciente.destacado { background: var(--secondary); }

.btn-fav {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: transform 0.2s;
    color: #94a3b8;
}

.btn-fav:hover { transform: scale(1.15); color: var(--danger); }
.btn-fav.active { color: var(--danger); }

.car-body { padding: 18px; }

.car-name {
    font-family: 'Sora', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 2px;
}

.car-version {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.car-finance {
    background: #fff7ed;
    border: 1.5px solid var(--secondary);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    font-size: 0.78rem;
    color: var(--text);
    text-align: center;
    margin-bottom: 12px;
    line-height: 1.5;
}

.car-finance strong { color: var(--secondary); }

.car-price {
    font-family: 'Sora', sans-serif;
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 12px;
}

.car-specs {
    display: flex;
    gap: 16px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.car-spec { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.car-spec span:first-child { font-weight: 700; color: var(--text); }
.car-spec span:last-child { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.5px; }

.car-location {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* =============================================
   POPUP PROMOCIONES
   ============================================= */
.promo-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.promo-popup-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.promo-popup {
    background: #fff;
    border-radius: 20px;
    max-width: 640px;
    width: 100%;
    overflow: hidden;
    box-shadow: 0 32px 80px rgba(0,0,0,0.35);
    transform: scale(0.92);
    transition: transform 0.3s;
}

.promo-popup-overlay.open .promo-popup { transform: scale(1); }

.promo-popup-header {
    background: var(--primary);
    padding: 24px 28px 20px;
    color: #fff;
    position: relative;
}

.promo-popup-header h2 {
    font-size: 1.3rem;
    margin-bottom: 4px;
}

.promo-popup-header p { opacity: 0.7; font-size: 0.88rem; }

.btn-close-popup {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.15);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.btn-close-popup:hover { background: rgba(255,255,255,0.3); }

.promo-list { padding: 20px 28px 28px; display: flex; flex-direction: column; gap: 14px; }

.promo-card {
    border-radius: 12px;
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.promo-card-left { flex: 1; }
.promo-bank { font-family: 'Sora', sans-serif; font-weight: 800; font-size: 1.05rem; }
.promo-title { font-size: 0.88rem; opacity: 0.85; margin-top: 2px; }
.promo-desc { font-size: 0.8rem; opacity: 0.7; margin-top: 6px; }

.promo-card-right { text-align: right; }
.promo-cuotas { font-family: 'Sora', sans-serif; font-weight: 800; font-size: 1.5rem; }
.promo-cuotas-label { font-size: 0.75rem; opacity: 0.7; }
.promo-vigencia { font-size: 0.72rem; opacity: 0.6; margin-top: 4px; }

/* Botón flotante promos */
.btn-promos-float {
    position: fixed;
    bottom: 32px;
    right: 32px;
    background: var(--secondary);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 14px 22px;
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    box-shadow: 0 8px 32px rgba(232,93,4,0.45);
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 99;
    animation: pulse-btn 2s infinite;
    transition: transform 0.2s;
}

.btn-promos-float:hover { transform: scale(1.05); }

@keyframes pulse-btn {
    0%, 100% { box-shadow: 0 8px 32px rgba(232,93,4,0.45); }
    50% { box-shadow: 0 8px 48px rgba(232,93,4,0.7); }
}

/* =============================================
   DETALLE AUTO
   ============================================= */
.detail-layout {
    max-width: 1200px;
    margin: 32px auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 28px;
    align-items: start;
}

.gallery-main {
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 16/10;
    background: #f1f5f9;
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    overflow-x: auto;
}

.gallery-thumb {
    width: 80px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    flex-shrink: 0;
}

.gallery-thumb.active { border-color: var(--secondary); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }

.detail-info-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
    position: sticky;
    top: 88px;
}

.detail-price {
    font-family: 'Sora', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 16px;
}

.detail-finance {
    background: #fff7ed;
    border: 2px solid var(--secondary);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 0.88rem;
    text-align: center;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    margin-bottom: 10px;
    outline: none;
    transition: border-color 0.2s;
}

.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--accent); }

.contact-form textarea { min-height: 90px; resize: vertical; }

.btn-contactar {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-contactar:hover { background: var(--secondary); }

.specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 24px 0;
}

.spec-item {
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
}

.spec-item label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-muted); display: block; margin-bottom: 4px; }
.spec-item strong { font-size: 0.95rem; font-weight: 700; }

/* =============================================
   ADMIN PANEL
   ============================================= */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 260px;
    background: var(--primary);
    min-height: 100vh;
    padding: 0;
    flex-shrink: 0;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 50;
}

.admin-logo {
    padding: 24px 24px 20px;
    font-family: 'Sora', sans-serif;
    font-weight: 800;
    font-size: 1.3rem;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 8px;
}

.admin-logo span { color: var(--secondary); }

.admin-nav { padding: 12px 12px; }

.admin-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    border-radius: var(--radius-sm);
    color: rgba(255,255,255,0.7);
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.2s;
    margin-bottom: 2px;
    text-decoration: none;
}

.admin-nav a:hover,
.admin-nav a.active {
    background: rgba(255,255,255,0.12);
    color: #fff;
}

.admin-nav a.active { color: var(--secondary); }

.admin-nav .nav-section {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255,255,255,0.35);
    padding: 16px 16px 6px;
    font-weight: 700;
}

.admin-content {
    margin-left: 260px;
    flex: 1;
    padding: 32px;
    background: var(--bg);
    min-height: 100vh;
}

.admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.admin-topbar h1 {
    font-size: 1.5rem;
    font-weight: 800;
}

.stat-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 22px 24px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.stat-card-value {
    font-family: 'Sora', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
}

.stat-card-label {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.stat-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

/* Tabla admin */
.admin-table-card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.admin-table-header {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
}

.admin-table-header h2 { font-size: 1rem; font-weight: 700; }

.admin-table { width: 100%; border-collapse: collapse; }

.admin-table th {
    background: var(--bg);
    padding: 12px 16px;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    font-weight: 700;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.admin-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 0.88rem;
    vertical-align: middle;
}

.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: #fafbfc; }

.admin-table img {
    width: 64px;
    height: 44px;
    object-fit: cover;
    border-radius: 6px;
}

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 600;
}

.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-info { background: #dbeafe; color: #1e40af; }

.table-actions { display: flex; gap: 6px; }

.btn-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.15s;
    text-decoration: none;
}

.btn-edit { background: #dbeafe; color: #1e40af; }
.btn-edit:hover { background: #1e40af; color: #fff; }
.btn-delete { background: #fee2e2; color: #991b1b; }
.btn-delete:hover { background: #991b1b; color: #fff; }
.btn-view { background: #d1fae5; color: #065f46; }
.btn-view:hover { background: #065f46; color: #fff; }

/* Formularios admin */
.admin-form-card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.admin-form-header {
    padding: 20px 28px;
    border-bottom: 1px solid var(--border);
}

.admin-form-body { padding: 28px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-full { grid-column: 1 / -1; }

.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-group label {
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-muted);
}

.form-control {
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0,180,216,0.1);
}

textarea.form-control { min-height: 120px; resize: vertical; }

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 20px 28px;
    border-top: 1px solid var(--border);
    background: var(--bg);
}

.btn-save {
    padding: 11px 28px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-save:hover { background: var(--secondary); }

.btn-cancel {
    padding: 11px 24px;
    background: transparent;
    color: var(--text-muted);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

/* Upload zona */
.upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-sm);
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    background: #fafbfc;
}

.upload-zone:hover { border-color: var(--accent); background: #f0f9ff; }
.upload-zone input { display: none; }
.upload-zone-icon { font-size: 2.5rem; margin-bottom: 8px; }
.upload-zone p { font-size: 0.88rem; color: var(--text-muted); }
.upload-zone strong { color: var(--accent); }

.preview-images {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.preview-img {
    position: relative;
    width: 80px;
    height: 60px;
}

.preview-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.preview-img button {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 18px;
    height: 18px;
    background: var(--danger);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 0.7rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Login */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary) 0%, #1a4480 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    background: #fff;
    border-radius: 20px;
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 32px 80px rgba(0,0,0,0.35);
}

.login-logo {
    text-align: center;
    font-family: 'Sora', sans-serif;
    font-weight: 800;
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 8px;
}

.login-logo span { color: var(--secondary); }
.login-subtitle { text-align: center; color: var(--text-muted); font-size: 0.9rem; margin-bottom: 32px; }

.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    margin-bottom: 16px;
}

.alert-danger { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }

/* Pagination */
.pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 32px;
}

.page-btn {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border);
    background: #fff;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    transition: all 0.15s;
}

.page-btn:hover,
.page-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* Footer */
.footer {
    background: var(--primary);
    color: rgba(255,255,255,0.7);
    text-align: center;
    padding: 24px;
    font-size: 0.85rem;
    margin-top: 60px;
}

.footer strong { color: #fff; }

/* Responsive */
@media (max-width: 900px) {
    .main-layout { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .detail-layout { grid-template-columns: 1fr; }
    .stat-cards { grid-template-columns: 1fr 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 2rem; }
    .hero-stats { gap: 20px; }
    .admin-content { margin-left: 0; padding: 20px; }
    .admin-sidebar { display: none; }
}

@media (max-width: 600px) {
    .cars-grid { grid-template-columns: 1fr; }
    .stat-cards { grid-template-columns: 1fr; }
    .header-inner { flex-wrap: wrap; height: auto; padding: 12px 16px; gap: 10px; }
    .search-bar { order: 3; max-width: 100%; flex: 0 0 100%; }
}
