@font-face {
    font-family: 'Onest';
    src: url('fonts/Onest-SemiBold.woff2') format('woff2'),
    url('fonts/Onest-SemiBold.woff') format('woff');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Onest';
    src: url('fonts/Onest-Regular.woff2') format('woff2'),
    url('fonts/Onest-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Onest';
    src: url('fonts/Onest-ExtraLight.woff2') format('woff2'),
    url('fonts/Onest-ExtraLight.woff') format('woff');
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}

* {
    -webkit-tap-highlight-color: transparent;
}

body {
    margin: 0;
    background-color: white;
    padding-bottom: 40px;
}

.container {
    min-width: 0;
    max-width: 1150px;
    padding: 0 clamp(12px, 2vw, 65px);
    margin: auto;
    font-family: 'Onest', sans-serif;
}

/*=============================================
                    Шапка
===============================================*/
.header-fragment {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: white;
    box-shadow: 0 2px 2px rgba(0, 0, 0, 0.1);
    overflow: visible;
    position: sticky;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    height: 56px;
    border-radius: 0 0 24px 24px;
    padding: 0 clamp(15px, 2vw, 35px);
    background-color: black;
    color: white;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.header-top-left {
    text-align: left;
    font-size: clamp(14px, 2vw, 16px);
    font-family: 'Onest', sans-serif;
    font-weight: 200;
    white-space: nowrap;
}

.header-top-center {
    flex: 1;
    text-align: center;
    direction: rtl;
    font-size: clamp(16px, 2vw, 20px);
    font-family: 'Onest', sans-serif;
    font-weight: 200;
    white-space: nowrap;
    overflow: hidden;
    color: white;
    text-overflow: ellipsis;
    min-width: 0;
}

.header-top-right {
    text-align: right;
    font-size: clamp(14px, 2vw, 16px);
    font-family: 'Onest', sans-serif;
    font-weight: 200;
    white-space: nowrap;
}

/* Убирает подчёркивание и цвет ссылки */
.header-top-right a {
    color: inherit;
    text-decoration: none;
}

/* Нижний блок шапки */
.header-bottom {
    max-width: 100%;
    width: 100%;
    height: 64px;
    padding: 0 12px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    box-sizing: border-box;
    overflow: hidden;
}

.header-bottom-left {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.header-bottom-center {
    max-width: 100%;
    min-width: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.header-bottom-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 15px;
}

.catalog-link {
    color: #000000;
    text-decoration: none;
    font-size: 16px;
    font-weight: 400;
    font-family: 'Onest', sans-serif;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.2s ease;
}

.catalog-link:hover {
    background-color: #f5f5f5;
    color: #333333;
}

.icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.icon:hover {
    opacity: 0.7;
}

.icon-svg {
    width: 18px;
    height: 18px;
}

/* Стили для счетчика корзины */
.cart-icon {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #e91e63;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    min-width: 20px;
    padding: 0 2px;
}

/* Стили для ссылки логотипа */
.logo-link {
    display: block;
    text-decoration: none;
    color: inherit;
    max-width: 100%;
    height: auto;
}

/* Адаптивный логотип */
.logo-image {
    max-width: 100%;
    height: auto;
    max-height: clamp(30px, 2vw, 60px); /* Максимальная высота логотипа */
    width: auto;
    object-fit: contain;
    transition: transform 0.2s ease;
}

@media (max-width: 768px) {
    .header-top-center {
        display: none;
    }

    .header-bottom {
        padding: 0 8px;
    }
    
    .catalog-link {
        font-size: 14px;
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    .header-bottom {
        padding: 0 0;
    }
    
    .catalog-link {
        font-size: 13px;
        padding: 5px 10px;
    }
}

/*=============================================
          Сетка с карточками товаров
===============================================*/
:root {
    --product-card-width: 180px
}

.product-grid {
    margin-top: 25px;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(var(--product-card-width), 1fr));
    justify-content: space-between;
    gap: 20px;
}

.product-grid.search {
    grid-template-columns: repeat(auto-fill, minmax(var(--product-card-width), 1fr));
}

/* Адаптивность для планшетов */
@media (max-width: 1280px) {
    .product-grid {
        grid-template-columns: repeat(4, minmax(var(--product-card-width), 1fr));
    }
}

@media (max-width: 900px) {
    .product-grid {
        grid-template-columns: repeat(3, minmax(var(--product-card-width), 1fr));
    }
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .product-grid,
    .product-grid.search {
        grid-template-columns: repeat(2, 1fr);
    }
}

/*=============================================
                Карточка товара
===============================================*/
.product-card-fragment {
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    text-decoration: none;
    color: inherit;
    display: block;
    width: 100%;
    height: 100%;
    transition: transform 0.2s ease;
}

.product-card-fragment:hover {
    text-decoration: none;
    color: inherit;
    transform: translateY(-2px);
}

.product-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    width: 100%;
    height: 100%;
}

.product-card-link:hover {
    text-decoration: none;
    color: inherit;
}

.pcf-image {
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: 24px;
    overflow: hidden;
}

.pcf-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pcf-info {
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.pcf-title {
    margin: 0 auto;
    overflow: hidden;
    font-size: clamp(18px, 2vw, 24px);
    font-weight: 400;
    letter-spacing: -1.4px;
    height: 2.2em;
    line-height: 1.1;
    color: #000000;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
}

.pcf-price {
    margin-top: 10px;
    font-size: clamp(14px, 2vw, 16px);
    font-weight: 400;
    letter-spacing: -1px;
    color: #000000;
}

.pcf-button {
    width: 100%;
    max-width: 150px;
    height: 44px;
    border-radius: 22px;
    font-size: clamp(16px, 2vw, 20px);
    font-weight: 400;
    transition: background-color 0.2s ease, transform 0.2s ease;
    display: block;
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
    pointer-events: auto;
}

.pcf-button.buy {
    margin-top: 30px;
    background-color: #ffffff;
    color: #000000;
    border-color: black;
    border-width: 1px;
}

.pcf-button.cart {
    margin-top: 10px;
    background-color: #000000;
    color: #ffffff;
    border: none;
}

@media (hover: hover) {
    .pcf-button.buy:hover {
        background-color: #f5f5f5;
        border-color: #666666;
        transform: scale(1.02);
    }

    .pcf-button.cart:hover {
        background-color: #333333;
        transform: scale(1.02);
    }
}

/*=============================================
             Модальное окно поиска
===============================================*/
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.search-modal.active {
    display: flex;
    opacity: 1;
}

.search-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.search-modal-content {
    position: absolute;
    top: 12px;
    left: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2001;
    pointer-events: none;
}

.search-modal-content .container {
    width: 100%;
}

.search-input-container {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.search-input-wrapper {
    position: relative;
    flex: 1;
    max-width: 50%;
    height: 44px;
    border: none;
    border-radius: 30px;
    background-color: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.search-input {
    flex: 1;
    padding-left: 15px;
    width: 100%;
    height: 100%;
    font-size: 18px;
    background-color: transparent;
    border: none;
    font-family: 'Onest', sans-serif;
    font-weight: 400;
    color: #000000;
    outline: none;
    transition: all 0.3s ease;
}

.search-input-icon {
    padding: 11px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    color: #999999;
    transition: all 0.2s ease;
    pointer-events: none;
}

.search-input-icon.clearable {
    pointer-events: auto;
    color: #666666;
}

.search-input-icon:hover {
    color: #000000;
    transform: scale(1.02);
}

.search-input::placeholder {
    color: #999999;
    font-weight: 200;
}

.icon.search-close {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: white;
    pointer-events: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon.search-close:hover {
    transform: scale(1.02);
}

.search-result-container {
    margin-top: 16px;
    padding: 20px;
    width: 100%;
    border-radius: 12px;
    background-color: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    min-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    pointer-events: auto;
    transition: opacity 0.3s ease, transform 0.3s ease;
    box-sizing: border-box;
    transform: translateY(10px);
    opacity: 0;

    /* Кастомный скроллбар для Firefox */
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.search-result-container.loaded {
    transform: translateY(0);
    opacity: 1;
}

/* Кастомный скроллбар для Webkit браузеров */
.search-result-container::-webkit-scrollbar {
    width: 6px;
}

.search-result-container::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 3px;
}

.search-result-container::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
    transition: background 0.2s ease;
}

.search-result-container::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.4);
}

.search-result-container::-webkit-scrollbar-thumb:active {
    background: rgba(0, 0, 0, 0.6);
}

/* Скрываем стрелочки */
.search-result-container::-webkit-scrollbar-button {
    display: none;
}

.search-result-container::-webkit-scrollbar-corner {
    display: none;
}


.search-results-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.search-results-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.search-loading {
    text-align: center;
    padding: 40px 20px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #333;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.search-loading p {
    margin: 0;
    color: #666;
    font-size: 16px;
}

.search-no-results,
.search-error {
    text-align: center;
    padding: 40px 20px;
}

.search-no-results p,
.search-error p {
    margin: 0;
    color: #666;
    font-size: 16px;
}

@media (max-width: 768px) {
    .search-input-wrapper {
        max-width: 70%;
    }
    
    .search-result-container {
        margin-top: 20px;
        padding: 15px;
        max-height: 50vh;
    }
}

@media (max-width: 480px) {
    .search-input-wrapper {
        max-width: 100%;
    }
    
    .search-result-container {
        padding: 10px;
    }
}

/*=============================================
                Модальное меню
===============================================*/

.menu-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.menu-modal.active {
    display: flex;
    opacity: 1;
}

.menu-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
}

.menu-modal-content {
    position: absolute;
    top: 74px;
    right: 0;
    width: 100%;
    z-index: 2001;
    pointer-events: none;
    display: flex;
    justify-content: flex-end;
}

.menu-modal-content .container {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    flex-direction: column;
    align-items: flex-end;
}

.icon.menu-close {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: white;
    pointer-events: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon.menu-close:hover {
    transform: scale(1.02);
}

.menu-modal-wrapper {
    margin-top: 18px;
    width: 320px;
    border: none;
    border-radius: 24px;
    background-color: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    pointer-events: auto;
    padding: 30px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.menu-title {
    font-size: 20px;
    font-weight: 600;
    color: #000000;
    margin: 0;
}

.menu-items {
    margin-top: 10px;
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.menu-item {
    margin: 0;
}

.menu-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    font-size: 16px;
    font-weight: 400;
    color: #333333;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
}

.menu-link:hover {
    color: #000000;
    border-bottom-color: #e0e0e0;
    text-decoration: none;
}

.menu-link-text {
    flex: 1;
}

.menu-link-arrow {
    width: 16px;
    height: 16px;
    opacity: 0.6;
    transition: all 0.2s ease;
}

.menu-link:hover .menu-link-arrow {
    opacity: 1;
    transform: translateX(2px);
}

.menu-icons {
    margin-top: 40px;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 4px;
}

.menu-icon-link {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.menu-icon-link img {
    width: 30px;
    height: 30px;
    transition: all 0.2s ease;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {

    .menu-modal-wrapper {
        width: 280px;
        padding: 25px;
    }
}

@media (max-width: 480px) {

    .menu-modal-wrapper {
        width: 260px;
        padding: 20px;
    }
}

/*=============================================
                    Пагинация
===============================================*/

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
    gap: 8px;
}

.pagination-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 22px;
    font-size: 16px;
    font-weight: 400;
    text-decoration: none;
    color: #666666;
    background-color: transparent;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

.pagination-item:hover {
    background-color: #f5f5f5;
    color: #000000;
    border-color: #e0e0e0;
}

.pagination-item.active {
    background-color: #000000;
    color: #ffffff;
    border-color: #000000;
}

.pagination-item.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination-item.disabled:hover {
    background-color: transparent;
    color: #666666;
    border-color: transparent;
}

.pagination-arrow {
    width: 44px;
    height: 44px;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    border: 1px solid #e0e0e0;
    color: #666666;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.pagination-arrow:hover {
    background-color: #f5f5f5;
    color: #000000;
    border-color: #d0d0d0;
}

.pagination-arrow.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination-arrow.disabled:hover {
    background-color: transparent;
    color: #666666;
    border-color: #e0e0e0;
}

/* Адаптивность пагинации для мобильных устройств */
@media (max-width: 768px) {
    .pagination {
        margin-top: 30px;
        gap: 6px;
    }
    
    .pagination-item,
    .pagination-arrow {
        width: 40px;
        height: 40px;
        border-radius: 20px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .pagination {
        gap: 4px;
    }
    
    .pagination-item,
    .pagination-arrow {
        width: 36px;
        height: 36px;
        border-radius: 18px;
        font-size: 13px;
    }
}

/*=============================================
                    Футер
===============================================*/

.footer-fragment {
    background-color: #FFFFFF;
    margin-top: 60px;
    padding-top: 40px;
    padding-bottom: 30px;
}

/* Навигация */
.footer-navigation {
    text-align: center;
    margin-bottom: 40px;
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.footer-nav-link {
    font-family: 'Onest', sans-serif;
    font-size: clamp(20px, 1.8vw, 22px);
    font-weight: 400;
    color: #000000;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-nav-link:hover {
    color: #666666;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
    justify-content: space-between;
}

.footer-section {
    display: flex;
    flex-direction: column;
}

.footer-contacts {
    text-align: left;
}

.footer-addresses {
    text-align: right;
}

.footer-section-title {
    font-family: 'Onest', sans-serif;
    font-size: clamp(18px, 2vw, 20px);
    font-weight: 600;
    color: #000000;
    margin: 0 0 20px 0;
}


/* Контакты */
.footer-contacts-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.footer-contact-item {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: baseline;
}

.footer-contact-label {
    font-family: 'Onest', sans-serif;
    font-size: clamp(14px, 1.6vw, 16px);
    font-weight: 400;
    color: #000000;
}

.footer-contact-link {
    font-family: 'Onest', sans-serif;
    font-size: clamp(14px, 1.6vw, 16px);
    font-weight: 400;
    color: #000000;
    text-decoration: underline;
}

.footer-social-icons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.footer-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: transform 0.2s ease;
}

.footer-social-link:hover {
    transform: scale(1.1);
}

.footer-social-link img {
    width: 24px;
    height: 24px;
}

/* Адреса */
.footer-addresses-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-address-item {
    font-family: 'Onest', sans-serif;
    font-size: clamp(14px, 1.6vw, 16px);
    font-weight: 400;
    color: #000000;
    line-height: 1.5;
}

/* Копирайт */
.footer-copyright {
    padding-top: 30px;
    text-align: left;
}

.footer-copyright-text {
    font-family: 'Onest', sans-serif;
    font-size: clamp(16px, 1.8vw, 18px);
    font-weight: 400;
    color: #000000;
    margin: 0 0 15px 0;
}

.footer-copyright-disclaimer {
    font-family: 'Onest', sans-serif;
    font-size: clamp(12px, 1.4vw, 14px);
    font-weight: 400;
    color: #666666;
    line-height: 1.6;
    margin: 0;
}

.footer-privacy-link {
    margin: 15px 0 0 0;
}

.footer-privacy-link-text {
    font-family: 'Onest', sans-serif;
    font-size: clamp(14px, 1.6vw, 16px);
    font-weight: 400;
    color: #000000;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.footer-privacy-link-text:hover {
    color: #666666;
}

/* Адаптивность */
@media (max-width: 768px) {
    .footer-fragment {
        margin-top: 40px;
        padding-top: 30px;
        padding-bottom: 20px;
    }

    .footer-navigation {
        margin-bottom: 30px;
    }

    .footer-nav {
        gap: 20px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        margin-bottom: 30px;
    }

    .footer-contacts,
    .footer-addresses {
        text-align: left;
    }

    .footer-section-title {
        margin-bottom: 15px;
    }

    .footer-copyright {
        padding-top: 20px;
    }

}
