/* Whiznoch experience layer. Loaded after whiznoch-product-cards.css.
   Mobile search, hero actions, advertisement cards, promotional popup, avatars,
   product image preview, support buttons (live chat + WhatsApp) and the app splash.
   Scoped with body.app-layout-standard so it wins over the older stylesheets. */

body.app-layout-standard { overflow-x: clip; }

/* =====================================================================
   1. Header search: icon button + panel instead of a permanent second row
   ===================================================================== */
.header-search-toggle { display: none; }

@media (max-width: 1199px) {
    body.app-layout-standard .header .header-search-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: none;
        width: 44px;
        height: 44px;
        border: 1px solid var(--platform-line, rgba(128, 140, 165, .35));
        border-radius: 12px;
        background: transparent;
        color: inherit;
        cursor: pointer;
    }
    body.app-layout-standard .header .header-search { display: none; }
    body.app-layout-standard .header.search-open .header-search {
        display: flex;
        align-items: center;
        gap: 10px;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 40;
        width: auto;
        max-width: none;
        margin: 0;
        padding: 10px max(14px, env(safe-area-inset-right)) 12px max(14px, env(safe-area-inset-left));
        border-width: 0 0 1px;
        border-radius: 0;
        background: var(--platform-panel, #101728);
        box-shadow: 0 18px 30px rgba(0, 0, 0, .25);
    }
    body.app-layout-standard .header.search-open .header-search input {
        flex: 1 1 auto;
        width: 100%;
        min-width: 0;
        font-size: 16px; /* 16px stops iOS zooming into the field */
    }
    body.app-layout-standard .header.search-open .header-search .search-suggestions {
        left: max(14px, env(safe-area-inset-left));
        right: max(14px, env(safe-area-inset-right));
        width: auto;
        max-height: min(60dvh, 420px);
        overflow: auto;
    }
}

/* =====================================================================
   2. Home hero actions: two equal columns on small screens
   ===================================================================== */
body.app-layout-standard .premium-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
body.app-layout-standard .premium-hero-actions .btn { min-height: 50px; }

@media (max-width: 700px) {
    body.app-layout-standard .premium-hero-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
    body.app-layout-standard .premium-hero-actions .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        min-width: 0;
        min-height: 48px;
        padding: 10px 8px;
        text-align: center;
        font-size: clamp(.74rem, 3.3vw, .9rem);
        line-height: 1.2;
        white-space: normal;
        overflow-wrap: anywhere;
    }
}

/* =====================================================================
   3. Advertisement cards: any banner size, no stretching
      The full image is shown (object-fit: contain) over a blurred copy of itself,
      so odd sizes never leave empty bars and never get distorted.
   ===================================================================== */
