/* Карточки товаров по макету 27.10.2026 (главная и разделы): обводка, стикеры на фото,
   название и цена жирным, вес по центру, скруглённые кнопки.
   Действует на li.proditem.tp-card (чанки CatListTpl, MpItemTpl, MpItemPpTpl).
   Подключён в чанке head; селекторы с html body, чтобы перебить style.css и stylemp.css,
   которые грузятся позже. Было до правки: work/task19/orig у исполнителя. */

/* Стикеры «Новинка» и «Хит» — на всех карточках, где они есть (и в слайдерах) */
html body .proditem .prod-image-wrapper { position: relative; }
html body .proditem .tp-badges {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 5;
    display: flex !important;
    flex-wrap: wrap;
    gap: 6px;
    pointer-events: none;
}
html body .proditem .tp-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 30px;
    padding: 0 13px 0 11px;
    border-radius: 15px;
    font-family: "SF Pro Display", -apple-system, "Segoe UI", Arial, sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    color: #fff;
    white-space: nowrap;
}
html body .proditem .tp-badge::before {
    content: "";
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    background: center / contain no-repeat;
}
html body .proditem .tp-badge--new { background: #1f9a3e; }
html body .proditem .tp-badge--new::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M10 2.5l1.9 5.6 5.6 1.9-5.6 1.9L10 17.5l-1.9-5.6L2.5 10l5.6-1.9z'/%3E%3Cpath d='M18 13l.95 2.55L21.5 16.5l-2.55.95L18 20l-.95-2.55L14.5 16.5l2.55-.95z'/%3E%3Cpath d='M18.5 2l.6 1.6 1.6.6-1.6.6-.6 1.6-.6-1.6-1.6-.6 1.6-.6z'/%3E%3C/svg%3E");
}
html body .proditem .tp-badge--hit { background: #ff6900; }
html body .proditem .tp-badge--hit::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M12.6 1.8c.4 3-1 4.9-2.6 6.7C8.4 10.3 6.5 12.2 6.5 15.2 6.5 19 9 22 12.3 22c3.5 0 5.9-2.7 5.9-6.3 0-2.6-1.2-4.5-2.4-5.9-.1 1.4-.7 2.6-1.7 3.2.3-3.7-.6-8.4-1.5-11.2zM12.2 19.9c-1.5 0-2.5-1.2-2.5-2.7 0-1.6 1.1-2.6 2-3.6.2 1 .8 1.6 1.5 2 .1-.7.4-1.3.8-1.7.5.8.9 1.6.9 2.6 0 1.9-1.1 3.4-2.7 3.4z'/%3E%3C/svg%3E");
}

/* Карточка; между рядами карточек тот же отступ, что между колонками */
html body .category .out:has(> li.tp-card),
html body ul.pritwrap:has(> li.tp-card) { row-gap: 24px !important; }
html body li.proditem.tp-card {
    font-family: "SF Pro Display", -apple-system, "Segoe UI", Arial, sans-serif;
}
html body li.proditem.tp-card > .prod-outer {
    background: #fff;
    border: 1px solid #e6e8ed;
    border-radius: 14px;
    overflow: hidden;
    box-sizing: border-box;
}
html body li.proditem.tp-card .prod-inner { padding: 0 !important; }
html body li.proditem.tp-card .prod-image-wrapper {
    max-width: none;
    margin: 0;
    overflow: hidden;
}
html body li.proditem.tp-card .prod-image-wrapper a { display: block; }
html body li.proditem.tp-card .prod-image-wrapper a img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    max-height: none !important;
    margin: 0 !important;
    border-radius: 0 !important;
}
html body li.proditem.tp-card .prod-content-wrapper {
    padding: 18px 20px 20px;
    text-align: left;
    box-sizing: border-box;
}
html body li.proditem.tp-card .prod-content-wrapper > a { text-decoration: none; }
html body li.proditem.tp-card .prod-content-wrapper h2 {
    min-height: 0;
    margin: 0 0 10px;
    font-family: inherit;
    font-size: 19px !important; /* style.css: .prod-content-wrapper h2 { 14px !important } на телефоне */
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0;
    text-transform: none;
    text-align: left;
    color: #1b2232;
}
html body li.proditem.tp-card .prod-content-wrapper .desc {
    margin: 0 0 6px;
    font-family: inherit;
    font-size: 14.5px;
    font-style: normal;
    font-weight: 400;
    line-height: 1.45;
    text-align: left;
    color: #7c8394;
}
html body li.proditem.tp-card .prod-content-wrapper .desc:empty { display: none; }
html body li.proditem.tp-card .devider { display: none; }

