/* ==================== HOME BANNER ==================== */

.home-banner {
  background: radial-gradient(50% 50% at 50% 50%, #ECEFFF 0%, #DEE4FF 100%);
}

.home-banner__main-block {
    display: flex;
    flex-direction: column;
    aspect-ratio: 2/1;
}

.home-banner__text-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: calc(100% - 340px);
}

.home-banner__title {
  text-align: center;
  font-size: 52px;
}

.home-banner__subtitle {
  margin-top: 16px;
  display: block;
  text-align: center;
  font-size: 20px;
}

.home-banner__btn {
  margin-top: 24px;
}

.home-banner__slider {
    margin-top: auto;
    height: 340px;

}

.home-banner .swiper-slide__picture {
  /* picture tag */
}

.home-banner .swiper-slide__img {
    width: 100%;
    height: auto;
}

@media (max-width:1336px) {
    .home-banner__main-block {
        aspect-ratio: 2/1.2;
    }

    banner__title {
        font-size: 42px;
    }
}

/* ==================== BRANDS ==================== */

.brands .swiper {
    padding-top: 60px;
    padding-bottom: 60px;
    position: relative;
    overflow: hidden;
}

.brands__img {
  width: 100%;
  height: 60px;
  object-fit: contain;
  object-position: center;
}

@media (max-width: 520px) {
    .brands__img {
        height: 40px;
    }   
}

/* ==================== SUBCATEGORIES ==================== */

.subcategories-sec .swiper {
    padding-top: 60px;
    padding-bottom: 60px;
    position: relative;
    overflow: hidden;
}

.subcategories-sec__slide {
    height: auto;
}

