
.myshop-catalog-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 16px;
    padding: 4px 2px 10px;
}

.myshop-catalog-heading h1,
.myshop-catalog-heading h2 {
    margin: 0;
    color: #26372f;
    font-size: clamp(22px, 4vw, 30px);
    font-weight: 800;
    letter-spacing: -.035em;
}

.myshop-catalog-heading p {
    margin: 5px 0 0;
    color: #78847c;
    font-size: 12px;
}

@media (max-width: 520px) {
    .myshop-catalog-heading { padding: 2px 0 8px; }
    .myshop-catalog-heading h1,
    .myshop-catalog-heading h2 { font-size: 22px; }
    .myshop-catalog-heading p { font-size: 11px; }
}
/**
 * KORVON-STLYES: FULL GRID & CARD 2026
 * Путь: style.css (или ваш основной CSS файл)
 * Назначение: Единый стиль сетки и карточек для Сайта и Android (зеркало)
 * Обновлено: 25.01.2026
 */
/* === GRID: MYSHOP 2026 STYLE (UPDATED) === */
.myshop-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 4px;
    padding: 10px; /* Стандартный отступ для ПК */
background: #ffffff !important;
    margin: 0 auto;
    width: 100%;
    max-width: 1440px;
    box-sizing: border-box; /* КРИТИЧЕСКИ: чтобы padding не расширял экран */
}

/* АДАПТАЦИЯ ДЛЯ МОБИЛЬНЫХ (5px ОТ КРАЕВ) */
@media (max-width: 480px) {
    .myshop-products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 4px !important;
        padding: 5px !important; /* Тот самый отступ 5px от левого и правого края экрана */
        width: 100% !important;
    }
}

/* TABLET */
@media (min-width: 481px) and (max-width: 1024px) {
    .myshop-products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 4px;
        padding: 8px;
    }
}



/* === CARD === */
.myshop-product-card {
    text-align: center !important;
    /* Уменьшаем тень, чтобы она не выходила за границы колонки */
    box-shadow: 0 0 0 1px #e4e4e4 !important; 
    padding: 0 !important;
    border-radius: 10px !important;
    background: #fff; /* Белый фон выглядит чище для WB стиля */
    overflow: hidden;
    transition: transform 0.25s ease;
    position: relative;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
}

.myshop-product-card:active {
    transform: scale(0.98); /* Легкое нажатие вместо смещения */
}

/* === IMAGE WRAPPER === */
.myshop-product-image-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    /* border-radius: 10px 10px 0 0;  Лучше только сверху, если карточка цельная */
    aspect-ratio: 3 / 4; 
    background-color: #f4f4f4;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* === IMAGE === */
.myshop-product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.3s ease;
    -webkit-user-drag: none;
}

/* Заглушка */
.myshop-product-image[src^="data:image/svg+xml"] {
    object-fit: contain !important;
    padding: 25%;
    background: #f3f4f6;
    opacity: 0.8;
}




/* === WISHLIST BUTTON === */
.myshop-product-image-wrapper .tinvwl_add_to_wishlist_button,
.myshop-product-image-wrapper .yith-wcwl-add-to-wishlist,
.myshop-product-image-wrapper .myshop-wishlist,
.silsila-wishlist-icon {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    position: absolute;
    top: 5px !important;
    right: 5px !important;
    z-index: 9 !important;
}


/* === КАРТОЧКА (Делаем ее гибкой) === */
.myshop-product-card {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important; /* Карточки в ряду будут одной высоты */
}

/* === ССЫЛКА И ЗАГОЛОВОК === */
.myshop-product-link {
    text-decoration: none !important;
    outline: none !important;
    display: block;
    margin-top: 5px;
    flex-grow: 1; /* РАСТЯГИВАЕТ блок, чтобы прижать кнопку вниз */
    -webkit-tap-highlight-color: transparent;
}

.myshop-product-link .myshop-product-title {
    text-decoration: none !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    text-align: left;
    color: #000 !important;
    
    /* ОГРАНИЧЕНИЕ СТРОК (Без пустых мест) */
    display: -webkit-box !important;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2em !important;
    
    /* УБРАЛИ height: 2.4em — теперь блок сжимается до 1 строки */
    height: auto !important; 
    max-height: 2.4em !important; 
    
    margin: 3px 8px 0px 8px !important;
}

/* Принудительно прижимаем кнопку и доставку к самому низу */
.myshop-delivery-time, .myshop-add-to-cart {
    margin-top: auto !important;
}

.myshop-product-link:hover, 
.myshop-product-link:hover .myshop-product-title {
    text-decoration: none !important;
}



/* === PRICE BLOCK === */
.myshop-price-block {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    padding: 0 8px;
    margin-top: 5px;
}

.price-new {
    color: #FF8800 !important;
    font-size: 16px !important;
    font-weight: 700 !important;
}

