/* ============================================
   CRITICAL CSS - Above-the-fold styles only
   Target: < 14KB for first TCP packet
   ============================================ */

/* CSS Reset - Essential only */
:root {
    --bls-transition: all 0.4s;
    --base-line-height: 1.75;
    --heading-line-height: 1.3;
    --color-white: #fff;
    --light-grey-color: #f5f5f5;
    --header-padding: 15px;
    --bs-gutter-x: 3rem;
    --perload-gap: 15px;
}

@media (min-width: 1200px) {
    :root {
        --bs-gutter-x: 6rem;
        --header-padding: 11px;
    }
}

*,
:after,
:before {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    outline: 0;
}

html {
    font-size: 62.5%;
    height: 100%;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-size: var(--base-font-size, 14px);
    color: rgb(var(--base-color, 51, 51, 51));
    font-family: var(--base-font-family, system-ui, -apple-system, sans-serif);
    line-height: var(--base-line-height);
    font-weight: var(--base-font-weight, 400);
    background-color: var(--base-body-bg-color, #fff);
    text-rendering: optimizeSpeed;
}

img {
    vertical-align: middle;
    max-width: 100%;
    height: auto;
}

a {
    color: var(--color-link, inherit);
    text-decoration: none;
    transition: var(--bls-transition);
}

/* Layout */
.bls-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#MainContent {
    flex-grow: 1;
}

.container,
.container-fluid {
    margin-left: auto;
    margin-right: auto;
    padding-right: calc(var(--bs-gutter-x) * 0.5);
    padding-left: calc(var(--bs-gutter-x) * 0.5);
    width: 100%;
}

@media (min-width: 1200px) {
    .container {
        max-width: calc(var(--body-custom-width-container, 1260px) + var(--bs-gutter-x));
    }

    .container-fluid {
        max-width: calc(var(--bls-container-fluid-width, 1600px) + var(--bs-gutter-x));
    }
}

/* Flexbox utilities */
.d-flex {
    display: flex;
}

.d-none {
    display: none;
}

.d-block {
    display: block;
}

.flex-wrap {
    flex-wrap: wrap;
}

.align-items-center {
    align-items: center;
}

.justify-content-center {
    justify-content: center;
}

.justify-content-between {
    justify-content: space-between;
}

.justify-content-end {
    justify-content: flex-end;
}

.text-center {
    text-align: center;
}

.relative,
.position-relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.inset-0 {
    inset: 0;
}

.w-full,
.w-100 {
    width: 100%;
}

.h-full,
.h-100 {
    height: 100%;
}

.overflow-hidden {
    overflow: hidden;
}

.list-none {
    list-style: none;
}

.p-0 {
    padding: 0;
}

.m-0,
.my-0 {
    margin: 0;
}

/* Header Critical */
.header-container {
    min-height: 1px;
    position: relative;
    z-index: 5;
}

.col-header-left,
.col-header-right {
    flex: 1 1 0;
}

