/*
 * Madukani storefront theme
 *
 * Colours, type and shapes from the Madukani design sheet, layered over the
 * core stylesheet. The primary and secondary colours, header and footer stay
 * editable in Website Setup; this file holds the rest of the design system.
 */

:root {
    --mk-green: #0E5A3A;
    --mk-green-hover: #0A4730;
    --mk-green-tint: #E3F1E9;
    --mk-orange: #F29A2E;
    --mk-orange-text: #C9650F;
    --mk-ink: #14211B;
    --mk-muted: #5B6862;
    --mk-bg: #F6F7F4;
    --mk-border: #E3E7E2;
    --mk-input-border: #CBD1CC;
    --mk-footer: #0A3D28;
    /* Order status pills: they differ in lightness too, so they read without colour */
    --mk-paid-bg: #E3F1E9;
    --mk-paid: #0E5A3A;
    --mk-pending-bg: #FDF0DD;
    --mk-pending: #834906;
    --mk-transit-bg: #E6EFF8;
    --mk-transit: #224B7B;
    --mk-cancelled-bg: #FBE7E6;
    --mk-cancelled: #942221;
    --mk-radius-button: 10px;
    --mk-radius-card: 12px;
    --mk-font-heading: 'Bricolage Grotesque', 'DM Sans', system-ui, sans-serif;
}

/* ---------- Type ---------- */

body {
    color: var(--mk-ink);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Titles use Bricolage Grotesque; product names and other light headings keep the body font */
:is(h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6):not(.fw-300):not(.fw-400):not(.fw-500) {
    font-family: var(--mk-font-heading);
    letter-spacing: -0.01em;
}

::selection {
    background: var(--mk-green-tint);
    color: var(--mk-ink);
}

/* Orange words on white use the darker orange so they stay readable */
.text-secondary-base,
.text-warning {
    color: var(--mk-orange-text) !important;
}

/* Labels whose text colour is set to "dark" in admin */
[style*="color:dark"],
[style*="color: dark"] {
    color: var(--mk-ink) !important;
}

/* ---------- Focus: a 3px Soko orange ring ---------- */

a:focus-visible,
button:focus-visible,
.btn:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid var(--mk-orange);
    outline-offset: 2px;
    box-shadow: none;
}

/* ---------- Buttons: radius 10, one green button per screen ---------- */

.btn {
    border-radius: var(--mk-radius-button);
    font-weight: 700;
}

.btn.rounded-0,
.btn.rounded-1,
.btn.rounded-2 {
    border-radius: var(--mk-radius-button) !important;
}

