:root {
    --primary-color: #3b82f6;
    --secondary-color: #1e40af;
    --background-light: #f8fafc;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --border-color: #e5e7eb;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}


.cd-container {
    max-width: 1300px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

/* Gallery Styles */
.cd-gallery {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.cd-gallery__main {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--background-light);
    margin-bottom: 1rem;
}

.cd-gallery__main img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    display: none;
}

.cd-gallery__main img.active {
    display: block;
}

.cd-gallery__thumbs {
    display: flex;
    overflow-x: hidden;
    gap: 10px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--background-light);
    padding: 0.5rem 0;
}

.cd-gallery__thumbs::-webkit-scrollbar {
    height: 6px;
}

.cd-gallery__thumbs::-webkit-scrollbar-track {
    background: var(--background-light);
    border-radius: 3px;
}

.cd-gallery__thumbs::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 3px;
}

.cd-gallery__thumbs img {
    width: 100px;
    height: 60px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 4px;
    transition: border-color 0.2s ease;
}

.cd-gallery__thumbs img.active {
    border-color: var(--primary-color);
}

.cd-gallery__arrows {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 1rem;
    pointer-events: none;
}

.cd-gallery__arrows button {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.43);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--text-dark);
    pointer-events: auto;
    transition: all 0.2s ease;
    box-shadow: var(--shadow);
}

.cd-gallery__arrows button:hover {
    background: white;
    transform: scale(1.1);
}

/* Main Info Styles */
.cd-main-info {
    background: white;
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.car-title {
    text-align: center;
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 1rem;
}

.cd-price-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 1rem;
}

.info-card {
    padding: 1.5rem;
    background: var(--background-light);
    border-radius: var(--radius);
    text-align: center;
}

.cd-price {
    font-size: 2.2rem;
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 0.5rem;
}

/* Specifications Styles */
.cd-specs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.cd-spec-group {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow);
}

.cd-spec-title {
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    text-align: center;

    border-bottom: 2px solid var(--primary-color);
}

.cd-spec-item {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.cd-spec-item:last-child {
    border-bottom: none;
}

.cd-spec-item span:first-child {
    color: var(--text-light);
}

/* Features Styles */
.cd-features {
    display: grid;
    text-align: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.cd-feature {
    padding: 1rem;
    background: var(--background-light);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.2s ease;
}

.cd-feature:hover {
    transform: translateY(-2px);
}

.cd-feature i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

/* Description & Seller Styles */
.cd-description, .cd-seller {
    background: white;
    padding: 2rem;
    border-radius: var(--radius);
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    text-align: center;
    line-break: anywhere;

}

.cd-description p {
    color: var(--text-light);
    line-height: 1.8;
}

/* Loading State */
.lazy-image {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.lazy-image:not([data-src]) {
    opacity: 1;
}
.seller-profile {
    background: white;
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.seller-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.seller-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
}

.seller-info {
    flex-grow: 1;
}

.seller-name-dt {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.seller-contact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-item i {
    color: var(--primary-color);
}
.edit-for-seller{
    color: black;
text-decoration: none;
background-color: #50f650;
padding: 4px 28px;
text-align: center;
border-radius: 10px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f0f4f7;
    color: #333;
    
}

.container {
    max-width: 1200px;
    margin: 100px auto;
 
    padding: 20px;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    transition: box-shadow 0.3s ease;
}

.container:hover {
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.2);
}

h1 {
    text-align: center;
    font-size: 2em;
    color: #0056b3;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
    width: 100%;
}

input, 
select:not(.sort-select,.search-select), 
textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    color: #333;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

input:focus, select:focus, textarea:focus {
    border-color: #0056b3;
    outline: none;
}

textarea {
    resize: vertical;
}

.submit-btn {
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.submit-btn:hover {
    background-color: #45a049;
}



.image-upload-box {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 120px;
    border: 2px dashed #ccc;
    border-radius: 8px;
    overflow: hidden;
    background-color: #fafafa;
    transition: border-color 0.3s, transform 0.3s ease-in-out;
}

.image-upload-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-upload-box:hover {
    border-color: #007bff;
    transform: scale(1.05);
}

.image-upload-box input[type="file"] {
    display: none;
}

.remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: red;
    color: white;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 14px;
    line-height: 20px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.remove-btn:hover {
    background-color: #cc0000;
}

.add-box-btn {
    display: block;
    width: 100px;
    margin: 20px auto 0;
    padding: 12px;
    font-size: 18px;
    color: white;
    background-color: #007bff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.add-box-btn:hover {
    background-color: #0056b3;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    margin-top: 25px;
}

.checkbox-group label {
    font-size: 16px;
    color: #555;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 10px;
}

.field-checkbox {
    display: flex;
    flex-wrap: nowrap;
    align-content: center;
    align-items: center;
    flex-direction: row-reverse;
}

.label-checkbox {
    width: 150px;
}

.features-container {
    display: flex;
        flex-direction: column;
        gap: 10px;
        padding: 10px;
        border: 1px solid #ddd;
        border-radius: 4px;
        align-items: flex-start;
}

.feature-item {
    display: flex;
align-items: center; 
gap: 5px;
width: 30%;
}

.image-preview-container {
    display: flex;
        flex-wrap: wrap;
        gap: 10px;
        margin-top: 10px;
        align-items: center;
        justify-content: center;
}

.image-preview {
    position: relative;
    width: 150px;
    height: 150px;
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}


/* Responsive Styles */
@media (max-width: 1024px) {
    .cd-container {
        max-width: 100%;
     
    }
}

@media (max-width: 768px) {
    .container {
        margin-top: 120px;
    }
    .feature-item {
        width: 80%;
    }
    .seller-header{
        flex-direction: column;
    }
    .cd-container {
        padding: 1rem;
        margin: 1rem auto;
        margin-top: 100px;
    }

    .cd-gallery__main img {
        height: 350px;
    }

    .car-title {
        font-size: 1.5rem;
    }

    .cd-price {
        font-size: 1.8rem;
    }

    .cd-gallery__arrows button {
        width: 2.5rem;
        height: 2.5rem;
    }

    .cd-spec-group, .cd-features, .cd-description, .cd-seller {
        padding: 1rem;
    }

    .cd-price-section {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .cd-gallery__main img {
        height: 250px;
    }

    .cd-gallery__thumbs img {
        width: 80px;
        height: 50px;
    }

    .cd-price-section {
        grid-template-columns: 1fr;
    }

    .car-title {
        font-size: 1.2rem;
    }

    .cd-spec-title {
        font-size: 1.1rem;
    }
}

