/**
 * Loja [cashback_loja] — experiência app mobile-first
 */

.cb-loja-app {
    --cb-text: #5c5349;
    --cb-text-dark: #2a2520;
    --cb-text-muted: #8a8178;
    --cb-primary: #1a7a7a;
    --cb-primary-dark: #145f5f;
    --cb-primary-soft: #e8f4f4;
    --cb-primary-ring: rgba(26, 122, 122, 0.22);
    --cb-link: #1a7a7a;
    --cb-accent: #c96864;
    --cb-accent-soft: #d57874;
    --cb-cream: #faf7f2;
    --cb-cream-deep: #ebe3d9;
    --cb-surface: #ffffff;
    --cb-white: #ffffff;
    --cb-success: #0f5132;
    --cb-error: #b42318;
    --cb-error-soft: #fef3f2;
    --cb-shadow: 0 8px 32px rgba(42, 37, 32, 0.07);
    --cb-shadow-lg: 0 -8px 40px rgba(42, 37, 32, 0.1);
    --cb-shadow-tactile: 0 2px 8px rgba(42, 37, 32, 0.06), 0 8px 24px rgba(42, 37, 32, 0.06);
    --cb-radius: 20px;
    --cb-radius-sm: 14px;
    --cb-radius-xs: 10px;
    --cb-header-h: 88px;
    --cb-bottom-bar-h: 88px;
    --cb-font-body: "DM Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
    --cb-font-heading: ivypresto-display, "Cormorant Garamond", Georgia, serif;
    --cb-app-max: 480px;
    --cb-touch: 52px;

    position: relative;
    max-width: var(--cb-app-max);
    margin: 0 auto;
    min-height: 100dvh;
    font-family: var(--cb-font-body);
    color: var(--cb-text);
    line-height: 1.5;
    background: var(--cb-cream);
}

.cb-loja-app.is-sheet-open {
    overflow: hidden;
}

/* Header fixo — nome da loja + status */
.cb-app-header {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: var(--cb-app-max);
    z-index: 30;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(239, 230, 222, 0.95);
    box-shadow: 0 4px 24px rgba(36, 28, 16, 0.04);
}

.cb-app-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    min-height: var(--cb-header-h);
    box-sizing: border-box;
}

.cb-app-header__brand {
    min-width: 0;
}

.cb-app-header__eyebrow {
    margin: 0 0 2px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--cb-primary);
}