/* Форма: вес по центру, ниже ряд «цена — количество — В корзину» */
html body li.proditem.tp-card .card_form {
    position: relative;
    margin: 14px 0 0;
}
html body li.proditem.tp-card .card_form .params {
    position: static;
    margin: 0;
    padding: 0;
    text-align: center;
    font-size: 0;
}
html body li.proditem.tp-card .card_form .params > .clearfix { display: none; }
html body li.proditem.tp-card .params .row.ms2_product {
    display: inline-block;
    margin: 0 4px;
    padding: 0;
    float: none;
    width: auto;
    vertical-align: top;
}
html body li.proditem.tp-card .sizew {
    display: block;
    width: auto;
    margin: 0;
    padding: 0;
}
html body li.proditem.tp-card .sizew .options input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}
html body li.proditem.tp-card .sizew label.input-parent,
html body li.proditem.tp-card span.options input[type="radio"] + label.input-parent {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-width: 92px;
    width: auto;
    height: 32px;
    margin: 0;
    padding: 0 14px;
    border: 0 !important;
    border-radius: 10px !important;
    background: #eff1f4 !important;
    box-shadow: none !important;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    color: #7c8394 !important;
    cursor: pointer;
    transition: background-color .15s, color .15s;
}
html body li.proditem.tp-card .sizew label.input-parent::before,
html body li.proditem.tp-card .sizew label.input-parent::after { display: none !important; }
html body li.proditem.tp-card span.options input[type="radio"]:checked + label.input-parent {
    background: #ff6900 !important;
    color: #fff !important;
}
html body li.proditem.tp-card .myparam.left { display: none; }

/* Цена слева в нижнем ряду: и с выбором веса (.price), и без него (.myparam.right, .price_sweet) */
html body li.proditem.tp-card .ms2_product ~ .price,
html body li.proditem.tp-card .params .myparam.right {
    position: absolute;
    left: 0;
    bottom: 0;
    top: auto;
    float: none;
    width: auto;
    margin: 0;
    padding: 0;
    height: 44px;
    line-height: 44px;
    text-align: left;
    white-space: nowrap;
}
html body li.proditem.tp-card .ms2_product ~ .price,
html body li.proditem.tp-card .params .myparam.right,
html body li.proditem.tp-card .price_sweet {
    font-family: inherit;
    font-size: 15px;
    font-weight: 400;
    color: #1b2232;
}
html body li.proditem.tp-card .price_sweet {
    margin: 0 auto 0 0;
    white-space: nowrap;
}
html body li.proditem.tp-card .price__num,
html body li.proditem.tp-card .msoptionsprice-cost {
    font-size: 23px;
    font-weight: 700;
    letter-spacing: -.2px;
    margin-right: 2px;
}
html body li.proditem.tp-card .params .old_price { display: none; }

html body li.proditem.tp-card .form-group.list {
    margin: 14px 0 0;
    padding: 0;
}
html body li.proditem.tp-card .card_bottom {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    float: none;
    width: 100%;
    max-width: none;
    height: 44px;
    margin: 0;
    padding: 0;
    text-align: right;
}
html body li.proditem.tp-card .card_bottom > .clearfix { display: none; }

/* Количество */
html body li.proditem.tp-card .card_bottom .stepper {
    display: inline-flex;
    flex: 0 0 auto;
    position: relative;
    width: 92px;
    height: 40px;
    margin: 0;
    border: 1px solid #ffd3b3;
    border-radius: 12px;
    background: #fff;
    box-sizing: border-box;
}
html body li.proditem.tp-card .card_bottom .stepper .stepper__input {
    width: 100%;
    height: 100%;
    font-family: inherit;
    font-size: 15px;
    color: #1b2232;
}

