[x-cloak] {
    display: none !important;
}

.cart-overlay {
    background: rgba(0, 0, 0, 0.5);
    z-index: 20000;
}

.cart-drawer {
    max-width: 420px;
    width: 100%;
    background: #ffffff;
    z-index: 20001;
}

.popup-shopping-cart,
.offcanvas {
    z-index: 20001;
}

.tf-topbar {
    position: relative;
    z-index: 10;
}

/* Image sizing for consistent cards and galleries */
.card-product .product-img {
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.category-v04 .cate-image {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 50%;
}

.img-style {
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.section-product-single .product-img {
    aspect-ratio: 3 / 4;
    overflow: hidden;
}

.card-product .product-img img,
.category-v04 .cate-image img,
.img-style img,
.section-product-single .product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.category-v04 .cate-image img {
    border-radius: 50%;
}

.tf-slideshow .sld_image {
    aspect-ratio: 1770 / 680;
    overflow: hidden;
}

.tf-slideshow .sld_image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.18);
    pointer-events: none;
}

/* Mobile UX tuning */
@media (max-width: 767.98px) {
    .tf-topbar {
        padding: 6px 0;
    }

    .text-line-clamp-1 {
        -webkit-line-clamp: 2;
    }

    .tf-header .header-inner {
        gap: 12px;
        padding: 8px 0;
    }

    .tf-header {
        padding-top: 0;
        padding-bottom: 0;
    }

    .tf-header .header-left,
    .tf-header .header-right {
        padding: 4px 0;
    }

    .tf-header .header-inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .tf-header .header-left,
    .tf-header .header-actions-mobile {
        width: auto;
        display: flex;
        align-items: center;
    }

    .tf-header .logo-site img {
        width: 120px;
        height: auto;
    }

    .box-nav-menu {
        gap: 10px;
        flex-wrap: wrap;
    }

    .nav-icon .nav-icon-item {
        width: 42px;
        height: 42px;
    }

    .tf-slideshow .slider-wrap {
        border-radius: 14px;
    }

    .tf-slideshow .sld_content .h1 {
        font-size: 28px;
        line-height: 1.15;
    }

    .tf-slideshow .sld_content p {
        font-size: 14px;
    }

    .tf-slideshow .tf-btn {
        width: 100%;
        justify-content: center;
    }

    .themesFlat.flat-spacing,
    .section-top-pick-v02,
    .flat-spacing {
        padding-top: 36px;
        padding-bottom: 36px;
    }

    .category-v04 .cate-image {
        max-width: 130px;
        margin: 0 auto;
    }

    .section-top-pick-v02 .tf-grid-layout,
    .catalog-grid .tf-grid-layout {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .card-product {
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    }

    .card-product_info {
        padding: 12px 10px;
    }

    .section-product-single .row.g-4 {
        row-gap: 24px;
    }

    .section-product-single .product-img {
        aspect-ratio: 4 / 5;
    }

    .section-checkout .tf-page-checkout,
    .section-shoping-cart {
        padding-top: 0;
    }

    .tf-table-page-cart {
        min-width: 600px;
    }

    .cart-drawer {
        max-width: 100%;
    }

    .tf-mini-cart-view-checkout {
        flex-direction: column;
        gap: 10px;
    }

    .tf-mini-cart-view-checkout .tf-btn {
        width: 100%;
        justify-content: center;
    }

    .img-style {
        border-radius: 12px;
    }
}

@media (max-width: 575.98px) {
    .tf-slideshow .sld_content {
        padding: 18px 16px;
    }

    .tf-slideshow .sld_content .h1 {
        font-size: 24px;
    }

    .tf-slideshow .sld_content p {
        margin-bottom: 18px;
    }

    .card-product .product-action_bot .tf-btn {
        font-size: 14px;
        padding: 10px 12px;
    }

    .section-top-pick-v02 .tf-grid-layout,
    .catalog-grid .tf-grid-layout {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .box-order-summary,
    .box-your-order {
        padding: 18px 16px;
    }
}
