/* ============================================
   Professional Car Details Page Design
   ============================================ */

   :root {
    --primary: #477CDB;
    --primary-hover: #3b5fc7;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #1f2937;
    --gray: #6b7280;
    --light: #f9fafb;
    --border: #e5e7eb;
    --white: #ffffff;
}

.spacer-15 {
    height: 120px;
    min-height: 120px;
    display: block;
    width: 100%;
}

/* ============================================
   Main Container
   ============================================ */

.car-details-page {
    padding: 25px 0 60px;
    background: var(--light);
    margin-top: 0;
    position: relative;
    min-height: calc(100vh - 120px);
}

/* ============================================
   Gallery Section
   ============================================ */

.details-gallery-section {
    margin-bottom: 24px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    background: var(--white);
}

.myGallery {
    width: 100%;
    height: 500px;
    border-radius: 12px;
    overflow: hidden;
}

.myGallery .swiper-slide {
    padding: 0;
}

.myGallery img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.myGallery .swiper-button-next,
.myGallery .swiper-button-prev {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    color: var(--primary);
    transition: all 0.3s ease;
}

.myGallery .swiper-button-next:after,
.myGallery .swiper-button-prev:after {
    font-size: 20px;
    font-weight: 700;
}

.myGallery .swiper-button-next:hover,
.myGallery .swiper-button-prev:hover {
    background: var(--primary);
    color: var(--white);
    transform: scale(1.1);
}

.myGallery .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 1;
    border: 2px solid var(--white);
}

.myGallery .swiper-pagination-bullet-active {
    background: var(--primary);
    border-color: var(--primary);
}

/* ============================================
   Quick Info Bar
   ============================================ */

.quick-info-bar {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 20px 24px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.quick-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gray);
    font-size: 14px;
    font-weight: 500;
}

.quick-info-item i {
    color: var(--primary);
    font-size: 20px;
}

.quick-info-item.favorite-action {
    margin-left: auto;
}

[dir="rtl"] .quick-info-item.favorite-action {
    margin-left: 0;
    margin-right: auto;
}

.favorite-btn-inline {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: transparent;
    border: 2px solid var(--border);
    border-radius: 8px;
    color: var(--gray);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.favorite-btn-inline:hover,
.favorite-btn-inline.active {
    background: var(--danger);
    border-color: var(--danger);
    color: var(--white);
}

.favorite-btn-inline i {
    font-size: 18px;
}

/* ============================================
   Navigation Tabs
   ============================================ */

.details-nav-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.nav-tab {
    flex: 1;
    min-width: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: 10px;
    color: var(--gray);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
}

.nav-tab:hover,
.nav-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(71, 124, 219, 0.25);
}

.nav-tab i {
    font-size: 20px;
}

/* ============================================
   Sidebar Card
   ============================================ */

.details-sidebar-card {
    background: var(--white);
    border-radius: 12px;
    padding: 28px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 24px;
}

.sidebar-header {
    margin-top: 16px;
}

.status-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.new {
    background: var(--success);
    color: var(--white);
}

.status-badge.used {
    background: var(--warning);
    color: var(--white);
}

.sidebar-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark);
    margin: 0 0 20px;
    line-height: 1.4;
}

.sidebar-price {
    padding-top: 20px;
    border-top: 2px solid var(--border);
}

.price-main {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -1px;
}

/* ============================================
   Common Cards
   ============================================ */

.common-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 24px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.common-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.common-card-header {
    padding: 0;
    border: none;
    margin: 0;
}

.common-card-header-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
    padding: 24px 28px;
    margin: 0;
    border: none;
    border-left: 4px solid var(--primary);
    background: var(--light);
    text-align: left;
    width: 100%;
}

.common-card-header-title[dir="rtl"] {
    border-right: 4px solid var(--primary);
    border-left: none;
    text-align: right;
    width: 100%;
}

.common-card-body {
    padding: 28px;
}

/* ============================================
   Overview Card
   ============================================ */

.description-content {
    line-height: 1.8;
    color: var(--gray);
    font-size: 16px;
    text-align: start;
}

[dir="rtl"] .description-content {
    text-align: right;
}

.description-content p {
    margin: 0;
}

/* ============================================
   Features Card
   ============================================ */

.product-single-feature-group {
    padding: 0;
}

.product-single-feature-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.product-single-feature-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--light);
    border-radius: 10px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    flex-direction: row;
    gap: 12px;
}

[dir="rtl"] .product-single-feature-list li {
    flex-direction: row-reverse;
    direction: rtl;
}

.product-single-feature-list li span:first-child {
    font-weight: 600;
    color: var(--gray);
    font-size: 14px;
    flex-shrink: 0;
    text-align: left;
    white-space: nowrap;
}

[dir="rtl"] .product-single-feature-list li span:first-child {
    text-align: right;
    direction: rtl;
    order: 2;
}

[dir="ltr"] .product-single-feature-list li span:first-child {
    text-align: left;
    direction: ltr;
    order: 1;
}

.product-single-feature-list li span:last-child {
    font-weight: 700;
    color: var(--dark);
    font-size: 15px;
    flex: 1;
    text-align: right;
    word-wrap: break-word;
}

[dir="rtl"] .product-single-feature-list li span:last-child {
    text-align: left;
    direction: rtl;
    order: 1;
}

[dir="ltr"] .product-single-feature-list li span:last-child {
    text-align: right;
    direction: ltr;
    order: 2;
}

.product-single-feature-list li:hover {
    background: rgba(71, 124, 219, 0.05);
    border-color: rgba(71, 124, 219, 0.2);
    transform: translateX(4px);
}

[dir="rtl"] .product-single-feature-list li:hover {
    transform: translateX(-4px);
}