.input-group > .input-group-prepend > .btn.rounded-0,
.input-group > .input-group-append:not(:last-child) > .btn.rounded-0 {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.input-group > .input-group-append > .btn.rounded-0,
.input-group > .input-group-prepend:not(:first-child) > .btn.rounded-0 {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

.btn-primary,
.btn-primary:hover,
.btn-primary:focus {
    color: #fff;
}

.btn-outline-primary {
    background-color: #fff;
    border-width: 1.5px;
}

.btn.btn-secondary-base,
.btn.btn-secondary-base:hover,
.btn.btn-secondary-base:focus {
    color: var(--mk-ink);
}

/* Unavailable, e.g. sold out */
.btn:not(.btn-link):disabled,
.btn:not(.btn-link).disabled {
    background-color: var(--mk-border) !important;
    border-color: var(--mk-border) !important;
    color: var(--mk-muted) !important;
    opacity: 1;
}

/* At least 48px tall for thumbs */
@media (max-width: 991.98px) {
    .btn:not(.btn-sm):not(.btn-xs):not(.btn-icon):not(.btn-circle):not(.btn-link) {
        padding-top: 0.8rem;
        padding-bottom: 0.8rem;
    }
}

/* ---------- Inputs ---------- */

.form-control,
.custom-select,
.bootstrap-select > .dropdown-toggle.btn-light,
.bootstrap-select > .dropdown-toggle.form-control {
    border-color: var(--mk-input-border);
    border-radius: var(--mk-radius-button);
    color: var(--mk-ink);
}

.form-control.rounded-0,
.form-control.rounded-1,
.form-control.rounded-2 {
    border-radius: var(--mk-radius-button) !important;
}

.input-group > .form-control.rounded-0:not(:first-child),
.input-group > .form-control:not(:first-child) {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

.input-group > .form-control.rounded-0:not(:last-child),
.input-group > .form-control:not(:last-child) {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.form-control::placeholder {
    color: #7C8781;
}

.form-control:focus,
.custom-select:focus,
.bootstrap-select > .dropdown-toggle:focus,
.bootstrap-select.show > .dropdown-toggle {
    border-color: var(--mk-input-border);
    box-shadow: 0 0 0 3px var(--mk-orange) !important;
    outline: 0 !important;
}

/* 16px text stops phones zooming in */
@media (max-width: 767.98px) {
    .form-control,
    .custom-select,
    input.form-control,
    select.form-control,
    textarea.form-control {
        font-size: 16px !important;
    }

    .form-control:not(textarea):not(.form-control-sm) {
        height: 48px;
    }
}

.aiz-checkbox > input:checked ~ .aiz-square-check,
.aiz-checkbox > input:checked ~ .aiz-rounded-check,
.aiz-radio > input:checked ~ .aiz-rounded-check,
.aiz-radio > input:checked ~ .aiz-square-check {
    border-color: var(--primary);
}

/* ---------- Cards: radius 12, borders rather than shadows (lighter on cheap screens) ---------- */

.card {
    border: 1px solid var(--mk-border);
    border-radius: var(--mk-radius-card);
    box-shadow: none;
}

.card.rounded-0 {
    border-radius: var(--mk-radius-card) !important;
}

.card > .card-header:first-child {
    border-radius: calc(var(--mk-radius-card) - 1px) calc(var(--mk-radius-card) - 1px) 0 0;
}

.card > .card-footer:last-child {
    border-radius: 0 0 calc(var(--mk-radius-card) - 1px) calc(var(--mk-radius-card) - 1px);
}

.card.shadow-sm,
.card.shadow,
.card.shadow-md,
.card.hov-shadow-md:hover,
.card.hov-shadow-lg:hover {
    box-shadow: none !important;
}

.aiz-megabox .aiz-megabox-elem {
    border-color: var(--mk-border);
    border-radius: var(--mk-radius-card);
}

.aiz-megabox > input:checked ~ .aiz-megabox-elem {
    border-color: var(--primary);
    box-shadow: inset 0 0 0 1px var(--primary);
}

.dropdown-menu {
    border-color: var(--mk-border);
    border-radius: var(--mk-radius-button);
}

.dropdown-item.active,
.dropdown-item:active {
    background-color: var(--mk-green-tint);
    color: var(--mk-green) !important;
}

/* ---------- Badges and order status ---------- */

.badge {
    font-weight: 700;
}

.badge-inline {
    height: auto;
    padding: 0.3em 0.75em;
    border-radius: 999px;
}

.badge-primary {
    background-color: var(--primary);
    color: #fff;
}

.badge-success,
.badge-soft-success {
    background-color: var(--mk-paid-bg);
    color: var(--mk-paid);
}

.badge-warning,
.badge-soft-warning {
    background-color: var(--mk-pending-bg);
    color: var(--mk-pending);
}

.badge-info,
.badge-soft-info {
    background-color: var(--mk-transit-bg);
    color: var(--mk-transit);
}

.badge-danger,
.badge-soft-danger {
    background-color: var(--mk-cancelled-bg);
    color: var(--mk-cancelled);
}

.badge-secondary {
    background-color: var(--mk-border);
    color: var(--mk-muted);
}

.badge-dark {
    background-color: var(--mk-ink);
    color: #fff;
}

/* Text made white for a solid badge would vanish on the light status colours */
.badge-success.text-white { color: var(--mk-paid) !important; }
.badge-warning.text-white { color: var(--mk-pending) !important; }
.badge-info.text-white { color: var(--mk-transit) !important; }
.badge-danger.text-white { color: var(--mk-cancelled) !important; }
.badge-secondary.text-white { color: var(--mk-muted) !important; }

/* Discount and other labels on product pictures are pills */
.aiz-card-box .absolute-top-left.rounded-4,
.aiz-card-box .absolute-top-left.rounded {
    border-radius: 999px !important;
}

.alert {
    border-radius: var(--mk-radius-card);
}

.alert-success {
    background-color: var(--mk-paid-bg);
    border-color: var(--mk-paid-bg);
    color: var(--mk-paid);
}

.alert-warning {
    background-color: var(--mk-pending-bg);
    border-color: var(--mk-pending-bg);
    color: var(--mk-pending);
}

.alert-info {
    background-color: var(--mk-transit-bg);
    border-color: var(--mk-transit-bg);
    color: var(--mk-transit);
}

.alert-danger {
    background-color: var(--mk-cancelled-bg);
    border-color: var(--mk-cancelled-bg);
    color: var(--mk-cancelled);
}

/* ---------- Product page: "Buy now" is the green button, "Add to cart" its outline ---------- */

.buy-now {
    background-color: var(--primary) !important;
    color: #fff !important;
    border-radius: var(--mk-radius-button) !important;
}

.buy-now:hover {
    background-color: var(--hov-primary) !important;
    opacity: 1 !important;
}

button.add-to-cart {
    background-color: #fff !important;
    color: var(--primary) !important;
    border: 1.5px solid var(--primary) !important;
    border-radius: var(--mk-radius-button) !important;
}

button.add-to-cart:hover {
    background-color: var(--mk-green-tint) !important;
    color: var(--hov-primary) !important;
}

.out-of-stock {
    background-color: var(--mk-border) !important;
    color: var(--mk-muted) !important;
    border-radius: var(--mk-radius-button) !important;
}

.discount-badge {
    background-color: var(--mk-orange) !important;
    color: var(--mk-ink) !important;
    border-radius: 999px !important;
}

/* ---------- Buyer's account: order history ---------- */

.deep-blue,
a.deep-blue {
    color: var(--primary);
}

.btn-on-the-way {
    color: var(--mk-muted);
    background-color: var(--mk-border);
    font-weight: 700;
}

.order-status-picked_up,
.order-status-on_the_way,
.order-status-at_pickup_point {
    color: var(--mk-transit);
    background-color: var(--mk-transit-bg);
}

.order-status-delivered {
    color: var(--mk-paid);
    background-color: var(--mk-paid-bg);
}

.order-status-cancelled,
.order-status-failed {
    color: var(--mk-cancelled);
    background-color: var(--mk-cancelled-bg);
}

.btn-paid {
    color: var(--mk-paid);
    background-color: var(--mk-paid-bg);
}

.btn-unpaid {
    color: var(--mk-pending);
    background-color: var(--mk-pending-bg);
}

.btn-options {
    background-color: var(--mk-muted);
}

.btn-orange {
    background-color: var(--mk-orange);
    border-color: var(--mk-orange);
}

.btn-orange.text-white {
    color: var(--mk-ink) !important;
}

.aiz-user-sidenav .aiz-side-nav-link.active,
.aiz-user-sidenav .aiz-side-nav-link:hover {
    background-color: var(--mk-green-tint);
}

/* ---------- Leftover hard-coded blues and violets ---------- */

.light-blue,
.see_more_toggle_btn,
.less_toggle_btn,
.see_more_toggle_btn:hover,
.less_toggle_btn:hover,
.text-violet {
    color: var(--primary);
}

.loader-fill,
.bg-dark-violet,
.violet-dropdown:hover,
.top-bar-text-white .dropdown-menu,
.bootstrap-select.custom-blue-dropdown .dropdown-menu li a:hover,
.bootstrap-select.custom-blue-dropdown .dropdown-menu li a:focus {
    background-color: var(--primary);
}

.border-violet {
    border-color: var(--primary) !important;
}

.border-right-violet {
    border-right-color: var(--primary) !important;
}

.recommended-ribbon {
    background: var(--mk-orange);
    color: var(--mk-ink);
}

.header-content-wrapper .search-input-group .form-control:hover {
    border: 1px solid var(--mk-input-border) !important;
}

.header-content-wrapper .search-input-group .form-control:focus {
    border-color: var(--mk-input-border);
}

/* ---------- Popups and orange panels ---------- */

.vote-btn {
    background: var(--primary);
    border-radius: var(--mk-radius-button);
    font-weight: 700;
    min-height: 48px;
}

.vote-btn:hover {
    background: var(--hov-primary);
    color: #fff;
}

/* Dark text on Soko orange, as on the design sheet's orange button */
.bg-secondary-base.text-white,
.bg-secondary-base .text-white,
.btn-secondary-base.text-white {
    color: var(--mk-ink) !important;
}

/* ---------- Home page ---------- */

.todays-deal.border-dark {
    border-color: var(--mk-orange) !important;
}

.view-more-slide-btn.bg-dark {
    background-color: var(--primary) !important;
}

/* ---------- Header ---------- */

.front-header-search .form-control,
.search-input-box .form-control {
    border-radius: var(--mk-radius-button) !important;
}

.nav-cart-box .badge,
.cart-count.badge {
    background-color: var(--mk-orange) !important;
    color: var(--mk-ink) !important;
}

/* ---------- Footer ---------- */

footer .hov-text-primary:hover,
.footer-widget .hov-text-primary:hover,
.aiz-footer .hov-text-primary:hover {
    color: var(--mk-orange) !important;
}

/* ---------- Pagination ---------- */

.pagination .page-item.active .page-link {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* ---------- Phone fields ---------- */

/* With one country open, the phone field shows its dialling code without a flag */
.one-country .iti__flag {
    display: none;
}

/* ---------- Page loading bar ---------- */

/* Shown at the top of the screen while the next page loads (it fades out by itself if nothing loads) */
#page-progress {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 2000;
    width: 0;
    height: 3px;
    background-color: var(--secondary-base, #F29A2E);
    opacity: 0;
    pointer-events: none;
}

#page-progress.loading {
    animation: page-progress 10s ease-out forwards;
}

@keyframes page-progress {
    0% { width: 0; opacity: 1; }
    10% { width: 45%; }
    60% { width: 85%; }
    95% { width: 90%; opacity: 1; }
    100% { width: 90%; opacity: 0; }
}

/* The panel that slides in from the right waits just off-screen: its shadow showed along the right edge */
#rightOffcanvas:not(.active) {
    box-shadow: none;
}

.min-w-0 {
    min-width: 0;
}

/* ================================================================
 * Phones and tablets (narrower than 992px): the app and the mobile site.
 * The desktop layout above that width is unchanged.
 * ================================================================ */

@media (max-width: 991.98px) {
    /* Room for the tab bar at the end of every page */
    .aiz-main-wrapper {
        padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    }

    /* ---------- Header: logo and icons, then the search field on its own row ---------- */

    .phone-header-row {
        flex-wrap: wrap;
        padding-bottom: 12px;
    }

    .phone-header-row > .col-auto > a {
        padding-top: 10px !important;
        padding-bottom: 8px !important;
    }

    .phone-header-row .front-header-search {
        position: static;
        order: 3;
        flex: 0 0 100%;
        height: auto;
        opacity: 1;
        transform: none;
        background: transparent !important;
        border-radius: 0;
    }

    .phone-header-row .front-header-search > .position-relative {
        padding: 0 !important;
    }

    .phone-header-row .search-input-box > input {
        height: 48px;
        padding-left: 44px;
        font-size: 16px;
        border-color: var(--mk-input-border) !important;
    }

    .phone-header-row .search-input-box > svg {
        top: 14px;
        left: 14px;
        right: auto;
    }

    /* Notices that sit at the bottom of the screen stay above the tab bar */
    .aiz-custom-alert.bottom-left,
    .aiz-custom-alert.bottom-right {
        bottom: calc(84px + env(safe-area-inset-bottom, 0px)) !important;
    }
}

.phone-header-icon {
    position: relative;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--mk-radius-button);
    color: var(--mk-ink);
}

.phone-header-icon:hover {
    color: var(--mk-green);
}

.phone-header-badge {
    position: absolute;
    top: 3px;
    right: 1px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: var(--mk-orange);
    color: var(--mk-ink);
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}

/* ---------- Tab bar ---------- */

.phone-tab-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1030;
    display: flex;
    padding: 4px 4px calc(8px + env(safe-area-inset-bottom, 0px));
    background: #fff;
    border-top: 1px solid var(--mk-border);
}

.phone-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 8px 0 4px;
    border-top: 3px solid transparent;
    color: var(--mk-muted);
    font-size: 12px;
    font-weight: 500;
    text-decoration: none !important;
}

