:root {
    --af-bg: #0ea8a8;
    --af-text: #102a27;
    --af-muted: #60736f;
    --af-card: rgba(255, 255, 255, .94);
    --af-line: rgba(16, 42, 39, .10);
    --af-primary: #0b8f7a;
    --af-primary-dark: #075f55;
    --af-soft: #e6f7f2;
    --af-danger: #b42318;
    --af-shadow: 0 22px 70px rgba(6, 60, 51, .18);
    --af-radius-xl: 28px;
    --af-radius-md: 18px;
}

html,
body.af-body {
    margin: 0;
    min-height: 100%;
    background: var(--af-bg) !important;
}

body.af-body {
    overflow-x: hidden;
}

.af-app-shell,
.af-app-shell * {
    box-sizing: border-box;
}

.af-app-shell {
    min-height: 100vh;
    padding: max(18px, env(safe-area-inset-top)) 16px calc(104px + env(safe-area-inset-bottom));
    color: var(--af-text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 50% -10%, rgba(255, 255, 255, .34), transparent 36%),
        linear-gradient(180deg, #0ea8a8 0%, #0ea8a8 48%, #0c9999 100%);
}

.af-screen {
    width: min(100%, 620px);
    margin: 0 auto;
}

.af-brand-header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2px 0 18px;
}

.af-brand-logo {
    display: block;
    width: min(72vw, 240px);
    height: auto;
    border-radius: 18px;
    box-shadow: 0 18px 46px rgba(0, 0, 0, .16);
}

.af-hero {
    padding: 8px 2px 18px;
}

.af-status-pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 13px;
    border: 1px solid rgba(255, 255, 255, .46);
    border-radius: 999px;
    background: rgba(255, 255, 255, .72);
    color: var(--af-primary-dark);
    font-size: 13px;
    font-weight: 800;
    backdrop-filter: blur(12px);
}

.af-hero h1 {
    margin: 18px 0 8px;
    font-size: clamp(42px, 13vw, 66px);
    line-height: .95;
    letter-spacing: -0.06em;
    color: #ffffff;
    text-shadow: 0 12px 34px rgba(0, 0, 0, .16);
}

.af-hero p {
    max-width: 500px;
    margin: 0;
    color: rgba(255, 255, 255, .88);
    font-size: 17px;
    line-height: 1.42;
}

.af-search-panel,
.af-cart-card,
.af-checkout-card {
    background: var(--af-card);
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: var(--af-radius-xl);
    padding: 16px;
    box-shadow: var(--af-shadow);
    backdrop-filter: blur(16px);
}

.af-cart-card,
.af-checkout-card {
    margin-top: 14px;
}

.af-search-wrap {
    position: relative;
}

.af-search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--af-primary);
    font-size: 24px;
    font-weight: 900;
}

.af-app-shell input {
    width: 100%;
    min-height: 58px;
    border: 1px solid var(--af-line);
    border-radius: var(--af-radius-md);
    padding: 0 16px;
    color: var(--af-text);
    background: rgba(255, 255, 255, .96);
    font: inherit;
    font-size: 16px;
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.af-search-wrap input {
    padding-left: 48px;
    font-size: 18px;
    font-weight: 700;
}

.af-app-shell input:focus {
    border-color: rgba(11, 143, 122, .55);
    box-shadow: 0 0 0 4px rgba(11, 143, 122, .12);
}

.af-help {
    margin: 10px 4px 0;
    color: var(--af-muted);
    font-size: 13px;
}

.af-resultados {
    display: none;
    margin-top: 10px;
    overflow: hidden;
    border: 1px solid var(--af-line);
    border-radius: 20px;
    background: #fff;
}

.af-resultado-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 54px;
    padding: 13px 14px;
    border-bottom: 1px solid rgba(16, 42, 39, .07);
    cursor: pointer;
    font-weight: 750;
}

.af-resultado-item:last-child {
    border-bottom: none;
}

.af-resultado-item::after {
    content: "+";
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    border-radius: 999px;
    background: var(--af-soft);
    color: var(--af-primary-dark);
    font-size: 18px;
}

.af-resultado-item:active {
    transform: scale(.99);
}

