/* style.css v2.0.40 */

:where(html, body, body *) {
    touch-action: pan-x pan-y;
}

.feal-screen-title {
    display: none;
}

@media (max-width: 867px) {
    .feal-screen-title {
        display: block;
        height: 52px;
        margin: 0;
        padding: 0 56px;
        box-sizing: border-box;
        font-family: "Unbounded", sans-serif;
        font-size: 18px;
        font-weight: 600;
        line-height: 52px;
        letter-spacing: -0.02em;
        text-align: center;
        color: #161B2D;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* === Скелетоны карточек товаров: плавная загрузка вместо пустоты === */
.feal-skeleton-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    margin: 0;
    border-radius: 15px;
    background: #fff;
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
    height: 100%;
}

.feal-skeleton-block {
    position: relative;
    overflow: hidden;
    background: #eceff3;
    border-radius: 8px;
}

.feal-skeleton-block::after {
    content: '';
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.65), transparent);
    animation: feal-skeleton-shimmer 1.2s infinite;
}

@keyframes feal-skeleton-shimmer {
    100% { transform: translateX(100%); }
}

.feal-skeleton-card .feal-skeleton-img {
    width: 100%;
    height: 180px;
    flex-shrink: 0;
    margin-bottom: 8px;
    border-radius: 10px;
}

.feal-skeleton-card .feal-skeleton-lines {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    min-width: 0;
}

.feal-skeleton-line { height: 12px; }
.feal-skeleton-line--w60 { width: 88%; height: 18px; }
.feal-skeleton-line--w40 { width: 46%; }
.feal-skeleton-line--w80 { width: 62%; }

.feal-skeleton-line--btn {
    height: 36px;
    width: 100%;
    margin-top: 8px;
    border-radius: 15px;
}


/* @font-face {
    font-family: 'Unbounded';
    src: url('./fonts/Roboto_Flex/RobotoFlex.ttf') format('ttf');
    font-weight: 100 1000;
    font-stretch: 25% 151%;
    font-display: swap;
    font-style: normal;
    font-optical-sizing: auto;
} */

html,
body {
    margin: 0;
    padding: 0;
    font-family: "Unbounded", sans-serif;
    font-weight: 400;
    font-optical-sizing: auto;
    position: relative;
    background-color: #f9f9f9;
}

body {
    /* padding: 0 20px 20px 20px; */
    display: flex;
    flex-direction: column;
    align-items: center;
    /* height: 100vh; */
}

.loading {
    text-align: center;
    color: #666;
    font-style: italic;
    margin: 10px 0;
}


/* Стили для истории поиска */

.search-history {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
    /* padding: 0 20px; */
}

.search-history-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    max-height: 320px;
    overflow-y: auto;
    padding: 8px 0 2px;
    border-radius: 15px;
    border: none;
    background: #f9f9f9;
    box-shadow: none;
    z-index: 1200;
}

.search-history-dropdown.show {
    display: flex;
}

.search-history-dropdown-title {
    padding: 4px 18px 8px;
    color: #9ea2ab;
    font-size: 14px;
    font-weight: 500;
}

.search-history-dropdown-row {
    display: grid;
    grid-template-columns: 28px 1fr 26px;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 2px 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.04);
    transition: background 0.15s;
}

.search-history-dropdown-row:hover {
    background: #ebebeb;
}

.search-history-dropdown-icon {
    color: #babec7;
    font-size: 17px;
    line-height: 1;
}

.search-history-dropdown-item {
    display: block;
    justify-self: stretch;
    width: 100%;
    text-align: left;
    padding: 8px 0;
    border: none;
    background: transparent;
    color: #1c2230;
    font-size: 16px;
    font-weight: 400;
    font-family: "Unbounded", sans-serif;
    cursor: pointer;
    transition: none;
}

.search-history-dropdown-item:hover,
.search-history-dropdown-item:focus-visible {
    background: transparent !important;
    color: #1c2230 !important;
    box-shadow: none !important;
}

.search-history-dropdown-remove {
    width: 26px;
    height: 26px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #b2b7c1;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: grid;
    place-items: center;
    padding: 0;
    transition: color 0.15s, background 0.15s;
}

.search-history-dropdown-remove:hover {
    color: #7f8796;
    background: rgba(255, 255, 255, 0.5);
}

.search-history-dropdown-empty {
    padding: 10px 16px;
    color: #7a8799;
    font-size: 13px;
}

.main-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #f9f9f9;
}

.catalog-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #fff;
    border-radius: 25px 25px 0 0;
}

.home-feature-grid {
    width: min(960px, 92%);
    margin: 14px auto 28px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.home-feature-card {
    background: #fff;
    border: 1px solid #e9edf3;
    border-radius: 15px;
    padding: 18px 20px;
}

.home-feature-card h3 {
    margin: 0 0 8px;
    font-size: 24px;
    color: #161B2D;
}

.home-feature-card p {
    margin: 0;
    color: #5d667a;
    font-size: 15px;
    line-height: 1.45;
}

.nav-search-trigger {
    white-space: nowrap;
}

.desktop-nav-search-popover {
    position: fixed;
    top: 76px;
    right: 24px;
    z-index: 12010;
    display: none;
}

.desktop-nav-search-popover.show {
    display: block;
}

.desktop-nav-search-inner {
    width: min(520px, calc(100vw - 48px));
    padding: 12px;
    border-radius: 15px;
    background: #fff;
    border: 1px solid #e8ecf3;
}

#desktopNavSearchHistory {
    position: static;
    margin-top: 8px;
    max-height: 260px;
}