.cb-app-header__title {
    margin: 0;
    font-family: var(--cb-font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.2;
    color: var(--cb-text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cb-app-header__status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    text-align: right;
    white-space: nowrap;
    flex-shrink: 0;
    background: var(--cb-cream);
    color: var(--cb-text);
    border: 1px solid var(--cb-cream-deep);
}

.cb-app-header__status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #9ca3af;
    flex-shrink: 0;
}

.cb-app-header__status--is-open {
    background: #ecfdf5;
    border-color: #bbf7d0;
    color: var(--cb-success);
}

.cb-app-header__status--is-open .cb-app-header__status-dot {
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

.cb-app-header__status--is-closed {
    background: #fff8e5;
    border-color: #fde68a;
    color: #92400e;
}

.cb-app-header__status--is-closed .cb-app-header__status-dot {
    background: #f59e0b;
}

/* Main catalog */
.cb-app-main {
    padding: calc(var(--cb-header-h) + 20px) 16px 28px;
    transition: padding-bottom 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.cb-loja-app.has-bottom-bar .cb-app-main {
    padding-bottom: calc(var(--cb-bottom-bar-h) + env(safe-area-inset-bottom, 0px) + 28px);
}

.cb-app-catalog__intro {
    margin-bottom: 20px;
}

.cb-app-catalog__title {
    margin: 0 0 6px;
    font-family: var(--cb-font-heading);
    font-size: 1.75rem;
    font-weight: 500;
    color: var(--cb-text-dark);
    line-height: 1.15;
}

.cb-app-catalog__lead {
    margin: 0;
    font-size: 15px;
    color: var(--cb-text);
}

/* Cards de produto — app de compra premium */
.cb-loja-produtos {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.cb-loja-produto,
.cb-product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--cb-white);
    border-radius: calc(var(--cb-radius) + 4px);
    border: 1px solid rgba(239, 230, 222, 0.9);
    box-shadow: 0 4px 20px rgba(36, 28, 16, 0.06);
    transition:
        transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.28s ease,
        border-color 0.28s ease;
}

@media (hover: hover) {
    .cb-product-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 16px 40px rgba(36, 28, 16, 0.1);
        border-color: rgba(213, 120, 116, 0.35);
    }

    .cb-product-card:hover .cb-product-card__img {
        transform: scale(1.04);
    }
}

.cb-product-card:active {
    transform: scale(0.985);
}

.cb-product-card:focus-within {
    outline: 2px solid var(--cb-accent);
    outline-offset: 3px;
}

.cb-product-card.is-in-cart {
    border-color: rgba(213, 120, 116, 0.45);
    box-shadow: 0 8px 28px rgba(213, 120, 116, 0.12);
}

.cb-product-card.is-adding {
    animation: cb-card-pop 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes cb-card-pop {
    0% { transform: scale(1); }
    40% { transform: scale(0.97); }
    100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .cb-product-card,
    .cb-product-card__img,
    .cb-product-card__add,
    .cb-qty-btn {
        transition: none;
        animation: none;
    }
}

.cb-loja-produto-media,
.cb-product-card__media {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: linear-gradient(145deg, var(--cb-cream) 0%, #f5ebe3 100%);
}

.cb-loja-produto-media--placeholder,
.cb-product-card__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 2.75rem;
}

.cb-loja-produto-img,
.cb-product-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.cb-product-card__badge {
    position: absolute;
    top: 12px;
    right: 12px;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--cb-link);
    color: var(--cb-white);
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 4px 12px rgba(63, 55, 33, 0.28);
    animation: cb-badge-in 0.25s ease;
}

@keyframes cb-badge-in {
    from { transform: scale(0.6); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.cb-loja-produto-body,
.cb-product-card__body {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 18px 18px 16px;
    flex: 1;
}

.cb-product-card__content {
    flex: 1;
    min-height: 4.5em;
    margin-bottom: 14px;
}

.cb-product-card__name,
.cb-loja-produto h3 {
    margin: 0 0 8px;
    font-family: var(--cb-font-heading);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--cb-text-dark);
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.cb-loja-produto-desc,
.cb-product-card__desc {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: rgba(106, 89, 82, 0.92);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(1.5em * 2);
}

.cb-product-card__desc--empty {
    visibility: hidden;
}

.cb-loja-produto-actions,
.cb-product-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid rgba(239, 230, 222, 0.85);
}

.cb-product-card__price-wrap {
    display: flex;
    align-items: baseline;
    gap: 4px;
    line-height: 1;
}

.cb-product-card__price-currency {
    font-size: 13px;
    font-weight: 700;
    color: var(--cb-accent);
    letter-spacing: 0.02em;
}

.cb-product-card__price-amount {
    font-family: var(--cb-font-heading);
    font-size: 1.65rem;
    font-weight: 600;
    color: var(--cb-text-dark);
    letter-spacing: -0.02em;
}

.cb-product-card__cta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
    min-height: 44px;
}

.cb-product-card__cta .cb-qty-stepper--card:not([hidden]) + .cb-product-card__add,
.cb-product-card__cta .cb-qty-stepper--card:not([hidden]) + .cb-loja-btn-add {
    display: none;
}

.cb-loja-btn-add,
.cb-product-card__add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 128px;
    min-height: 44px;
    padding: 0 20px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: linear-gradient(135deg, var(--cb-primary) 0%, var(--cb-primary-dark) 100%);
    color: var(--cb-white);
    border: none;
    border-radius: 999px;
    box-shadow: 0 6px 18px rgba(26, 122, 122, 0.28);
    cursor: pointer;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.cb-product-card__add-icon {
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
}

@media (hover: hover) {
    .cb-loja-btn-add:hover:not(:disabled),
    .cb-product-card__add:hover:not(:disabled) {
        background: linear-gradient(135deg, #208f8f 0%, var(--cb-primary) 100%);
        transform: translateY(-2px);
        box-shadow: 0 10px 24px rgba(26, 122, 122, 0.35);
    }
}

.cb-loja-btn-add:active:not(:disabled),
.cb-product-card__add:active:not(:disabled) {
    transform: translateY(0) scale(0.97);
    box-shadow: 0 4px 12px rgba(63, 55, 33, 0.2);
}

.cb-loja-btn-add:focus-visible,
.cb-product-card__add:focus-visible,
.cb-qty-btn:focus-visible {
    outline: 2px solid var(--cb-accent);
    outline-offset: 2px;
}

/* Stepper no card */
.cb-qty-stepper--product {
    gap: 2px;
    padding: 4px;
    min-height: 44px;
    background: #fff9f8;
    border: 2px solid rgba(213, 120, 116, 0.35);
    border-radius: 999px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.cb-qty-stepper--product .cb-qty-btn {
    width: 38px;
    height: 38px;
    background: var(--cb-white);
    color: var(--cb-link);
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

@media (hover: hover) {
    .cb-qty-stepper--product .cb-qty-btn:hover {
        background: var(--cb-cream);
        color: var(--cb-accent);
    }
}

.cb-qty-stepper--product .cb-qty-btn--plus {
    background: var(--cb-link);
    color: var(--cb-white);
}

@media (hover: hover) {
    .cb-qty-stepper--product .cb-qty-btn--plus:hover {
        background: var(--cb-accent);
        color: var(--cb-white);
    }
}

.cb-qty-stepper--product .cb-qty-value {
    min-width: 28px;
    font-size: 16px;
    font-weight: 800;
    color: var(--cb-text-dark);
}

.cb-qty-value.is-bump {
    animation: cb-qty-bump 0.28s ease;
}

@keyframes cb-qty-bump {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Painéis do checkout — menos “formulário longo” */
.cb-panel {
    background: var(--cb-white);
    border: 1px solid var(--cb-cream-deep);
    border-radius: var(--cb-radius);
    padding: 18px;
    box-shadow: 0 2px 12px rgba(36, 28, 16, 0.04);
}

#cb-loja-step-cart.cb-app-step.is-active {
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

#cb-loja-step-cart .cb-panel {
    padding: 0;
    overflow: hidden;
}

#cb-loja-step-cart .cb-loja-cart {
    padding: 4px 16px;
}

/* Cart drawer */
.cb-app-cart-backdrop {
    z-index: 42;
    background: rgba(36, 28, 16, 0.38);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.cb-app-cart-drawer {
    position: fixed;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%) translateY(100%);
    width: 100%;
    max-width: var(--cb-app-max);
    max-height: min(78dvh, 640px);
    z-index: 43;
    display: flex;
    flex-direction: column;
    background: var(--cb-white);
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -8px 40px rgba(36, 28, 16, 0.16);
    transition: transform 0.34s cubic-bezier(0.32, 0.72, 0, 1);
}

.cb-app-cart-drawer.is-open {
    transform: translateX(-50%) translateY(0);
}

.cb-app-cart-drawer__handle {
    width: 40px;
    height: 4px;
    margin: 10px auto 0;
    border-radius: 999px;
    background: var(--cb-cream-deep);
    flex-shrink: 0;
}

.cb-app-cart-drawer__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px 8px;
    border-bottom: 1px solid var(--cb-cream-deep);
}

.cb-app-cart-drawer__titles {
    min-width: 0;
}

.cb-app-cart-drawer__eyebrow {
    margin: 0 0 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--cb-accent);
}

.cb-app-cart-drawer__title {
    margin: 0;
    font-family: var(--cb-font-heading);
    font-size: 1.35rem;
    font-weight: 500;
    color: var(--cb-text-dark);
}

.cb-app-cart-drawer__close {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: var(--cb-cream);
    color: var(--cb-link);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cb-app-cart-drawer__close:focus-visible {
    outline: 2px solid var(--cb-accent);
    outline-offset: 2px;
}

.cb-app-cart-drawer__body {
    flex: 1;
    overflow-y: auto;
    padding: 0 16px;
    -webkit-overflow-scrolling: touch;
    background: var(--cb-cream);
}

.cb-app-cart-drawer__body .cb-loja-cart {
    background: var(--cb-white);
    border-radius: var(--cb-radius-sm);
    border: 1px solid var(--cb-cream-deep);
    padding: 0 16px;
    margin: 12px 0;
}

.cb-app-cart-drawer__footer {
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--cb-cream-deep);
    background: var(--cb-white);
    display: grid;
    gap: 12px;
}

.cb-app-cart-drawer__summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: var(--cb-text);
}