.phone-tab:hover {
    color: var(--mk-ink);
}

.phone-tab.active {
    border-top-color: var(--mk-green);
    color: var(--mk-green);
    font-weight: 700;
}

/* ---------- Phone pages ---------- */

.phone-page {
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.text-muted-ink {
    color: var(--mk-muted);
    font-size: 14px;
}

/* ---------- Account page ---------- */

.account-head {
    display: flex;
    align-items: center;
    gap: 14px;
}

.account-avatar {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    border-radius: 28px;
    background: var(--mk-green-tint);
    color: var(--mk-green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--mk-font-heading);
    font-size: 22px;
    font-weight: 800;
}

.account-name {
    margin: 0 0 2px;
    font-size: 22px;
    font-weight: 800;
}

.account-list {
    border: 1px solid var(--mk-border);
    border-radius: var(--mk-radius-card);
    background: #fff;
    overflow: hidden;
}

.account-list a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    padding: 0 14px;
    border-bottom: 1px solid var(--mk-border);
    color: var(--mk-ink);
    font-size: 16px;
    text-decoration: none;
}

.account-list a:last-child {
    border-bottom: 0;
}

.account-list a:hover {
    background: var(--mk-bg);
    color: var(--mk-ink);
}

.account-list a > span:first-child {
    flex: 1;
}

