/* ███████╗██╗██╗  ████████╗██████╗ 
██╔════╝██║██║  ╚══██╔══╝██╔══██╗
█████╗  ██║██║     ██║   ██████╔╝
██╔══╝  ██║██║     ██║   ██╔══██╗
██║     ██║███████╗██║   ██║  ██║
╚═╝     ╚═╝╚══════╝╚═╝   ╚═╝  ╚═╝
                                  */


.content-wrapper {
    display: flex;
    max-width: 1600px;
    margin: 0 auto;
    gap: 20px;
    margin-top: 30px;
    min-height: 800px;
}

.filters {
    width: 298px;
    height: 600px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
}

#filterForm {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.filters h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #333;
    margin-top: 0;
}

.filter-group {
    margin-bottom: 15px;
}

.filter-group label {
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 5px;
    display: block;
    color: #555;
}

.filter-group select,
.filter-group input {
    width: 100%;
    padding: 10px;
    font-size: 0.9rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
}

.filter-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    margin-bottom: 10px;
}

.filter-button,
.reset-button {
    flex: 1;
    padding: 10px;
    font-size: 0.9rem;
    border: none;
    font-weight: bold;
    text-align: center;
    border-radius: 5px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.3s ease;
}

.filter-button {
    background: #FF6600;
    color: white;
}

.filter-button:hover {
    background: #e65500;
}

.reset-button {
    background: #ddd;
    color: #333;
}

.reset-button:hover {
    background: #ccc;
}

.content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sorting-bar {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    background: #f1f1f1;
    padding: 10px 20px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.sorting-bar span {
    font-size: 1rem;
    font-weight: bold;
    color: #333;
}

.sorting-bar select {
    padding: 10px;
    font-size: 0.9rem;
    border: 1px solid #ccc;
    border-radius: 5px;
}






/* 
██╗     ██╗███████╗████████╗
██║     ██║██╔════╝╚══██╔══╝
██║     ██║███████╗   ██║   
██║     ██║╚════██║   ██║   
███████╗██║███████║   ██║   
╚══════╝╚═╝╚══════╝   ╚═╝                             
*/

.content {
    flex-grow: 1; 
    padding: 20px;
    padding-right: 0;
    padding-top: 0;
    margin: 0 auto;
    overflow-y: auto; 
    max-width: 1600px;
    padding-bottom: 190px;
}

h1 {
    margin-top: 0px;
    margin-bottom: 20px;
    font-size: 2rem;
    color: #333;
    text-align: left;
}

.car-list {
    display: flex;
    flex-direction: column;
    gap: 54px;
}



.car-card {
    position: relative;
    display: flex;
    align-items: stretch;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
    height: 260px;
    width: 100%;
    max-width: 1248px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}


.card-action-button {
    position: absolute;
    width: 240px;
    z-index: 1;
    right: 20px;
    bottom: 20px;
    padding: 10px 0;
    background: #FF6600;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
}

.card-action-button:hover {
    background: #d74f00;
}


.car-image {
    position: relative;
    width: 260px;
    height: 260px;
    flex-shrink: 0;
}

.car-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-right: 1px solid #ddd;
}

.car-id {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #FF6600;
    color: #fff;
    font-size: 1rem;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 5px;
}

.car-registration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: #333;
    color: #fff;
    font-size: 1rem;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 5px;
}