/* «В корзину» */
html body li.proditem.tp-card .card_bottom button[type="submit"] {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 7px;
    flex: 0 0 auto;
    float: none;
    width: auto !important; /* stylemp.css: .cardhome { width: 100% !important } на главной */
    height: 42px;
    margin: 0 !important;
    padding: 0 14px;
    border: 0;
    border-radius: 12px !important;
    background: #ff6900;
    box-shadow: none;
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1;
    color: #fff;
    white-space: nowrap;
    transition: background-color .15s;
}
html body li.proditem.tp-card .card_bottom button[type="submit"]:hover { background: #e65f00; }
html body li.proditem.tp-card .card_bottom button[type="submit"] .glyphicon { display: none; }
html body li.proditem.tp-card .card_bottom button[type="submit"]::before {
    content: "" !important;
    display: block !important;
    position: static !important;
    width: 17px;
    height: 17px;
    margin: 0 !important;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='20' r='1.4'/%3E%3Ccircle cx='18' cy='20' r='1.4'/%3E%3Cpath d='M2.5 3.5h2.6l2.4 11.2a1.6 1.6 0 0 0 1.6 1.3h8.6a1.6 1.6 0 0 0 1.6-1.2L21 7.5H6'/%3E%3C/svg%3E") center / contain no-repeat !important;
}

/* Узкая карточка (планшет, 2 в ряд, телефон 360) — уже кнопка и цена */
@media (max-width: 1199px) {
    html body li.proditem.tp-card .prod-content-wrapper { padding: 16px 16px 18px; }
    html body li.proditem.tp-card .card_bottom button[type="submit"] { padding: 0 13px; }
}
@media (max-width: 1199px) and (min-width: 1000px) {
    html body li.proditem.tp-card .prod-content-wrapper h2 { font-size: 17px !important; }
}
/* узкая карточка: ноутбук 1000-1199 (3 в ряд) и телефон — цена мельче, кнопка без значка */
@media (max-width: 1199px) and (min-width: 1000px), (max-width: 480px) {
    html body li.proditem.tp-card .card_bottom { gap: 6px; }
    html body li.proditem.tp-card .card_bottom .stepper { width: 86px; }
    html body li.proditem.tp-card .price__num,
    html body li.proditem.tp-card .msoptionsprice-cost { font-size: 21px; }
    html body li.proditem.tp-card .card_bottom button[type="submit"] { padding: 0 13px; font-size: 14px; }
    html body li.proditem.tp-card .card_bottom button[type="submit"]::before { display: none !important; }
}
@media (max-width: 480px) {
    html body li.proditem.tp-card .prod-content-wrapper h2 { font-size: 18px !important; }
}

/* Отступ над заголовком раздела (Пироги с мясом и т.д.) после карточек прошлого раздела, 147940 */
html body .category .cat-group + .cat-group { margin-top: 50px; }
@media (max-width: 767px) {
    html body .category .cat-group + .cat-group { margin-top: 36px; }
}

/* task22 (29.10.2026): слайдеры на главной (assets/js/tp-sliders.js) */
html body ul.pritwrap.tp-slider { display: block !important; position: relative; padding: 0 !important; margin-left: 0; margin-right: 0; }
html body ul.pritwrap.tp-slider .slick-list { margin: 0 -12px; padding: 2px 0 6px; }
html body ul.pritwrap.tp-slider .slick-track { display: flex !important; margin-left: 0; }
html body ul.pritwrap.tp-slider > .slick-list > .slick-track > li.proditem.slick-slide {
    flex: 0 0 auto !important; float: none; height: auto; padding: 0 12px; box-sizing: border-box; margin: 0 !important;
}
html body ul.pritwrap.tp-slider .tp-arr {
    position: absolute; top: 38%; z-index: 5; width: 44px; height: 44px; padding: 0;
    border-radius: 50%; border: 1px solid #e6e8ed; background: #fff; cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .12); transition: opacity .2s;
}
html body ul.pritwrap.tp-slider .tp-arr::before {
    content: ""; position: absolute; top: 50%; left: 50%; width: 10px; height: 10px;
    border-top: 2px solid #222; border-right: 2px solid #222;
}
html body ul.pritwrap.tp-slider .tp-arr--prev { left: -22px; }
html body ul.pritwrap.tp-slider .tp-arr--next { right: -22px; }
html body ul.pritwrap.tp-slider .tp-arr--prev::before { transform: translate(-35%, -50%) rotate(-135deg); }
html body ul.pritwrap.tp-slider .tp-arr--next::before { transform: translate(-65%, -50%) rotate(45deg); }
html body ul.pritwrap.tp-slider .tp-arr.slick-disabled { opacity: 0; pointer-events: none; }
@media (max-width: 1290px) {
    html body ul.pritwrap.tp-slider .tp-arr--prev { left: 4px; }
    html body ul.pritwrap.tp-slider .tp-arr--next { right: 4px; }
}

/* task22 правка 29.10 (148189): в слайдере li уже не прямой ребёнок ul.pritwrap, и правила сайта
   «карточка на высоту ряда, форма прижата к низу» (custom.css, ul.pritwrap > li.proditem) перестали
   действовать — повторяем их для карточек слайдера: вес и корзина у всех на одной линии */
html body ul.pritwrap.tp-slider > .slick-list > .slick-track > li.proditem.slick-slide { display: flex !important; flex-direction: column; }
html body ul.pritwrap.tp-slider li.proditem > .prod-outer,
html body ul.pritwrap.tp-slider li.proditem .prod-inner,
html body ul.pritwrap.tp-slider li.proditem .prod-content-wrapper { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
html body ul.pritwrap.tp-slider li.proditem .prod-image-wrapper { flex: 0 0 auto; width: 100%; }
html body ul.pritwrap.tp-slider li.proditem .prod-content-wrapper > a { flex: 1 1 auto; }