.related-card {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 20px 16px;
    border: 1px solid #E5EAF1;
    border-radius: 20px;
    background-color: #fff;
    text-align: center;
    text-decoration: none;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

/* ==================== Hover styles ==================== */
.related-card:hover {
    border-color: #C8D5E6;
    box-shadow: 0 12px 30px rgba(19, 54, 88, 0.08);
    transform: translateY(-2px);
}

.related-card__img {
    width: 100%;
    height: 76px;
    object-fit: contain;
    object-position: center;
}

.related-card__name {
    margin: 0;
    color: #1F2A37;
    font-size: 16px;
    line-height: 1.35;
    font-weight: 500;
}



/* ==================== New section ==================== */

.new-sec__banner-list {
    flex-wrap: wrap;
    flex-direction: row;
    gap: 40px
}
.new-sec__banner-item {
    overflow: hidden;
    border-radius: 20px;
    padding: 40px;
    padding-bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    flex: 1 1 calc(33.3% - 40px);
    overflow: hidden;
}

.new-sec__banner-item:nth-child(1) {
    background-color: #D7E0EC;
}
.new-sec__banner-item:nth-child(2) {
    background-color: #D4E4F0;
}
.new-sec__banner-item:nth-child(3) {
    background-color: #DEE5DA;
}
.new-sec__banner-item:last-child {
    flex: 1 1 100%;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 40%;
    background-color: #EBF0F6;
}
.banner-item__top-wrapper {
    display: flex;
    gap: 35px 0;
    align-items: center;
    flex-direction: column;
}
.banner-item__text-wrapper {
    display: flex;
    gap: 40px 0;
    flex-direction: column;
    align-items: center;
}
.new-sec .banner-item__subtitle {}

.new-sec .banner-item__title {
    font-size: 32px;
    text-align: center;
}
.new-sec .banner-item__link {
    height: 36px;
    padding: 0 16px;
}
.new-sec .banner-item__link svg {
    transform: scale(.7) translate(4px, 2px);
}
.new-sec .banner-item__img {
    margin-top: 50px;
    object-position: bottom;
    height: auto;
    width: 100%;
    transform: translateY(7px);
}
@media (max-width: 1200px) {
    .new-sec__banner-list {
        gap: 25px;
    }
    .new-sec__banner-item:last-child {
        padding-top: 0;
    }

    .banner-item__text-wrapper {
        gap: 24px 0;
    }
}

/* ==================== ADAPTIVE ==================== */
@media (max-width: 1080px) {
    .home-banner__main-block { 
        aspect-ratio: 2/1.4; 
        justify-content: center;
    }
    .home-banner__title { font-size: 38px; }
    .home-banner__slider { height: auto; margin-top: inherit; }

    .new-sec__banner-item {
        flex: 1 1 calc(50% - 25px);
    }
    .new-sec__banner-item:last-child {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .home-banner__main-block {
        aspect-ratio: auto;
        min-height: 360px;
    }
    .home-banner__text-wrapper {
        height: auto;
        padding: 32px 0 0;
    }
    .home-banner__title { font-size: 28px; }
    .home-banner__subtitle { font-size: 15px; margin-top: 10px; }
    .home-banner__slider {margin-top: 20px; }

    .new-sec__banner-item {
        flex: 1 1 100%;
        padding: 24px 24px 0;
    }
    .new-sec__banner-item:last-child {
        grid-template-columns: 1fr;
        padding: 24px;
    }
    .new-sec .banner-item__title { font-size: 22px; }

    .related-card { padding: 14px 12px; gap: 10px; }
    .related-card__name { font-size: 14px; }
}

@media (max-width: 480px) {
    .home-banner__title { font-size: 22px; }
    .home-banner__btn { margin-top: 16px; }
}

/* ==================== Additional responsive fixes ==================== */

@media (max-width: 768px) {
  /* Brands slider padding */
  .brands .swiper,
  .subcategories-sec .swiper {
    padding-top: 32px;
    padding-bottom: 32px;
  }

  /* New section banner gap */
  .new-sec__banner-list {
    gap: 20px;
  }
}

@media (max-width: 520px) {
  /* New section: stack all banners */
  .new-sec__banner-item {
    flex: 1 1 100%;
    padding: 20px 16px 0;
  }
  .new-sec__banner-item:last-child {
    padding: 20px 16px;
  }
  .new-sec__banner-list {
    gap: 16px;
  }
  .banner-item__text-wrapper {
    gap: 16px 0;
  }
  .new-sec .banner-item__title {
    font-size: 18px;
  }

  /* Brands */
  .brands .swiper,
  .subcategories-sec .swiper {
    padding-top: 24px;
    padding-bottom: 24px;
  }

  /* Categories swiper */
  .categories-sec__swiper {
    padding-bottom: 40px;
  }

  /* Bloglatest */
  .bloglatest-sec .swiper-slide {
    gap: 14px 0;
  }
}

@media (max-width: 480px) {
  /* Related card */
  .related-card {
    padding: 12px 10px;
    gap: 8px;
  }
  .related-card__name {
    font-size: 13px;
  }
  .related-card__img {
    height: 56px;
  }
}



/* ==================== Categories section ==================== */

.categories-sec__swiper {
    overflow: hidden;
    padding-bottom: 70px;
}


.categories-sec .swiper-slide {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px 0;
}

.categories-sec .swiper-slide__thumb {
    background: #F9F9F9;
    border-radius: 16px;
    padding: 24px;
    box-sizing: border-box;
    display: block;
}
.categories-sec .swiper-slide__img {
    aspect-ratio: 16/9;
    object-fit: contain;
    object-position: center;
    width: 100%;
}
.categories-sec .swiper-slide__title {
    font-size: 16px;
    text-align: center;
    line-height: 1.1;
}

.categories-sec .swiper-slide__title * {
    font-size: inherit;
    line-height: inherit;
    color: inherit;
    font-weight: inherit;
}

@media (max-width: 520px) {
    .categories-sec .swiper-slide {
        gap: 12px 0;
    }
    .categories-sec .swiper-slide__title {
        font-size: 14px;
    }
}

/* ==================== Latest blog ==================== */


.bloglatest-sec__swiper {
    overflow: hidden;
}
.bloglatest-sec .swiper-slide {
    display: flex;
    flex-direction: column;
    gap: 24px 0;
}
.bloglatest-sec .swiper-slide__thumb {
    display: block;
    border-radius: 30px;
    overflow: hidden;
    width: 100%;
}

.bloglatest-sec .swiper-slide__img {
    width: 100%;
    height: ;
    object-fit: cover;
    object-position: center;
}
.bloglatest-sec .swiper-slide__title {
    font-size: 16px;
    line-height: 1.1;
    font-weight: 500;
}
.bloglatest-sec .swiper-slide__title * {
    font-size: inherit;
    line-height: inherit;
    color: inherit;
    font-weight: inherit;
}
.bloglatest-sec .swiper-slide__btn {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0 8px;
    color: #0059D8;
}

.bloglatest-sec .swiper-slide__btn svg {
    transform: scale(.7) translateX(5px);
}

@media (max-width: 768px) {
    .bloglatest-sec .swiper-slide__thumb {
        border-radius: 16px;
    }
    .bloglatest-sec .swiper-slide__img {
        aspect-ratio: 16/9;
    }
}

@media (max-width: 520px) {
    .bloglatest-sec .swiper-slide {
        gap: 12px 0;
    }
    .bloglatest-sec .swiper-slide__title {
        font-size: 14px;
    }
}