/* home_blocks.css */

.banner-large {
    position: relative;
    margin-bottom: 40px;
}
.banner-group-grid-smalls {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.banner-large-wrapper {
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center; /* по горизонтали */
    align-items: center;     /* по вертикали */
    height: 100%;
}

.banner-large img {
    width: 100%;
    display: block;
}

.banner-large-content {
    position: absolute;
    top: auto;
    left: 50%;
    transform: translateY(-50%);
    color: #fff;
    /* width: 100%; */
    transform: translate(-50%, -50%);
    text-align: center;
    bottom: 23px;
}

.banner-large h2 {
    font-size: 48px;
    font-weight: 400;
    font-family: "Alegreya Sans", sans-serif;
    padding-bottom: 1rem;
}

.banner-large p {
    font-size: 18px;
    margin: 10px 0 20px;
}

.banner-large .btn {
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 6px;
}

.banner-grid {
    margin-bottom: 40px;
}

.banner-grid .grid-wrapper {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    width: 93%;
}

.grid-item .grid-box {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: end;
    background: #f8f8f8;
    padding: 0px;
    border-radius: 12px;
    text-decoration: none;
    /*height: 244px;*/
    transition: .3s all;
    overflow: hidden;

}
.grid-item .grid-box:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: .3s all;
    background-position: center !important;
}

.grid-text h3 {
    font-size: 18px;
    margin: 0;
    color: #fff;
    line-height: 130%;
    font-weight: 400;
    font-family: 'Alegreya Sans', sans-serif;
}

.grid-text .btn-white {
    background: #fff;
    color: #000;
    padding: 6px 14px;
    font-size: 14px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

.grid-image img {
    height: 80px;
    max-width: 100px;
    object-fit: contain;
}

.grid-footer {
    margin-top: 30px;
    text-align: center;
}

.banner-grid-narrow {
    margin-bottom: 7rem !important;
    margin-top: 7rem !important;
}

.narrow-wrapper {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.narrow-box {
    position: relative;
    display: block;
    border-radius: 12px;
    overflow: hidden;
    height: auto;
}

.narrow-box img {
    width: 100%;
    display: block;
    transition: .3s all;
}

.narrow-title {
    position: absolute;
    top: 40px;
    left: 40px;
    font-size: 28px;
    font-weight: 400;
}

.narrow-box.text-light .narrow-title {
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.narrow-box.text-dark .narrow-title {
    color: #000;
}

.banner-group-alt {
    margin-bottom: 40px;
}

.banner-group-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: flex-start;
}

.group-big-alt {
    flex: 1 1 50%;
}

.group-big-alt img {
    width: 100%;
    border-radius: 12px;
    object-fit: cover;
}

.group-smalls-alt {
    flex: 1 1 45%;
    position: relative;
}

.group-smalls-alt .group-title {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #000;
}

.smalls-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    position: absolute;
    left: -9rem;
}

.small-banner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: #000;
    padding: 15px;
    border-radius: 12px;
    text-decoration: none;
    height: 100%;
}

.small-banner .img-wrapper {
    width: 100%;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.small-banner img {
    max-height: 60px;
    object-fit: contain;
}

.small-banner .banner-title {
    margin-top: 10px;
    font-size: 16px;
    font-weight: 500;
}

.small-banner.text-light .banner-title {
    color: #fff;
}

.small-banner.text-dark .banner-title {
    color: #000;
}

.banner-slider-full {
    margin-bottom: 40px;
    position: relative;
}

.swiper-banner-slider {
    overflow: visible;
}

.slider-banner-box {
    display: block;
    text-align: center;
    text-decoration: none;
    overflow: hidden;
    border-radius: 10px;
}

.slider-banner-title {
    font-size: 20px;
    font-weight: 400;
    display: block;
    width: 100%;
    margin-top: 10px;
}

.slider-banner-button-wrapper {
    margin-top: 20px;
    text-align: center;
}

.banner-slider-full .swiper-button-next,
.banner-slider-full .swiper-button-prev {
    color: #000;
    top: 40%;
}

.slider-products-full {
    margin: 40px 0;
}

.product-slider-box {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
    text-align: center;
    padding: 10px;
}

.product-slider-box:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

.product-slider-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
    max-height: 240px;
}

.product-slider-title {
    font-size: 16px;
    font-weight: 500;
    margin-top: 10px;
    color: #333;
}

.product-slider-price {
    margin-top: 6px;
    font-size: 18px;
    font-weight: bold;
}