.cb-app-cart-drawer__summary strong {
    font-family: var(--cb-font-heading);
    font-size: 1.35rem;
    color: var(--cb-text-dark);
}

.cb-loja-app.is-cart-drawer-open.has-bottom-bar .cb-app-bottom-bar {
    z-index: 44;
}

.cb-loja-app.is-cart-drawer-open.has-bottom-bar .cb-app-cart-drawer__footer {
    padding-bottom: calc(var(--cb-bottom-bar-h) + env(safe-area-inset-bottom, 0px) + 12px);
}

@media (max-width: 767px) {
    .cb-loja-app.is-cart-drawer-open.has-bottom-bar .cb-app-cart-drawer__footer .cb-loja-btn-primary {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .cb-loja-app.is-cart-drawer-open.has-bottom-bar .cb-app-cart-drawer__footer {
        position: relative;
    }
}

body.cb-loja-scroll-lock {
    overflow: hidden;
    touch-action: none;
}

@media (min-width: 768px) {
    .cb-app-cart-drawer {
        bottom: 24px;
        max-height: min(72dvh, 560px);
        border-radius: 24px;
    }

    .cb-app-cart-drawer.is-open {
        transform: translateX(-50%) translateY(0);
    }
}

/* Qty stepper */
.cb-qty-stepper {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    background: var(--cb-cream);
    border-radius: 999px;
    border: 1px solid var(--cb-cream-deep);
}

.cb-qty-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: var(--cb-white);
    color: var(--cb-link);
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(36, 28, 16, 0.06);
}