@media (max-width: 867px) {
    .home-feature-grid {
        display: none;
    }
}


/* Голова */

header {
    position: sticky;
    top: 0px;
    padding: 10px 0;
    width: 100%;
    justify-content: space-around;
    border-radius: 0 0 15px 15px;
    background-color: #f9f9f9;
    display: flex;
    flex-direction: row;
    align-items: center;
    height: 7vh;
    z-index: 100;
}

.logo {
    width: 255px;
    height: 30px;
}

/* Только шапка: нижний .mobile-menu > ul.navbar тоже имеет класс navbar — не красим его в «десктопную» синюю капсулу */
header .navbar {
    background-color: rgba(18, 128, 208, 0.36);
    display: flex;
    /* padding: 0; */
    height: 36px;
    flex-direction: row;
    list-style: none;
    align-items: center;
    justify-content: center;
    width: 450px;
    border-radius: 15px;
    font-weight: 500;
    color: #ffffff;
    margin: 0;
    outline: #1280D0 2px solid;
    padding: 3px;
}

.barItem {
    cursor: pointer;
    margin: 0 2px 0 2px;
}

.mainBtn {
    border-radius: 15px;
    transition: 0.2s cubic-bezier(0.33, 1, 0.68, 1);
    height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 90%;
}

.cartBtn {
    border-radius: 15px;
    transition: 0.2s cubic-bezier(0.33, 1, 0.68, 1);
    height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 90%;
}

.lkBtn {
    border-radius: 15px;
    transition: 0.2s cubic-bezier(0.33, 1, 0.68, 1);
    height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 90%;
}

.fav {
    border-radius: 15px;
    transition: 0.2s cubic-bezier(0.33, 1, 0.68, 1);
    height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50%;
}

.fav img {
    width: 22px;
}


/* .cntBtn {
    transition: 0.2s cubic-bezier(0.33, 1, 0.68, 1);
}

.aboutBtn {
    transition: 0.2s cubic-bezier(0.33, 1, 0.68, 1);
} */

.mainBtn:hover {
    background-color: #1280D0a3;
}

.cartBtn:hover {
    background-color: #1280D0a3;
}

.lkBtn:hover {
    background-color: #1280D0a3;
}

.fav:hover {
    background-color: #1280D0a3;
}


/* .cntBtn:hover {
    color: #1280D0;
}

.aboutBtn:hover {
    color: #1280D0;
} */


/* Поисковый блок */

.searchBlock {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    width: 100%;
    align-items: center;
}

.searchText {
    font-size: 32px;
    color: #161B2D;
    margin-bottom: 10px;
    width: 70%;
    text-align: center;
}

.container {
    width: 100%;
    margin: 0 auto;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    /* padding: 20px; */
    border-radius: 15px;
    /* box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); */
    margin-top: 30px;
}

.search-box {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    outline: solid 2.5px #dfdfdf;
    /* background-color: #eaeaea; */
    width: 80%;
    border-radius: 15px;
    transition: 0.2s cubic-bezier(0.33, 1, 0.68, 1);
    /* margin-bottom: 20px; */
    /* gap: 10px; */
}

#article {
    padding: 10px 20px;
    width: 70%;
    border: none;
    /* background-color: #F6F6F6; */
    height: 50px;
    border-radius: 15px;
    color: #161B2D;
    font-size: 18px;
    font-weight: 600;
    font-family: "Unbounded", sans-serif;
    font-optical-sizing: auto;
    transition: 0.2s cubic-bezier(0.33, 1, 0.68, 1);
    margin-right: 10px;
}

#article::placeholder {
    color: rgba(156, 156, 156, 0.28);
    transition: 0.2s cubic-bezier(0.33, 1, 0.68, 1);
}

.search-box:hover {
    outline: #1280D0 solid 2.5px;
}

#article:hover::placeholder {
    color: #1280D0;
}

#article:focus {
    outline: none;
}

#article:focus>.search-box {
    outline: #1280D0 solid 2.5px;
}

.search-box:focus {
    outline: #1280D0 solid 2.5px;
}

button {
    padding: 10px 0px;
    width: 150px;
    margin-right: 10px;
    background-color: #1280D0;
    color: white;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    font-size: 24px;
    font-weight: 600;
    font-family: "Unbounded", sans-serif;
    font-optical-sizing: auto;
    transition: 0.2s cubic-bezier(0.33, 1, 0.68, 1);
}

.mobile-menu button {
    border-radius: 999px;
}

button:hover {
    background-color: #0F6FB2;
}

.help {
    margin-bottom: 30px;
    font-size: 20px;
    font-weight: 500;
    color: #161B2D;
}

