html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    min-height: 100dvh;
    overscroll-behavior-y: contain;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.08);
}

button,
a,
input,
select,
textarea {
    touch-action: manipulation;
}

input,
select,
textarea {
    font-size: 16px;
}

img,
video {
    max-width: 100%;
    height: auto;
}

.tf-product-media-main,
.card-product,
.product-img,
.product-img-wrapper {
    content-visibility: auto;
    contain-intrinsic-size: 320px 420px;
}

#header.header-default {
    padding-top: env(safe-area-inset-top);
}

.mobile-bottom-nav,
.tf-sticky-btn-atc,
.bottom-bar {
    padding-bottom: max(env(safe-area-inset-bottom), 0px);
}

@media (max-width: 767.98px) {
    body {
        padding-bottom: env(safe-area-inset-bottom);
    }

    .modal.fullRight .modal-dialog,
    .offcanvas {
        max-width: 100vw;
    }

    .tf-sticky-btn-atc {
        gap: 8px;
    }
}

.pwa-install-banner {
    position: fixed;
    right: 14px;
    bottom: max(86px, calc(env(safe-area-inset-bottom) + 76px));
    left: 14px;
    z-index: 1090;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    color: #111;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(17, 17, 17, 0.08);
    border-radius: 16px;
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.16);
    transform: translateY(18px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.pwa-install-banner.show {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.pwa-install-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    color: #fff;
    background: #111;
    border-radius: 12px;
    font-size: 21px;
    font-weight: 800;
}

.pwa-install-copy {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.pwa-install-copy strong {
    font-size: 13px;
    font-weight: 800;
    line-height: 1.5;
}

.pwa-install-copy span {
    color: #666;
    font-size: 11px;
    line-height: 1.7;
}

.pwa-install-action {
    min-width: 68px;
    min-height: 38px;
    padding: 0 14px;
    color: #fff;
    background: #111;
    border: 0;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 800;
}

.pwa-install-close {
    position: absolute;
    top: -8px;
    left: -8px;
    width: 28px;
    height: 28px;
    color: #555;
    background: #fff;
    border: 1px solid rgba(17, 17, 17, 0.08);
    border-radius: 999px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    font-size: 18px;
    line-height: 24px;
}

@media (min-width: 992px) {
    .pwa-install-banner {
        right: auto;
        bottom: 24px;
        left: 24px;
        width: min(430px, calc(100vw - 48px));
    }
}

@media (max-width: 575.98px) {
    .pwa-install-banner {
        right: 12px;
        left: 12px;
        bottom: max(104px, calc(env(safe-area-inset-bottom) + 94px));
        grid-template-columns: 30px minmax(0, 1fr) 58px;
        gap: 8px;
        min-height: 58px;
        padding: 9px 10px;
        border-radius: 12px;
        box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
    }

    .pwa-install-icon {
        display: none;
    }

    .pwa-install-copy {
        grid-column: 2;
        grid-row: 1;
        gap: 1px;
        align-self: center;
    }

    .pwa-install-copy strong {
        font-size: 12px;
        line-height: 1.45;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .pwa-install-copy span {
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
        font-size: 10.5px;
        line-height: 1.55;
    }

    .pwa-install-action {
        grid-column: 3;
        grid-row: 1;
        width: 58px;
        min-width: 58px;
        min-height: 36px;
        padding: 0;
        border-radius: 10px;
        font-size: 11px;
        align-self: center;
    }

    .pwa-install-close {
        grid-column: 1;
        grid-row: 1;
        position: static;
        width: 30px;
        height: 30px;
        align-self: center;
        color: #777;
        background: #f5f5f5;
        border: 0;
        box-shadow: none;
        font-size: 16px;
        line-height: 28px;
    }
}

@media (max-width: 360px) {
    .pwa-install-banner {
        grid-template-columns: 28px minmax(0, 1fr) 52px;
        right: 8px;
        left: 8px;
    }

    .pwa-install-action {
        width: 52px;
        min-width: 52px;
        min-height: 32px;
    }

    .pwa-install-close {
        width: 28px;
        height: 28px;
    }
}

/* ========================================================================== */
/* Mobile shopping experience                                                  */
/* A single spacing system keeps navigation, purchase actions and chat apart. */
/* ========================================================================== */

:root {
    --mobile-toolbar-height: 68px;
    --mobile-actionbar-height: 0px;
    --mobile-safe-bottom: env(safe-area-inset-bottom, 0px);
    --mobile-page-gutter: 14px;
    --mobile-radius: 16px;
    --mobile-shadow: 0 10px 30px rgba(15, 23, 42, .08);
}

@media (max-width: 991.98px) {
    html {
        scroll-padding-top: 76px;
        scroll-padding-bottom: calc(var(--mobile-toolbar-height) + var(--mobile-actionbar-height) + 20px);
        max-width: 100%;
        overflow-x: clip;
    }

    body {
        overflow-x: hidden;
        padding-bottom: calc(var(--mobile-toolbar-height) + 18px) !important;
    }

    body.mobile-has-actionbar {
        padding-bottom: calc(var(--mobile-toolbar-height) + var(--mobile-actionbar-height) + 24px) !important;
    }

    body > #wrapper,
    main,
    section,
    .container,
    .container-fluid {
        min-width: 0;
    }

    body > #wrapper {
        max-width: 100%;
        overflow-x: clip;
    }

    .nw-ad-sitetop {
        max-height: 34px;
        margin: 0 auto !important;
        padding: 5px 10px !important;
        overflow: hidden;
        font-size: 11px;
        line-height: 24px;
        background: #fff;
    }

    .container,
    .container-sm,
    .container-md,
    .container-lg,
    .container-xl {
        padding-right: var(--mobile-page-gutter);
        padding-left: var(--mobile-page-gutter);
    }

    a,
    button,
    [role="button"],
    input[type="checkbox"],
    input[type="radio"] {
        -webkit-tap-highlight-color: transparent;
    }

    button,
    .btn,
    .tf-btn,
    input,
    select,
    textarea {
        min-height: 44px;
    }

    input,
    select,
    textarea {
        max-width: 100%;
        font-size: 16px !important;
    }

    .flat-spacing,
    .flat-spacing-2,
    .flat-spacing-3,
    .flat-spacing-4,
    .flat-spacing-5 {
        padding-top: 28px;
        padding-bottom: 28px;
    }

    .heading-section {
        margin-bottom: 18px !important;
    }

    .heading-section .heading,
    .heading-section h2,
    .heading-section h3,
    .heading-section h4 {
        font-size: clamp(1.2rem, 5.2vw, 1.55rem) !important;
        line-height: 1.6 !important;
    }

    .page-title {
        min-height: 118px !important;
        padding: 22px 14px !important;
        background-position: center;
    }

    .page-title .heading {
        font-size: 1.45rem !important;
        line-height: 1.55 !important;
    }

    .page-title .breadcrumbs {
        margin-top: 6px !important;
        overflow-x: auto;
        white-space: nowrap;
        scrollbar-width: none;
    }

    .page-title .breadcrumbs::-webkit-scrollbar {
        display: none;
    }

    /* Compact and predictable mobile header. */
    .tf-topbar {
        min-height: 36px;
        height: 36px;
        padding: 0 !important;
    }

    .tf-topbar .tf-topbar_wrap {
        min-height: 36px;
        height: 36px;
        padding: 0 !important;
    }

    .tf-topbar .topbar-left {
        width: 100%;
        min-width: 0;
        justify-content: center;
        gap: 0;
        overflow: hidden;
    }

    .tf-topbar .topbar-left li:not(:first-child) {
        display: none !important;
    }

    .tf-topbar .topbar-left a {
        display: block;
        max-width: 100%;
        font-size: 11px !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    #header.header-default {
        position: sticky;
        top: 0;
        z-index: 1020;
        padding-top: 0;
        background: rgba(255, 255, 255, .96);
        border-bottom: 1px solid rgba(15, 23, 42, .06);
        box-shadow: 0 6px 18px rgba(15, 23, 42, .04);
        backdrop-filter: blur(14px);
    }

    #header .wrapper-header {
        min-height: 58px;
        padding-top: 6px;
        padding-bottom: 6px;
    }

    #header .logo-header,
    #header .logo-header .logo {
        display: block;
        max-width: 150px;
        max-height: 42px;
        margin-inline: auto;
        object-fit: contain;
    }

    #header .nav-search,
    #header .nav-wishlist,
    #header .nav-cart {
        display: none !important;
    }

    #header .mobile-menu,
    #header .nav-account > .nav-icon-item {
        display: inline-flex;
        width: 44px;
        height: 44px;
        align-items: center;
        justify-content: center;
        border-radius: 13px;
        background: #f7f7f8;
    }

    .tf-breadcrumb {
        padding: 10px 0 !important;
        overflow: hidden;
    }

    .tf-breadcrumb-wrap,
    .tf-breadcrumb-list {
        min-width: 0;
    }

    .tf-breadcrumb-list {
        display: flex;
        overflow-x: auto;
        white-space: nowrap;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .tf-breadcrumb-list::-webkit-scrollbar {
        display: none;
    }

    /* Bottom navigation is the mobile app shell. */
    .tf-toolbar-bottom {
        min-height: 64px;
        height: auto;
        padding: 6px 4px max(6px, var(--mobile-safe-bottom));
        overflow: visible;
        z-index: 1028;
        background: rgba(255, 255, 255, .97);
        border-top: 1px solid rgba(15, 23, 42, .08);
        box-shadow: 0 -10px 30px rgba(15, 23, 42, .08);
        backdrop-filter: blur(16px);
    }

    .tf-toolbar-bottom .toolbar-item {
        min-width: 0;
        flex: 1 1 20%;
    }

    .tf-toolbar-bottom .toolbar-item a {
        min-width: 0;
        min-height: 50px;
        height: auto;
        gap: 2px;
        padding: 4px 2px;
        color: #6b7280;
        border-radius: 12px;
    }

    .tf-toolbar-bottom .toolbar-item a .toolbar-icon {
        display: inline-flex;
        width: 24px;
        height: 24px;
        align-items: center;
        justify-content: center;
        color: inherit;
    }

    .tf-toolbar-bottom .toolbar-item a .toolbar-icon svg {
        width: 22px;
        height: 22px;
    }

    .tf-toolbar-bottom .toolbar-item a .toolbar-icon path[fill] {
        fill: currentColor !important;
    }

    .tf-toolbar-bottom .toolbar-item a .toolbar-icon path[stroke] {
        stroke: currentColor !important;
    }

    .tf-toolbar-bottom .toolbar-item a .toolbar-label {
        max-width: 100%;
        color: inherit;
        font-size: 10.5px;
        font-weight: 750;
        line-height: 1.35;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .tf-toolbar-bottom .toolbar-item a.is-active,
    .tf-toolbar-bottom .toolbar-item a:active {
        color: var(--primary, #c71920);
        background: color-mix(in srgb, var(--primary, #c71920) 8%, transparent);
    }

    /* All purchase bars sit above the bottom navigation. */
    .tf-sticky-btn-atc,
    .cart-mobile-bar,
    .checkout-mobile-bar,
    .payment-mobile-bar,
    body[data-page="Dashboard-EditAddress"] .form-actions {
        bottom: var(--mobile-toolbar-height) !important;
        z-index: 1027 !important;
        box-shadow: 0 -10px 30px rgba(15, 23, 42, .10) !important;
    }

    .cart-mobile-bar,
    .checkout-mobile-bar,
    .payment-mobile-bar {
        min-height: 66px;
        gap: 12px;
        padding: 9px var(--mobile-page-gutter) !important;
        background: rgba(255, 255, 255, .98) !important;
        border-top: 1px solid #eceff3 !important;
        backdrop-filter: blur(16px);
    }

    .cart-mobile-bar .cmb-btn,
    .checkout-mobile-bar .cmb-btn,
    .payment-mobile-bar .pmb-btn {
        min-height: 48px;
        border-radius: 13px !important;
        font-size: .9rem !important;
        font-weight: 900 !important;
    }

    /* Product media must never create a blank vertical region on phones. */
    body[data-page="Shop-Detail"] .tf-main-product > .container > .row {
        gap: 18px 0;
    }

    body[data-page="Shop-Detail"] .tf-product-media-wrap.sticky-top {
        position: relative !important;
        top: auto !important;
        z-index: 1 !important;
    }

    body[data-page="Shop-Detail"] .thumbs-slider,
    body[data-page="Shop-Detail"] .slider-scroll {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
        min-height: 0 !important;
    }

    body[data-page="Shop-Detail"] .tf-product-media-main {
        order: 0 !important;
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 1 / 1;
        overflow: hidden;
        border: 1px solid #f0f1f3;
        border-radius: 16px;
        background: #f8f8f9;
    }

    body[data-page="Shop-Detail"] .tf-product-media-main .swiper-wrapper,
    body[data-page="Shop-Detail"] .tf-product-media-main .swiper-slide,
    body[data-page="Shop-Detail"] .tf-product-media-main .item {
        min-height: 0 !important;
        height: 100% !important;
        max-height: none !important;
    }

    body[data-page="Shop-Detail"] .tf-product-media-main .item img {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain !important;
        background: #f8f8f9;
    }

    body[data-page="Shop-Detail"] .tf-product-media-thumbs {
        order: 1 !important;
        width: 100% !important;
        height: 68px !important;
        max-height: 68px !important;
    }

    body[data-page="Shop-Detail"] .tf-product-media-thumbs .swiper-wrapper {
        align-items: stretch;
    }

    body[data-page="Shop-Detail"] .tf-product-media-thumbs .swiper-slide {
        width: 62px !important;
        height: 62px !important;
    }

    body[data-page="Shop-Detail"] .tf-product-media-thumbs .swiper-slide .item {
        width: 62px;
        height: 62px;
        border-radius: 10px;
        overflow: hidden;
    }

    body[data-page="Shop-Detail"] .tf-product-media-wrap > img.tf-image-zoom {
        display: block;
        width: 100%;
        aspect-ratio: 1 / 1;
        object-fit: contain;
        border-radius: 16px;
        background: #f8f8f9;
    }

    body[data-page="Shop-Detail"] .tf-product-info-wrap,
    body[data-page="Shop-Detail"] .tf-product-info-list {
        min-width: 0;
        padding: 0 !important;
    }

    body[data-page="Shop-Detail"] .tf-product-info-name {
        margin-bottom: 12px !important;
    }

    body[data-page="Shop-Detail"] .tf-product-info-name .name {
        margin-top: 4px;
        font-size: clamp(1.35rem, 6vw, 1.8rem) !important;
        line-height: 1.55 !important;
        overflow-wrap: anywhere;
    }

    body[data-page="Shop-Detail"] .tf-product-info-price {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-wrap: wrap;
    }

    body[data-page="Shop-Detail"] .tf-product-info-choose-option,
    body[data-page="Shop-Detail"] .tf-product-info-quantity,
    body[data-page="Shop-Detail"] .product-notify-compact,
    body[data-page="Shop-Detail"] .product-meta-share {
        margin-top: 14px !important;
    }

    body[data-page="Shop-Detail"] .vr-grid {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px !important;
    }

    body[data-page="Shop-Detail"] .vr-card {
        width: 100% !important;
        min-width: 0 !important;
        min-height: 82px;
        padding: 12px !important;
    }

    body[data-page="Shop-Detail"] .tf-product-info-by-btn {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) 48px 48px;
        gap: 8px !important;
    }

    body[data-page="Shop-Detail"] .tf-product-info-by-btn .btn-add-to-cart {
        min-width: 0;
        min-height: 50px;
        padding-inline: 12px;
        border-radius: 13px;
        text-align: center;
    }

    body[data-page="Shop-Detail"] .tf-product-info-by-btn .box-icon {
        width: 48px;
        height: 48px;
        border-radius: 13px;
    }

    body[data-page="Shop-Detail"] .product-meta-share {
        grid-template-columns: 1fr !important;
    }

    body[data-page="Shop-Detail"] .product-qr-box {
        display: none !important;
    }

    body[data-page="Shop-Detail"] .tf-sticky-btn-atc {
        padding: 0 !important;
        background: rgba(255, 255, 255, .98) !important;
        border-top: 1px solid #eceff3;
        backdrop-filter: blur(16px);
    }

    body[data-page="Shop-Detail"] .tf-sticky-btn-atc .container,
    body[data-page="Shop-Detail"] .tf-sticky-btn-atc .form-sticky-atc {
        width: 100%;
    }

    body[data-page="Shop-Detail"] .tf-sticky-btn-atc .form-sticky-atc {
        display: grid !important;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: center;
        gap: 12px;
        padding: 8px 0 !important;
    }

    body[data-page="Shop-Detail"] .tf-sticky-btn-atc .tf-sticky-atc-product {
        display: flex !important;
        min-width: 78px;
        margin: 0 !important;
    }

    body[data-page="Shop-Detail"] .tf-sticky-btn-atc .tf-sticky-atc-product .image,
    body[data-page="Shop-Detail"] .tf-sticky-btn-atc .tf-sticky-atc-product .text-title:first-child,
    body[data-page="Shop-Detail"] .tf-sticky-btn-atc .tf-sticky-atc-quantity {
        display: none !important;
    }

    body[data-page="Shop-Detail"] .tf-sticky-btn-atc #stickyPrice {
        display: block !important;
        white-space: nowrap;
        font-size: .88rem;
        font-weight: 950;
    }

    body[data-page="Shop-Detail"] .tf-sticky-btn-atc .tf-sticky-atc-infos,
    body[data-page="Shop-Detail"] .tf-sticky-btn-atc .tf-sticky-atc-btns {
        width: 100% !important;
        min-width: 0;
        margin: 0 !important;
    }

    body[data-page="Shop-Detail"] .tf-sticky-btn-atc .tf-btn {
        width: 100%;
        min-height: 48px;
        border-radius: 13px !important;
        font-size: .9rem;
        font-weight: 900;
    }

    /* Product lists remain readable at narrow widths. */
    body[data-page="Shop-Index"] .wrapper-shop,
    body[data-page="Shop-Detail"] .product-detail-recommendations .wrapper-shop,
    body[data-page="Cart-Index"] section .wrapper-shop {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px !important;
    }

    body[data-page="Shop-Index"] .card-product,
    body[data-page="Shop-Detail"] .product-detail-recommendations .card-product,
    body[data-page="Cart-Index"] section .card-product {
        width: auto !important;
        min-width: 0 !important;
    }

    .card-product .card-product-wrapper,
    .card-product .product-img,
    .card-product .product-img-wrapper {
        min-height: 0 !important;
        aspect-ratio: 1 / 1.18;
        overflow: hidden;
        border-radius: 14px;
    }

    .card-product .product-img img,
    .card-product .product-img-wrapper img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    .card-product .card-product-info {
        padding-top: 9px !important;
    }

    .card-product .card-product-info .title {
        display: -webkit-box;
        min-height: 42px;
        overflow: hidden;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        font-size: .82rem !important;
        line-height: 1.7 !important;
    }

    /* Correct mobile cart layout; the older nested media rule is invalid CSS. */
    body[data-page="Cart-Index"] .cart-page-wrapper {
        padding: 16px 0 28px !important;
    }

    body[data-page="Cart-Index"] .cart-steps {
        margin-bottom: 16px;
        padding: 12px 10px;
        border-radius: 15px;
    }

    body[data-page="Cart-Index"] .cart-step {
        gap: 5px;
    }

    body[data-page="Cart-Index"] .cart-step .step-icon {
        width: 30px;
        height: 30px;
        font-size: .75rem;
    }

    body[data-page="Cart-Index"] .cart-step .step-label {
        font-size: .68rem;
    }

    body[data-page="Cart-Index"] .cart-items-card,
    body[data-page="Cart-Index"] .cart-summary-card,
    body[data-page="Cart-Index"] .empty-cart-box {
        border-radius: var(--mobile-radius) !important;
        box-shadow: var(--mobile-shadow) !important;
    }

    body[data-page="Cart-Index"] .cart-items-header {
        padding: 14px !important;
    }

    body[data-page="Cart-Index"] .cart-item-row {
        display: grid !important;
        grid-template-columns: 78px minmax(0, 1fr) 40px !important;
        grid-template-areas:
            "image info remove"
            "image quantity quantity"
            "total total total";
        gap: 10px 12px !important;
        padding: 15px 14px !important;
        align-items: center;
    }

    body[data-page="Cart-Index"] .cart-item-img {
        grid-area: image;
        width: 78px !important;
        height: 92px !important;
        align-self: start;
        border-radius: 12px;
    }

    body[data-page="Cart-Index"] .cart-item-info {
        grid-area: info;
        min-width: 0;
    }

    body[data-page="Cart-Index"] .cart-item-name {
        display: -webkit-box;
        overflow: hidden;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        font-size: .9rem !important;
        line-height: 1.65;
    }

    body[data-page="Cart-Index"] .cart-item-meta {
        gap: 4px;
        margin-top: 5px;
    }

    body[data-page="Cart-Index"] .cart-item-meta .cart-item-badge:nth-child(n+2) {
        display: none;
    }

    body[data-page="Cart-Index"] .cart-item-price {
        display: none !important;
    }

    body[data-page="Cart-Index"] .cart-item-row .qty-control {
        grid-area: quantity;
        justify-self: start;
        min-height: 44px;
    }

    body[data-page="Cart-Index"] .qty-btn {
        width: 42px;
        height: 42px;
        min-height: 42px;
    }

    body[data-page="Cart-Index"] .qty-input {
        width: 48px;
        height: 42px;
        min-height: 42px;
    }

    body[data-page="Cart-Index"] .cart-item-total {
        grid-area: total;
        display: flex;
        width: 100%;
        min-width: 0;
        align-items: center;
        justify-content: space-between;
        padding-top: 10px;
        border-top: 1px dashed #e7e7e8;
        text-align: right;
    }

    body[data-page="Cart-Index"] .cart-item-total .total-label {
        display: inline;
    }

    body[data-page="Cart-Index"] .cart-item-remove {
        grid-area: remove;
        width: 40px;
        height: 40px;
        color: #b42318;
        justify-self: end;
    }

    body[data-page="Cart-Index"] .cart-summary-card {
        position: static !important;
        margin-top: 16px !important;
        padding: 18px 16px !important;
    }

    body[data-page="Cart-Index"] .cart-summary-card > .checkout-btn {
        display: none !important;
    }

    body[data-page="Cart-Index"] .empty-cart-box {
        padding: 38px 18px !important;
    }

    body[data-page="Cart-Index"] .empty-cart-icon {
        width: 82px;
        height: 82px;
        margin-bottom: 18px;
    }

    /* Checkout cards become a clear single-column task flow. */
    body[data-page="Checkout-Index"] .checkout-wrapper {
        padding: 16px 0 26px !important;
    }

    body[data-page="Checkout-Index"] .checkout-steps {
        display: none !important;
    }

    body[data-page="Checkout-Index"] .co-card,
    body[data-page="Checkout-Index"] .co-summary-card {
        margin-bottom: 14px;
        border: 1px solid #eef0f2;
        border-radius: var(--mobile-radius) !important;
        box-shadow: var(--mobile-shadow) !important;
    }

    body[data-page="Checkout-Index"] .co-card-header,
    body[data-page="Checkout-Index"] .co-summary-header {
        padding: 14px !important;
    }

    body[data-page="Checkout-Index"] .co-card-body,
    body[data-page="Checkout-Index"] .co-summary-totals {
        padding: 14px !important;
    }

    body[data-page="Checkout-Index"] .address-grid {
        grid-template-columns: 1fr !important;
        gap: 10px;
    }

    body[data-page="Checkout-Index"] .address-card,
    body[data-page="Checkout-Index"] .add-address-card {
        min-height: 112px;
        padding: 15px !important;
        border-radius: 13px !important;
    }

    body[data-page="Checkout-Index"] .shipping-method-card {
        min-height: 72px;
        padding: 13px !important;
        gap: 10px !important;
        align-items: flex-start !important;
        border-radius: 13px !important;
    }

    body[data-page="Checkout-Index"] .method-tag {
        max-width: 84px;
        white-space: normal;
        text-align: center;
    }

    body[data-page="Checkout-Index"] .summary-sticky {
        position: static !important;
    }

    body[data-page="Checkout-Index"] .summary-item {
        padding: 12px 14px !important;
    }

    body[data-page="Checkout-Index"] .secure-badges {
        gap: 7px !important;
        flex-wrap: wrap;
    }

    body[data-page="Checkout-Index"] .summary-sticky .place-order-btn {
        display: none !important;
    }

    /* Authentication is a focused, one-column mobile flow. */
    body[data-page^="Account-"] .flat-spacing {
        padding-top: 18px !important;
        padding-bottom: 28px !important;
    }

    body[data-page^="Account-"] .login-wrap {
        display: flex !important;
        flex-direction: column !important;
        gap: 14px !important;
    }

    body[data-page^="Account-"] .login-wrap > .left,
    body[data-page^="Account-"] .login-wrap > .right {
        width: 100% !important;
        padding: 18px 16px !important;
        border: 1px solid #eceff3;
        border-radius: var(--mobile-radius);
        background: #fff;
        box-shadow: var(--mobile-shadow);
    }

    body[data-page="Account-Login"] .login-wrap > .right {
        padding: 14px 16px !important;
    }

    body[data-page^="Account-"] .nav-tabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
        padding: 5px;
        border: 0;
        border-radius: 13px;
        background: #f4f5f7;
    }

    body[data-page^="Account-"] .nav-tabs .nav-link {
        min-height: 44px;
        border: 0 !important;
        border-radius: 10px !important;
        font-size: .82rem;
        font-weight: 850;
    }

    body[data-page^="Account-"] .nav-tabs .nav-link.active {
        background: #fff !important;
        box-shadow: 0 5px 14px rgba(15, 23, 42, .08);
    }

    body[data-page^="Account-"] .form-login fieldset {
        margin-bottom: 12px;
    }

    body[data-page^="Account-"] .form-login input {
        width: 100%;
        min-height: 50px;
        border-radius: 12px !important;
    }

    body[data-page^="Account-"] .button-submit .tf-btn {
        width: 100%;
        min-height: 50px;
        border-radius: 13px;
    }

    /* Customer dashboard and address completion remain usable one-handed. */
    .db-wrapper .db-card,
    .db-wrapper .wallet-card,
    .db-wrapper .order-card {
        border-radius: var(--mobile-radius) !important;
    }

    .db-wrapper .db-card-header,
    .db-wrapper .db-card-body {
        padding: 14px !important;
    }

    .db-wrapper .form-row-grid,
    .db-wrapper .profile-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    body[data-page="Dashboard-EditAddress"] .db-wrapper {
        padding-bottom: 20px !important;
    }

    body[data-page="Dashboard-EditAddress"] .form-actions {
        position: fixed !important;
        right: 0;
        left: 0;
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px;
        margin: 0 !important;
        padding: 9px var(--mobile-page-gutter) !important;
        background: rgba(255, 255, 255, .98);
        border-top: 1px solid #eceff3;
        backdrop-filter: blur(16px);
    }

    body[data-page="Dashboard-EditAddress"] .form-actions .submit-btn,
    body[data-page="Dashboard-EditAddress"] .form-actions .cancel-btn {
        min-height: 48px;
        margin: 0 !important;
        padding: 10px 12px !important;
        border-radius: 12px !important;
        white-space: nowrap;
    }

    body[data-page="Dashboard-EditAddress"] .form-actions .submit-btn {
        min-width: 0;
        font-size: .82rem;
    }

    body[data-page="Dashboard-EditAddress"] .form-actions .cancel-btn {
        font-size: 0;
    }

    body[data-page="Dashboard-EditAddress"] .form-actions .cancel-btn i {
        margin: 0;
        font-size: 18px;
    }

    body[data-page="Dashboard-EditAddress"] .map-height-md {
        height: 280px !important;
        min-height: 280px !important;
    }

    body[data-page="Dashboard-EditAddress"] .locate-btn {
        min-height: 40px;
    }

    /* Wide content must scroll instead of breaking the viewport. */
    .table-responsive,
    .db-table-wrap,
    .wallet-table-wrap {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 575.98px) {
    :root {
        --mobile-page-gutter: 12px;
    }

    body[data-page="Shop-Detail"] .product-meta-share {
        grid-template-columns: 1fr !important;
    }

    body[data-page="Shop-Detail"] .tf-product-info-desc > p {
        display: -webkit-box;
        overflow: hidden;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
    }

    body[data-page="Cart-Index"] .coupon-box {
        gap: 6px;
    }

    body[data-page="Cart-Index"] .coupon-btn {
        padding-inline: 14px;
    }
}

@media (max-width: 359.98px) {
    .tf-toolbar-bottom .toolbar-item a .toolbar-label {
        font-size: 9.5px;
    }

    body[data-page="Shop-Index"] .wrapper-shop,
    body[data-page="Shop-Detail"] .product-detail-recommendations .wrapper-shop,
    body[data-page="Cart-Index"] section .wrapper-shop {
        gap: 8px !important;
    }

    body[data-page="Shop-Detail"] .vr-grid {
        grid-template-columns: 1fr;
    }

    body[data-page="Dashboard-EditAddress"] .form-actions {
        grid-template-columns: minmax(0, 1fr) 46px;
    }
}