.cb-qty-btn:active {
    transform: scale(0.96);
}

.cb-qty-value {
    min-width: 24px;
    text-align: center;
    font-weight: 700;
    font-size: 15px;
    color: var(--cb-text-dark);
}

/* Bottom bar — app de delivery */
.cb-app-bottom-bar {
    position: fixed;
    left: 50%;
    bottom: 0;
    z-index: 35;
    width: 100%;
    max-width: var(--cb-app-max);
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    box-sizing: border-box;
    pointer-events: none;
    visibility: hidden;
    opacity: 0;
    transform: translateX(-50%) translateY(calc(100% + 12px));
    transition:
        transform 0.38s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.28s ease,
        visibility 0.38s;
}

.cb-app-bottom-bar::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(251, 246, 242, 0) 0%, rgba(251, 246, 242, 0.88) 28%, var(--cb-cream) 100%);
    pointer-events: none;
    z-index: 0;
}

.cb-app-bottom-bar.is-visible {
    pointer-events: auto;
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.cb-app-bottom-bar__inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 10px 10px 14px;
    background: var(--cb-white);
    border: 1px solid rgba(239, 230, 222, 0.95);
    border-radius: 20px;
    box-shadow:
        0 4px 24px rgba(36, 28, 16, 0.08),
        0 12px 40px rgba(36, 28, 16, 0.12);
}

.cb-app-bottom-bar__summary {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.cb-app-bottom-bar__qty-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 12px;
    background: var(--cb-cream);
    border: 1px solid var(--cb-cream-deep);
    font-size: 15px;
    font-weight: 800;
    color: var(--cb-link);
    flex-shrink: 0;
}