.account-list svg {
    flex-shrink: 0;
    color: var(--mk-muted);
}

.account-extra {
    color: var(--mk-muted);
    font-size: 14px;
}

.account-section h2 {
    margin: 0 0 8px;
    font-family: inherit !important;
    font-size: 15px;
    font-weight: 700;
    color: var(--mk-muted);
}

.account-choices {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.account-choice {
    height: 48px;
    border: 1px solid var(--mk-input-border);
    border-radius: var(--mk-radius-button);
    background: #fff;
    color: var(--mk-ink);
    font-size: 16px;
    font-weight: 500;
}

.account-choice.active {
    border: 2px solid var(--mk-green);
    background: var(--mk-green-tint);
    color: var(--mk-green);
    font-weight: 700;
}

.account-sell {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-radius: var(--mk-radius-card);
    background: var(--mk-green);
    color: #fff;
}

.account-sell h2 {
    margin: 0 0 4px;
    font-size: 18px;
    color: #fff;
}

.account-sell p {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
    color: var(--mk-green-tint);
}

.account-sell .btn {
    color: var(--mk-ink);
    font-weight: 700;
    white-space: nowrap;
}

.account-sign-out {
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--mk-input-border);
    border-radius: var(--mk-radius-button);
    background: #fff;
    color: var(--mk-cancelled) !important;
    font-weight: 700;
}

