/* Reset & Global */
* {
    box-sizing: border-box;
    margin: 0; padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
body.dark-theme {
    background-color: #121212;
    color: #eee;
    min-height: 100vh;
}

/* Utility buttons */
.btn-orange {
    background-color: #ff7f00;
    color: #121212;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
}
.btn-orange:hover {
    background-color: #e36d00;
}

.btn-green {
    background-color: #27ae60;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
}
.btn-green:hover {
    background-color: #1e8642;
}

.btn-red {
    background-color: #c0392b;
    color: #fff;
    border: none;
    padding: 7px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
}
.btn-red:hover {
    background-color: #992a1e;
}

/* Login page */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}
.login-container {
    background: #1c1c1c;
    padding: 40px;
    border-radius: 25px;
    text-align: center;
    width: 300px;
    box-shadow: 0 0 5px #ff7f00a0;
}
.login-container h1 {
    margin-bottom: 25px;
    color: #ff7f00;
    font-weight: 900;
    font-size: 22px;
}
.login-form input[type=text],
.login-form input[type=password],
.login-form textarea,
.login-form select {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 15px;
    border: none;
    border-radius: 15px;
    background-color: #161616;
    color: #eee;
    font-size: 14px;
    outline: none;
}
.error-msg {
    color: #ff3300;
    margin-top: -10px;
    margin-bottom: 10px;
    font-weight: bold;
}

/* Header */
header {
    background-color: #111;
    height: 60px;
    display: flex;
    align-items: center;
    padding: 0 40px;
    box-shadow: 0 2px 10px #000;
}
.header-content {
    display: flex;
    justify-content: space-between;
    width: 100%;
    align-items: center;
    font-size: 10px;
    font-weight: bold;
    color: #ff7f00;
}

/* Main catalogue */
.catalogue-page main {
    padding: 25px 40px;
}

.filter-section {
    margin-bottom: 20px;
    text-align: center;
}
.filter-btn {
    cursor: pointer;
    border: none;
    background: #222;
    color: #eee;
    padding: 10px 20px;
    margin: 0 8px 12px 8px;
    border-radius: 25px;
    font-weight: 600;
    transition: background-color 0.3s ease;
}
.filter-btn.active,
.filter-btn:hover {
    background-color: #ff7f00;
    color: #121212;
}

/* Cars grid */
.cars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(280px,1fr));
    gap: 25px;
}
.car-card {
    background-color: #1a1a1a;
    border-radius: 20px;
    box-shadow: 0 0 10px #ff7f0050;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.2s ease;
}
.car-card:hover {
    transform: translateY(-7px);
}
.car-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}
.car-info {
    padding: 15px 18px;
}
.car-info h2 {
    font-size: 18px;
    color: #ff7f00;
    margin-bottom: 8px;
}
.car-info p.price {
    font-size: 16px;
    font-weight: 700;
    color: #27ae60;
}
.car-info p.category {
    font-size: 14px;
    color: #ccc;
    margin-top: 5px;
}
.view-details {
    margin-top: 10px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.9);
    padding: 50px 0;
    overflow-y: auto;
}
.modal-content {
    background: #1a1a1a;
    max-width: 900px;
    margin: 0 auto;
    border-radius: 25px;
    padding: 25px;
    color: #eee;
    position: relative;
}
.modal-content h2 {
    color: #ff7f00;
    margin-bottom: 15px;
}
.modal-content .close {
    position: absolute;
    top: 20px; right: 30px;
    font-size: 28px;
    cursor: pointer;
    color: #ff7f00;
}
.modal-content .main-image {
    width: 100%;
    max-height: 350px;
    object-fit: contain;
    border-radius: 15px;
    margin-bottom: 15px;
}
.image-thumbs {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    margin-bottom: 20px;
}
.image-thumbs img {
    width: 100px;
    height: 70px;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}
.image-thumbs img.active {
    border-color: #27ae60;
}

/* Admin page */
.admin-page main {
    padding: 20px 40px;
}
.admin-section {
    background: #1a1a1a;
    border-radius: 25px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 0 10px #27ae6050;
}
.admin-section h2 {
    color: #27ae60;
    margin-bottom: 20px;
}
.admin-section input[type=text],
.admin-section select,
.admin-section textarea,
.admin-section input[type=file] {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 15px;
    border-radius: 10px;
    border: none;
    background: #121212;
    color: #eee;
    font-size: 15px;
    outline: none;
}
.cars-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}
.car-item {
    background: #121212;
    border-radius: 20px;
    box-shadow: 0 0 5px #27ae6050;
    display: flex;
    overflow: hidden;
    width: 100%;
    max-width: 400px;
}
.car-item img {
    width: 140px;
    object-fit: cover;
}
.car-item div {
    padding: 10px 15px;
    color: #eee;
    flex-grow: 1;
}
.car-item h3 {
    color: #27ae60;
    margin-bottom: 10px;
}
.car-item p {
    margin-bottom: 5px;
}
footer {
    text-align: center;       /* centers text horizontally */
    padding: 20px;            /* optional spacing */
    background-color: #222;   /* matches dark theme, optional */
    color: #fff;              /* footer text color */
}
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1; /* pushes footer to bottom */
}