.help a {
    color: #1280D0;
}

.catalog {
    display: flex;
    flex-direction: column;
    width: 95%;
    margin-top: 30px;
}

.catalog h1 {
    font-size: 42px;
    margin: 0;
    color: #161B2D;
}

.catalogBlocks {
    margin-top: 20px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    /* background-color: rgb(189, 189, 189); */
    height: 40vh;
}

.catalogBlocks h2 {
    /* padding-left: 15px; */
    margin: 0;
    font-size: 28px;
    color: #1280D0;
}

.catalogBlocks ul {
    list-style: none;
    margin: 10px 0 0 0;
    padding-left: 0px;
}

.catalogBlocks ul li {
    text-decoration: underline;
    color: #161B2D;
    font-size: 20px;
    font-weight: 400;
    cursor: pointer;
    transition: 0.2s cubic-bezier(0.33, 1, 0.68, 1);
    margin: 6px 0 6px 0;
}

.catalogBlocks ul li:hover {
    color: #1280D0;
}

.blocks1 {
    width: 25%;
}

.blocks2 {
    width: 38%;
}

.blocks3 {
    width: 34%;
}

.motoroil {
    display: flex;
    flex-direction: column-reverse;
    /* width: 100%; */
    border-radius: 15px;
    border: 2px solid #1280D0;
    position: relative;
    padding: 15px;
    height: 220px;
    cursor: pointer;
}

.transmoil {
    display: flex;
    flex-direction: column-reverse;
    /* width: 100%; */
    border-radius: 15px;
    border: 2px solid #ECECEC;
    position: relative;
    padding: 15px;
    height: 220px;
}

.gidrooil {
    display: flex;
    flex-direction: column-reverse;
    /* width: 100%; */
    border-radius: 15px;
    border: 2px solid #ECECEC;
    position: relative;
    padding: 15px;
    height: 220px;
}

.imgcont {
    position: absolute;
    top: 0px;
    left: -5px;
    width: 100px;
    /* height: 150px; */
    overflow: hidden;
    /* z-index: 10; */
}

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

.mobile-menu {
    display: none;
}

.mobres {
    display: none;
}

.fav {
    cursor: pointer;
    transition: 0.2s cubic-bezier(0.33, 1, 0.68, 1);
}

.fav:hover {
    color: #1280D0;
}


@media (max-width: 1240px) {

    .motoroil,
    .transmoil,
    .gidrooil {
        height: 250px;
    }
}

@media (max-width: 867px) {

    .mainBtn,
    .cartBtn,
    .lkBtn,
    .fav {
        /* padding: 10px 20px; */
        font-size: 12px;
    }

    .fav img {
        width: 20px;
    }

    .searchBlock {
        margin-top: 0px;
        align-items: center;
        text-align: center;
        width: 95%;
    }

    .search-box {
        width: 95%;
    }

    .search-history {
        justify-content: center;
    }

    header {
        display: none !important;
        justify-content: center;
        align-items: center;
        height: auto;
        min-height: 0;
        padding: 8px 0;
    }

    header img {
        display: none;
    }

    header .navbar {
        display: none;
    }

    /* Синий фон .navbar здесь ломал нижнее .mobile-menu > ul (до JS и без .mobile-menu-pill). Стили нижней панели — в mobile-search.css */

    .pcbtn {
        display: none;
    }

    .pcres {
        display: none;
    }

    .mobres {
        display: flex;
    }

    .result-brand {
        font-size: 14px;
    }

    .result-name {
        font-size: 14px;
    }

    /* Цена */
    .result-price {
        display: flex;
        font-size: 18px;
        font-weight: 600;
        color: #161B2D;
        margin-top: 2px;
    }

    .mobile-menu {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        justify-content: center;
        align-items: center;
        gap: 10px;
        width: 100%;
        height: auto;
        min-height: 0;
        padding: 0 14px calc(10px + env(safe-area-inset-bottom, 0px));
        box-sizing: border-box;
        background: transparent;
        border: none;
        border-radius: 0;
        box-shadow: none;
        z-index: 11;
    }

    button {
        width: auto;
        max-width: 100%;
        padding: 6px 12px;
        font-size: 12px;
    }

    #article {
        height: 30px;
        font-size: 16px;
    }

    .searchText {
        font-size: 22px;
        margin-bottom: 0;
        width: 100%;
    }

    .help {
        font-size: 14px;
    }

    /* Также обновим hover-эффекти для мобильной версии */
    .cartBtn:hover {
        background-color: #0F6FB2;
    }

    button:hover {
        background-color: #0F6FB2;
    }

    /* #article:hover,
    #article:focus {
        outline: #1280D0 solid 2px;
    } */
    .catalogBlocks {
        flex-direction: column;
    }

    .blocks {
        width: 100%;
        margin-top: 10px;
    }

    .motoroil,
    .gidrooil {
        height: 220px;
    }

    .cart-container {
        flex-direction: column;
    }

    .checkout-form {
        margin-left: 0;
    }

    .search-box button {
        width: 88px;
        padding: 6px 0;
        font-size: 12px;
    }

}