.cb-app-bottom-bar__amounts {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.cb-app-bottom-bar__count {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--cb-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cb-app-bottom-bar__total {
    display: block;
    font-family: var(--cb-font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--cb-text-dark);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.cb-app-bottom-bar__cta {
    flex-shrink: 0;
    min-height: 48px;
    padding: 0 22px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cb-primary) 0%, var(--cb-primary-dark) 100%);
    color: var(--cb-white);
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(26, 122, 122, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

@media (hover: hover) {
    .cb-app-bottom-bar__cta:hover {
        background: linear-gradient(135deg, #208f8f 0%, var(--cb-primary) 100%);
        transform: translateY(-1px);
        box-shadow: 0 8px 22px rgba(26, 122, 122, 0.35);
    }
}

.cb-app-bottom-bar__cta:active {
    transform: scale(0.97);
}

.cb-app-bottom-bar__cta:focus-visible {
    outline: 2px solid var(--cb-accent);
    outline-offset: 2px;
}

.cb-loja-app.is-sheet-open.has-bottom-bar .cb-app-bottom-bar {
    z-index: 60;
}

.cb-loja-app.is-sheet-open.has-bottom-bar .cb-app-sheet__body {
    padding-bottom: calc(var(--cb-bottom-bar-h) + env(safe-area-inset-bottom, 0px) + 12px);
}

@media (max-width: 767px) {
    .cb-loja-app.is-sheet-open.has-bottom-bar .cb-app-sheet__footer {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cb-app-bottom-bar,
    .cb-app-main,
    .cb-app-progress__fill,
    .cb-app-step.is-entering,
    .cb-app-step.is-leaving {
        transition: none;
        animation: none;
    }
}

@media (min-width: 768px) {
    .cb-app-bottom-bar {
        bottom: 20px;
        padding-left: 20px;
        padding-right: 20px;
        max-width: min(var(--cb-app-max), calc(100% - 40px));
    }

    .cb-app-bottom-bar::before {
        display: none;
    }

    .cb-app-bottom-bar__inner {
        border-radius: 999px;
        padding: 8px 8px 8px 20px;
    }

    .cb-loja-app.has-bottom-bar .cb-app-main {
        padding-bottom: calc(var(--cb-bottom-bar-h) + 48px);
    }
}

/* Backdrop + sheet */
.cb-app-backdrop {
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(36, 28, 16, 0.45);
    opacity: 0;
    transition: opacity 0.25s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.cb-app-backdrop.is-visible {
    opacity: 1;
}

.cb-app-sheet {
    position: fixed;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%) translateY(100%);
    width: 100%;
    max-width: var(--cb-app-max);
    max-height: min(92dvh, 720px);
    z-index: 50;
    display: flex;
    flex-direction: column;
    background: var(--cb-white);
    border-radius: 24px 24px 0 0;
    box-shadow: var(--cb-shadow-lg);
    transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
}

.cb-app-sheet.is-open {
    transform: translateX(-50%) translateY(0);
}

.cb-app-sheet__handle {
    width: 40px;
    height: 4px;
    margin: 10px auto 0;
    border-radius: 999px;
    background: var(--cb-cream-deep);
}

.cb-app-sheet__header {
    display: grid;
    grid-template-columns: 40px 1fr 40px;
    align-items: center;
    gap: 8px;
    padding: 12px 16px 8px;
}

.cb-app-sheet__titles {
    text-align: center;
}

.cb-app-sheet__eyebrow {
    margin: 0;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--cb-accent-soft);
}

.cb-app-sheet__title {
    margin: 2px 0 0;
    font-family: var(--cb-font-heading);
    font-size: 1.35rem;
    font-weight: 500;
    color: var(--cb-text-dark);
}

.cb-app-sheet__nav,
.cb-app-sheet__close {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: var(--cb-cream);
    color: var(--cb-text-dark);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Progress bar checkout */
.cb-app-progress {
    padding: 0 16px 14px;
    background: var(--cb-white);
    border-bottom: 1px solid var(--cb-cream-deep);
}

.cb-app-progress__meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 10px;
}

.cb-app-progress__counter {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--cb-text-muted);
}

.cb-app-progress__name {
    font-size: 13px;
    font-weight: 700;
    color: var(--cb-primary);
}

.cb-app-progress__track {
    height: 4px;
    border-radius: 999px;
    background: var(--cb-cream-deep);
    overflow: hidden;
}

.cb-app-progress__fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--cb-primary) 0%, #208f8f 100%);
    transition: width 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Step transitions */
.cb-app-step {
    animation: none;
}

.cb-app-step.is-entering {
    animation: cb-step-in 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.cb-app-step.is-leaving {
    animation: cb-step-out 0.18s ease forwards;
}

@keyframes cb-step-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes cb-step-out {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-8px); }
}

.cb-app-sheet.is-result-mode .cb-app-progress {
    display: none;
}

.cb-app-sheet__body {
    flex: 1;
    overflow-y: auto;
    padding: 0 16px 16px;
    -webkit-overflow-scrolling: touch;
    background: var(--cb-cream);
}

.cb-app-step + .cb-app-step,
.cb-app-form .cb-app-step {
    margin-top: 12px;
}

.cb-app-step-lead {
    margin: 0 0 18px;
    font-size: 15px;
    color: var(--cb-text-muted);
    line-height: 1.45;
}

.cb-app-step-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: var(--cb-radius-sm);
    background: var(--cb-cream);
    font-size: 14px;
}

.cb-app-step-summary strong {
    font-family: var(--cb-font-heading);
    font-size: 1.25rem;
    color: var(--cb-text-dark);
}

.cb-app-sheet__footer {
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0));
    border-top: 1px solid var(--cb-cream-deep);
    background: var(--cb-white);
}

.cb-app-sheet.is-result-mode .cb-app-progress,
.cb-app-sheet.is-result-mode .cb-app-sheet__footer {
    display: none;
}

