/* ============================================================
   PERFORMANCE OPTIMISATIONS
   Added: March 2026 — Phase 1 CWV Improvement
   ============================================================

   1. FONT DISPLAY — prevent Flash of Invisible Text (FOIT)
   ----------------------------------------------------------
   Plus Jakarta Sans is uploaded to Infigo as 'Jakarta_normal_regular'
   and loaded via @font-face without font-display set. Re-declaring
   it with font-display: swap forces the browser to show fallback
   system text immediately and swap in Jakarta Sans once downloaded.

   Estimated saving: ~100ms FCP (per Lighthouse audit).

   Note: font is served as TTF — raise with Infigo to convert to
   WOFF2 for a further ~35% file size reduction.
   ============================================================ */

@font-face {
    font-family: 'Jakarta_normal_regular';
    font-style: normal;
    font-weight: normal;
    font-display: swap;
    src: url('/Handler/Picture/GU/F/ThemeFonts/Jakarta_normal_regular.ttf') format('truetype');
}

/* ============================================================
   2. LAYOUT STABILITY — prevent unexpected shifts (CLS)
   ----------------------------------------------------------
   CLS is currently 0.012 (Good) — these rules keep it there
   as new content is added to the storefront.
   ============================================================ */

/* Reserve space for logo so it doesn't cause layout shift on load */
.navbar-brand img,
.navbar-brand-logo img {
    aspect-ratio: auto 2442 / 754;
    width: auto;
    height: auto;
    max-height: 60px;
}

/* Prevent tile/card images from causing layout shifts */
.tile-inner img,
.product-item img,
.category-image img {
    aspect-ratio: auto;
}

/* ============================================================
   3. CONTENT VISIBILITY — skip rendering off-screen sections
   ----------------------------------------------------------
   Tells the browser it can skip layout/paint for sections
   not yet in the viewport. Reduces main thread work and
   improves TBT and Speed Index.
   ============================================================ */

.footer,
footer {
    content-visibility: auto;
    contain-intrinsic-size: 0 300px;
}

/* ============================================================
   END PERFORMANCE OPTIMISATIONS
   ============================================================ */


/* ============================================================
   STOREFRONT CUSTOMISATIONS (existing)
   ============================================================ */

.alternate--prices span {
    display: none !important;
}

.listWrapper {
    .product-item {
        .product-item--info {
            .description {
                display: none !important;
            }
        }
    }
}

.navbar-item.is-mega {
    position: static;

    .is-mega-menu-title {
        margin-bottom: 0;
        padding: .375rem 1rem;
    }
}

.category-spacer {
    margin-top: 1rem;
    padding-top: 5%;
}


.is-mega-menu-title a {
    color: #333;
    text-decoration: underline;
}

.navbar-dropdown .navbar-item:hover {
    background-color: #f0f0f0;
}

@media (min-width: 1088px) and (max-width: 1100px) {
    .bottom-menu-split .navbar-menu {
        max-width: 1060px;
        margin: 0 auto;
    }
}

@media (min-width: 1088px) {
    .category-top {
        margin-top: 50px;
    }
}

.tile-tile {
    position: relative;
    overflow: hidden;
    background-color: #FF5555;
    margin: 1rem 0;
    cursor: pointer;
    transition: transform 0.3s ease;
    width: 100%;
    aspect-ratio: 1 / 1;
}

@media screen and (max-width: 1024px) {
    .tile-tile {
        aspect-ratio: 4 / 3;
    }
}

.tile-inner {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tile-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.tile-tile:hover img {
    transform: scale(1.05);
    filter: brightness(0.85);
}

.tile-label {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    color: white;
    font-weight: bold;
    z-index: 2;
    transition: transform 0.3s ease, opacity 0.3s ease;
    font-size: 1.25rem;
}

.tile-tile:hover .tile-label {
    transform: translateY(-5px);
    opacity: 1;
}

.tile-tile.triangle {
    clip-path: polygon(0 0, 100% 0, 0 100%);
}

.tile-tile.parallelogram {
    transform: skew(-10deg);
}

.tile-tile.parallelogram .tile-inner {
    transform: skew(10deg);
}

.hoverable {
    transition: transform 0.3s ease;
    cursor: pointer;
}

.hoverable:hover {
    transform: translateY(-4px);
}

.cta-button {
    margin-top: 1rem;
    background-color: #FF5555;
    border-color: transparent;
    color: white;
    transition: background-color 0.3s ease;
}

.cta-button:hover {
    background-color: #e04343;
}

.placeholder {
    background: #e0e0e0;
    border-radius: 4px;
    min-height: 120px;
}