.header-middle {
    padding-top: var(--header-padding);
    padding-bottom: var(--header-padding);
    background-color: var(--header-bg, #fff);
}

.header__logo img {
    max-height: var(--logo-height, 50px);
    width: auto;
}

@media (max-width: 1024px) {
    .header__logo img {
        max-height: var(--logo-height-mobile, 40px);
        margin: auto;
        display: block;
    }
}

/* Hide desktop elements on mobile */
@media (max-width: 1024px) {

    .d-block-lg,
    .d-lg-block {
        display: none;
    }
}

@media (min-width: 1025px) {

    .d-none-lg,
    .d-lg-none {
        display: none;
    }

    .d-block-lg,
    .d-lg-block {
        display: block;
    }
}

@media (max-width: 767px) {
    .d-md-none {
        display: none;
    }

    .d-block-md,
    .medium-hide {
        display: none;
    }
}

@media (min-width: 768px) {
    .d-none-md {
        display: none;
    }
}

/* Aspect Ratio (CLS prevention) */
[style*="--aspect-ratio"] {
    position: relative;
    overflow: hidden;
}

[style*="--aspect-ratio"]:before {
    content: "";
    height: 0;
    display: block;
    padding-top: calc(100% / (0 + var(--aspect-ratio, 16/9)));
}

[style*="--aspect-ratio"] img,
[style*="--aspect-ratio"]>svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Image Loading States (prevents flash) */
.bls__responsive-image,
.bls_img-ratio {
    width: 100%;
}

html.js .bls-loading-image {
    background-color: var(--light-grey-color);
}

html.js .bls-loaded-image {
    opacity: 1;
}

/* Hero/Slideshow Critical */
.bls__slideshow {
    position: relative;
    overflow: hidden;
}

.bls__slideshow .slide-items {
    position: relative;
    min-height: 50vh;
}

.bls__slideshow .slide-bg-image {
    position: absolute;
    inset: 0;
}

.bls__slideshow .slide-bg-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Swiper Pre-initialization (prevents layout shift) */
.swiper:not([class*="initialized"]) .swiper-wrapper {
    display: flex;
    overflow: hidden;
    margin-left: calc(var(--perload-gap) / 2 * -1);
    margin-right: calc(var(--perload-gap) / 2 * -1);
    width: calc(var(--perload-gap) + 100%);
    flex: 0 0 auto;
}

.swiper:not([class*="initialized"]) .swiper-wrapper .swiper-slide {
    padding-left: calc(var(--perload-gap) / 2);
    padding-right: calc(var(--perload-gap) / 2);
}

.bls__slideshow .swiper:not([class*="initialized"]) .swiper-wrapper .swiper-slide:not(:first-child) {
    opacity: 0;
    visibility: hidden;
}

/* Swiper grid sizes pre-init */
@media (min-width: 1200px) {
    .swiper:not([class*="initialized"])[data-desktop="1"] .swiper-slide {
        width: 100%;
    }

    .swiper:not([class*="initialized"])[data-desktop="2"] .swiper-slide {
        width: 50%;
    }

    .swiper:not([class*="initialized"])[data-desktop="3"] .swiper-slide {
        width: 33.333%;
    }

    .swiper:not([class*="initialized"])[data-desktop="4"] .swiper-slide {
        width: 25%;
    }

    .swiper:not([class*="initialized"])[data-desktop="5"] .swiper-slide {
        width: 20%;
    }

    .swiper:not([class*="initialized"])[data-desktop="6"] .swiper-slide {
        width: 16.666%;
    }
}

@media (max-width: 1199px) {
    .swiper:not([class*="initialized"])[data-tablet="1"] .swiper-slide {
        width: 100%;
    }

    .swiper:not([class*="initialized"])[data-tablet="2"] .swiper-slide {
        width: 50%;
    }

    .swiper:not([class*="initialized"])[data-tablet="3"] .swiper-slide {
        width: 33.333%;
    }

    .swiper:not([class*="initialized"])[data-tablet="4"] .swiper-slide {
        width: 25%;
    }
}

@media (max-width: 767px) {
    .swiper:not([class*="initialized"])[data-mobile="1"] .swiper-slide {
        width: 100%;
    }

    .swiper:not([class*="initialized"])[data-mobile="2"] .swiper-slide {
        width: 50%;
    }

    .swiper:not([class*="initialized"])[data-mobile="3"] .swiper-slide {
        width: 33.333%;
    }
}

/* Navigation Critical */
.navigation {
    display: flex;
    align-items: center;
}

.navigation .level0 {
    display: inline-block;
    padding: var(--spacing-menu, 12px);
}

.navigation .submenu {
    display: none;
    position: absolute;
    z-index: 10;
    background: #fff;
}

@media (min-width: 1200px) {
    .navigation .level0:hover>.submenu {
        display: block;
    }
}

/* Mobile menu toggle */
.nav-toggle {
    display: none;
    cursor: pointer;
}

@media (max-width: 1024px) {
    .nav-toggle {
        display: flex;
        align-items: center;
    }

    .navigation:not(.mobile-menu-open) {
        display: none;
    }
}

/* Overlay */
.bls__overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 8;
    opacity: 0;
    visibility: hidden;
    transition: var(--bls-transition);
}

.d-none-overlay {
    display: none;
}

/* Announcement bar */
.announcement-bar {
    color: rgb(var(--base-color));
    padding: 8px 0;
}

.announcement-bar-content {
    font-size: var(--announcement-bar-font-size, 12px);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Typography headings */
h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
    font-family: var(--heading-font-family, inherit);
    font-weight: var(--heading-font-weight, 600);
    color: var(--heading-color, #111);
    line-height: var(--heading-line-height);
    margin-bottom: 1rem;
}

/* Button base */
.btn,
.btn-primary {
    display: inline-block;
    padding: var(--btn-padding, 1rem 2rem);
    font-weight: var(--btn-font-weight, 500);
    text-align: center;
    border: 1px solid transparent;
    border-radius: var(--btn-border-radius, 4px);
    transition: var(--bls-transition);
    cursor: pointer;
}

.btn-primary {
    background-color: var(--btn-primary-bg, #111);
    color: var(--btn-primary-color, #fff);
    border-color: var(--btn-primary-bg, #111);
}

/* Placeholder for images */
.bls__placeholder {
    fill: rgba(51, 50, 50, 0.35);
    background-color: #eee;
    display: block;
}

/* Font display swap is handled via Shopify font_face filter with font_display: 'swap' */

/* Skip loading animations for LCP */
.bls__slideshow .swiper-slide:first-child .bls-loading-image {
    background: transparent;
}

.bls__slideshow .swiper-slide:first-child .bls-loading-image img {
    opacity: 1 !important;
}