.customer-app-header,
.customer-tabbar {
    display: none;
}

.customer-messages:has(.alert) {
    padding-top: 16px;
}

.customer-icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    color: var(--ink);
    font-size: 22px;
}

.customer-account-heading h1 {
    overflow-wrap: anywhere;
}

.customer-balance-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 14px;
    background: #eaf0f5;
    color: var(--accent);
    font-size: 24px;
}

.customer-balance-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-top: 1px solid var(--line);
    margin-top: 20px;
    padding-top: 14px;
    font-size: 12px;
}

.customer-account-shortcuts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 24px;
}

.customer-account-shortcuts a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 10px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    font-weight: 700;
}

.customer-account-shortcuts i {
    color: var(--accent);
    font-size: 24px;
}

.customer-app-menu {
    --bs-offcanvas-width: min(340px, 90vw);
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.customer-app-menu .offcanvas-body {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.customer-menu-identity {
    display: flex;
    align-items: center;
    gap: 12px;
    overflow-wrap: anywhere;
}

.customer-menu-avatar {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 16px;
    background: #e5f0ee;
    color: #285b57;
    font-size: 26px;
}

.customer-menu-identity p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.customer-menu-links a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    border-bottom: 1px solid var(--line);
    font-weight: 700;
}

.customer-menu-links i:first-child {
    color: var(--accent);
    font-size: 21px;
}

.customer-menu-links i:last-child {
    margin-inline-start: auto;
    font-size: 12px;
}

.customer-menu-bottom {
    margin-top: auto;
}

@media screen and (max-width: 991.98px) {
    html:has(.public-body) {
        scroll-padding-top: calc(80px + env(safe-area-inset-top, 0px));
        scroll-padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
    }

    .public-body {
        --customer-tabbar-height: 74px;
        min-height: 100vh;
        min-height: 100dvh;
        padding-bottom: calc(var(--customer-tabbar-height) + env(safe-area-inset-bottom, 0px));
        padding-left: env(safe-area-inset-left, 0px);
        padding-right: env(safe-area-inset-right, 0px);
        background: var(--surface);
        -webkit-tap-highlight-color: transparent;
    }

    .public-body .store-strip,
    .public-body .public-header,
    .public-body .customer-desktop-nav,
    .public-body .public-footer {
        display: none !important;
    }

    .customer-app-header {
        display: block;
        position: sticky;
        top: 0;
        z-index: 1020;
        padding-top: env(safe-area-inset-top, 0px);
        border-bottom: 1px solid var(--line);
        background: #fff;
    }

    .customer-app-toolbar {
        display: flex;
        align-items: center;
        gap: 12px;
        min-height: 70px;
        padding: 10px 16px;
    }

    .customer-app-logo { flex-shrink: 0; }
    .customer-app-logo img { display: block; object-fit: contain; border-radius: 12px; }
    .customer-app-title { flex: 1; min-width: 0; }
    .customer-app-title small { display: block; color: var(--muted); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .customer-app-title strong { display: block; font-size: 16px; line-height: 1.6; }

    .customer-tabbar {
        position: fixed;
        inset: auto 0 0;
        z-index: 1030;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        min-height: calc(var(--customer-tabbar-height) + env(safe-area-inset-bottom, 0px));
        padding: 6px env(safe-area-inset-right, 0px) calc(6px + env(safe-area-inset-bottom, 0px)) env(safe-area-inset-left, 0px);
        border-top: 1px solid var(--line);
        background: #fff;
        box-shadow: 0 -4px 20px #23374408;
    }

    .customer-tabbar > a {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        min-height: 62px;
        color: var(--muted);
        font-size: 11px;
        font-weight: 700;
    }

    .customer-tab-icon {
        display: grid;
        place-items: center;
        position: relative;
        width: 48px;
        height: 32px;
        border-radius: 12px;
        font-size: 22px;
        line-height: 1;
    }

    .customer-tabbar a[aria-current="page"] { color: #285b57; }
    .customer-tabbar a[aria-current="page"] .customer-tab-icon { background: #e5f0ee; }
    .customer-cart-count { position: absolute; top: -3px; right: -3px; min-width: 18px; padding: 3px 5px; border: 2px solid #fff; border-radius: 20px; background: var(--accent); color: #fff; font-size: 10px; }
    .customer-app-main .btn, .customer-app-menu .btn { min-height: 44px; padding: 10px 14px; border-radius: 12px; }
    .customer-app-main .form-control, .customer-app-main .form-select { min-height: 46px; font-size: 16px; border-radius: 12px; }
    .customer-app-main input, .customer-app-main textarea, .customer-app-main select { scroll-margin-block: 100px; }
}

@media screen and (max-width: 767.98px) {
    .customer-app-main > .container,
    .customer-app-main .public-section > .container,
    .customer-app-main .public-page-heading > .container { padding-inline: 16px; }
    .customer-app-main > .container.py-4 { padding-block: 20px !important; }
    .customer-app-main .row { --bs-gutter-x: 16px; --bs-gutter-y: 16px; }
    .customer-app-main .row > * { min-width: 0; }
    .customer-app-main .card { border-radius: 16px; box-shadow: 0 3px 12px #23374403; }
    .customer-app-main .card-body { padding: 18px; }
    .customer-app-main .card-header { padding: 18px; border-radius: 16px 16px 0 0 !important; }
    .customer-app-main .card-header h2 { font-size: 16px; }
    .customer-app-main .page-heading { align-items: center; gap: 12px; margin-bottom: 20px; }
    .customer-app-main .page-heading h1 { font-size: 22px; }
    .customer-app-main .page-heading p { font-size: 12px; }
    .customer-app-main .alert { border-radius: 14px; overflow-wrap: anywhere; }

    .customer-account-heading { flex-wrap: nowrap; }
    .customer-account-heading > div { min-width: 0; }
    .customer-balance-card { border: 0; background: #2e4c5e; color: #fff; }
    .customer-balance-card .card-body { padding: 22px; }
    .customer-balance-card .stat-label, .customer-balance-card .stat-value small { color: #d4dfe5; }
    .customer-balance-card .stat-value, .customer-balance-card .stat-value.text-danger { font-size: clamp(28px, 8vw, 36px); color: #fff !important; overflow-wrap: anywhere; }
    .customer-balance-card .stat-label { margin-bottom: 8px; }
    .customer-balance-card .customer-balance-icon { background: #ffffff14; color: #c4e2db; }
    .customer-balance-footer { border-color: #ffffff25; color: #d4dfe5; }
    .customer-balance-footer .btn { min-height: 40px; border: 0; background: #ffffff14; color: #fff; }
    .customer-account-shortcuts a { flex-direction: column; gap: 6px; padding: 14px 4px; font-size: 11px; }

    .public-body .statement-movements { overflow: hidden; }
    .public-body .statement-movements .card-header small { font-size: 11px; }
    .public-body .statement-table,
    .public-body .statement-table > tbody,
    .public-body .statement-table > tfoot,
    .public-body .statement-items table,
    .public-body .statement-items tbody,
    .public-body .customer-order-items,
    .public-body .customer-order-items > tbody,
    .public-body .customer-order-items > tfoot { display: block; width: 100%; }

    .public-body .statement-table thead,
    .public-body .customer-order-items thead { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

    .public-body .statement-table > tbody > tr,
    .public-body .statement-items tbody > tr,
    .public-body .customer-order-items > tbody > tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 18px; border-bottom: 1px solid var(--line); }

    .public-body .statement-table td,
    .public-body .customer-order-items td { display: block; min-width: 0; padding: 0; border: 0; white-space: normal !important; overflow-wrap: anywhere; }
    .public-body .statement-table td[data-label]::before,
    .public-body .customer-order-items td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 3px; color: var(--muted); font-size: 11px; font-weight: 400; }
    .public-body .statement-table > tbody > tr > td:nth-child(-n+2) { grid-column: 1 / -1; }
    .public-body .statement-table > tbody > tr > td:first-child { color: var(--muted); font-size: 11px; }
    .public-body .statement-table > tbody > tr > td:nth-child(2) { font-size: 14px; }
    .public-body .statement-table > tbody > tr > td:nth-child(5) { grid-column: 1 / -1; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; border-top: 1px dashed var(--line); padding-top: 10px; }
    .public-body .statement-table > tbody > .statement-detail { display: block; padding-top: 0; }
    .public-body .statement-table > tbody > .statement-event:has(+ .statement-detail) { border-bottom: 0; }
    .public-body .statement-items { padding: 12px; }
    .public-body .statement-items tbody > tr { padding: 12px 0; }
    .public-body .statement-items tbody > tr:first-child { padding-top: 0; }
    .public-body .statement-items td:first-child { grid-column: 1 / -1; font-weight: 700; }
    .public-body .statement-items h3 { font-size: 13px; }
    .public-body .statement-table > tfoot > tr,
    .public-body .customer-order-items > tfoot > tr { display: flex; justify-content: space-between; gap: 16px; padding: 16px 18px; }
    .public-body .statement-table > tfoot th,
    .public-body .customer-order-items > tfoot th { padding: 0; border: 0; }
    .public-body .customer-order-items td:first-child { grid-column: 1 / -1; font-weight: 700; }
    .public-body .customer-order-items td:last-child { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 12px; }

    .customer-order-card .card-body { display: grid !important; grid-template-columns: minmax(0, 1fr) auto; gap: 14px !important; }
    .customer-order-card .card-body > div:first-child { grid-column: 1 / -1; }
    .customer-order-card .card-body > a { grid-column: 1 / -1; }
    .customer-order-card h2 { font-size: 16px; }
    .customer-order-card p { overflow-wrap: anywhere; }
    .customer-cart-quantity { flex: 1; min-width: 0; flex-wrap: nowrap !important; }
    .customer-cart-quantity > div { flex: 1; min-width: 0; }
    .customer-cart-line-total { flex-basis: 100%; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 4px; text-align: end; }

    .public-body .public-page-heading { padding: 22px 0 0; background: transparent; }
    .public-body .public-page-heading h1 { font-size: 24px; }
    .public-body .public-section { padding-block: 24px; }
    .public-body .section-heading { align-items: center; gap: 12px; margin-bottom: 18px; }
    .public-body .section-heading h2 { font-size: 20px; }
    .public-body .section-heading .btn { font-size: 11px; padding-inline: 10px; flex-shrink: 0; }
    .public-body .hero .container { min-height: 0; display: block; padding: 24px 16px; }
    .public-body .hero h1 { font-size: 28px; line-height: 1.6; }
    .public-body .hero h1 br { display: none; }
    .public-body .hero h1 em::before { content: ' '; }
    .public-body .hero p { font-size: 13px; margin: 10px 0 18px; line-height: 1.9; }
    .public-body .hero-image, .public-body .hero-features { display: none; }
    .public-body .hero .d-flex { gap: 10px !important; }
    .public-body .hero .btn { flex: 1; font-size: 12px; padding-inline: 10px; }
    .public-body .service-tile { padding: 16px; border-radius: 16px; background: #fff; }
    .public-body .service-tile i { margin-bottom: 10px; }
    .public-body .service-tile h3 { font-size: 14px; }
    .public-body .service-tile p { font-size: 11px; }
    .public-body .public-cta { padding: 20px; border-radius: 16px; }
    .public-body .public-cta h2 { font-size: 20px; }
    .public-body .public-cta .eyebrow { color: #c4e2db; }
    .public-body .public-cta .btn { margin-top: 16px; }

    .public-body .customer-catalog-filter { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; padding: 12px; border-radius: 16px; }
    .public-body .customer-catalog-filter > .search-field { grid-column: 1 / -1; min-width: 0; }
    .public-body .customer-catalog-filter .form-select { min-width: 0; width: 100%; }
    .public-body .public-product { display: flex; flex-direction: column; border-radius: 16px; }
    .public-body .product-picture { height: auto; aspect-ratio: 4 / 3; }
    .public-body .product-picture i { font-size: 42px; }
    .public-body .public-product .info { display: flex; flex: 1; flex-direction: column; padding: 12px; }
    .public-body .public-product h3 { min-height: 44px; font-size: 13px; overflow-wrap: anywhere; }
    .public-body .public-product .category { font-size: 10px; }
    .public-body .public-product .info > .d-flex { margin-top: auto !important; }
    .public-body .public-product .info strong { font-size: 13px; }
    .public-body .public-product .info strong small { font-size: 10px; }
    .public-body .public-product .badge-soft { padding: 4px 7px; font-size: 10px; white-space: normal; }
    .public-body .public-product .btn { font-size: 11px; padding-inline: 6px; }
    .public-body .public-product .form-label { font-size: 11px; }
    .public-body .customer-product-cart-link { display: none; }
    .public-body .customer-login-page { padding-block: 24px !important; }
    .public-body .pagination { flex-wrap: wrap; gap: 4px; padding-inline: 0; }
    .public-body .page-link { min-height: 44px; min-width: 40px; display: grid; place-items: center; }
}

@media print {
    .customer-app-header, .customer-tabbar, .customer-app-menu { display: none !important; }
    .customer-balance-icon { display: none; }
}