.car-info {
    position: relative;
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.car-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.car-header h2 {
    margin: 0;
}

.car-brand {
    color: #000000;
    font-weight: 600;
}

.car-model {
    color: #e65500;
    font-weight: bold;
}

.car-description {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #555;
    margin-top: 0; 
    margin-bottom: 8px;
    width: 80%;
}

.car-specs {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.spec-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    color: #333;
}

.spec-item img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.car-price {
    font-size: 1rem;
    color: #333;
    font-weight: bold;
}

.car-price-amount {
    color: #e65500;
}

.car-actions {
    position: absolute;
    right: 22px;
    display: flex;
    gap: 10px;
}

.card-button {
    padding: 12px 20px;
    border-radius: 5px;
    font-size: 0.9rem;
    cursor: pointer;
}

.edit-button {
    background: #bbb;
    color: #333;
}


.edit-button:hover {
    background: #84ebc4;
    color: #333;
}


.delete-button {
    background: #e60000;
    color: #fff;
}

.delete-button:hover {
    background: #b70000;
}




/* Mobile CSS */
@media (max-width: 768px) {
    .content-wrapper {
        flex-direction: column;
        gap: 15px;
        margin: 15px auto;
        min-height: auto;
        padding: 10px;
    }


    .filters {
        width: 85%;
        height: auto;
        padding: 15px;
        margin-bottom: 20px;
        margin: auto;
      }

    #filterForm {
        flex-direction: column;
        justify-content: flex-start;
        gap: 15px;
    }

    .filter-group {
        margin-bottom: 10px;
    }

    .filter-actions {
        flex-direction: column;
        gap: 10px;
    }

    .content {
        padding: 15px;
        margin: 0;
    }

    .sorting-bar {
        flex-direction: column;
        gap: 10px;
        padding: 10px;
    }

    .car-list {
        gap: 30px;
    }

    .car-card {
        flex-direction: column;
        height: auto;
        width: 100%;
    }

    .car-image {
        width: 100%;
        height: 200px;
        margin-bottom: 15px;
    }

    .car-info {
        padding: 15px;
        gap: 10px;
    }

    .car-description {
        width: 100%;
        margin-bottom: 10px;
    }

    .car-specs {
        gap: 15px;
    }

    .car-actions {
        flex-direction: column;
        right: 0;
        margin-top: 15px;
        gap: 10px;
    }

    .car-header h2 {
        margin: 0;
        display: flex;
        gap: 6px;
    }


    .card-action-button,
    .card-button {
        width: 50%;
        padding: 12px;
        top: 20px;
        bottom: auto;
    }

    .filters h2 {
        margin-bottom: 15px;
    }

    .filter-group select,
    .filter-group input {
        width: 100%;
        padding: 12px;
        margin-bottom: 10px;
    }

    .filter-actions .filter-button,
    .filter-actions .reset-button {
        padding: 12px;
    }

    .car-header {
        flex-wrap: wrap;
        gap: 10px;
    }

    .car-brand,
    .car-model {
        display: block;
    }

    .car-price {
        margin-top: 10px;
    }

    .sorting-bar span {
        margin-bottom: 10px;
    }
}






































.modal {
    display: none; 
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); 
    justify-content: center;
    align-items: center;
    overflow: auto;
    box-sizing: border-box;
}



.modal-content {
    position: relative;
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    max-width: 700px;
    width: 100%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    box-sizing: border-box;
    margin-bottom: 30px;

}

.modal-content h2 {
    margin-top: 0;
}

.form-row {
    display: flex;
    gap: 20px;
    box-sizing: border-box;
    justify-content: space-between;
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: calc(33.33% - 20px); 
    box-sizing: border-box;
}

.form-group.full-width {
    flex: 0 0 100%;    
    box-sizing: border-box;
}

label {
    font-size: 0.9rem;
    font-weight: bold;
    color: #555;
    margin-bottom: 5px;
}

input,
textarea {
    padding: 10px 12px;
    font-size: 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    resize: none;
    transition: border 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 14px;
    box-sizing: border-box;

}

textarea {
    height: 80px;
}

input:focus,
textarea:focus {
    border-color: #FF6600;
    box-shadow: 0 0 4px rgba(255, 102, 0, 0.5);
    outline: none;
}




.close {
    margin-left: 10px;
    padding: 10px 15px;
    font-size: 1rem;
    font-weight: bold;
    color: #333;
    background: #f1f1f1;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
    position: absolute;
    right: 30px;
}  

.close:hover {
    background: #ddd;
}

.modal-save-button {
    width: 180px;
    padding: 10px 15px;
    font-size: 1rem;
    font-weight: bold;
}



@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
    }
}





















.confirmation-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.confirmation-modal .modal-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.confirmation-modal h2 {
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.confirmation-modal p {
    margin-bottom: 20px;
    font-size: 1rem;
}

.confirmation-modal input {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    font-size: 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.confirmation-modal .modal-actions {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.confirmation-modal button {
    padding: 10px 20px;
    font-size: 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.confirmation-modal .confirm-delete-button {
    background: #FF0000;
    color: white;
}

.confirmation-modal .confirm-delete-button:hover {
    background: #CC0000;
}

.confirmation-modal .cancel-delete-button {
    background: #ccc;
    color: black;
}

.confirmation-modal .cancel-delete-button:hover {
    background: #bbb;
}