/* ---------- Phone home ---------- */

.phone-home {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 16px;
    background: var(--mk-bg);
}

.phone-trust {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 16px;
    border-radius: var(--mk-radius-card);
    background: var(--mk-green-tint);
    color: var(--mk-green);
}

.phone-trust svg {
    flex-shrink: 0;
}

.phone-trust p {
    margin: 0;
    font-size: 15px;
    line-height: 1.45;
    color: var(--mk-ink);
}

.phone-trust strong {
    color: var(--mk-green);
}

.phone-offers {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
    border-radius: var(--mk-radius-card);
    background: var(--mk-green);
    color: #fff;
}

.phone-offers h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 800;
    line-height: 1.1;
    color: #fff;
}

.phone-offers p {
    margin: 0;
    font-size: 15px;
    line-height: 1.45;
    color: var(--mk-green-tint);
}

.phone-offers .btn {
    align-self: flex-start;
    margin-top: 6px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    padding: 0 22px;
    border-radius: var(--mk-radius-button);
    background: var(--mk-orange);
    color: var(--mk-ink);
    font-size: 16px;
    font-weight: 700;
}

.phone-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.phone-section-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}

.phone-section-head h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
}

.phone-section-head a {
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
}

.phone-departments {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px 8px;
}

.phone-departments a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--mk-ink);
    font-size: 12px;
    line-height: 1.25;
    text-align: center;
    text-decoration: none;
}

.phone-department-icon {
    width: 60px;
    height: 60px;
    border-radius: 30px;
    border: 1px solid var(--mk-border);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.phone-department-icon img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.phone-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

@media (min-width: 576px) {
    .phone-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.phone-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--mk-border);
    border-radius: var(--mk-radius-card);
    background: #fff;
    overflow: hidden;
    color: var(--mk-ink);
    text-decoration: none !important;
}

.phone-card:hover {
    color: var(--mk-ink);
    border-color: var(--mk-input-border);
}

.phone-card-photo {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    background: #EEF1EC;
}