/* ============================================
   Owner Card - Modern Design
   ============================================ */

.owner-info-card {
    overflow: visible;
}

.owner-info-wrapper {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Avatar Section */
.owner-avatar-section {
    text-align: center;
    padding-bottom: 24px;
    border-bottom: 2px solid var(--border);
}

.owner-avatar-link {
    display: inline-block;
    text-decoration: none;
    margin-bottom: 16px;
}

.owner-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid var(--white);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    margin: 0 auto;
    transition: all 0.3s ease;
    background: var(--light);
}

.owner-avatar-link:hover .owner-avatar {
    transform: scale(1.05);
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.2);
}

.owner-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.owner-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
    margin: 0 0 8px;
    line-height: 1.3;
}

.owner-role {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, rgba(71, 124, 219, 0.1) 0%, rgba(71, 124, 219, 0.05) 100%);
    color: var(--primary);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Contact Information */
.owner-contact-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
    background: var(--light);
    border-radius: 10px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    flex-direction: row;
}

[dir="rtl"] .contact-item {
    flex-direction: row-reverse;
}

.contact-item:hover {
    background: rgba(71, 124, 219, 0.05);
    border-color: rgba(71, 124, 219, 0.2);
    transform: translateX(4px);
}

[dir="rtl"] .contact-item:hover {
    transform: translateX(-4px);
}

.contact-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(71, 124, 219, 0.15) 0%, rgba(71, 124, 219, 0.08) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon i {
    color: var(--primary);
    font-size: 20px;
}

.contact-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
        max-width: 180px;
}

.contact-label {
    font-size: 11px;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.contact-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--dark);
    text-decoration: none;
    transition: color 0.3s ease;
}
.contact-value {
    display: block;
    text-overflow: ellipsis;
    white-space: nowrap;
}
  .contact-value {
       word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    overflow: hidden;
    }
@media (max-width: 1200px) {
    .contact-content {
        max-width: 113px;
    }

}

.contact-value:hover {
    color: var(--primary);
}

/* Action Buttons */
.owner-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 20px;
    align-content: center;
    flex-wrap: wrap;
}
.owner-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
    border: 2px solid transparent;
}

.owner-action-btn i {
    font-size: 20px;
}

.owner-action-btn.primary {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(71, 124, 219, 0.3);
}

.owner-action-btn.primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(71, 124, 219, 0.4);
    color: var(--white);
}

.owner-action-btn.secondary {
    background: var(--white);
    color: var(--primary);
    border-color: var(--border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.owner-action-btn.secondary:hover {
    background: var(--light);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    color: var(--primary);
}

/* ============================================
   Top Brands - Compact Design
   ============================================ */

.top-brands-card {
    max-height: 600px;
    display: flex;
    flex-direction: column;
}

.top-brands-card .common-card-body {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.brands-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 500px;
    padding-right: 8px;
}

[dir="rtl"] .brands-container {
    padding-right: 0;
    padding-left: 8px;
}

.brands-container::-webkit-scrollbar {
    width: 6px;
}

.brands-container::-webkit-scrollbar-track {
    background: var(--light);
    border-radius: 10px;
}

.brands-container::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}

.brands-container::-webkit-scrollbar-thumb:hover {
    background: var(--gray);
}

.brand-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.brand-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 10px;
    background: var(--light);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    text-decoration: none;
    min-height: 70px;
    flex-direction: row;
}

[dir="rtl"] .brand-item {
    flex-direction: row-reverse;
}

.brand-item:hover {
    background: rgba(71, 124, 219, 0.08);
    border-color: rgba(71, 124, 219, 0.3);
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

[dir="rtl"] .brand-item:hover {
    transform: translateX(-4px);
}

.brand-image-wrapper {
    width: 45px;
    height: 45px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border-radius: 8px;
    padding: 4px;
    border: 1px solid var(--border);
}

.brand-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-width: 100%;
    max-height: 100%;
}

.brand-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.brand-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--dark);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.brand-count {
    font-size: 11px;
    color: var(--gray);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ============================================
   Video Card
   ============================================ */

.product-single-video {
    width: 100%;
    height: 500px;
    border-radius: 12px;
    border: none;
}

/* ============================================
   Modal
   ============================================ */

#modalImage {
    width: 100%;
    height: 500px;
    object-fit: contain;
}

.modal-media .modal-dialog {
    max-width: 900px;
}

.modal-media .swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-media .modal-slide-img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    background: #f4f4f4;
    border-radius: 8px;
}

.modal-media .modalSwiper {
    height: auto;
    padding: 12px;
}

.star-yellow {
    color: #ffb100;
}

.section-text[dir="rtl"] {
    border-right: 4px solid var(--primary);
    border-left: none;
}

.section-text {
    padding-inline-start: 24px;
    text-align: start;
}

.section-gap-120 {
    margin-bottom: 0px !important;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 992px) {
    .myGallery {
        height: 400px;
    }

    .quick-info-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .quick-info-item.favorite-action {
        margin-left: 0;
        width: 100%;
    }

    [dir="rtl"] .quick-info-item.favorite-action {
        margin-right: 0;
    }

    .details-nav-tabs {
        flex-direction: column;
    }

    .nav-tab {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .myGallery {
        height: 300px;
    }

    .product-single-feature-list {
        grid-template-columns: 1fr;
    }

    .brand-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .brands-container {
        max-height: 400px;
    }
}

@media (max-width: 576px) {
    .modal-media .modal-dialog {
        max-width: 95vw;
    }

    .modal-media .modal-slide-img {
        max-height: 60vh;
    }

    .sidebar-title {
        font-size: 20px;
    }

    .price-main {
        font-size: 28px;
    }
}