.af-cart-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.af-mini-label {
    display: block;
    color: var(--af-primary-dark);
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.af-cart-card h2,
.af-checkout-card h2 {
    margin: 4px 0 12px;
    color: var(--af-text);
    font-size: 22px;
    line-height: 1.1;
    letter-spacing: -.03em;
}

.af-link-button {
    border: none;
    background: transparent;
    color: var(--af-primary-dark);
    font: inherit;
    font-size: 14px;
    font-weight: 850;
    cursor: pointer;
}

.af-productos-elegidos {
    display: grid;
    gap: 8px;
}

.af-vacio {
    margin: 0;
    color: var(--af-muted);
    font-size: 15px;
}

.af-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 12px 12px 14px;
    border: 1px solid rgba(11, 143, 122, .16);
    border-radius: 18px;
    background: var(--af-soft);
    color: var(--af-text);
    font-size: 15px;
    font-weight: 760;
}

.af-chip button {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 999px;
    background: rgba(255,255,255,.8);
    color: var(--af-primary-dark);
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
}

.af-field {
    margin-top: 14px;
}

.af-field label {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 7px;
    color: var(--af-text);
    font-size: 14px;
    font-weight: 850;
}

.af-field label span {
    color: var(--af-muted);
    font-weight: 650;
}

.af-error {
    min-height: 20px;
    margin: 12px 2px 0;
    color: var(--af-danger);
    font-size: 14px;
    font-weight: 750;
}

.af-sticky-bar {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: min(calc(100% - 24px), 620px);
    margin: 0 auto;
    padding: 12px;
    border: 1px solid rgba(255,255,255,.7);
    border-radius: 24px;
    background: rgba(16, 42, 39, .90);
    color: #fff;
    box-shadow: 0 22px 50px rgba(7, 45, 40, .28);
    backdrop-filter: blur(18px);
}

.af-sticky-bar strong,
.af-sticky-bar span {
    display: block;
}

.af-sticky-bar strong {
    font-size: 14px;
}

.af-sticky-bar span {
    margin-top: 2px;
    color: rgba(255,255,255,.68);
    font-size: 12px;
}

#af-enviar {
    min-height: 48px;
    border: none;
    border-radius: 16px;
    padding: 0 18px;
    background: #18c59f;
    color: #062d28;
    font: inherit;
    font-size: 15px;
    font-weight: 950;
    cursor: pointer;
    white-space: nowrap;
}

#af-enviar:active {
    transform: translateY(1px) scale(.99);
}

#splash-screen {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
    background: #0ea8a8;
    transition: opacity .55s ease, visibility .55s ease;
}

#splash-screen.af-splash-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.splash-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
    width: min(100%, 420px);
    animation: afSplashLogoIn .75s cubic-bezier(.2, .9, .25, 1.15) both;
}

.splash-logo-img {
    display: block;
    width: min(78vw, 330px);
    height: auto;
    border-radius: 20px;
    box-shadow: 0 26px 80px rgba(0, 0, 0, .22);
}

#splash-screen p {
    max-width: 320px;
    margin: 0;
    color: #ffffff;
    text-align: center;
    font-size: clamp(20px, 5vw, 28px);
    font-weight: 850;
    line-height: 1.12;
    letter-spacing: -.035em;
    text-shadow: 0 8px 24px rgba(0, 0, 0, .16);
}

.splash-loader {
    position: relative;
    width: min(62vw, 230px);
    height: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, .24);
}

.splash-loader span {
    display: block;
    width: 42%;
    height: 100%;
    border-radius: inherit;
    background: #ffffff;
    box-shadow: 0 0 22px rgba(255, 255, 255, .70);
    animation: afSplashLoader 1.1s ease-in-out infinite;
}

@keyframes afSplashLogoIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(.94);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes afSplashLoader {
    0% {
        transform: translateX(-110%);
    }
    100% {
        transform: translateX(250%);
    }
}

@media (min-width: 760px) {
    .af-app-shell {
        padding-top: 34px;
    }

    .af-screen {
        display: grid;
        grid-template-columns: 1.05fr .95fr;
        gap: 16px;
        width: min(100%, 1040px);
        align-items: start;
    }

    .af-brand-header {
        grid-column: 1 / -1;
        padding-bottom: 10px;
    }

    .af-brand-logo {
        width: 260px;
    }

    .af-hero {
        grid-column: 1 / -1;
        padding-bottom: 4px;
    }

    .af-search-panel {
        position: sticky;
        top: 24px;
    }

    .af-cart-card,
    .af-checkout-card {
        margin-top: 0;
    }

    .af-checkout-card {
        grid-column: 2;
    }

    .af-sticky-bar {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }

    .splash-logo-img {
        width: 340px;
    }
}