.phone-card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.phone-card-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--mk-orange);
    color: var(--mk-ink);
    font-size: 12px;
    font-weight: 700;
}

.phone-card-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 10px 12px 12px;
}

.phone-card-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.7em;
    font-size: 14px;
    line-height: 1.35;
}

.phone-card-price {
    font-size: 17px;
    font-weight: 700;
}

.phone-card-note {
    font-size: 13px;
    color: var(--mk-muted);
}

.phone-card-delivery {
    font-size: 13px;
    font-weight: 500;
    color: var(--mk-muted);
}

.phone-card-delivery.good {
    color: var(--mk-green);
}

.phone-empty {
    padding: 24px 16px;
    border: 1px dashed var(--mk-input-border);
    border-radius: var(--mk-radius-card);
    background: #fff;
    text-align: center;
}

.phone-empty h2 {
    margin: 0 0 6px;
    font-size: 18px;
}

.phone-empty p {
    margin: 0;
    color: var(--mk-muted);
}

.phone-sell {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--mk-border);
    border-radius: var(--mk-radius-card);
    background: #fff;
}

.phone-sell-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 22px;
    background: var(--mk-green-tint);
    color: var(--mk-green);
    display: flex;
    align-items: center;
    justify-content: center;
}

.phone-sell strong,
.phone-sell span {
    display: block;
}

.phone-sell span {
    font-size: 14px;
    color: var(--mk-muted);
}

.phone-sell .btn {
    white-space: nowrap;
    font-weight: 700;
}

/* ---------- Phone categories: departments beside their sections ---------- */

.phone-categories {
    display: flex;
    min-height: calc(100vh - 210px);
    border-top: 1px solid var(--mk-border);
}

.phone-categories-rail {
    width: 112px;
    flex-shrink: 0;
    background: var(--mk-bg);
    border-right: 1px solid var(--mk-border);
}

.phone-categories-rail button {
    display: block;
    width: 100%;
    min-height: 60px;
    padding: 10px 12px;
    border: 0;
    border-bottom: 1px solid var(--mk-border);
    border-left: 3px solid transparent;
    background: transparent;
    color: var(--mk-muted);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
    text-align: left;
}

.phone-categories-rail button.active {
    border-left-color: var(--mk-green);
    background: #fff;
    color: var(--mk-green);
    font-weight: 700;
}

.phone-categories-panels {
    flex: 1;
    min-width: 0;
    background: #fff;
}

.phone-categories-panel {
    padding: 16px;
}

.phone-categories-head {
    margin-bottom: 14px;
}

.phone-categories-head h2 {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
}

.phone-categories-head a {
    font-size: 15px;
    font-weight: 500;
}

.phone-categories-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 10px;
}

@media (min-width: 576px) {
    .phone-categories-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.phone-categories-grid a {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--mk-ink);
    font-size: 13px;
    line-height: 1.3;
    text-decoration: none;
}

.phone-categories-tile {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 4 / 3;
    border: 1px solid var(--mk-border);
    border-radius: var(--mk-radius-card);
    background: #EEF1EC;
    overflow: hidden;
}

.phone-categories-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.phone-categories-tile img[src$=".svg"] {
    width: 40%;
    height: 40%;
    object-fit: contain;
}

/* ---------- Phone search results and category listings ---------- */

.phone-filter-btn {
    height: 40px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 14px;
    border: 1px solid var(--mk-input-border);
    border-radius: 999px;
    background: #fff;
    color: var(--mk-ink);
    font-size: 14px;
    font-weight: 500;
}

@media (max-width: 991.98px) {
    #products-row {
        margin: 0 -6px;
        border: 0 !important;
    }

    #products-row > .phone-results-item {
        padding: 0 6px;
        margin-bottom: 12px;
    }

    #products-row .phone-card {
        height: 100%;
    }
}

@media (max-width: 991.98px) {
    .phone-sort .bootstrap-select > .dropdown-toggle {
        height: 40px;
        display: flex;
        align-items: center;
        padding-top: 0;
        padding-bottom: 0;
        font-size: 14px;
        font-weight: 500;
    }

    .phone-sort .bootstrap-select > .dropdown-toggle .filter-option,
    .phone-sort .bootstrap-select > .dropdown-toggle .filter-option-inner,
    .phone-sort .bootstrap-select > .dropdown-toggle .filter-option-inner-inner {
        height: auto !important;
        line-height: 1.4;
        overflow: visible;
    }
}