/* Cart list */
.cb-loja-cart {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cb-cart-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: start;
    padding: 16px 0;
    border-bottom: 1px solid var(--cb-cream-deep);
}

.cb-cart-item__main {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.cb-cart-item__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.cb-cart-item__unit {
    font-size: 13px;
    color: var(--cb-text);
}

.cb-cart-item__remove {
    border: none;
    background: transparent;
    padding: 6px 0;
    font-size: 12px;
    font-weight: 700;
    color: var(--cb-accent);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cb-cart-item__remove:focus-visible {
    outline: 2px solid var(--cb-accent);
    outline-offset: 2px;
}

.cb-cart-item:last-child {
    border-bottom: none;
}

.cb-cart-item__info strong {
    display: block;
    font-size: 15px;
    color: var(--cb-text-dark);
}

.cb-cart-item__info span {
    font-size: 13px;
    color: var(--cb-text);
}

.cb-cart-item__sub {
    font-weight: 700;
    font-size: 15px;
    color: var(--cb-link);
    white-space: nowrap;
    padding-top: 2px;
    text-align: right;
}

.cb-loja-cart-empty {
    padding: 32px 16px;
    text-align: center;
    color: #8c817a;
    font-size: 14px;
}

.cb-app-sheet__footer--dual {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 10px;
}

.cb-app-sheet__footer--dual #cb-loja-step-next,
.cb-app-sheet__footer--dual #cb-loja-submit {
    grid-column: 2;
}

.cb-app-sheet__footer--dual #cb-loja-step-back[hidden] + #cb-loja-step-next,
.cb-app-sheet__footer--dual #cb-loja-step-back[hidden] + #cb-loja-submit {
    grid-column: 1 / -1;
}

/* Selection cards */
.cb-section-label {
    display: block;
    margin: 0 0 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--cb-text-muted);
}

.cb-select-cards {
    margin: 0 0 16px;
    padding: 0;
    border: 0;
}

.cb-select-cards__grid {
    display: grid;
    gap: 10px;
}

.cb-select-cards__grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 420px) {
    .cb-select-cards__grid--3 {
        grid-template-columns: 1fr;
    }
}

.cb-select-card {
    cursor: pointer;
    display: block;
}

.cb-select-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.cb-select-card__surface {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: var(--cb-touch);
    padding: 12px 14px;
    background: var(--cb-surface);
    border: 2px solid var(--cb-cream-deep);
    border-radius: var(--cb-radius-sm);
    box-shadow: var(--cb-shadow-tactile);
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.cb-select-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--cb-primary-soft);
    color: var(--cb-primary);
    flex-shrink: 0;
}

.cb-select-card__icon--pix { color: #0d9488; background: #ecfdf5; }
.cb-select-card__icon--card { color: #2563eb; background: #eff6ff; }
.cb-select-card__icon--cash { color: #b45309; background: #fffbeb; }

.cb-select-card__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.cb-select-card__text strong {
    font-size: 14px;
    color: var(--cb-text-dark);
}

.cb-select-card__text small {
    font-size: 12px;
    color: var(--cb-text-muted);
    line-height: 1.35;
}

.cb-select-card input:checked + .cb-select-card__surface {
    border-color: var(--cb-primary);
    background: var(--cb-primary-soft);
    box-shadow: 0 0 0 3px var(--cb-primary-ring);
}

.cb-select-card input:focus-visible + .cb-select-card__surface {
    outline: 2px solid var(--cb-primary);
    outline-offset: 2px;
}

.cb-select-card:active .cb-select-card__surface {
    transform: scale(0.98);
}

.cb-select-card--compact .cb-select-card__surface {
    min-height: 48px;
    padding: 10px 12px;
}

.cb-select-card--compact .cb-select-card__icon {
    width: 36px;
    height: 36px;
}

/* Form fields — app components */
.cb-field-group {
    display: grid;
    gap: 14px;
}

.cb-field-group--row {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.cb-field {
    margin-bottom: 0;
}

.cb-field--conditional[hidden] {
    display: none !important;
}

.cb-field__label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--cb-text-dark);
}

.cb-field__input {
    width: 100%;
    min-height: var(--cb-touch);
    padding: 14px 16px;
    border: 2px solid var(--cb-cream-deep);
    border-radius: var(--cb-radius-sm);
    background: var(--cb-surface);
    box-sizing: border-box;
    font-family: var(--cb-font-body);
    font-size: 16px;
    color: var(--cb-text-dark);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    box-shadow: inset 0 1px 2px rgba(42, 37, 32, 0.03);
}

.cb-field__input::placeholder {
    color: var(--cb-text-muted);
}

.cb-field__input:focus {
    outline: none;
    border-color: var(--cb-primary);
    box-shadow: 0 0 0 4px var(--cb-primary-ring);
    background: var(--cb-white);
}

.cb-field.is-error .cb-field__input {
    border-color: var(--cb-error);
    background: var(--cb-error-soft);
}

.cb-field__error {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--cb-error);
}

.cb-field__error[hidden] {
    display: none;
}

.cb-field__error--block {
    margin-top: 10px;
}

.cb-field__hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--cb-text-muted);
}

