/* Moved from templates/education/modules/products/short_products.tpl (was an inline <style> block). */
.products-page {
        position: relative;
    }

    .products-page .products-sidebar {
        position: sticky;
        top: var(--store-sidebar-top, 190px);
    }

    .products-page .products-sidebar .module-filter-category-btn {
        padding-block: 10px;
        box-shadow: none !important;
    }

    .products-page .module-filter-category-btn:hover {
        transform: none;
    }

    .products-page .module-filter-category-btn.active {
        background: rgba(var(--bs-primary-rgb, 38, 150, 219), 0.06);
    }

    .products-page [data-store-results] {
        position: relative;
    }

    .products-page .store-loading-status {
        position: absolute;
        z-index: 2;
        top: 0;
        left: 12px;
        right: 12px;
        height: 3px;
        overflow: hidden;
        border-radius: 2px;
        background: rgba(var(--bs-primary-rgb, 38, 150, 219), 0.12);
    }

    .products-page .store-loading-status::before {
        content: '';
        display: block;
        width: 35%;
        height: 100%;
        background: var(--bs-primary, #2696db);
        animation: store-loading-progress 1.1s ease-in-out infinite;
    }

    @keyframes store-loading-progress {
        from { transform: translateX(-100%); }
        to { transform: translateX(390%); }
    }

    @media (prefers-reduced-motion: reduce) {
        .products-page .store-loading-status::before {
            animation: none;
            width: 100%;
        }
    }

    .products-page [data-store-results][aria-busy="true"] > :not([data-store-status]) {
        opacity: 0.6;
        pointer-events: none;
    }

    /* same text block in every card: title 1 line, description 2 lines ("…" when longer) */
    .products-page .products-grid .product-desc {
        display: -webkit-box;
        overflow: hidden;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }
    .products-page .products-grid .product-title {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        line-height: 1.3;
    }
    .products-page .products-grid .product-desc {
        min-height: 3em;
        line-height: 1.5;
    }
    .products-page .products-grid .product-quantity-group {
        width: 3.75rem;
    }
    .products-page .products-grid .product-brand-row {
        min-width: 0;
    }

    .products-page .module-filter-sidebar {
        max-height: max(120px, calc(100dvh - var(--store-sidebar-top, 190px) - 80px));
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-width: thin;
    }

    .products-sidebar .card-body {
        overflow: hidden;
    }

    .hero-banner {
        background:
                radial-gradient(circle at 85% 20%, rgba(255, 255, 255, 0.26), transparent 32%),
                linear-gradient(135deg, #0d6efd 0%, #0b5ed7 45%, #084298 100%);
        box-shadow: 0 1rem 2.2rem rgba(13, 110, 253, 0.18);
    }

    .hero-product-visual {
        width: 220px;
        height: 220px;
        margin: 0 auto;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.15);
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
    }

    .hero-product-icon {
        font-size: 5rem;
        filter: drop-shadow(0 1rem 1.2rem rgba(0, 0, 0, 0.18));
    }

    .product-card {
        border: 0;
        border-radius: 1rem;
        overflow: hidden;
        background: var(--bs-body-bg, #fff);
        box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.08);
        transition: transform 0.25s ease, box-shadow 0.25s ease;
        display: flex;
        flex-direction: column;
    }

.product-image-wrapper {
        min-height: 260px;
        background: var(--bs-light, #f8f9fa);
        overflow: hidden;
    }

    .product-badges {
        top: 1rem;
        left: 1rem;
        right: 1rem;
        z-index: 5;
    }

    .white-icon {
        filter: brightness(0) invert(1);
    }

    .product-img-bg {
        height: 260px;
        background:
                radial-gradient(circle at 50% 35%, rgba(13, 110, 253, 0.09), transparent 42%),
                var(--bs-light, #f8f9fa);
        overflow: hidden;
    }

    .product-img {
        max-width: 92%;
        width: 100%;
        height: 100%;
        object-fit: contain;
        transition: transform 0.35s ease;
    }

.product-no-photo {
        height: 100%;
        width: 100%;
    }

    .product-title {
        min-height: 42px;
        line-height: 1.25;
        transition: color 0.2s ease;
    }

    .product-title:hover {
        color: var(--bs-primary, #0d6efd);
    }

    .product-desc {
        min-height: 42px;
        line-height: 1.4;
        color: var(--bs-secondary-color, #6c757d);
    }

    .product-brand-row p {
        line-height: 1.25;
    }

    .price {
        color: var(--bs-body-color, #212529);
        line-height: 1;
    }

    .old-price {
        font-size: 0.9rem;
        white-space: nowrap;
    }

    .stock-info {
        min-width: 72px;
    }

    .product-quantity-group .input-group-text {
        border-right: 0;
        background: var(--bs-light, #f8f9fa);
    }

    .product-quantity-group .form-control {
        border-left: 0;
        max-width: 82px;
    }

    .product-share {
        min-height: 24px;
    }

    .empty-products {
        background: var(--bs-body-bg, #fff);
    }

    .pagination-wrapper .pagination,
    .pagination-wrapper ul {
        gap: 0.5rem;
    }

    .pagination-wrapper .page-link {
        border: 0;
        border-radius: 0.75rem;
        box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.08);
    }

    @media (max-width: 1199.98px) {
        .products-page .products-sidebar {
            position: static;
        }
    }

    @media (max-width: 767.98px) {
        .product-image-wrapper,
        .product-img-bg {
            height: 220px;
            min-height: 220px;
        }

        .products-grid {
            --bs-gutter-x: 1rem;
            --bs-gutter-y: 1rem;
        }
    }

    @media (max-width: 575.98px) {
        .hero-banner .lead {
            font-size: 1rem !important;
        }

        .product-image-wrapper,
        .product-img-bg {
            height: 200px;
            min-height: 200px;
        }

        .product-title {
            min-height: auto;
        }

        .product-desc {
            min-height: auto;
        }

        .product-card .btn {
            width: 100%;
        }

        .product-card .d-flex.justify-content-between.align-items-center.gap-2 {
            flex-direction: column;
            align-items: stretch !important;
        }
    }
