/* ========================================
   PROMOTIONS STYLES
   ======================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Geologica", sans-serif;
    background: #ffff;
    color: #1a1a1a;
    font-size: 14px;
    line-height: 1;
}

.page-wrapper {
    max-width: 1460px;
    width: 100%;
    margin: 0 auto;
}

/* ========================================
   PROMOTIONS GRID
   ======================================== */
.promotions-container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 30px;
}

.banner-section {
  padding-top: 80px;
}

/* Ссылка-обертка для акции */
.promotion-item-link {
    text-decoration: none;
    display: block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.promotion-item-link:hover {
    transform: translateY(-4px);
}

.promotion-item-link:hover .promotion-item {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.promotion-item {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 100%;
    height: 182px;
    border-radius: 16px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 8px;
    transition: box-shadow 0.3s ease;
}

/* Градиент поверх фона */
.promotion-item {
    background: linear-gradient(95.75deg, rgba(45, 54, 69, 0.6) 0.85%, rgba(45, 54, 69, 0.2) 100%);
}

/* Процентный бейдж */
.promotion-item-percent-img-container {
    position: absolute;
    top: -30px;
    right: 0px;
    width: 136px;
    height: 136px;
}

.promotion-item-percent-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Текстовые блоки */
.promotion-item-header {
    font-size: 24px;
    font-weight: 400;
    color: rgba(255, 255, 255, 1);
    padding: 4px 8px;
    background-color: rgba(34, 37, 42, 0.5);
    border-radius: 8px;
    width: fit-content;
    max-width: 100%;
    
    /* Ограничение в 2 строки */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    
    /* Для поддержки nl2br */
    line-height: 1.3;
}

.promotion-item-description {
    font-size: 20px;
    font-weight: 300;
    color: rgba(255, 255, 255, 1);
    padding: 4px 8px;
    background-color: rgba(34, 37, 42, 0.5);
    border-radius: 8px;
    width: fit-content;
    max-width: 100%;
    
    /* Ограничение в 1 строку */
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    
    /* Для поддержки line-height */
    line-height: 1.3;
}

/* ========================================
   PAGINATION
   ======================================== */
.pagination-wrapper {
    margin-top: 40px!important;
    text-align: center;
}

.pagination-wrapper .bx-pagination {
    margin: 0;
}

/* Стилизация стандартной пагинации Bitrix */
.pagination-wrapper .bx-pagination ul {
    display: inline-flex;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination-wrapper .bx-pagination ul li {
    display: inline-block;
}

.pagination-wrapper .bx-pagination ul li a,
.pagination-wrapper .bx-pagination ul li span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border-radius: 8px;
    background-color: #f5f5f5;
    color: #1a1a1a;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pagination-wrapper .bx-pagination ul li a:hover {
    background-color: rgba(255, 173, 13, 0.2);
    color: rgba(255, 173, 13, 1);
}

.pagination-wrapper .bx-pagination ul li.bx-active span {
    background-color: rgba(255, 173, 13, 1);
    color: #ffffff;
}

/* ========================================
   BANNER FOR WHOLESALE CLIENTS
   ======================================== */
.opt-clients-banner-order-btn {
    text-align: center;
    padding: 12px 20px;
    border-radius: 12px;
    background-color: rgba(255, 173, 13, 1);
    cursor: pointer;
    font-weight: 500;
    font-size: 18px;
    color: rgba(255, 255, 255, 1);
    width: fit-content;
    transition: background-color 0.3s ease;
    border: none;
}

.opt-clients-banner-order-btn:hover {
    background-color: rgba(255, 160, 0, 1);
}

.opt-clients-banner {
    display: flex;
    position: relative;
    border-radius: 16px;
    background-color: rgba(255, 229, 177, 1);
    margin-top: 80px;
    padding: 40px;
}

.opt-clients-banner-text-container {
    display: flex;
    flex-direction: column;
    max-width: 695px;
    width: 695px;
}

.opt-clients-banner-header {
    font-weight: 500;
    font-size: 32px;
    line-height: 40px;
    color: rgba(34, 37, 42, 1);
}

.opt-clients-banner-text {
    font-weight: 300;
    font-size: 24px;
    line-height: 100%;
    color: rgba(34, 37, 42, 1);
    margin-top: 16px;
    margin-bottom: 40px;
}

.opt-clients-banner-img-container {
    position: absolute;
    width: 432px;
    max-width: 432px;
    max-height: 414px;
    height: 414px;
    object-fit: cover;
    right: 0px;
    bottom: 0px;
}

.opt-clients-banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Tablet (≤1200px) */
@media (max-width: 1200px) {
    .page-wrapper {
        max-width: 1152px;
        width: 100%;
        margin: 0 auto;
    }
    
    .promotions-container {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 30px;
    }
    
    .pagination-wrapper {
        margin-top: 36px!important;
    }
}

/* Mobile (≤768px) */
@media (max-width: 768px) {
    .page-wrapper {
        width: 100%;
        padding: 0px 16px;
        max-width: 100%;
        margin: 0 auto;
        overflow: hidden;
    }
    
    .promotions-container {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
    
    .promotion-item {
        height: 136px;
        padding: 15px;
    }
    
    .promotion-item-percent-img-container {
        top: -20px;
        width: 62px;
        height: 76px;
    }
    
    .promotion-item-header {
        font-size: 20px;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }
    
    .promotion-item-description {
        font-size: 16px;
        -webkit-line-clamp: 1;
        line-clamp: 1;
    }
    
    .pagination-wrapper {
        margin-top: 32px!important;
    }
    
    .pagination-wrapper .bx-pagination ul {
        gap: 6px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .pagination-wrapper .bx-pagination ul li a,
    .pagination-wrapper .bx-pagination ul li span {
        min-width: 32px;
        height: 32px;
        font-size: 13px;
    }
    
    .opt-clients-banner {
        margin-top: 44px;
        padding: 40px;
    }
    
    .opt-clients-banner-text-container {
        max-width: 547px;
        width: 547px;
    }
    
    .opt-clients-banner-text {
        color: rgba(98, 116, 144, 1);
    }
    
    .opt-clients-banner-img-container {
        width: 323px;
        max-width: 323px;
        max-height: 310px;
        height: 310px;
        right: -107px;
    }
}

/* Small Mobile (≤480px) */
@media (max-width: 480px) {
    .promotions-container {
        gap: 16px;
    }
    
    .pagination-wrapper {
        margin-top: 28px;
    }
    
    .pagination-wrapper .bx-pagination ul {
        gap: 4px;
    }
    
    .pagination-wrapper .bx-pagination ul li a,
    .pagination-wrapper .bx-pagination ul li span {
        min-width: 28px;
        height: 28px;
        font-size: 12px;
    }
}

/* Extra Small Mobile (≤360px) */
@media (max-width: 440px) {
    .page-wrapper {
        padding: 0px 12px;
    }
    
    .promotions-container {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .promotion-item {
        height: 126px;
        padding: 10px 15px;
    }
    
    .promotion-item-percent-img-container {
        width: 57px;
        height: 70px;
    }
    
    .pagination-wrapper {
        margin-top: 24px;
    }
    
    .opt-clients-banner {
        margin-top: 16px;
        padding: 24px;
    }
    
    .opt-clients-banner-img-container {
        display: none;
    }
    
    .opt-clients-banner-text-container {
        max-width: 283px;
        width: 283px;
    }
    
    .opt-clients-banner-header {
        line-height: 100%;
        font-size: 24px;
    }
    
    .opt-clients-banner-text {
        font-size: 24px;
        color: rgba(98, 116, 144, 1);
        margin-top: 16px;
        margin-bottom: 16px;
    }
    
    .opt-clients-banner-order-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
    }
}

/* ========================================
   ANIMATIONS & ADDITIONAL
   ======================================== */
.opt-clients-banner-order-btn {
    transition: all 0.3s ease;
}

.opt-clients-banner-order-btn:active {
    transform: scale(0.98);
}

.promotion-item-link:focus {
    text-decoration: none;
    outline: none;
}

.promotion-item-link:focus-visible .promotion-item {
    outline: 2px solid rgba(255, 173, 13, 1);
    outline-offset: 2px;
}

/* Глобальное отключение подчеркивания для всех ссылок внутри промо-блока */
.promotion-item-link,
.promotion-item-link:hover,
.promotion-item-link:active,
.promotion-item-link:visited,
.promotion-item-link:focus {
    text-decoration: none !important;
}