body.app-layout-standard .platform-ad {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    align-items: stretch;
    gap: 0 !important;
    width: 100%;
    max-height: none !important;
    min-height: 0 !important;
    padding: 0 !important;
    overflow: hidden;
    border-radius: 18px;
}
body.app-layout-standard .platform-ad .platform-ad-media {
    order: 2;
    position: relative;
    margin: 0;
    min-width: 0;
    aspect-ratio: 16 / 7;
    max-height: 280px;
    overflow: hidden;
    background: rgba(128, 140, 165, .12);
}
body.app-layout-standard .platform-ad .platform-ad-backdrop {
    position: absolute;
    inset: -14px;
    width: calc(100% + 28px) !important;
    height: calc(100% + 28px) !important;
    object-fit: cover !important;
    filter: blur(22px) saturate(1.15);
    opacity: .55;
}
body.app-layout-standard .platform-ad .platform-ad-image {
    position: relative;
    z-index: 1;
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: contain !important;
    object-position: center;
}
body.app-layout-standard .platform-ad .platform-ad-copy {
    display: grid;
    align-content: center;
    justify-items: start;
    gap: 8px;
    min-width: 0;
    padding: clamp(16px, 3vw, 28px);
}
body.app-layout-standard .platform-ad .platform-ad-copy > span {
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .16em;
    opacity: .7;
}
body.app-layout-standard .platform-ad .platform-ad-copy h3 {
    margin: 0;
    font-size: clamp(1.05rem, 2.2vw, 1.4rem);
    line-height: 1.25;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
}
body.app-layout-standard .platform-ad .platform-ad-copy p {
    margin: 0;
    font-size: .92rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
}
body.app-layout-standard .platform-ad .platform-ad-copy a {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    margin-top: 4px;
    padding: 0 18px;
    border-radius: 12px;
    background: linear-gradient(135deg, #2f6df6, #6a1fe8);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
}
/* An ad without an image: single column */
body.app-layout-standard .platform-ad:not(:has(.platform-ad-media)) { grid-template-columns: minmax(0, 1fr); }

@media (max-width: 700px) {
    body.app-layout-standard .platform-ad { grid-template-columns: minmax(0, 1fr); border-radius: 16px; }
    body.app-layout-standard .platform-ad .platform-ad-media { order: 0; aspect-ratio: 16 / 9; max-height: 220px; }
    body.app-layout-standard .platform-ad .platform-ad-copy { padding: 14px; }
}

/* =====================================================================
   4. Promotional popup: the whole image fits, on every screen size
   ===================================================================== */
body.app-layout-standard .promo-media.has-image { position: relative; }
body.app-layout-standard .promo-media .promo-media-backdrop {
    position: absolute;
    inset: -16px;
    width: calc(100% + 32px) !important;
    height: calc(100% + 32px) !important;
    object-fit: cover !important;
    filter: blur(26px) saturate(1.2);
    opacity: .5;
}
body.app-layout-standard .promo-media.has-image img:not(.promo-media-backdrop) {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    max-height: min(70dvh, 640px);
    padding: 12px;
    object-fit: contain !important;
}
body.app-layout-standard .promo-close { width: 44px; height: 44px; }
@media (max-width: 700px) {
    body.app-layout-standard .promo-media.has-image { max-height: 38dvh; }
    body.app-layout-standard .promo-media.has-image img:not(.promo-media-backdrop) { max-height: 38dvh; }
}

/* =====================================================================
   5. Avatars: uploaded photos always fill their frame, centred (faces biased upward)
   ===================================================================== */
body.app-layout-standard :is(.profile-avatar, .app-avatar, .welcome-avatar, .ticket-message-avatar, .profile-photo-preview) {
    display: grid;
    place-items: center;
    flex: none;
    overflow: hidden;
    aspect-ratio: 1;
}
body.app-layout-standard :is(.profile-avatar, .app-avatar, .welcome-avatar, .ticket-message-avatar, .profile-photo-preview) img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
}

/* =====================================================================
   6. Product image preview (detail page gallery + lightbox)
   ===================================================================== */
body.app-layout-standard :is(.gallery-cover, .market-product-cover) {
    position: relative;
    overflow: hidden;
    background: rgba(128, 140, 165, .1);
}
body.app-layout-standard .gallery-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}
body.app-layout-standard .gallery-thumbnail img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}
body.app-layout-standard .gallery-lightbox img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: calc(100dvh - 130px);
    object-fit: contain;
}

/* =====================================================================
   7. Support buttons: WhatsApp + live chat (two clearly separate channels)
   ===================================================================== */
.support-dock {
    position: fixed;
    z-index: 9000;
    right: max(16px, env(safe-area-inset-right));
    bottom: calc(16px + env(safe-area-inset-bottom, 0px) + var(--support-dock-lift, 0px));
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    pointer-events: none;
}
.support-dock > * { pointer-events: auto; }
.support-dock[hidden] { display: none; }

