/* SputnikovoeTV — product card component
   Global component stylesheet. Existing HTML class names and miniShop2 hooks are preserved. */

html body .catalog .stv-product-column {
    min-width: 0;
    margin-bottom: 18px;
}

html body .catalog .stv-product-card {
    position: relative;
    display: flex;
    height: 100%;
    min-width: 0;
    overflow: hidden;
    border: 1px solid #e2e9f2;
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 7px 24px rgba(22, 42, 74, .055);
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

html body .catalog .stv-product-card:hover {
    transform: translateY(-3px);
    border-color: #bfd7f5;
    box-shadow: 0 15px 32px rgba(24, 82, 151, .105);
}

html body .catalog .stv-product-form {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    height: 100%;
    margin: 0;
}

/* Image frame: a centered image element, not a background crop. */
html body .catalog .stv-product-card .stv-product-image {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    height: 210px;
    min-height: 0;
    padding: 14px;
    box-sizing: border-box;
    overflow: hidden;
    background: #fff;
}

/* Keep legacy class hooks in markup, but do not let crop pseudo-elements reserve space. */
html body .catalog .stv-product-card .stv-product-image.img-wrapper.crop::before,
html body .catalog .stv-product-card .stv-product-image.img-wrapper.crop::after {
    content: none;
    display: none;
}

html body .catalog .stv-product-card .stv-product-image > img {
    position: static;
    display: block;
    float: none;
    justify-self: center;
    align-self: center;
    width: 100%;
    height: 100%;
    min-width: 0;
    max-width: 100%;
    max-height: 100%;
    margin: 0;
    object-fit: contain;
    object-position: 50% 50%;
}

html body .catalog .stv-product-card .stv-product-tags {
    position: absolute;
    z-index: 2;
    top: 12px;
    left: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

html body .catalog .stv-product-card .stv-product-tags > span {
    display: inline-flex;
    align-items: center;
    min-height: 23px;
    padding: 4px 8px;
    border-radius: 6px;
    color: #fff;
    font-size: 11px;
    line-height: 1;
    font-weight: 750;
}

html body .catalog .stv-product-card .stv-product-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
    padding: 16px 17px 18px;
}

html body .catalog .stv-product-card .stv-product-category {
    margin: 0 0 7px;
    color: #7b8798;
    font-size: 11px;
    line-height: 1.35;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .045em;
}

html body .catalog .stv-product-card .stv-product-title {
    display: -webkit-box;
    min-height: 44px;
    margin: 0 0 15px;
    overflow: hidden;
    color: #172235;
    font-size: 16px;
    line-height: 1.38;
    font-weight: 750;
    letter-spacing: -.018em;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

/* Desktop: purchase action left, price right. */
html body .catalog .stv-product-card .stv-product-buy-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "buy price";
    align-items: end;
    gap: 10px;
    min-width: 0;
    margin: auto 0 0;
}

html body .catalog .stv-product-card .stv-product-buy-row > [class*="col-"] {
    float: none;
    width: auto;
    min-width: 0;
    max-width: none;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html body .catalog .stv-product-card .stv-product-buy-column {
    grid-area: buy;
    min-width: 0;
}

html body .catalog .stv-product-card .stv-product-price-wrap {
    grid-area: price;
    align-self: end;
    min-width: 0;
    padding: 0 0 2px;
    color: #172235;
    text-align: right;
    white-space: normal;
}

html body .catalog .stv-product-card .stv-product-order {
    grid-column: 1 / -1;
    min-width: 0;
}

html body .catalog .stv-product-card .stv-product-price {
    display: inline-block;
    color: #172235;
    font-size: clamp(16px, 1.35vw, 20px);
    line-height: 1.2;
    font-weight: 850;
    letter-spacing: -.035em;
}

html body .catalog .stv-product-card .stv-product-old-price {
    margin: 0 0 5px;
    color: #929dad;
    font-size: 12px;
    line-height: 1.2;
}

html body .catalog .stv-product-card .stv-product-button {
    position: relative;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 43px;
    padding: 10px 12px;
    border: 0;
    border-radius: 10px;
    background: #087cff;
    color: #fff;
    font-size: 14px;
    line-height: 1.2;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
}

html body .catalog .stv-product-card .stv-product-button:hover,
html body .catalog .stv-product-card .stv-product-button:focus {
    background: #075ec4;
    color: #fff;
}

html body .catalog .stv-product-card .stv-product-buy-column .push10 {
    height: 8px;
    margin: 0;
}

html body .catalog .stv-product-card .stv-product-howto {
    position: relative;
    z-index: 3;
    display: inline-block;
    margin-top: 8px;
    color: #1769d2;
    font-size: 12px;
    line-height: 1.3;
    font-weight: 650;
    text-decoration: none;
}

html body .catalog .stv-product-card .stv-product-howto:hover {
    color: #084fa8;
    text-decoration: underline;
}

html body .catalog .stv-product-card .stv-product-overlay-link {
    z-index: 1;
}

html body .catalog .stv-product-card .stv-product-button,
html body .catalog .stv-product-card .stv-product-howto {
    pointer-events: auto;
}

/* Frontbar (MODX front-end toolbar): its dropdown sits above the shop UI. */
html body .fbr-navbar {
    z-index: 2147483000;
    isolation: isolate;
}

html body .fbr-navbar .navbar-dropdown {
    z-index: 1;
    border: 1px solid #dce5f0;
    border-radius: 8px;
    background: #fff;
    color: #172235;
    opacity: 1;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .22);
}

html body .fbr-navbar .navbar-dropdown .navbar-item {
    background: #fff;
    color: #172235;
    opacity: 1;
    text-shadow: none;
}

html body .fbr-navbar .navbar-dropdown .navbar-item:hover,
html body .fbr-navbar .navbar-dropdown .navbar-item:focus {
    background: #f1f6fc;
    color: #075ec4;
}

/* Mobile composition */
@media (max-width: 767px) {
    html body .catalog .stv-product-column {
        margin-bottom: 14px;
    }

    html body .catalog .stv-product-card .stv-product-image {
        height: clamp(164px, 43vw, 188px);
        padding: 10px;
    }

    html body .catalog .stv-product-card .stv-product-content {
        padding: 13px;
    }

    html body .catalog .stv-product-card .stv-product-category {
        margin-bottom: 6px;
    }

    html body .catalog .stv-product-card .stv-product-title {
        min-height: 0;
        margin-bottom: 11px;
        font-size: 14px;
        line-height: 1.35;
    }

    /* Price first in document flow; action below. Price stays clear of #up. */
    html body .catalog .stv-product-card .stv-product-buy-row {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "price"
            "buy";
        align-items: start;
        gap: 9px;
    }

    html body .catalog .stv-product-card .stv-product-price-wrap {
        align-self: start;
        padding: 0;
        text-align: left;
    }

    html body .catalog .stv-product-card .stv-product-old-price {
        margin-bottom: 3px;
    }

    html body .catalog .stv-product-card .stv-product-price-wrap > .push5 {
        display: none;
    }

    html body .catalog .stv-product-card .stv-product-buy-column .push10 {
        height: 8px;
    }

    html body .catalog .stv-product-card .stv-product-price {
        display: block;
        font-size: 20px;
        text-align: left;
    }

    html body .catalog .stv-product-card .stv-product-buy-column {
        width: 100%;
    }

    html body .catalog .stv-product-card .stv-product-button {
        min-height: 44px;
        padding: 10px 12px;
        font-size: 14px;
    }

    html body .catalog .stv-product-card .stv-product-howto {
        margin-top: 8px;
        font-size: 12px;
    }

    html body .catalog {
        padding-bottom: 48px;
    }

    html body #up {
        right: 14px;
        bottom: calc(14px + env(safe-area-inset-bottom, 0px));
        z-index: 100;
    }
}

@media (prefers-reduced-motion: reduce) {
    html body .catalog .stv-product-card,
    html body .catalog .stv-product-card .stv-product-button {
        transition: none;
    }
}