.cb-info-card {
    padding: 14px 16px;
    margin-bottom: 14px;
    background: var(--cb-primary-soft);
    border: 1px solid rgba(26, 122, 122, 0.15);
    border-radius: var(--cb-radius-sm);
    font-weight: 600;
    color: var(--cb-primary-dark);
}

/* Review step */
.cb-review__block {
    padding: 14px 16px;
    margin-bottom: 10px;
    background: var(--cb-surface);
    border: 1px solid var(--cb-cream-deep);
    border-radius: var(--cb-radius-sm);
    box-shadow: var(--cb-shadow-tactile);
}

.cb-review__heading {
    margin: 0 0 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--cb-text-muted);
}

.cb-review__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cb-review__list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--cb-cream-deep);
    font-size: 14px;
}

.cb-review__list li:last-child {
    border-bottom: none;
}

.cb-review__line {
    margin: 0 0 4px;
    font-size: 14px;
    color: var(--cb-text-dark);
}

.cb-review__line--muted {
    color: var(--cb-text-muted);
    font-size: 13px;
}

.cb-review__total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 14px;
    padding: 16px;
    background: var(--cb-primary-soft);
    border-radius: var(--cb-radius-sm);
    font-size: 14px;
    font-weight: 600;
}

.cb-review__total strong {
    font-family: var(--cb-font-heading);
    font-size: 1.5rem;
    color: var(--cb-primary-dark);
}

.cb-consent-card {
    display: block;
    margin-top: 14px;
    cursor: pointer;
}

.cb-consent-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.cb-consent-card__surface {
    display: block;
    padding: 14px 16px;
    background: var(--cb-surface);
    border: 2px solid var(--cb-cream-deep);
    border-radius: var(--cb-radius-sm);
    transition: border-color 0.2s ease, background 0.2s ease;
}

.cb-consent-card input:checked + .cb-consent-card__surface {
    border-color: var(--cb-primary);
    background: var(--cb-primary-soft);
}

.cb-consent-card.is-error .cb-consent-card__surface {
    border-color: var(--cb-error);
    background: var(--cb-error-soft);
}

.cb-consent-card__text {
    font-size: 13px;
    line-height: 1.5;
    color: var(--cb-text-dark);
}

.cb-loja-retirada {
    margin: 0;
    padding: 0;
    border: 0;
}

/* Buttons */
.cb-loja-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: var(--cb-touch);
    padding: 14px 22px;
    border-radius: 999px;
    font-family: var(--cb-font-body);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    border: 2px solid var(--cb-primary);
    background: transparent;
    color: var(--cb-primary);
}

.cb-loja-btn:active:not(:disabled) {
    transform: scale(0.98);
}

.cb-loja-btn:disabled,
.cb-loja-btn.is-loading {
    opacity: 0.65;
    cursor: not-allowed;
}

.cb-loja-btn.is-loading {
    position: relative;
}

.cb-loja-btn-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--cb-primary) 0%, var(--cb-primary-dark) 100%);
    color: var(--cb-white);
    border-color: transparent;
    box-shadow: 0 6px 18px rgba(26, 122, 122, 0.25);
}

@media (hover: hover) {
    .cb-loja-btn-primary:hover:not(:disabled) {
        background: linear-gradient(135deg, #208f8f 0%, var(--cb-primary) 100%);
    }
}

.cb-loja-btn-ghost {
    width: 100%;
    background: var(--cb-surface);
    border-color: var(--cb-cream-deep);
    color: var(--cb-text-dark);
    box-shadow: none;
}

.cb-loja-pix textarea,
.cb-app-form textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--cb-cream-deep);
    border-radius: var(--cb-radius-sm);
    background: var(--cb-surface);
    box-sizing: border-box;
    font-family: var(--cb-font-body);
    font-size: 16px;
    color: var(--cb-text-dark);
}