.support-fab {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 52px;
    min-width: 52px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    color: #fff;
    font: 700 .86rem/1 inherit;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 10px 26px rgba(8, 12, 28, .35), 0 2px 6px rgba(8, 12, 28, .25);
    transition: transform .18s ease, box-shadow .18s ease;
}
.support-fab svg { width: 26px; height: 26px; flex: none; }
.support-fab-label {
    max-width: 0;
    overflow: hidden;
    white-space: nowrap;
    opacity: 0;
    transition: max-width .22s ease, opacity .18s ease, margin .22s ease;
}
.support-fab--whatsapp { height: 48px; min-width: 48px; background: #25d366; }
.support-fab--chat { background: linear-gradient(135deg, #2f6df6, #6a1fe8); }
.support-fab:focus-visible { outline: 3px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 6px rgba(47, 109, 246, .65); }
.support-fab[aria-busy="true"] svg { opacity: .3; }
.support-fab[aria-busy="true"]::after {
    content: "";
    position: absolute;
    width: 22px;
    height: 22px;
    border: 3px solid rgba(255, 255, 255, .35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: support-spin .8s linear infinite;
}
@keyframes support-spin { to { transform: rotate(360deg); } }
@keyframes support-pulse {
    0% { box-shadow: 0 10px 26px rgba(8, 12, 28, .35), 0 0 0 0 rgba(106, 31, 232, .55); }
    100% { box-shadow: 0 10px 26px rgba(8, 12, 28, .35), 0 0 0 18px rgba(106, 31, 232, 0); }
}
@media (prefers-reduced-motion: no-preference) {
    .support-fab--chat.is-attention { animation: support-pulse 2.2s ease-out 2; }
}
@media (hover: hover) and (min-width: 900px) {
    .support-fab:hover { transform: translateY(-2px); }
    .support-fab:hover, .support-fab:focus-visible { padding-left: 14px; }
    .support-fab:hover .support-fab-label,
    .support-fab:focus-visible .support-fab-label { max-width: 120px; opacity: 1; margin-right: 18px; margin-left: 10px; }
}
@media (prefers-reduced-motion: reduce) {
    .support-fab, .support-fab-label { transition: none; }
}
/* Stay clear of the app bottom navigation and the install prompt */
@media (max-width: 850px) {
    body:has(.mobile-bottom-nav) .support-dock { --support-dock-lift: var(--app-bottom-nav-height, 72px); }
}
body:has(.pwa-prompt.is-visible) .support-dock { --support-dock-lift: 120px; }
@media print { .support-dock { display: none; } }

/* =====================================================================
   8. Installed-app splash (cold start only) and navigation progress bar
   ===================================================================== */
.app-splash { display: none; }
html.show-splash .app-splash {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 16px;
    background: #0c1220;
    color: #f4f7ff;
    transition: opacity .35s ease, visibility .35s ease;
}
html[data-theme="light"].show-splash .app-splash { background: #f2f3f5; color: #0c1220; }
.app-splash img { width: 84px; height: 84px; border-radius: 22px; box-shadow: 0 18px 40px rgba(47, 109, 246, .35); }
.app-splash strong { font-size: 1.5rem; letter-spacing: .01em; }
.app-splash-bar { position: relative; width: 120px; height: 3px; overflow: hidden; border-radius: 99px; background: rgba(128, 140, 165, .3); }
.app-splash-bar::after {
    content: "";
    position: absolute;
    inset: 0 auto 0 -40%;
    width: 40%;
    border-radius: 99px;
    background: linear-gradient(90deg, #2f6df6, #6a1fe8);
    animation: app-splash-run 1.1s ease-in-out infinite;
}
@keyframes app-splash-run { to { left: 100%; } }
.app-splash.is-leaving { opacity: 0; visibility: hidden; }

.app-progress {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100001;
    width: 0;
    height: 3px;
    opacity: 0;
    background: linear-gradient(90deg, #2f6df6, #6a1fe8);
    transition: width .4s ease, opacity .2s ease;
}
.app-progress.is-active { width: 78%; opacity: 1; }
@media (prefers-reduced-motion: reduce) {
    .app-splash-bar::after { animation: none; left: 30%; }
    .app-progress, .app-splash { transition: none; }
}

/* =====================================================================
   9. Digital cart page and product-page purchase buttons
   ===================================================================== */
.market-purchase-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.market-purchase-actions .btn { flex: 1 1 150px; justify-content: center; text-align: center; }

.dcart { padding-block: clamp(20px, 4vw, 40px); }
.dcart-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.dcart-head h1 { margin: 4px 0 0; font-size: clamp(1.6rem, 4vw, 2.2rem); }
.dcart-count { font-size: .9rem; opacity: .7; }
.dcart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; }
.dcart-lines { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.dcart-line {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr) auto;
    gap: 16px;
    padding: 14px;
    border: 1px solid var(--platform-line, rgba(128, 140, 165, .3));
    border-radius: 16px;
    background: var(--platform-panel, rgba(128, 140, 165, .08));
}
.dcart-line.is-unavailable { opacity: .78; }
.dcart-thumb { display: block; width: 96px; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 10px; background: rgba(128, 140, 165, .12); }
.dcart-thumb picture, .dcart-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.dcart-info { min-width: 0; }
.dcart-info h2 { margin: 0 0 8px; font-size: 1.02rem; line-height: 1.3; overflow-wrap: anywhere; }
.dcart-info h2 a { color: inherit; text-decoration: none; }
.dcart-licence { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.dcart-licence button {
    min-height: 40px;
    padding: 6px 12px;
    border: 1px solid var(--platform-line, rgba(128, 140, 165, .4));
    border-radius: 10px;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: .85rem;
    cursor: pointer;
}
.dcart-licence button.is-active { border-color: #6a1fe8; background: rgba(106, 31, 232, .16); }
.dcart-licence button strong { margin-left: 6px; }
.dcart-licence-fixed { margin: 0; font-size: .9rem; opacity: .8; }
.dcart-note { margin: 8px 0 0; font-size: .82rem; line-height: 1.45; opacity: .85; }
.dcart-note.is-warning { color: #f5a524; opacity: 1; }
.dcart-side { display: grid; align-content: space-between; justify-items: end; gap: 12px; text-align: right; }
.dcart-price { font-size: 1.15rem; }
.dcart-actions { display: grid; gap: 8px; }
.dcart-actions form { margin: 0; }
.dcart-actions .btn { display: inline-flex; align-items: center; justify-content: center; width: 100%; min-height: 42px; }
.dcart-summary {
    position: sticky;
    top: 96px;
    padding: 18px;
    border: 1px solid var(--platform-line, rgba(128, 140, 165, .3));
    border-radius: 16px;
    background: var(--platform-panel, rgba(128, 140, 165, .08));
}
.dcart-summary h2 { margin: 0 0 12px; font-size: 1.05rem; }
.dcart-summary dl { display: grid; gap: 8px; margin: 0 0 12px; }
.dcart-summary dl div { display: flex; justify-content: space-between; gap: 12px; }
.dcart-summary dt, .dcart-summary dd { margin: 0; }
.dcart-total { padding-top: 10px; border-top: 1px solid var(--platform-line, rgba(128, 140, 165, .3)); font-size: 1.1rem; font-weight: 800; }
.dcart-fineprint { margin: 0 0 14px; font-size: .8rem; line-height: 1.5; opacity: .75; }
.dcart-summary .btn { display: inline-flex; align-items: center; justify-content: center; width: 100%; min-height: 42px; }
.dcart-empty {
    display: grid;
    justify-items: center;
    gap: 10px;
    padding: 56px 16px;
    text-align: center;
    border: 1px dashed var(--platform-line, rgba(128, 140, 165, .4));
    border-radius: 18px;
}
@media (max-width: 900px) {
    .dcart-layout { grid-template-columns: minmax(0, 1fr); }
    .dcart-summary { position: static; }
}
@media (max-width: 600px) {
    .dcart-line { grid-template-columns: 72px minmax(0, 1fr); gap: 12px; }
    .dcart-thumb { width: 72px; }
    .dcart-side { grid-column: 1 / -1; grid-template-columns: auto 1fr; align-items: center; justify-items: stretch; text-align: left; }
    .dcart-actions { grid-template-columns: 1fr 1fr; }
}

/* =====================================================================
   10. Search: panel submit button, "see all results" row, dashboard search
   ===================================================================== */
.header-search-submit { display: none; }
.header-search-toggle { text-decoration: none; color: inherit; }
.search-suggestions a.search-all { font-weight: 700; color: #8b9cff; }
@media (max-width: 1199px) {
    body.app-layout-standard .header.search-open .header-search .header-search-submit {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: none;
        min-height: 40px;
        padding: 0 16px;
        border: 0;
        border-radius: 10px;
        background: linear-gradient(135deg, #2f6df6, #6a1fe8);
        color: #fff;
        font-weight: 700;
        font-size: .85rem;
        cursor: pointer;
    }
}
.app-sidebar-search {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 6px 0 14px;
    padding: 0 6px 0 12px;
    border: 1px solid var(--platform-line, rgba(128, 140, 165, .3));
    border-radius: 12px;
    background: rgba(128, 140, 165, .08);
}
.app-sidebar-search input {
    flex: 1 1 auto;
    min-width: 0;
    height: 42px;
    border: 0;
    outline: 0;
    background: transparent;
    color: inherit;
    font-size: 16px;
}
.app-sidebar-search button {
    flex: none;
    min-height: 34px;
    padding: 0 12px;
    border: 0;
    border-radius: 9px;
    background: linear-gradient(135deg, #2f6df6, #6a1fe8);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}
.app-topbar-search { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.market-fx-warning { color: #f5a524; }

/* =====================================================================
   11. Dashboard: purchase history list, brand/avatar fallbacks, shared polish
   ===================================================================== */
.app-brand-fallback[hidden] { display: none; }
.app-avatar { position: relative; }
.app-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.app-avatar-initial { position: relative; z-index: 0; }

/* Orders: one horizontal row per purchase on wide screens, tidy cards on phones */
.orders-page .orders-table-card { padding: 0; overflow: hidden; }
.orders-head,
.orders-row {
    display: grid;
    grid-template-columns: 150px minmax(0, 2.4fr) 110px 110px 120px 130px 28px;
    align-items: center;
    column-gap: 16px;
}
.orders-head {
    padding: 12px 20px;
    border-bottom: 1px solid var(--platform-line, rgba(128, 140, 165, .25));
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    opacity: .7;
}
.orders-head .is-end { text-align: right; }
.orders-list { margin: 0; padding: 0; list-style: none; }
.orders-list > li + li { border-top: 1px solid var(--platform-line, rgba(128, 140, 165, .18)); }
.orders-row {
    min-height: 68px;
    padding: 12px 20px;
    color: inherit;
    text-decoration: none;
    transition: background-color .15s ease;
}
.orders-row:hover { background: rgba(128, 140, 165, .1); }
.orders-row:focus-visible { outline: 2px solid #6a1fe8; outline-offset: -2px; }
.orders-cell { min-width: 0; font-size: .9rem; }
.orders-ref { display: flex; align-items: center; gap: 10px; }
.orders-ref .order-icon { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; }
.orders-ref strong { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.orders-product { display: grid; gap: 2px; }
.orders-product strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.orders-product small { opacity: .65; }
.orders-date, .orders-method { opacity: .85; white-space: nowrap; }
.orders-total { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.orders-open { display: grid; place-items: center; opacity: .5; }
.orders-row:hover .orders-open { opacity: 1; }

/* Width tiers account for the dashboard sidebar (about 290px of the screen on wide viewports). */
@media (max-width: 1279px) {
    .orders-head, .orders-row { grid-template-columns: 130px minmax(0, 2fr) 100px 120px 120px 24px; column-gap: 14px; }
    .orders-head > :nth-child(4), .orders-method { display: none; }
}
@media (max-width: 1091px) {
    .orders-head { display: none; }
    .orders-row {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas: "product total" "ref status" "date status";
        row-gap: 6px;
        padding: 14px 16px;
    }
    .orders-product { grid-area: product; }
    .orders-product strong { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
    .orders-total { grid-area: total; align-self: start; }
    .orders-ref { grid-area: ref; }
    .orders-ref .order-icon { display: none; }
    .orders-ref strong { font-size: .78rem; opacity: .7; }
    .orders-date { grid-area: date; font-size: .78rem; opacity: .7; }
    .orders-status { grid-area: status; align-self: end; justify-self: end; }
    .orders-open { display: none; }
}

/* Shared polish for dashboard list rows: same hover, focus and number styling everywhere */
.customer-page :is(.customer-order, .ticket-row, .app-notice-row, .funding-row, .website-card) { transition: background-color .15s ease, border-color .15s ease, transform .15s ease; }
.customer-page :is(.customer-order, .ticket-row, .app-notice-row, .funding-row):hover { background: rgba(128, 140, 165, .1); }
.customer-page :is(a, button, summary):focus-visible { outline: 2px solid #6a1fe8; outline-offset: 2px; }
.customer-page :is(.customer-order-total, .customer-metric strong, .metric-label + strong, .customer-balance-row strong) { font-variant-numeric: tabular-nums; }
.customer-page :is(.customer-order-main strong, .ticket-row-main strong, .notice-title strong) { overflow-wrap: anywhere; }
.customer-page { min-width: 0; }
.customer-page img { max-width: 100%; }
.customer-empty { text-align: center; }
@media (prefers-reduced-motion: reduce) {
    .orders-row, .customer-page :is(.customer-order, .ticket-row, .app-notice-row, .funding-row, .website-card) { transition: none; }
}

/* =====================================================================
   12. Digital cart checkout
   ===================================================================== */
.dcheck-alert { margin: 0 0 16px; padding: 12px 14px; border-radius: 12px; font-size: .9rem; line-height: 1.5; border: 1px solid rgba(128, 140, 165, .3); }
.dcheck-alert p { margin: 0 0 6px; }
.dcheck-alert p:last-child { margin-bottom: 0; }
.dcheck-alert.is-error { border-color: rgba(239, 68, 68, .55); background: rgba(239, 68, 68, .1); }
.dcheck-alert.is-warning { border-color: rgba(245, 165, 36, .55); background: rgba(245, 165, 36, .1); }
.dcheck-alert .btn { margin-top: 10px; }
.dcheck-line { grid-template-columns: minmax(0, 1fr) auto; }
.dcheck-discount dd { color: #34d399; font-weight: 700; }
.dcheck-wallet { padding-top: 12px; border-top: 1px solid var(--platform-line, rgba(128, 140, 165, .3)); }
.dcheck-form { display: grid; gap: 12px; margin: 14px 0; }
.dcheck-confirm { display: flex; align-items: flex-start; gap: 10px; font-size: .85rem; line-height: 1.4; cursor: pointer; }
.dcheck-confirm input { flex: none; width: 20px; height: 20px; margin-top: 1px; }
.dcheck-form .btn { display: inline-flex; align-items: center; justify-content: center; width: 100%; min-height: 46px; }
.dcheck-form .btn[disabled] { opacity: .55; cursor: not-allowed; }

/* =====================================================================
   13. Phone purchase bar (everyone) and dashboard mode
   ===================================================================== */
@media (max-width: 850px) {
    body.app-layout-standard .mobile-product-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        align-items: center;
    }
    body.app-layout-standard .mobile-product-actions > div { display: none; }
    body.app-layout-standard .mobile-product-actions .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        min-height: 48px;
        padding-inline: 10px;
        font-size: .9rem;
        white-space: nowrap;
    }
    /* Keep the page content clear of the floating bar */
    body.app-layout-standard:has(.mobile-product-actions) main { padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px)); }
    /* The WhatsApp / chat buttons sit above the bar instead of covering it */
    body:has(.mobile-product-actions) .support-dock { --support-dock-lift: 96px; }
    body.is-dashboard:has(.mobile-product-actions) .support-dock { --support-dock-lift: calc(var(--app-bottom-nav-height, 72px) + 96px); }
}

/* Dashboard top bar: cart with count */
.app-topbar-cart { position: relative; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.app-cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #6a1fe8;
    color: #fff;
    font-size: .68rem;
    line-height: 1;
}
.app-side-links a b { margin-left: auto; min-width: 20px; padding: 2px 6px; border-radius: 999px; background: rgba(106, 31, 232, .35); font-size: .7rem; text-align: center; }