/* ---------- Phone product page ---------- */

@media (max-width: 991.98px) {
    /* Add to cart and Buy now stay at the bottom of the screen, where the tab bar is elsewhere */
    .product-buy-bar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1030;
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
        background: #fff;
        border-top: 1px solid var(--mk-border);
    }

    .product-buy-bar > .d-flex {
        flex-wrap: nowrap !important;
        gap: 10px;
    }

    .product-buy-bar .buy-now,
    .product-buy-bar .add-to-cart,
    .product-buy-bar .out-of-stock {
        height: 52px;
        margin: 0 !important;
        padding: 0 12px !important;
        border-radius: var(--mk-radius-button) !important;
        font-size: 16px !important;
    }

    .product-buy-bar .add-to-cart {
        order: 1;
        border: 1px solid var(--mk-green) !important;
        background: #fff !important;
        color: var(--mk-green) !important;
    }

    .product-buy-bar .buy-now {
        order: 2;
        background: var(--mk-green) !important;
        color: #fff !important;
    }

    .product-buy-bar #add_to_cart_count {
        display: none;
    }

    /* The scrolling summary bar would sit on top of it */
    #smart-bar {
        display: none !important;
    }
}

/* ---------- Phone cart ---------- */

@media (max-width: 991.98px) {
    /* Checking out stays at the bottom of the screen, where the tab bar is elsewhere */
    .cart-checkout-bar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1030;
        margin: 0 !important;
        padding: 12px 16px calc(10px + env(safe-area-inset-bottom, 0px));
        background: #fff;
        border-top: 1px solid var(--mk-border);
    }

    .cart-checkout-bar .btn {
        height: 52px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: var(--mk-radius-button) !important;
        font-size: 16px !important;
    }

    .aiz-main-wrapper:has(.cart-checkout-bar) {
        padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px));
    }
}

/* ---------- Order progress in the buyer's order list ---------- */

.order-steps {
    list-style: none;
    margin: 16px 0 4px;
    padding: 0;
}

.order-steps li {
    position: relative;
    display: flex;
    gap: 12px;
    padding-bottom: 14px;
}

/* The line joining a step to the next */
.order-steps li:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 24px;
    bottom: 2px;
    width: 2px;
    background: var(--mk-border);
}

.order-steps li.done:not(:last-child)::before {
    background: var(--mk-green);
}

.order-steps li.current::before {
    background: var(--mk-border) !important;
}

.order-step-dot {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    border: 2px solid var(--mk-input-border);
    border-radius: 11px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.order-steps li.done .order-step-dot {
    border-color: var(--mk-green);
    background: var(--mk-green);
}

.order-step-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.order-step-label {
    font-size: 15px;
    font-weight: 500;
    color: var(--mk-muted);
}

.order-steps li.done .order-step-label {
    color: var(--mk-ink);
}

.order-steps li.current .order-step-label {
    font-weight: 700;
}

.order-step-note {
    font-size: 13px;
    color: var(--mk-muted);
}

.order-note {
    margin: 8px 0 0;
    padding: 12px 14px;
    border-radius: var(--mk-radius-button);
    background: var(--mk-bg);
    font-size: 14px;
    line-height: 1.45;
}

.order-note.good {
    background: var(--mk-green-tint);
}

.order-note.good strong {
    color: var(--mk-green);
}

.order-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 420px;
}

.order-actions .btn {
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--mk-radius-button);
    font-weight: 700;
}

/* ---------- Affiliates ---------- */