.price-old {
    text-decoration: line-through;
    color: #94a3b8 !important;
    font-size: 13px !important;
    font-weight: 500;
}

/* === BADGES === */
.myshop-discount-badge {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: #FF8800;
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    z-index: 5;
}

/* === QUANTITY & DELIVERY === */
.myshop-quantity {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin: 4px 8px 8px 8px;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.myshop-delivery-time {
    font-size: 11px;
    color: #007aff;
    text-align: left;
    margin: 0 8px 4px 8px;
}

/* === BUTTON "ADD TO CART" === */
.myshop-add-to-cart {
    background: #ff3300 !important; 
    box-shadow: inset 0 0 0 2px #ff3300 !important; 
    color: #fff !important;
    padding: 8px !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    width: calc(100% - 16px) !important;
    margin: 4px 8px 8px 8px !important;
    cursor: pointer;
    border: none !important;
    transition: 0.25s;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.myshop-add-to-cart:hover {
    background: #ff8800 !important;
    color: #fff !important;
}

/* === TOAST (ВАШ КОД) === */
#myshop-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 14px;
    z-index: 10000;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s;
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

#myshop-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}









/* === ОЖИВЛЯЕМ СВАЙПЕР В КАРТОЧКЕ (FIX 2026) === */

/* Убираем фиксированную высоту 250px, используем родительский aspect-ratio */
.myshop-product-card .js-loop-slider {
    width: 100%;
    height: 100%; /* Занимает всё место внутри .myshop-product-image-wrapper */
    position: absolute; /* Растягиваем на весь wrapper */
    top: 0;
    left: 0;
}

/* Контейнер слайдов должен быть равен родителю */
.myshop-product-card .swiper-wrapper {
    height: 100%;
}

.myshop-product-card .swiper-slide {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Картинка внутри слайда */
.myshop-product-card .myshop-product-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Заполнение без дырок */
    display: block;
}

/* Точки пагинации: делаем маленькими и аккуратными в стиле мобильных приложений */
.myshop-product-card .swiper-pagination {
    bottom: 4px !important;
    line-height: 1;
}

.myshop-product-card .swiper-pagination-bullet {
    width: 5px;
    height: 5px;
    background: #fff;
    opacity: 0.5;
    margin: 0 2px !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.myshop-product-card .swiper-pagination-bullet-active {
    background: #FF8800 !important;
    opacity: 1;
    width: 12px; /* Растянутая активная точка (modern style) */
    border-radius: 3px;
}

/* Убираем лишние отступы у ссылок внутри свайпера */
.myshop-product-card .p-img-link {
    width: 100%;
    height: 100%;
    display: block;
}

.myshop-recommended-section {
    max-width: 1440px;
    margin: 10px auto 4px;
    padding: 0;
}

.myshop-recommended-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    padding: 0 10px;
    margin-bottom: 8px;
}

.myshop-recommended-heading h2 {
    margin: 0;
    color: #202633;
    font-size: 18px;
    font-weight: 800;
}

.myshop-recommended-heading span {
    color: #7b8492;
    font-size: 12px;
}

.myshop-recommended-products-grid {
    margin: 0 auto !important;
}

@media (min-width: 481px) and (max-width: 1024px) {
    .myshop-recommended-heading {
        padding: 0 8px;
    }
}

@media (max-width: 480px) {
    .myshop-recommended-heading {
        padding: 0 5px;
    }
}






/* === SILSILA 2026: компактная карточка (стиль маркетплейса) === */
.myshop-products-grid { background: #f2f4f7 !important; }
.myshop-product-card { text-align: left !important; border: 1px solid #e5eaf0 !important; box-shadow: 0 2px 7px rgba(29, 51, 76, .045) !important; border-radius: 14px !important; background: #fff !important; overflow: hidden; }
.myshop-product-card .myshop-product-image-wrapper { border-radius: 14px; }
.myshop-product-card .myshop-product-link { margin-top: 6px; padding: 0 8px; }
.myshop-product-card .myshop-price-block { flex-wrap: wrap; align-items: baseline; gap: 2px 6px; padding: 0; margin: 0; }
.myshop-product-card .price-new { color: #ff8800 !important; font-size: 18px !important; font-weight: 800 !important; letter-spacing: -.02em; }
.myshop-product-card .price-old { color: #8a93a1 !important; font-size: 12px !important; text-decoration: line-through; }
.silsila-card-discount { color: #b84c19; font-size: 13px; font-weight: 700; }
.myshop-product-card .myshop-stock-info { margin: 1px 0 2px; color: #69798b; font-size: 12px; line-height: 1.3; }
.silsila-card-stock { color: #69798b; font-weight: 600; }
.silsila-card-stock.is-out { color: #8a93a1; }
.myshop-product-card .myshop-product-link .myshop-product-title { margin: 0 !important; font-size: 14px !important; font-weight: 500 !important; line-height: 1.25em !important; max-height: 2.5em !important; color: #1b1f27 !important; }
.silsila-card-rating { display: flex; align-items: center; gap: 4px; margin-top: 4px; font-size: 12px; color: #6b7482; }
.silsila-card-rating b { color: #1b1f27; font-weight: 600; margin-right: 4px; }
.silsila-card-rating svg { width: 14px; height: 14px; }
.silsila-card-star { fill: #ffb200; }
.silsila-card-bubble { fill: #9aa3b0; }
.myshop-product-card .myshop-add-to-cart { background: #005bff !important; box-shadow: none !important; border-radius: 12px !important; text-transform: none !important; font-size: 15px !important; min-height: 40px; margin: 8px !important; }
.myshop-product-card .myshop-add-to-cart:hover { background: #0047cc !important; }
.myshop-product-card .myshop-add-to-cart.is-disabled { background: #e9edf3 !important; color: #6b7482 !important; }
.silsila-card-basket { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; flex: 0 0 18px; }
.myshop-product-card .swiper-pagination-bullet-active { background: #005bff !important; }

/* Mobile storefront: compact, high-clarity cards matching the SiLSiLA app. */
@media (max-width: 767px) {
    .myshop-product-card .myshop-product-image-wrapper {
        aspect-ratio: 3 / 4;
        border-radius: 13px 13px 0 0;
        background: #edf2f7;
    }

    .myshop-product-card .myshop-product-link {
        margin-top: 0;
        padding: 8px 9px 0;
    }

    .myshop-product-card .myshop-product-link .myshop-product-title {
        margin: 5px 0 0 !important;
        color: #202b39 !important;
        font-size: 13px !important;
        line-height: 1.3 !important;
        font-weight: 550 !important;
        max-height: 2.6em !important;
    }

    .myshop-product-card .myshop-price-block {
        gap: 3px 6px;
        min-height: 23px;
    }

    .myshop-product-card .price-new {
        font-size: 17px !important;
        line-height: 1.15;
    }

    .myshop-product-card .price-old {
        font-size: 11px !important;
    }

    .silsila-card-discount {
        font-size: 11px;
    }

    .myshop-product-card .myshop-stock-info,
    .myshop-product-card .silsila-card-stock {
        font-size: 11px;
        line-height: 1.3;
    }

    .myshop-product-card .myshop-add-to-cart {
        min-height: 44px;
        width: calc(100% - 16px) !important;
        margin: 8px !important;
        padding: 8px 7px !important;
        border: 0 !important;
        border-radius: 11px !important;
        background: #007aff !important;
        color: #fff !important;
        box-shadow: none !important;
        font-size: 13px !important;
        font-weight: 750 !important;
        letter-spacing: 0;
        text-transform: none !important;
    }

    .myshop-product-card .myshop-add-to-cart:hover {
        background: #0069e6 !important;
    }

    .myshop-product-card .myshop-add-to-cart.is-disabled {
        background: #e8edf3 !important;
        color: #536274 !important;
    }

    body.home,
    body.front-page {
        --silsila-ink: #202b39;
        --silsila-muted: #69798b;
        --silsila-blue: #1876df;
        --silsila-cyan: #3bc8dc;
        --silsila-orange: #f47721;
        --silsila-canvas: #f3f6fa;
        background: var(--silsila-canvas);
        padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px));
    }

    #korvon-home-app {
        width: 100%;
        max-width: 100%;
        overflow: clip;
        color: var(--silsila-ink);
    }

    #korvon-home-app .myshop-recommended-section {
        margin: 12px 0 18px;
    }

    #korvon-home-app .myshop-recommended-heading {
        align-items: baseline;
        padding: 0 14px;
        margin-bottom: 10px;
    }

    #korvon-home-app .myshop-recommended-heading h2,
    #korvon-home-app .myshop-catalog-heading h2 {
        color: var(--silsila-ink);
        font-size: 19px;
        line-height: 1.2;
        letter-spacing: -.025em;
    }

    #korvon-home-app .myshop-recommended-heading span {
        color: var(--silsila-muted);
        font-size: 11px;
    }

    #korvon-home-app .myshop-products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 4px !important;
        padding: 0 10px 10px !important;
        background: transparent !important;
    }

    #korvon-home-app .myshop-product-card {
        min-width: 0;
        border: 1px solid #e5eaf0;
        border-radius: 14px !important;
        background: #fff !important;
        box-shadow: 0 2px 7px rgba(29, 51, 76, .045) !important;
        overflow: hidden;
        transition: transform .18s ease, box-shadow .18s ease;
    }

    #korvon-home-app .myshop-product-card:active {
        transform: scale(.985);
    }

    #korvon-home-app .myshop-product-image-wrapper {
        aspect-ratio: 3 / 4;
        border-radius: 13px 13px 0 0;
        background: #edf2f7;
    }

    #korvon-home-app .myshop-product-link {
        margin-top: 0;
        padding: 8px 9px 0;
    }

    #korvon-home-app .myshop-product-link .myshop-product-title {
        margin: 5px 0 0 !important;
        color: var(--silsila-ink) !important;
        font-size: 13px !important;
        line-height: 1.3 !important;
        font-weight: 550 !important;
        max-height: 2.6em !important;
    }

    #korvon-home-app .myshop-product-card .myshop-price-block {
        gap: 3px 6px;
        min-height: 23px;
    }

    #korvon-home-app .myshop-product-card .price-new {
        color: #ff8800 !important;
        font-size: 17px !important;
        line-height: 1.15;
        font-weight: 800 !important;
    }

    #korvon-home-app .myshop-product-card .price-old {
        font-size: 11px !important;
    }

    #korvon-home-app .silsila-card-discount {
        color: #b84c19;
        font-size: 11px;
    }

    #korvon-home-app .myshop-stock-info,
    #korvon-home-app .silsila-card-stock {
        color: #69798b;
        font-size: 11px;
        line-height: 1.3;
    }

    #korvon-home-app .myshop-product-card .myshop-add-to-cart {
        display: flex;
        min-height: 44px;
        width: calc(100% - 16px) !important;
        margin: 8px !important;
        padding: 8px 7px !important;
        border: 0 !important;
        border-radius: 11px !important;
        background: #007aff !important;
        color: #fff !important;
        box-shadow: none !important;
        font-size: 13px !important;
        font-weight: 750 !important;
        letter-spacing: 0;
        text-transform: none !important;
        transition: background-color .18s ease, transform .18s ease;
    }

    #korvon-home-app .myshop-product-card .myshop-add-to-cart:hover {
        background: #0069e6 !important;
    }

    #korvon-home-app .myshop-product-card .myshop-add-to-cart:focus-visible,
    #korvon-home-app .myshop-product-link:focus-visible {
        outline: 3px solid rgba(24, 118, 223, .65) !important;
        outline-offset: 2px;
    }

    #korvon-home-app .myshop-product-card .myshop-add-to-cart.is-disabled {
        background: #e8edf3 !important;
        color: #536274 !important;
    }

    #korvon-home-app .myshop-product-card .silsila-card-eta {
        margin: 5px 8px 0;
        min-height: 34px;
        color: #536b80;
        font-size: 11px;
    }

    #korvon-home-app .myshop-product-card .silsila-card-eta button {
        min-width: 34px;
        min-height: 34px;
    }

    #korvon-home-app .myshop-catalog-heading {
        display: block;
        margin: 0;
        padding: 8px 14px 12px;
    }

    #korvon-home-app .myshop-catalog-heading p {
        margin-top: 4px;
        color: var(--silsila-muted);
        font-size: 12px;
    }

    body.home .bottom-menu,
    body.front-page .bottom-menu {
        box-sizing: border-box;
        position: fixed;
        z-index: 999;
        right: 0;
        bottom: 0;
        left: 0;
        min-height: 62px;
        padding: 5px 6px calc(5px + env(safe-area-inset-bottom, 0px));
        border-top: 1px solid #e4eaf1;
        background: rgba(255, 255, 255, .97);
        box-shadow: 0 -4px 18px rgba(32, 55, 83, .08);
        -webkit-backdrop-filter: blur(14px);
        backdrop-filter: blur(14px);
    }

    body.home .bottom-menu a,
    body.home .bottom-menu button,
    body.front-page .bottom-menu a,
    body.front-page .bottom-menu button {
        min-width: 44px;
        min-height: 44px;
        color: #667586;
        -webkit-tap-highlight-color: transparent;
    }

    body.home .bottom-menu a:focus-visible,
    body.home .bottom-menu button:focus-visible,
    body.front-page .bottom-menu a:focus-visible,
    body.front-page .bottom-menu button:focus-visible {
        outline: 3px solid rgba(24, 118, 223, .75);
        outline-offset: -2px;
        border-radius: 12px;
    }
}

@media (max-width: 374px) {
    #korvon-home-app .myshop-products-grid {
        gap: 4px !important;
        padding-right: 8px !important;
        padding-left: 8px !important;
    }

    #korvon-home-app .myshop-product-card .price-new {
        font-size: 15px !important;
    }

    #korvon-home-app .myshop-product-card .myshop-add-to-cart {
        font-size: 12px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    #korvon-home-app .myshop-product-card,
    #korvon-home-app .myshop-product-card .myshop-add-to-cart {
        transition: none !important;
    }
}
