/* ── 1. Variables & Reset ─────────────────────────────────────── */
:root {
    --bg-main: #f4f7f5;
    --bg-surface: #ffffff;
    --bg-surface-hover: #eaf0ec;
    --accent: #087264;
    --accent-hover: #075e53;
    --accent-glow: rgba(8, 114, 100, 0.16);
    --green: #168a59;
    --text-primary: #17231d;
    --text-secondary: #65736b;
    --border: #d8e1db;
    --border-hover: #aab9af;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow: 0 12px 32px rgba(23, 35, 29, 0.08);
    --shadow-hover: 0 16px 38px rgba(23, 35, 29, 0.14);
    --font: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --transition: 0.25s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 4rem 0;
}

/* Fade-in animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

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

.fade-in {
    animation: fadeInUp 0.45s ease both;
}


/* ── 2. Typography ────────────────────────────────────────────── */
h1,
h2,
h3,
h4 {
    font-weight: 700;
    line-height: 1.2;
}

h2 {
    margin-bottom: 2rem;
    font-size: clamp(1.5rem, 4vw, 2rem);
}

.w-100 {
    width: 100%;
}


/* ── 3. Buttons ───────────────────────────────────────────────── */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background-color: var(--accent);
    color: var(--btn-primary-text, white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
    white-space: nowrap;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--accent-glow);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-hover);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

.btn-text {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 0.85rem;
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.btn-text:hover {
    text-decoration: underline;
}

.btn-whatsapp {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    background: var(--green);
    color: white;
    border: none;
    padding: 0.9rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

.btn-whatsapp:hover {
    background: #1da851;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.3);
}

.btn-save {
    background: var(--bg-surface);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.btn-save:hover,
.btn-save.saved {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-save.saved {
    background: rgba(230, 57, 70, 0.1);
}

.btn-details {
    background: var(--bg-main);
    color: var(--text-primary);
    border: 1px solid var(--border-hover);
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    text-align: center;
}

.btn-details:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-delete {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 0.6rem 1rem;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    width: 100%;
    margin-top: 0.5rem;
}

.btn-delete:hover {
    background: var(--accent);
    color: white;
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.05rem;
}

.section-cta {
    text-align: center;
    margin-top: 3rem;
}


/* ── 4. Form Inputs ───────────────────────────────────────────── */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="search"],
select,
textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-main);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: var(--radius);
    outline: none;
    font-family: var(--font);
    font-size: 0.95rem;
    transition: border-color var(--transition);
    -webkit-appearance: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

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

input[type="range"] {
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    accent-color: var(--accent);
}

select option {
    background: var(--bg-surface);
}


/* ── 5. Navbar ────────────────────────────────────────────────── */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(13, 13, 13, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 2rem;
    gap: 1.5rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    white-space: nowrap;
    flex-shrink: 0;
}

.logo span {
    color: var(--accent);
}

.country-badge {
    font-size: 0.65rem;
    background: #1e1e1e;
    padding: 2px 6px;
    border-radius: 4px;
    vertical-align: middle;
    margin-left: 4px;
    border: 1px solid var(--border);
    letter-spacing: 0.5px;
}

.nav-search {
    flex: 0 1 320px;
}

.nav-search form {
    margin: 0;
}

.nav-search input {
    background: var(--bg-surface);
    border-color: var(--border);
    padding: 0.6rem 1rem;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-shrink: 0;
}

.nav-links a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color var(--transition);
    white-space: nowrap;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.badge {
    display: inline-block;
    background: var(--accent);
    font-size: 0.7rem;
    padding: 1px 6px;
    border-radius: 12px;
    margin-left: 3px;
    font-weight: 700;
    color: white;
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition);
}

/* Mobile nav drawer */
.mobile-nav {
    display: none;
    flex-direction: column;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem;
    gap: 1rem;
}

.mobile-nav.open {
    display: flex;
}

.mobile-nav a {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}


/* ── 6. Hero ──────────────────────────────────────────────────── */
.hero {
    position: relative;
    height: 75vh;
    min-height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: 1;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
            rgba(13, 13, 13, 0.70) 0%,
            rgba(13, 13, 13, 0.55) 45%,
            rgba(13, 13, 13, 0.95) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 900px;
    padding: 0 1rem;
    animation: fadeInUp 0.7s ease;
}

.hero h1 {
    font-size: clamp(2.4rem, 6vw, 3.8rem);
    margin-bottom: 1rem;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.8);
    font-weight: 800;
}