.aff-hero {
    background: var(--mk-green);
    color: #fff;
    border-radius: var(--mk-radius-card);
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.aff-hero h1 {
    font-family: var(--mk-font-heading);
    font-weight: 800;
    font-size: 30px;
    line-height: 1.1;
    color: #fff;
    margin: 0;
}

.aff-hero p {
    color: #D5E6DC;
    font-size: 16px;
    line-height: 1.5;
    margin: 0;
}

.aff-hero .btn-light {
    color: var(--mk-green);
    font-weight: 700;
}

.aff-pill {
    align-self: flex-start;
    background: var(--mk-orange);
    color: var(--mk-ink);
    font-size: 13px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
}

.aff-card {
    background: #fff;
    border: 1px solid var(--mk-border);
    border-radius: var(--mk-radius-card);
    padding: 16px;
}

.aff-title {
    font-family: var(--mk-font-heading);
    font-weight: 700;
    font-size: 20px;
    margin: 0 0 12px;
}

.aff-example {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.aff-example strong {
    display: block;
    font-family: var(--mk-font-heading);
    font-size: 20px;
}

.aff-example .aff-earn {
    color: var(--mk-green);
    font-size: 22px;
}

.aff-steps,
.aff-rules {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.aff-steps.aff-card,
.aff-rules.aff-card {
    padding: 16px;
}

.aff-steps li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.aff-step-num {
    flex: none;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: var(--mk-green-tint);
    color: var(--mk-green);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.aff-rules li {
    display: flex;
    gap: 10px;
    font-size: 15px;
    line-height: 1.4;
}

.aff-rules svg {
    flex: none;
    margin-top: 1px;
}

/* Choices shown as pills: a hidden checkbox or radio with its label */
.aff-choices {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.aff-choices input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.aff-choices label {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 14px;
    margin: 0;
    border: 1px solid var(--mk-input-border);
    border-radius: 999px;
    background: #fff;
    font-size: 15px;
    cursor: pointer;
}

.aff-choices input:checked + label {
    border: 2px solid var(--mk-green);
    background: var(--mk-green-tint);
    color: var(--mk-green);
    font-weight: 700;
}

.aff-choices input:focus-visible + label {
    outline: 3px solid var(--mk-orange);
    outline-offset: 1px;
}

.aff-choices.aff-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.aff-choices.aff-grid label {
    justify-content: center;
    border-radius: var(--mk-radius-button);
}

.aff-balance {
    background: var(--mk-green);
    color: #fff;
    border-radius: var(--mk-radius-card);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.aff-balance .aff-amount {
    font-family: var(--mk-font-heading);
    font-weight: 800;
    font-size: 32px;
    line-height: 1.1;
}

.aff-balance .aff-small {
    color: #D5E6DC;
    font-size: 13px;
}

.aff-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    text-align: center;
}

.aff-stats strong {
    display: block;
    font-size: 20px;
}

.aff-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.aff-list.aff-card {
    padding: 0 16px;
}

.aff-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid #EEF1ED;
}

.aff-list li:first-child {
    border-top: 0;
}

.aff-status {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
}

.aff-status.ready, .aff-status.paid { background: var(--mk-paid-bg); color: var(--mk-paid); }
.aff-status.pending, .aff-status.held, .aff-status.requested { background: var(--mk-pending-bg); color: var(--mk-pending); }
.aff-status.void, .aff-status.failed { background: var(--mk-cancelled-bg); color: var(--mk-cancelled); }

.aff-share-link {
    flex: 1;
    min-width: 0;
    height: 48px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    border: 1px solid var(--mk-input-border);
    border-radius: var(--mk-radius-button);
    background: var(--mk-bg);
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.aff-share-buttons {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.aff-share-buttons a,
.aff-share-buttons button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 0;
    border: 1px solid var(--mk-border);
    border-radius: var(--mk-radius-card);
    background: #fff;
    color: var(--mk-ink);
    font-size: 13px;
}

/* ---------- Push notifications in the app (partials/app_push) ---------- */

/* Asks once whether to turn notifications on, above the tab bar */
.push-ask {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(84px + env(safe-area-inset-bottom, 0px));
    z-index: 1040;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px 10px;
    background: #fff;
    border: 1px solid var(--mk-border);
    border-radius: var(--mk-radius-card);
    box-shadow: 0 6px 20px rgba(20, 33, 27, 0.18);
    color: var(--mk-ink);
}

.push-ask[hidden],
.push-toast[hidden] {
    display: none;
}

.push-ask__body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.push-ask__actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* A notification that arrives while the app is open */
.push-toast {
    position: fixed;
    left: 12px;
    right: 12px;
    top: calc(8px + env(safe-area-inset-top, 0px));
    z-index: 1060;
}

.push-toast a {
    display: block;
    padding: 12px 16px;
    background: var(--mk-ink);
    border-radius: var(--mk-radius-card);
    box-shadow: 0 6px 20px rgba(20, 33, 27, 0.25);
    color: #fff;
    font-size: 14px;
    line-height: 1.4;
}
