/* Lighthouse: performance, accessibility & CLS helpers */
@font-face {
    font-family: 'remixicon';
    font-display: swap;
}

.visually-hidden-focusable:not(:focus):not(:focus-within) {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Critical above-the-fold layout (loads before deferred app.css) */
.hero-section {
    position: relative;
    width: 100%;
    min-height: 420px;
    margin-top: -90px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    color: #fff;
    aspect-ratio: 1920 / 550;
    max-height: 85vh;
}

.hero-section__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-section > picture,
.hero-section .swiper-slide picture {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    display: block;
}

.hero-section > picture .hero-section__bg,
.hero-section .swiper-slide picture .hero-section__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* Header shell — visible before deferred app.min.css on homepage */
.header.edu-header {
    position: relative;
    z-index: 1020;
}

.header-mainmenu {
    background-color: #fff;
}

.header .logo img {
    max-width: 180px;
    height: auto;
    max-height: 79px;
}

.header-navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
}

.edu-btn.btn-small,
.edu-btn.btn-medium {
    display: inline-block;
    padding: 0.55rem 1.25rem;
    border-radius: 4px;
    text-decoration: none;
    background-color: #f7a729;
    color: #fff;
    border: 0;
}

.mansonry-product-media-item img,
.pl-listing-img img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.hero-section .hero-section-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background-image: linear-gradient(180deg, rgba(0, 0, 0, 0.68) 64%, #000 100%);
}

.hero-section-content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding-bottom: 50px;
}

.hero-section-content .title {
    font-size: clamp(1.75rem, 5vw, 3.25rem);
    color: #fff;
}

.hero-section-widget-container .pre-title {
    color: #fff;
    margin-bottom: 0.75rem;
}

.hero-section-widget-container .ulz-vis {
    display: inline-block;
    line-height: 1.5;
    padding: 0 11px;
    margin: 1px 4px;
    background-color: rgba(0, 0, 0, 0.62);
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
}

.hero-section-widget-container .ulz-vis:hover,
.hero-section-widget-container .ulz-vis:focus {
    background-color: rgba(0, 0, 0, 0.82);
    color: #fff;
}

.section-gap-small,
.section-gap-medium {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.collections-wall .collections-wall-inner {
    display: grid;
    grid-auto-rows: 200px;
    gap: 1.5rem;
    grid-template-columns: repeat(12, 1fr);
}

.masonry-grid {
    column-count: 5;
    column-gap: 1rem;
    min-height: 900px;
}

.masonry-grid-item {
    break-inside: avoid;
    margin-bottom: 1rem;
}

.mansonry-product-media-item img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
}

.newsletter-spotlight-img {
    aspect-ratio: 1 / 1;
    width: 100%;
    max-width: 400px;
    height: auto;
    display: block;
    object-fit: cover;
}

.section-title .pre-title {
    display: block;
    margin-bottom: 0.5rem;
}

.features-area-9 {
    min-height: 56px;
    overflow: hidden;
}

/* SAL: visible by default — animations run after idle JS without hiding content */
[data-sal|='fade'],
[data-sal|='slide'],
[data-sal|='zoom'],
[data-sal|='flip'] {
    opacity: 1 !important;
    transform: none !important;
}

/* Avoid downloading 300KB+ placeholder on every masonry tile (defined in app.css) */
.masonry-grid .masonry-grid-item[short],
.masonry-grid .masonry-grid-item[tall],
.masonry-grid .masonry-grid-item[taller],
.masonry-grid .masonry-grid-item[tallest] {
    background-image: none !important;
    background-color: #f3f4f6;
}

#autoPromoModal .promo-popup-image:not([src]) {
    visibility: hidden;
    min-height: 200px;
}

.mansonry-product-name .product-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

@media (max-width: 991.98px) {
    .masonry-grid { column-count: 3; }
    .hero-section { min-height: 360px; }
}

@media (max-width: 767.98px) {
    .masonry-grid { column-count: 2; }
    .hero-section {
        min-height: 300px;
        margin-top: -70px;
        aspect-ratio: 4 / 3;
        max-height: none;
    }
}

img.features-icon {
    width: 24px;
    height: 24px;
}

.pl-listing-img img,
.edu-blog .thumbnail img {
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.cat--image,
.cat-items-image {
    background-color: #f3f4f6;
}

.cat-activation .swiper-slide {
    min-height: 140px;
}

.cat--cell .cat--item .cat--image,
.cat-items .cat-items-image {
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.collections-wall .collections-image {
    position: absolute !important;
    inset: 0;
    z-index: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.collections-wall .collections-image img,
.cat--cell .cat--item .cat--image img,
.cat-items .cat-items-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    z-index: 0;
}

.collections-wall .collections-item::after {
    pointer-events: none;
}

.collections-wall .collections-item {
    min-height: 200px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