.hero p {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    margin-bottom: 0;
}

.quick-finder {
    display: flex;
    gap: 0.75rem;
    background: rgba(23, 23, 23, 0.92);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1rem 1.25rem;
    border-radius: var(--radius-lg);
    margin-top: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.quick-finder select {
    flex: 1;
    min-width: 150px;
    background: var(--bg-surface);
}

.quick-finder button {
    flex-shrink: 0;
}


/* ── 7. Trust Strip ───────────────────────────────────────────── */
.trust-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: -30px;
    position: relative;
    z-index: 10;
    padding-top: 0;
}

.trust-item {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.2rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: border-color var(--transition);
}

.trust-item:hover {
    border-color: var(--accent);
}

.trust-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.trust-item strong {
    display: block;
    font-size: 0.95rem;
}

.trust-item p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 2px;
}


/* ── 8. Category Cards ────────────────────────────────────────── */
/* Modern visual category cards with body type imagery defined in theme.css */


/* ── 9. Car Cards ─────────────────────────────────────────────── */
.car-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 1.75rem;
}

.car-card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
}

.car-card:hover {
    transform: translateY(-5px);
    border-color: rgba(230, 57, 70, 0.5);
    box-shadow: var(--shadow-hover);
}

.card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.car-img-wrapper {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: var(--bg-surface-hover);
}

.car-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.cpo-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--accent);
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 700;
    color: white;
    letter-spacing: 0.3px;
}

.ev-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #1a3a2a;
    color: #4ade80;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 700;
    border: 1px solid #4ade8040;
}

.car-details {
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.car-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
    color: var(--text-primary);
}

.car-specs {
    color: var(--text-secondary);
    font-size: 0.82rem;
    margin-bottom: 0.25rem;
}

.car-location {
    color: var(--text-secondary);
    font-size: 0.78rem;
    margin-bottom: 0.75rem;
}

.car-price {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-top: auto;
}

.card-actions {
    display: flex;
    gap: 0.6rem;
    padding: 0.85rem 1.5rem;
    border-top: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.2);
}

.card-actions .btn-details {
    flex: 1;
}


/* ── 10. Inventory Layout ─────────────────────────────────────── */
.inventory-layout {
    display: grid;
    grid-template-columns: 270px 1fr;
    gap: 2.5rem;
    padding: 3rem 0;
    align-items: start;
}

.sidebar-filters {
    background: var(--bg-surface);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    position: sticky;
    top: 90px;
}

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

.filter-header h3 {
    font-size: 1rem;
}

.filter-group {
    margin-bottom: 1.25rem;
}

.filter-group label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sort-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.sort-bar span {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.sort-bar strong {
    color: var(--text-primary);
}

.sort-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sort-actions label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    white-space: nowrap;
}

.sort-actions select {
    width: auto;
    min-width: 190px;
}

/* Empty state */
.empty-state {
    grid-column: 1 / -1;
    background: var(--bg-surface);
    border: 1px dashed var(--border);
    padding: 5rem 2rem;
    text-align: center;
    border-radius: var(--radius-lg);
}

.empty-state h3 {
    margin-bottom: 0.75rem;
    font-size: 1.3rem;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}


/* ── 11. Car Detail (PDP) Layout ─────────────────────────────── */
.pdp-layout {
    display: grid;
    grid-template-columns: 1fr 370px;
    gap: 3rem;
    padding: 3rem 0 0;
    align-items: start;
}

/* Gallery */
.media-gallery {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-surface);
    margin-bottom: 1.25rem;
}

.media-gallery>img {
    width: 100%;
    height: 460px;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s ease;
}

