@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,600;1,400&family=Lato:wght@300;400;700&display=swap');

:root {
    /* Luxury Color Palette */
    --color-bg-main: #050505;
    --color-bg-secondary: #0f0f0f;
    --color-bg-card: #141414;

    --color-gold-primary: #d4af37;
    --color-gold-light: #f3e5ab;
    --color-gold-dark: #aa8c2c;

    --color-text-main: #ffffff;
    --color-text-muted: #a0a0a0;

    --color-border: #333333;
    --color-border-gold: rgba(212, 175, 55, 0.3);

    /* Fonts */
    --font-heading: 'Cinzel', serif;
    --font-subheading: 'Playfair Display', serif;
    --font-body: 'Lato', sans-serif;

    /* Effects */
    --glass-bg: rgba(20, 20, 20, 0.7);
    --glass-border: 1px solid rgba(255, 255, 255, 0.05);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--color-bg-main);
    color: var(--color-text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg-main);
}

::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-gold-dark);
}

/* Typography Utilities */
.text-gold {
    color: var(--color-gold-primary);
}

.font-heading {
    font-family: var(--font-heading);
}

.font-serif {
    font-family: var(--font-subheading);
}

/* Layout */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    background: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition-smooth);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-link {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: var(--transition-smooth);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--color-gold-primary);
    transition: var(--transition-smooth);
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-text-main);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Hero Section */
.hero {
    height: 80vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: radial-gradient(circle at center, #1a1a1a 0%, #050505 100%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://cargle.jp/wp-content/uploads/2025/11/Image_fx-2025-11-13T153126.465.jpg') no-repeat center center/cover;
    opacity: 0.3;
    filter: grayscale(100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 0 20px;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 400;
    letter-spacing: 5px;
    margin-bottom: 20px;
    background: linear-gradient(to right, #fff, #999);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
    font-family: var(--font-subheading);
    font-size: 1.5rem;
    color: var(--color-gold-primary);
    font-style: italic;
    margin-bottom: 40px;
}

/* Search & Filter Section (Concierge Bar) */
.concierge-bar {
    margin-top: -50px;
    position: relative;
    z-index: 10;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: var(--glass-border);
    border-radius: 4px;
    padding: 30px;
    box-shadow: var(--glass-shadow);
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
}

.search-input-group {
    flex: 2;
    position: relative;
    min-width: 300px;
}

.search-input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-gold-primary);
}

.search-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--color-border);
    padding: 15px 15px 15px 45px;
    color: var(--color-text-main);
    font-family: var(--font-body);
    font-size: 1rem;
    border-radius: 2px;
    transition: var(--transition-smooth);
}

.search-input:focus {
    outline: none;
    border-color: var(--color-gold-primary);
    background: rgba(255, 255, 255, 0.1);
}

.filter-group {
    flex: 1;
    min-width: 150px;
}

.custom-select {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--color-border);
    padding: 15px;
    color: var(--color-text-main);
    font-family: var(--font-body);
    font-size: 0.9rem;
    border-radius: 2px;
    cursor: pointer;
    transition: var(--transition-smooth);
    appearance: none; /* Remove default arrow */
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23d4af37%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 15px top 50%;
    background-size: 12px auto;
}

.custom-select:focus {
    outline: none;
    border-color: var(--color-gold-primary);
    background-color: rgba(255, 255, 255, 0.1);
}

.custom-select option {
    background: var(--color-bg-secondary);
    color: var(--color-text-main);
}

/* Inventory Section */
.inventory-section {
    padding: 80px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 20px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    letter-spacing: 2px;
}

.result-count {
    font-family: var(--font-body);
    color: var(--color-text-muted);
}

.inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 40px;
}

/* Luxury Card */
.car-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    display: block; /* Ensure anchor behaves like block */
}

.car-card:hover {
    transform: translateY(-10px);
    border-color: var(--color-border-gold);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.card-image-wrapper {
    height: 250px;
    overflow: hidden;
    position: relative;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.car-card:hover .card-image {
    transform: scale(1.1);
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.8) 100%);
    opacity: 0;
    transition: var(--transition-smooth);
    display: flex;
    align-items: flex-end;
    padding: 20px;
}