.product-slider-price .price-old {
    color: #999;
    font-size: 14px;
    text-decoration: line-through;
    margin-left: 8px;
}

.slider-products-button-wrapper {
    text-align: center;
    margin-top: 0;
}
.product-card img {
    width: 100%;
}

section {
    margin-bottom: 5rem !important;
    position: relative;
}

.btn.edit-btn {
    padding: 7px 8px;
    margin-left: 8px;
    vertical-align: top;
    position: absolute;
    top: 0;
    right: 0;
    z-index: 9;
}
.edit-btn img {
    width: 20px;
}
.grid-item .grid-box .grid-text {
    width: auto;
    position: absolute;
    bottom: 30px;
    left: 5%;
    font-size: 28px;
    font-weight: 400;
    background-color: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 4px 14px;

}

.grid-item .grid-box img{

    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    aspect-ratio: 4 / 3;
    display: block;
    transition: .3s all;
}
.grid-item .grid-box:hover img {
    transform: scale(1.1);
    display: block;
}


.narrow-box:hover img {
    transform: scale(1.1);
    display: block;
}
.banner-group-gri-mainlink {
    display: block;
    overflow: hidden;
    width: calc(68% - 200px);
    border-bottom-right-radius: 10px;
    border-top-right-radius: 10px;
}
@media (max-width: 1500px) {
    .btn.edit-btn {
        padding: 7px 8px;
        margin-left: 8px;
        vertical-align: top;
        position: absolute;
        top: -3rem;
        right: auto;
        z-index: 9;
        left: 1rem;
    }
    .banner-group-gri-mainlink {
        display: block;
        overflow: hidden;
        width: calc(68% - 222px);
        border-bottom-right-radius: 10px;
        border-top-right-radius: 10px;
    }
    .grid-text h3{
        font-size: 24px;
    }

}
@media (max-width: 1200px) {
    .banner-group-grid > div {
        width: 100%;
    }
    .division-box-item span {
        bottom: 10px;
        font-size: 20px !important;
    }
    .grid-text h3{
        font-size: 24px;
    }
}
@media (max-width: 1199px) {
    section.slider {
        margin-bottom: 3.5rem !important;
        margin-top: 94px;
    }
    .division-box-item {
        width: auto;
        height: auto;
        overflow: hidden;
    }
    .banner-group-grid-smalls {
        padding: 1rem;
    }
    .grid-text h3{
        font-size: 22px;
    }
}
@media (max-width: 992px) {
    footer.mt-6 {
        margin-bottom: 3rem;
    }
    footer .bottom .container a:nth-child(2), footer .bottom .container a:nth-child(3), footer .bottom .container a:nth-child(4){
        text-align: center !important;
    }
    .banner-large-wrapper {
        position: relative;
        overflow: hidden;
        display: flex;
        justify-content: center;
        align-items: center;
        /*height: 480px;*/
    }
    .banner-large img {
        width: 100%;
        display: block;
        object-fit: cover;
        height: 100%;
    }
    .banner-grid-narrow {
        margin-bottom: 7rem !important;
        margin-top: 4rem !important;
    }
    .grid-item .grid-box{
        /*height: 234px;*/
    }
    .narrow-wrapper {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .banner-grid .grid-wrapper {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        width: 100%;
        padding-left: 20px;
        padding-right: 20px;
    }
    .grid-text h3 {
        font-size: 22px;
        /*margin-left: 0;*/
        color: #fff;
        line-height: 130%;
        font-weight: 400;
    }
    .banner-large h2 {
        font-size: 40px;
        padding-bottom: 0;
    }
    .banner-large p {
        font-size: 12px;
        margin: 10px 0 5px;
    }
    .slider-products-button-wrapper {
        text-align: center;
        margin-top: 0;
        top: auto;
        bottom: 0;
    }
}
@media (max-width: 1024px) {
    .banner-group-grid-smalls{
        padding: 1rem;
    }
    section.slider {
        margin-bottom: 3.5rem !important;
        margin-top: 94px;
    }
}
@media (max-width: 768px) {
    .categories-slider .swiper-slide span {
        font-size: 14px;
    }
    .division-box-item {
        width: 230px;
        height: 230px;
        overflow: hidden;
    }
}
@media (max-width: 767px) {
    .banner-large img {
        min-height: 280px;
    }
    .narrow-box .narrow-title {
        padding-top: 10px;
        padding-left: 10px;
        font-size: 20px !important;
        top: 2px;
        left: 10px;
    }
    a.narrow-box {
        height: auto;
    }
    .narrow-wrapper {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .banner-grid-narrow {
        margin-bottom: 3rem !important;
        margin-top: 3rem !important;
    }
    .grid-item .grid-box .grid-text {
        /*width: 100%;*/
    }
    .grid-item .grid-box {
        width: 100%;
        background-position: center !important;
        /*height: 210px;*/
        padding-right: 0;
    }

    .grid-text h3 {
        /*margin: 0;*/
        font-size: 14px;
    }
    .banner-grid .grid-wrapper {
        display: grid;
        overflow-x: auto;
        gap: 10px;
        -webkit-overflow-scrolling: touch;
    }
    .banner-grid .grid-wrapper::-webkit-scrollbar {
        height: 0; /* horizontal scrollbar */
        width: 0;  /* for vertical if used */
        display: none;
    }
    .division-box-item:hover img {
        transform: scale(1);
    }
    section.slider {
        margin-bottom: 3.5rem !important;
        margin-top: 4.6rem;
    }
    .block__title {
        font-size: 24px;
        font-family: "Alegreya Sans", sans-serif;
    }
    .banner-large h2 {
        font-size: 24px;
        padding-bottom: 0;
    }
    .banner-large p {
        font-size: 12px;
        margin: 10px 0 5px;
    }
    .slider-products-button-wrapper {
        text-align: center;
        margin-top: 0;
        top: auto;
        bottom: 0;
    }
    section {
        margin-bottom: 2rem !important;
        position: relative;
    }
}

@media (max-width: 740px){
    .division-box-item {
        width: auto;
        height: auto;
        overflow: hidden;
    }
}
@media (max-width: 640px){

    .grid-item .grid-box {
        width: 210px;
        background-position: center !important;
        height: 210px!important;
        padding-right: 0;
    }
    .banner-group-grid-smalls {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .banner-grid .grid-wrapper{
        display: flex;
        overflow-x: auto;
        gap: 10px;
        -webkit-overflow-scrolling: touch;
    }

    .banner-grid .grid-wrapper .grid-item{
        flex: 0 0 210px;   /* ключевое */
        width: 210px;
        min-width: 210px;
    }

    .banner-grid .grid-wrapper .grid-box{
        width: 100%;
        aspect-ratio: 1 / 1; /* квадрат */
        display: block;
        position: relative;
        overflow: hidden;
        border-radius: 12px;
    }

    .banner-grid .grid-wrapper .grid-box > img{
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }
}
@media (max-width: 500px){
    .banner-grid .grid-wrapper {
        display: flex;
        overflow-x: auto;
        gap: 10px;
        -webkit-overflow-scrolling: touch;
    }
}
@media (max-width: 375px){
    .banner-large .btn {
        padding: 10px 20px;
        font-size: 14px;
        border-radius: 6px;
        width: 280px;
    }
    .slider-products-button-wrapper {
        text-align: center;
        margin-top: 0;
        top: auto;
        bottom: -2rem;
    }
    .banner-large-wrapper {
        position: relative;
        overflow: hidden;
        display: flex;
        justify-content: center;
        align-items: center;
        
    }
    .banner-large .btn {
        padding: 10px 20px;
        font-size: 14px;
        border-radius: 6px;
    }
    footer .bottom .container a:nth-child(2), footer .bottom .container a:nth-child(3), footer .bottom .container a:nth-child(4){
        text-align: left !important;
    }
    .division-box-item {
        width: 160px;
        height: 160px;
        overflow: hidden;
    }

}




.grid-item{
    aspect-ratio: 1 / 1;   /* всегда квадрат */
}

.grid-item .grid-box{
    width: 100%;
    height: 100%;
}

.grid-item .grid-box > img{
    width: 100%;
    height: 100%;
    object-fit: cover;     /* чтобы без искажений */
}

.grid-item .grid-box .grid-text{
    position: absolute;
    left: 18px;
    bottom: 18px;
    right: auto;
    display: inline-block;
    width: auto;                    /* ВАЖНО: убрать fit/max-content */
    max-width: calc(100% - 36px);

    padding: 8px 12px;
    border-radius: 12px;

    white-space: normal;
    overflow-wrap: anywhere;

    color: #fff;
    background: rgba(0,0,0,.35);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}


.banner-large-wrapper picture{
  width: 100%;
  height: 100%;
  display: block;
}
.banner-large-wrapper picture img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}


@supports not (width: fit-content){
    .grid-item .grid-box .grid-text{
        width: auto;
    }
}