.thumbnail-strip {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem;
    overflow-x: auto;
    background: var(--bg-surface);
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.thumbnail {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.55;
    border: 2px solid transparent;
    transition: all var(--transition);
    flex-shrink: 0;
}

.thumbnail:hover {
    opacity: 0.85;
}

.thumbnail.active {
    opacity: 1;
    border-color: var(--accent);
}

/* PDP Tabs */
.pdp-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.75rem;
}

.pdp-tabs .tab {
    padding: 0.85rem 1.5rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all var(--transition);
}

.pdp-tabs .tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    font-weight: 600;
}

.pdp-tabs .tab:hover {
    color: var(--text-primary);
}

/* Specs Grid */
.pdp-specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
}

.spec-item {
    background: var(--bg-surface);
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.spec-item span {
    color: var(--text-secondary);
    font-size: 0.78rem;
    display: block;
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-weight: 500;
}

.spec-item strong {
    font-size: 0.95rem;
    font-weight: 600;
}

/* Inspection Grid */
.inspection-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.inspection-item {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.insp-icon {
    font-size: 1.3rem;
}

.insp-status {
    display: block;
    font-size: 0.75rem;
    color: #4ade80;
    font-weight: 600;
    margin-top: 2px;
}

/* Description */
.pdp-description {
    margin-top: 2rem;
}

.pdp-description h3 {
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

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

/* PDP Sidebar */
.pdp-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    position: sticky;
    top: 90px;
}

.pdp-title-block h1 {
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.pdp-price {
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
    margin: 0.5rem 0;
}

.pdp-title-block .cpo-tag {
    position: static;
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 4px;
    background: var(--accent);
    color: white;
    font-weight: 700;
}

/* Lead form & Finance calc */
.lead-form,
.finance-calc {
    background: var(--bg-surface);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.lead-form h3,
.finance-calc h3 {
    margin-bottom: 1.25rem;
    font-size: 1rem;
}

.lead-form input {
    margin-bottom: 0.85rem;
}

.lead-form input:last-of-type {
    margin-bottom: 1rem;
}

.est-payment {
    font-size: 2rem;
    font-weight: 800;
    margin: 1rem 0 0;
    text-align: center;
    color: var(--text-primary);
}

.calc-subtext {
    text-align: center;
    font-size: 0.72rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* Admin details/delete */
.admin-actions {
    margin-top: 0.5rem;
}

.admin-actions summary {
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    list-style: none;
    text-align: center;
}

.admin-actions summary:hover {
    color: var(--text-primary);
}


/* ── 12. CTA Banner ───────────────────────────────────────────── */
.cta-banner {
    background: linear-gradient(135deg, var(--accent) 0%, #c23850 100%);
    padding: 4rem 3rem;
    text-align: center;
    margin: 4rem auto;
    border-radius: var(--radius-lg);
}

.cta-banner h2 {
    color: white;
    margin-bottom: 0.75rem;
}

.cta-banner p {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 1.5rem;
}

.cta-banner .btn-primary {
    background: var(--signal, #d9ec7a);
    color: var(--signal-text, #111d17);
}

.cta-banner .btn-primary:hover {
    background: #1a1a1a;
}


/* ── 13. Footer ───────────────────────────────────────────────── */
footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    padding: 4rem 0 0;
    margin-top: 4rem;
    color: var(--text-secondary);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2.5rem;
    padding-bottom: 3rem;
}

.footer-brand .logo {
    color: var(--text-primary);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    display: block;
}

.footer-grid h4 {
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
}

.footer-grid p {
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
}

.footer-grid a {
    color: var(--text-secondary);
    transition: color var(--transition);
}

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

.trust-badges {
    list-style: none;
}

.trust-badges li {
    margin-bottom: 0.6rem;
    font-size: 0.88rem;
}

.subscribe-form {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.subscribe-form input {
    padding: 0.6rem 0.85rem;
    flex: 1;
}

.subscribe-form .btn-primary {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
}

.subscribe-msg {
    font-size: 0.78rem;
    color: #4ade80;
    margin-top: 0.5rem;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-secondary);
}

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


/* ── 14. Toast Notification ───────────────────────────────────── */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(120%);
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
    padding: 0.85rem 1.75rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 200000;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    white-space: nowrap;
    box-shadow: var(--shadow);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}


/* ── 15. Admin Panel ──────────────────────────────────────────── */
.admin-container {
    padding: 3rem 1.5rem 5rem;
    max-width: 860px;
    margin: 0 auto;
}

.admin-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
}

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

.admin-header h1 {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
}

.admin-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.admin-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-section {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.form-section legend {
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0 0.5rem;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

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

.form-group label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.required {
    color: var(--accent);
}

/* File Upload */
.file-upload-area {
    position: relative;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    transition: border-color var(--transition);
    overflow: hidden;
}

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

.file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.file-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 2.5rem 1rem;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

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

.upload-sub {
    font-size: 0.75rem;
}

.image-preview-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.75rem;
}

.preview-thumb {
    width: 100px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-surface-hover);
}

.preview-thumb img {
    width: 100%;
    height: 72px;
    object-fit: cover;
}

.preview-thumb span {
    display: block;
    font-size: 0.65rem;
    color: var(--text-secondary);
    padding: 3px 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Toggle Switch */
.toggle-label {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    cursor: pointer;
    font-size: 0.95rem;
    margin-top: 0.5rem;
}

.toggle-input {
    display: none;
}

.toggle-switch {
    width: 44px;
    height: 24px;
    background: var(--border);
    border-radius: 12px;
    position: relative;
    transition: background var(--transition);
    flex-shrink: 0;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: white;
    transition: transform var(--transition);
}

.toggle-input:checked+.toggle-switch {
    background: var(--accent);
}

.toggle-input:checked+.toggle-switch::after {
    transform: translateX(20px);
}

/* Flash Messages */
.flash {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid;
}

.flash-error {
    background: rgba(230, 57, 70, 0.1);
    border-color: var(--accent);
    color: #ff8a90;
}

.flash-success {
    background: rgba(74, 222, 128, 0.1);
    border-color: #4ade80;
    color: #4ade80;
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding-top: 1rem;
}


/* ── 16. Responsive ───────────────────────────────────────────── */
@media (max-width: 1024px) {
    .pdp-layout {
        grid-template-columns: 1fr 330px;
        gap: 2rem;
    }
}

@media (max-width: 900px) {
    .inventory-layout {
        grid-template-columns: 1fr;
    }

    .pdp-layout {
        grid-template-columns: 1fr;
    }

    .sidebar-filters {
        position: static;
    }

    .pdp-sidebar {
        position: static;
    }

    .media-gallery>img {
        height: 320px;
    }

    .pdp-specs-grid {
        grid-template-columns: 1fr 1fr;
    }

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

    .trust-strip {
        margin-top: 1.5rem;
    }

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

@media (max-width: 640px) {
    .navbar {
        padding: 0.85rem 1.25rem;
    }

    .nav-links,
    .nav-search {
        display: none;
    }

    .hamburger {
        display: flex;
    }

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

    .quick-finder {
        flex-direction: column;
        align-items: stretch;
    }

    .quick-finder select {
        min-width: 100%;
    }

    .pdp-specs-grid {
        grid-template-columns: 1fr;
    }

    .admin-card {
        padding: 1.5rem;
    }

    .form-actions {
        flex-direction: column;
    }

    .cta-banner {
        padding: 3rem 1.5rem;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .thumbnail-strip {
        gap: 0.4rem;
    }
}

/* ── Pagination ────────────────────────────────────────────────────────── */
.pagination-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
}

.page-numbers {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.page-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.page-num:hover,
.page-num.active {
    background: var(--brand);
    color: #ffffff;
    border-color: var(--brand);
}

.page-dots {
    padding: 0 0.25rem;
    color: var(--muted);
    font-size: 0.85rem;
}

.page-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ink, var(--text-primary));
    border: 1px solid var(--line, var(--border));
    border-radius: 6px;
    background: var(--surface, var(--bg-surface));
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.page-nav-btn:hover {
    border-color: var(--brand, var(--accent));
    color: var(--brand, var(--accent));
}

.page-nav-btn:disabled,
.page-nav-btn[disabled] {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}