.car-card:hover .card-overlay {
    opacity: 1;
}

.view-details-btn {
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.8rem;
    border-bottom: 1px solid var(--color-gold-primary);
    padding-bottom: 5px;
}

.card-details {
    padding: 25px;
}

.card-make {
    color: var(--color-gold-primary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 5px;
}

.card-model {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin-bottom: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--color-text-main);
}

.card-specs {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    padding: 15px 0;
    margin-bottom: 20px;
}

.spec {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.spec span {
    color: var(--color-text-main);
    font-weight: 700;
    margin-top: 5px;
}

.card-price {
    font-family: var(--font-subheading);
    font-size: 1.5rem;
    color: var(--color-text-main);
    text-align: right;
    font-style: italic;
}

/* Admin Styles */
.admin-wrapper {
    padding-top: 120px;
    padding-bottom: 60px;
}

.admin-form-container {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    padding: 40px;
    max-width: 800px;
    margin: 0 auto;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    color: var(--color-text-muted);
    margin-bottom: 10px;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.form-input, .form-textarea, .form-select {
    width: 100%;
    background: #1a1a1a;
    border: 1px solid var(--color-border);
    padding: 12px;
    color: var(--color-text-main);
    font-family: var(--font-body);
    border-radius: 2px;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
    outline: none;
    border-color: var(--color-gold-primary);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-gold {
    background: linear-gradient(45deg, var(--color-gold-dark), var(--color-gold-primary));
    color: #000;
    border: none;
    padding: 15px 40px;
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
    width: 100%;
    transition: var(--transition-smooth);
    text-transform: uppercase;
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(212, 175, 55, 0.2);
}

.btn-danger {
    background: #8b0000;
    color: #fff;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 0.8rem;
    border-radius: 2px;
}

.admin-list-container {
    max-width: 1000px;
    margin: 60px auto 0;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.admin-table th, .admin-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.admin-table th {
    color: var(--color-gold-primary);
    font-family: var(--font-heading);
}

.admin-thumb {
    width: 80px;
    height: 50px;
    object-fit: cover;
    border-radius: 2px;
}

/* Details Page */
.details-wrapper {
    padding-top: 120px;
    padding-bottom: 80px;
}

.details-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 60px;
}

.gallery-container {
    position: relative;
}

.main-gallery {
    position: relative;
    width: 100%;
    height: 500px; /* Fixed height for consistency */
    overflow: hidden;
    border: 1px solid var(--color-border);
    margin-bottom: 20px;
}

.main-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none; /* Hidden by default */
}

.main-gallery img.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.gallery-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    padding: 15px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition-smooth);
    z-index: 10;
}

.gallery-nav-btn:hover {
    background: var(--color-gold-primary);
    color: #000;
}

.prev-btn { left: 0; }
.next-btn { right: 0; }

.sub-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.sub-gallery img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    cursor: pointer;
    opacity: 0.6;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
}

.sub-gallery img:hover,
.sub-gallery img.active {
    opacity: 1;
    border-color: var(--color-gold-primary);
}

.car-info-title {
    font-family: var(--font-heading);
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 10px;
    color: var(--color-text-main);
}

.car-info-price {
    font-family: var(--font-subheading);
    font-size: 2.5rem;
    color: var(--color-gold-primary);
    margin-bottom: 40px;
    font-style: italic;
}

.spec-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 40px;
}

.spec-table td {
    padding: 15px 0;
    border-bottom: 1px solid var(--color-border);
}

.spec-table td:first-child {
    color: var(--color-text-muted);
    width: 40%;
}

.spec-table td:last-child {
    font-weight: 700;
    text-align: right;
}

.description-box {
    background: var(--color-bg-secondary);
    padding: 30px;
    border: 1px solid var(--color-border);
    margin-top: 40px;
}

.description-box h3 {
    color: var(--color-gold-primary);
    margin-bottom: 15px;
    font-family: var(--font-heading);
}

/* Footer */
.footer {
    background: #000;
    padding: 60px 0;
    border-top: 1px solid var(--color-border);
    text-align: center;
    color: var(--color-text-muted);
    margin-top: auto;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .concierge-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .details-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
    
    .main-gallery {
        height: 300px;
    }
}
