/* ============================================================
   BRAND IMAGE PAGE LAYOUT
============================================================ */
.brandImagePage {
    padding-top: 16px;
    border-top: 1px solid #E5E7EB;
}

.brandImageSection {
    position: relative;
}

.brandImageSection button {
    font: inherit;
}

/* ============================================================
   POPULAR PHOTOS SLIDER
============================================================ */
/* Hold one row before Slick starts, so the gallery below does not jump up. */
.brandPhotoSlider:not(.slick-initialized) {
    display: flex;
    overflow: hidden;
}

.brandPhotoSlider:not(.slick-initialized) .brandPhotoSlider__item {
    flex: 0 0 50%;
    max-width: 50%;
    padding: 0 8px;
    box-sizing: border-box;
}

.brandPhotoSlider .slick-list {
    overflow: hidden;
}

.brandPhotoSlider .slick-slide {
    height: auto !important;
    margin: 0 !important;
    padding: 0 8px;
}

.brandPhotoSlider .slick-slide > div {
    display: block;
}

.brandPhotoSlider__image {
    position: relative;
    display: block;
    width: 100%;
    height: 260px;
    padding: 0;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    background: #F9FAFB;
    overflow: hidden;
    cursor: pointer;
}

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

.brandImageSection .brandPhotoSlider .slicknavArrow {
    top: 50%;
    transform: translateY(-50%);
}

.brandImageSection .brandPhotoSlider .slicknavArrow.slick-prev {
    left: 0;
}

.brandImageSection .brandPhotoSlider .slicknavArrow.slick-next {
    right: 0;
}

/* ============================================================
   GALLERY GRID & CARD
============================================================ */
.brandGalleryGrid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.brandGalleryCard {
    display: flex;
    flex-direction: column;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}

.brandGalleryCard__main,
.brandGalleryCard__thumb {
    display: block;
    padding: 0;
    border: 0;
    background: #fff;
    cursor: pointer;
}

.brandGalleryCard__main {
    width: 100%;
    height: 160px;
    padding: 8px 8px 0;
}

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

.brandGalleryCard__thumbs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.brandGalleryCard__thumb {
    position: relative;
    height: 54px;
    overflow: hidden;
}

.brandGalleryCard__more {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 11px;
    font-weight: 500;
}

.brandGalleryCard__content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
    padding: 16px 14px; 
}

.brandGalleryCard__info {
    min-width: 0;
}

.brandGalleryCard__brand {
    margin: 0 0 2px;
    color: #37373780;
    font-size: 14px;
    line-height: 24px;
}

.brandGalleryCard__name {
    display: block;
    color: #373737;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brandGalleryCard__name:hover {
    color: #E4002B;
    text-decoration: none;
}

.brandGalleryCard__arrow {
    display: inline-flex;
    flex: 0 0 48px;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 6px;
    background: #F3F4F6;
}
.brandGalleryCard__arrow img {
    height: auto;
}

.brandGalleryCard__arrow:hover {
    background: #E5E7EB;
}

#brandGalleryLoadMore.is-loading {
    opacity: 0.7;
    cursor: wait;
}

/* ============================================================
   TOOLS & SERVICES INSIDE MAIN COLUMN
============================================================ */
.brandImageToolsWrap .toolServiceSection {
    margin-top: 40px;
    margin-bottom: 24px;
}

.brandImageToolsWrap .toolServiceWrapper {
    margin: 0 -8px;
}

.brandImageToolsWrap .toolServiceItem {
    padding: 0 8px !important;
}

/* ============================================================
   SIDEBAR
============================================================ */
.brandImageSidebarCard {
    margin-bottom: 20px;
    padding: 16px;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    background: #fff;
}

.brandImageSidebarCard__title {
    margin-bottom: 16px;
    color: #373737;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
}

.relatedBrandGrid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px 8px;
}

.relatedBrandGrid[hidden] {
    display: none;
}

.relatedBrandItem {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
}

.relatedBrandItem:hover {
    text-decoration: none;
}

.relatedBrandItem__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: 8px;
    padding: 10px;
    border: 1px solid #E5E7EB;
    border-radius: 50%;
    background: #fff;
}

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

.relatedBrandItem__name {
    color: #00000080;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
}

.relatedBrandItem__count {
    margin-top: 4px;
    color: #D32525;
    font-size: 11px;
    font-weight: 600;
}

.relatedBrandItem:hover .relatedBrandItem__name {
    color: #E4002B;
}

.relatedBrandToggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    border: 0;
    border-radius: 6px;
    background: #F1EEFF;
    color: #4F46E5;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.relatedBrandToggle__icon {
    transition: transform 0.2s ease;
}

.relatedBrandToggle.is-open .relatedBrandToggle__icon {
    transform: rotate(180deg);
}

.sidebarTractorList {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.slideItemsWrap .dealerCard-main .dealerCard-address div{
    min-height: 36px;
}

.sidebarTractorItem {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
}

.sidebarTractorItem__image {
    flex: 0 0 72px;
    height: 52px;
}

.sidebarTractorItem__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.sidebarTractorItem__info {
    min-width: 0;
}

.sidebarTractorItem__name {
    display: block;
    color: #373737;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebarTractorItem__name:hover {
    color: #E4002B;
    text-decoration: none;
}

.sidebarTractorItem__specs {
    display: flex;
    gap: 10px;
    margin-top: 8px;
    color: #6C737F;
    font-size: 11px;
}

.sidebarTractorItem__specs span {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 12px;
    color: #0E4470;
    font-weight: 600;
    background: #F9FAFB;
    line-height: 19px;
}

.sidebarTractorItem__cta {
    display: inline-block;
    margin-top: 8px;
    color: #2563EB;
    font-size: 12px;
    font-weight: 700;
    text-decoration: underline;
}
.noSliderWrp.sliderMainWrap .cssSlider-item {
    flex: 0 0 30%;
    max-width: 30%;
    width: 30%;
}

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 1400px) {
    .brandImageSidebarCard__title {
        font-size: 18px;
    }
}
@media (max-width: 1150px) {
    .noSliderWrp.sliderMainWrap .cssSlider-item {
        flex: none;
        max-width: none;
        width: 300px;
    }
}
@media (max-width: 991px) {
    .brandGalleryGrid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .brandImagePage__sidebar {
        margin-top: 24px;
    }
}

@media (max-width: 767px) {
    .brandPhotoSlider:not(.slick-initialized) {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }

    .brandPhotoSlider:not(.slick-initialized)::-webkit-scrollbar {
        display: none;
    }

    .brandPhotoSlider:not(.slick-initialized) .brandPhotoSlider__item {
        flex: 0 0 86%;
        max-width: 86%;
        scroll-snap-align: start;
    }
    .noSliderWrp.sliderMainWrap .cssSlider-item {
        width: 250px;
    }
}

@media (max-width: 575px) {
    .brandGalleryGrid {
        gap: 10px;
    }

    .brandGalleryCard__main {
        height: 110px;
    }

    

    .brandGalleryCard__thumb {
        height: 34px;
    }

    .brandGalleryCard__content {
        padding: 8px;
    }

    .brandGalleryCard__arrow {
        flex-basis: 28px;
        width: 28px;
        height: 28px;
    }

    .brandPhotoSlider__image,
    .brandPhotoSlider__image img {
        height: 200px;
    }
}