.cb-loja-btn-outline {
    width: 100%;
}

.cb-loja-btn-whatsapp {
    background: #25d366;
    border-color: #25d366;
    color: #fff;
}

/* Result / payment */
.cb-app-result {
    padding-top: 8px;
}

.cb-loja-pix,
.cb-loja-encomenda-ok {
    text-align: center;
}

.cb-loja-pix-label {
    margin: 0 0 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--cb-accent);
}

.cb-loja-pix h4,
.cb-loja-encomenda-ok h4 {
    margin: 0 0 16px;
    font-family: var(--cb-font-heading);
    font-size: 1.5rem;
    color: var(--cb-text-dark);
}

.cb-loja-pix-qr-wrap img {
    max-width: 200px;
    border-radius: var(--cb-radius-sm);
    box-shadow: var(--cb-shadow);
}

.cb-loja-pix-status {
    margin: 0 0 14px;
    padding: 12px 14px;
    border-radius: var(--cb-radius-sm);
    font-size: 14px;
    font-weight: 600;
}

.cb-loja-pix-status.is-pending {
    background: #fff3cd;
    color: #664d03;
}

.cb-loja-pix-status.is-paid {
    background: #d1e7dd;
    color: var(--cb-success);
}

.cb-loja-pix-status.is-error {
    background: #f8d7da;
    color: #842029;
}

.cb-loja-retirada-resumo {
    margin: 12px 0;
    padding: 14px;
    border-radius: var(--cb-radius-sm);
    background: var(--cb-cream);
    text-align: left;
    font-size: 14px;
}

.cb-loja-retirada-resumo p {
    margin: 0 0 6px;
}

.cb-loja-msg {
    margin-top: 12px;
    padding: 12px 14px;
    background: #fff8e5;
    border: 1px solid #f0c33c;
    border-radius: var(--cb-radius-sm);
    font-size: 14px;
}

.cb-loja-notice,
.cb-pedidos-alert {
    margin: 12px 16px;
    padding: 14px 16px;
    background: #fff8e5;
    border: 1px solid #f0c33c;
    border-radius: var(--cb-radius-sm);
    text-align: center;
    font-size: 14px;
}

.cb-loja-empty {
    padding: 40px 20px;
    text-align: center;
    background: var(--cb-white);
    border-radius: var(--cb-radius);
    box-shadow: var(--cb-shadow);
}

.cb-loja-whatsapp-actions {
    margin-top: 16px;
}

.cb-loja-whatsapp-hint {
    margin: 10px 0 0;
    font-size: 12px;
    color: var(--cb-text);
}

.cb-loja-order-ref code {
    font-size: 12px;
}

.cb-loja-pix-hint {
    font-size: 13px;
    color: #8c817a;
    margin: 12px 0 0;
}

.cb-loja-encomenda-msg {
    margin: 0 0 12px;
    font-size: 15px;
}

.cb-loja-encomenda-email {
    font-size: 13px;
    color: var(--cb-success);
}

.cb-loja-paid-items ul {
    text-align: left;
    margin: 8px 0 0;
    padding-left: 18px;
}

/* Desktop — grid de cards + sheet modal */
@media (min-width: 640px) {
    .cb-loja-app {
        --cb-app-max: 720px;
        box-shadow: 0 0 0 1px var(--cb-cream-deep);
    }

    .cb-app-header__title {
        font-size: 1.45rem;
    }

    .cb-loja-produtos {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 22px;
    }
}

@media (min-width: 520px) {
    .cb-app-sheet {
        max-height: 85dvh;
        border-radius: 24px;
        bottom: 50%;
        transform: translateX(-50%) translateY(50%) scale(0.96);
        opacity: 0;
        pointer-events: none;
    }

    .cb-app-sheet.is-open {
        transform: translateX(-50%) translateY(50%) scale(1);
        opacity: 1;
        pointer-events: auto;
    }
}

@media (min-width: 900px) {
    .cb-loja-app {
        --cb-app-max: 960px;
    }

    .cb-loja-produtos {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .cb-app-main {
        padding-left: 24px;
        padding-right: 24px;
    }
}
