/* TOKENS DE DESIGN & VARIÁVEIS */
:root {
    --bg-outside: #F2F2F7; /* Cor de fundo nativa do navegador/desktop */
    --bg-app: #FAFAFA; /* Off-White Premium para o app shell */
    --surface: #FFFFFF; /* Branco puro para cards */
    
    /* Cores Primárias (Marrom Chocolate Intenso) */
    --primary: #251B19; 
    --primary-hover: #3A2A28;
    --primary-light: #EAE6E5;
    
    /* Textos */
    --text-strong: #2D2A2E;
    --text-body: #666666;
    --text-muted: #999999;
    
    /* Utilitários estruturais */
    --border-light: #F0F0F0;
    --radius-card: 22px;
    --radius-pill: 999px;

    /* Controle tipográfico */
    --font-brand: 'Quicksand', sans-serif;
    --font-ui: 'Inter', sans-serif;
}

/* RESET DEFENSIVO ABSOLUTO */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

i[class^="ph"], i[class*=" ph"] {
    color: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

button, input, select {
    font-family: inherit;
    outline: none !important;
    -webkit-appearance: none;
    border: none;
    background: transparent;
}

body {
    background-color: var(--bg-outside);
    display: flex;
    justify-content: center;
    min-height: 100dvh;
    overflow: hidden; /* Isolamento arquitetural de scroll */
    font-family: var(--font-ui);
    color: var(--text-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* APP SHELL: Emula o form-factor de um celular e limita quebras ultra-wide */
.app-shell {
    width: 100%;
    max-width: 430px;
    background-color: var(--bg-app);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100dvh;
    box-shadow: 0 0 40px rgba(0,0,0,0.06);
    overflow: hidden;
}

/* ============================================================
   VIEW SYSTEM (Spatial Navigation) 
   ============================================================ */
.view {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
    background: var(--bg-app);
    z-index: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: none;
    scrollbar-width: none; 
}
.view::-webkit-scrollbar { display: none; }

.view.active { display: flex; z-index: 2; }

.view-push-enter, .view-push-exit, .view-pop-enter, .view-pop-exit {
    display: flex;
    animation-duration: 0.4s;
    animation-timing-function: cubic-bezier(0.28, 0.84, 0.22, 1);
    animation-fill-mode: forwards;
}

/* PUSH: Nova view entra da DIREITA */
.view-push-enter { animation-name: pushEnter; z-index: 10; }
@keyframes pushEnter { from { transform: translateX(100%); } to { transform: translateX(0); } }

/* PUSH: View atual sai para a ESQUERDA (fundo, paralaxe) */
.view-push-exit { animation-name: pushExit; z-index: 5; }
@keyframes pushExit { from { transform: translateX(0); opacity: 1; } to { transform: translateX(-25%); opacity: 0.8; } }

/* POP: Nova view (anterior) entra da ESQUERDA */
.view-pop-enter { animation-name: popEnter; z-index: 5; }
@keyframes popEnter { from { transform: translateX(-25%); opacity: 0.8; } to { transform: translateX(0); opacity: 1; } }

/* POP: View atual sai para a DIREITA */
.view-pop-exit { animation-name: popExit; z-index: 10; }
@keyframes popExit { from { transform: translateX(0); } to { transform: translateX(100%); } }


/* HEADER PREMIUM E COMPACTO */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: rgba(250, 250, 250, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 50;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    border-bottom: 1px solid rgba(0,0,0,0.02);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-strong);
    background: #FFFFFF;
    padding: 6px 10px;
    border-radius: var(--radius-pill);
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.15s;
}
.header-left:active { transform: scale(0.96); }

.header-left i { color: var(--primary); font-size: 16px; }

.brand-title {
    font-family: var(--font-brand);
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.header-center {
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.cart-btn {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    color: var(--text-strong);
    font-size: 20px;
}

#btn-cart {
    width: 0;
    padding: 0;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.5);
    border: none;
    pointer-events: none;
    
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                margin 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.4s ease-out,
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

#btn-cart.is-active {
    width: 44px; 
    margin-left: 12px;
    padding: 10px; 
    opacity: 1;
    visibility: visible;
    transform: scale(1);
    pointer-events: auto;
}

#btn-cart.is-active:active { transform: scale(0.92); }

.cart-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background-color: var(--text-strong);
    color: #FFF;
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-pill);
    border: 2px solid #FFFFFF;
    transform: scale(0);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* DOMÍNIO DA VITRINE */
#view-vitrine {
    padding: 24px 16px;
    padding-top: 86px; /* offset para o header fixed */
    padding-bottom: 120px; /* Margem de fuga para scroll natural */
}

/* PROMO SLIDER SECTION */
.promo-section {
    margin-top: 24px;
    margin-bottom: 24px;
}
.promo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.promo-header h3 {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.2px;
    color: var(--text-strong);
    font-family: var(--font-brand);
    display: flex;
    align-items: center;
}
.promo-header a {
    font-size: 13px;
    font-weight: 600;
    color: #9C8984;
    text-decoration: none;
}

.promo-slider {
    position: relative;
    display: grid;
    margin: 10px 0;
    /* Adding some bottom padding below the slider container to ensure shadows render beautifully */
    padding-bottom: 12px;
}

.promo-card {
    background: #FDF4F3; /* Rosê super clarinho e premium - Contraste suave */
    border-radius: 24px;
    position: relative;
    display: flex;
    overflow: hidden;
    min-height: 160px;
    box-shadow: 0 12px 28px rgba(37, 27, 25, 0.08); /* Sombra mais fluida e dissipada */
    grid-area: 1 / 1;
    width: 100%;
    opacity: 0;
    pointer-events: none;
    transform: scale(0.95);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1;
}

.promo-card.active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
    z-index: 2;
}

.promo-card-content {
    flex: 1;
    padding: 20px 12px 20px 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    z-index: 2;
    max-width: 54%;
}

.promo-badge {
    background: #FFF;
    color: var(--text-strong);
    font-size: 10px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    margin-bottom: 10px;
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    flex-shrink: 0;
}

.promo-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--text-strong);
    margin-bottom: 4px;
    line-height: 1.15;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
}

.promo-discount {
    font-size: 13px;
    color: var(--text-strong);
    margin-bottom: 12px;
    display: flex;
    align-items: baseline;
    gap: 4px;
    flex-shrink: 0;
}

.promo-discount-val {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1;
}

.promo-discount-pct {
    font-size: 14px;
    color: #A08C86;
    margin-left: 2px;
}

.btn-promo {
    background: var(--primary);
    color: #FFF;
    border: none;
    border-radius: var(--radius-pill);
    padding: 7px 16px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s, background-color 0.2s;
    flex-shrink: 0;
}
.btn-promo:active {
    transform: scale(0.95);
    background-color: var(--primary-hover);
}

.promo-card-image {
    position: absolute;
    top: 0; bottom: 0; right: 0;
    width: 48%;
    z-index: 1;
    clip-path: ellipse(90% 115% at 100% 50%);
}

.promo-card-image img {
    width: 100%; height: 100%; object-fit: cover;
}

/* DAR/BROWN CAROUSEL CARD */
.promo-dark {
    background: #251B19;
}
.promo-dark .promo-title {
    color: #FFFFFF;
}
.badge-dark {
    background: rgba(255, 255, 255, 0.1);
    color: #FFF;
    border: 1px solid rgba(255,255,255,0.05);
}
.promo-subtitle {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2px;
}
.promo-price-white {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 12px;
    display: flex;
    align-items: baseline;
    gap: 4px;
    flex-shrink: 0;
}
.promo-price-white .price-big {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1;
    color: #FFFFFF;
}
.promo-price-white .price-small {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin-left: 2px;
}
.btn-light {
    background: var(--bg-app);
    color: #3A2B27;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-light:active {
    background: #E3D1C3;
    color: #3A2B27;
}

.promo-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 14px;
}

.promo-dots .dot {
    width: 8px; height: 8px;
    border-radius: 5px;
    background: var(--border-light);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    position: relative;
}
.promo-dots .dot::after {
    content: '';
    position: absolute;
    top: -10px; left: -10px; right: -10px; bottom: -10px;
}
.promo-dots .dot.active {
    background: #A08C86; /* soft brownish */
    width: 24px;
}


/* ... existing vitrine classes ... */
.welcome-section { margin-bottom: 24px; }
.welcome-text {
    font-family: var(--font-brand);
    font-size: 24px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-strong);
    letter-spacing: -0.5px;
}
.welcome-text strong { color: var(--primary); }

.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

/* ESTRUTURA DO CARD */
.product-card {
    background: var(--surface);
    border-radius: var(--radius-card);
    border: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: transform 0.15s ease;
}
.product-card:active { transform: scale(0.98); }

.card-image-wrapper {
    width: 100%;
    aspect-ratio: 1 / 1;
    position: relative;
    background: #F8F6F8;
    border-top-left-radius: calc(var(--radius-card) - 1px);
    border-top-right-radius: calc(var(--radius-card) - 1px);
    overflow: hidden;
}

/* Fundos Pastéis p/ profundidade */
.bg-pastel-orange { background-color: #FDF4E7; }
.bg-pastel-pink { background-color: #FAEFF2; }
.bg-pastel-brown { background-color: #F2F0ED; }

@supports not (aspect-ratio: 1 / 1) {
    .card-image-wrapper { padding-bottom: 100%; height: 0; }
}

.card-image-wrapper img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
}

.badge-tag {
    position: absolute;
    top: 12px; left: 12px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
    color: var(--text-strong);
    font-size: 10px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: var(--radius-pill);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    border: 1px solid rgba(255,255,255,0.4);
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.card-content { padding: 14px; display: flex; flex-direction: column; flex: 1; }

.card-title {
    font-family: var(--font-brand);
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text-strong);
    line-height: 1.25;
    margin-bottom: 4px;
    word-break: break-word; /* Correção para titulos longos */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-desc { display: none; }

.card-footer {
    margin-top: auto; 
    margin-bottom: 12px;
}

.price-display {
    font-size: 17px;
    font-weight: 800;
    color: var(--text-strong);
    transition: opacity 0.18s, transform 0.18s;
}

/* Number roll animation */
#flash-price-display, #cart-subtotal, #cart-btn-price-display { display: inline-block; transition: opacity 0.18s, transform 0.18s; }
.price-display.rolling, .btn-label-price.rolling, #flash-price-display.rolling, #cart-subtotal.rolling, #cart-btn-price-display.rolling {
    opacity: 0; transform: translateY(-6px);
}
.price-display.rolling-in, .btn-label-price.rolling-in, #flash-price-display.rolling-in, #cart-subtotal.rolling-in, #cart-btn-price-display.rolling-in {
    animation: priceRollIn 0.22s ease forwards;
}
@keyframes priceRollIn {
    from { opacity:0; transform: translateY(8px); }
    to { opacity:1; transform: translateY(0); }
}

.stepper {
    display: flex;
    align-items: center;
    background: var(--bg-outside);
    border-radius: var(--radius-pill);
    padding: 3px;
    gap: 6px;
}
.stepper-pill { background: #F5F3F2; }
.stepper-pill .stepper-btn { background: transparent; color: var(--text-strong); font-size: 14px; box-shadow: none; width: 28px; height: 28px; }
.stepper-pill .stepper-btn.disabled { color: var(--text-muted); opacity: 0.5; }
.stepper-pill .stepper-val { min-width: 20px; font-size: 14px; font-weight: 700; color: var(--text-strong); }

.stepper-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--surface);
    color: var(--text-strong);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}
.stepper-btn.disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; background: transparent;}

.stepper-val { font-size: 13px; font-weight: 600; min-width: 14px; text-align: center; }

/* BOTÕES DE AÇÃO */
.btn-primary {
    width: 100%;
    height: 48px;
    background-color: var(--primary);
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: opacity 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 0 24px;
}
.btn-primary:active:not(:disabled) { transform: scale(0.96); background-color: var(--primary-hover); }

.btn-label { transition: opacity 0.2s; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }

.btn-spinner {
    position: absolute; top: 50%; left: 50%;
    width: 20px; height: 20px;
    margin-top: -10px; margin-left: -10px;
    opacity: 0; transition: opacity 0.2s;
}
@keyframes spin { to { transform: rotate(360deg); } }
.btn-spinner { animation: spin 0.8s linear infinite; font-size: 20px; }

.btn-primary.is-loading .btn-label, 
.btn-primary.is-loading .btn-content-flex, 
.btn-primary.is-loading .btn-price-divider, 
.btn-primary.is-loading .btn-label-price,
.btn-primary.is-loading .btn-integrated-content,
.btn-primary.is-loading .btn-icon-left { opacity: 0 !important; visibility: hidden; }
.btn-primary.is-loading .btn-spinner { opacity: 1; pointer-events: none; }

.btn-primary.is-success { background-color: #37B863 !important; } /* Verde de "verificado" claro */

.btn-success { background-color: #25D366; } /* Mantido para WhatsApp */
.btn-success:active:not(:disabled) { background-color: #1FAF53; }
.btn-icon-left { margin-right: 6px; font-size: 18px; }

/* ============================================================
   SHARED INNER LAYOUTS
   ============================================================ */
.inner-header {
    display: flex;
    align-items: center;
    padding: 24px;
    gap: 16px;
    background: var(--bg-app);
    z-index: 10;
}
.nav-back-round {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border-light);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: var(--text-strong); font-size: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    transition: transform 0.1s;
}
.nav-back-round:active { transform: scale(0.9); }

.inner-title {
    font-family: var(--font-brand);
    font-size: 20px;
    font-weight: 700;
    color: var(--text-strong);
}

.review-footer {
    position: sticky;
    bottom: 0;
    width: 100%;
    background-color: #FFFFFF;
    padding: 16px 24px 32px;
    box-shadow: none !important;
    border-top: 1px solid rgba(0, 0, 0, 0.06) !important;
    z-index: 10;
}

.action-bar {
    position: fixed;
    bottom: 0; left: 50%;
    transform: translateX(-50%);
    width: 100%; max-width: 430px;
    background: rgba(250, 250, 250, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 16px 24px 24px;
    border-top: 1px solid rgba(0,0,0,0.04);
    z-index: 20;
}
.action-bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.column-gap { display: flex; flex-direction: column; gap: 16px; }

.w-full { width: 100%; }
.flex-1 { flex: 1; }

/* ============================================================
   DETALHES VIEW (#view-relampago)
   ============================================================ */
.nav-back-float {
    position: absolute;
    top: 24px; left: 24px;
    width: 44px; height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.85); backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-strong); font-size: 22px; cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1); z-index: 10;
    border: none; transition: transform 0.15s;
}
.nav-back-float:active { transform: scale(0.9); }


/* ============================================================
   NEW DETAIL VIEW - BOTTOM SHEET (#view-relampago)
   ============================================================ */

.detail-fullscreen-hero {
    position: fixed;
    top: 0; left: 50%; transform: translateX(-50%);
    width: 100%; max-width: 430px;
    height: 50vh;
    background: transparent;
    z-index: 1;
    overflow: hidden;
    transform-origin: top center;
}

.detail-fullscreen-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    transform: scale(1.05);
    transform-origin: top center;
    will-change: transform, filter, opacity;
}

.detail-fullscreen-header {
    position: fixed;
    top: 16px; left: 50%;
    transform: translateX(-50%);
    width: 100%; max-width: 430px;
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 24px;
    z-index: 9999;
}

.nav-btn-circle-solid {
    width: 44px; height: 44px; border-radius: 50%;
    background: var(--surface); border: none;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-strong); font-size: 20px; cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06); transition: transform 0.15s;
}
.nav-btn-circle-solid:active { transform: scale(0.9); }

.detail-fullscreen-badges {
    position: absolute;
    top: -56px; left: 24px; z-index: 10;
}
.badge-tag-solid {
    display: inline-flex; align-items: center; gap: 4px;
    background: var(--surface); color: var(--text-strong);
    padding: 8px 12px; border-radius: var(--radius-pill);
    font-size: 12px; font-weight: 700; font-family: var(--font-brand);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.detail-bottom-sheet {
    background: var(--surface);
    border-radius: 32px 32px 0 0;
    position: relative;
    z-index: 2;
    margin-top: 45vh; /* Starts just overlapping the image slightly */
    min-height: calc(55vh + 120px);
    padding-bottom: 24px;
    display: flex; flex-direction: column;
    flex: 1;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.05);
}

.detail-sheet-scroll {
    padding: 32px 24px 120px;
    flex: 1;
    scrollbar-width: none;
}
.detail-sheet-scroll::-webkit-scrollbar { display: none; }

.detail-sheet-title { font-family: var(--font-brand); font-size: 32px; font-weight: 800; color: #3A2B27; line-height: 1.1; margin-bottom: 12px; }
.detail-sheet-desc { font-size: 14.5px; color: var(--text-body); line-height: 1.6; margin-bottom: 24px; }

.scarcity-banner {
    display: flex; align-items: center; gap: 8px;
    background: #FFF5F2; color: #D94A26;
    padding: 14px 16px; border-radius: 12px;
    font-size: 14px; font-weight: 700; margin-bottom: 24px;
}
.scarcity-icon { font-size: 18px; }

.detail-sheet-price-row {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 32px;
}
.detail-price-wrap { display: flex; align-items: flex-start; gap: 4px; }
.price-symbol { font-size: 16px; font-weight: 700; color: var(--text-strong); margin-top: 6px; font-family: var(--font-brand);}
.price-big-val { font-size: 38px; font-weight: 800; color: var(--text-strong); font-family: var(--font-brand); letter-spacing: -1px; line-height: 1; }

.trust-seals {
    display: flex; justify-content: space-between; align-items: flex-start;
    border-top: 1px solid var(--border-light);
    padding-top: 24px; margin-top: 10px;
}
.trust-seal {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    width: 30%; text-align: center;
}
.trust-seal i { font-size: 24px; color: #3A2B27; }
.trust-seal span { font-size: 11px; font-weight: 600; color: var(--text-muted); line-height: 1.3; }

.action-bar-integrated {
    position: fixed;
    bottom: 0px; /* Keep wrapper at bottom */
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 430px;
    padding: 16px 24px max(24px, env(safe-area-inset-bottom));
    background: linear-gradient(to top, var(--surface) 80%, rgba(255,255,255,0));
    z-index: 99999;
    display: flex; justify-content: center; align-items: center;
    pointer-events: none;
}

.btn-flex-integrated {
    height: 56px; border-radius: 999px; padding: 0 32px; 
    width: max-content !important; 
    margin: 0 auto;
    z-index: 9999;
    transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1);
    pointer-events: auto;
    box-shadow: 0 8px 32px rgba(37, 27, 25, 0.15);
}
.btn-integrated-content { display: flex; align-items: center; gap: 12px; font-size: 16px; transition: opacity 0.2s; }
.btn-integrated-content .btn-divider { opacity: 0.3; }


/* ============================================================
   CART VIEW (#view-cart)
   ============================================================ */
.cart-header {
    display: flex; align-items: center;
    padding: 24px; position: relative; z-index: 10;
}

.nav-btn-circle {
    width: 44px; height: 44px; border-radius: 50%;
    background: transparent; border: none;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-strong); font-size: 20px; cursor: pointer;
    transition: transform 0.15s;
    margin-left: -10px; /* Offset the padding to align perfectly */
}
.nav-btn-circle:active { transform: scale(0.9); }

.cart-scroll-area { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; padding: 0 24px 140px; }
.cart-scroll-area::-webkit-scrollbar { display: none; }

.cart-title-row {
    display: flex; justify-content: space-between; align-items: baseline;
    margin-bottom: 24px;
}
.cart-main-title { font-family: var(--font-brand); font-size: 28px; font-weight: 800; color: var(--text-strong); }
.cart-total-wrap { text-align: right; }
.cart-total-label { font-size: 13px; color: var(--text-muted); font-weight: 600; margin-right: 6px; }
.cart-total-val { font-family: var(--font-brand); font-size: 18px; font-weight: 800; color: var(--text-strong); }

.cart-list-new { display: flex; flex-direction: column; gap: 16px; margin-bottom: 32px; }
.cart-item-new {
    display: flex; gap: 14px;
    background: transparent;
    transition: all 0.3s ease;
}
.cart-item-new.removing { opacity: 0; transform: scale(0.95); margin-bottom: -16px; height: 0; padding: 0; border: none; overflow: hidden; pointer-events: none;}

.cart-item-new-img {
    width: 76px; height: 76px;
    border-radius: 18px;
    background: var(--surface); border: 1px solid var(--border-light);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; flex-shrink: 0;
}
.cart-item-new-img img { width: 100%; height: 100%; object-fit: cover; }

.cart-item-new-info { flex: 1; display: flex; flex-direction: column; justify-content: center; padding-top: 4px; }
.cart-item-new-title { font-family: var(--font-brand); font-size: 15px; font-weight: 700; color: var(--text-strong); margin-bottom: 6px; line-height: 1.2; }
.cart-item-new-price { font-size: 14px; font-weight: 700; color: var(--text-strong); }

.cart-item-new-actions { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; padding-top: 4px; }
.cart-item-trash { background: none; border: none; color: #A08C86; font-size: 18px; cursor: pointer; transition: color 0.15s; }
.cart-item-trash:hover { color: #D94A26; }

.cart-promo-box { margin-bottom: 24px; position: relative; }
.promo-input-wrapper { position: relative; width: 100%; display: flex; align-items: center; }
.promo-input {
    width: 100%;
    /* Estado Padrão (Sem texto digitado / Vazio) */
    background: #F5F3F2;
    border: 2px solid transparent; 
    border-radius: 16px;
    padding: 16px 20px;
    
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-ui);
    color: var(--text-strong);
    text-align: center;
    letter-spacing: normal;
    text-transform: uppercase;
    
    appearance: none;
    -webkit-appearance: none;
    outline: none !important;
    box-shadow: none;
    caret-color: var(--primary);
    
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Quando tem algo digitado OU está em foco (O tracejado e o número grande) */
.promo-input:focus,
.promo-input:not(:placeholder-shown) {
    background: #FFFFFF;
    border: 2px dashed #D1C7C5;
    font-size: 18px; 
    font-weight: 800; /* Peso forte, mas com a fonte UI fica mais limpo */
    font-family: var(--font-ui); /* Restaura para a fonte do sistema/UI em vez da arredondada */
    letter-spacing: 3px;
    padding-right: 50px; /* Espaço para o botão de verificação */
}

.promo-input:focus {
    border-color: var(--primary);
    transform: translateY(-1px);
}

.promo-input::placeholder {
    color: #A08C86;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-ui);
    letter-spacing: normal;
    text-transform: none;
    transition: opacity 0.2s ease;
}

.promo-input:focus::placeholder {
    color: transparent;
    opacity: 0;
}

.btn-promo-verify {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%) scale(0.8);
    width: 32px; height: 32px; border-radius: 50%; border: none;
    background: #251B19; color: #FFFFFF; font-size: 16px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; opacity: 0; pointer-events: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.btn-promo-verify.is-visible { opacity: 1; transform: translateY(-50%) scale(1); pointer-events: auto; }
.btn-promo-verify i { transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
.btn-promo-verify:active { transform: translateY(-50%) scale(0.9); }

.btn-promo-verify.is-loading { background: #EFECEB; color: #A08C86; pointer-events: none; }
.btn-promo-verify.is-loading i { animation: spin 1s linear infinite; }

.btn-promo-verify.is-valid { background: #25D366; color: #FFF; pointer-events: none; }
.btn-promo-verify.is-invalid { background: #D94A26; color: #FFF; pointer-events: none; }

.promo-message {
    text-align: center; font-size: 13px; font-weight: 600; font-family: var(--font-ui);
    margin-top: 8px; opacity: 0; transform: translateY(-5px); transition: all 0.3s ease;
    height: 0; overflow: hidden;
}
.promo-message.show { opacity: 1; transform: translateY(0); height: 20px; }
.promo-message.valid { color: #25D366; }
.promo-message.invalid { color: #D94A26; }


.btn-pill-dark { background: #251B19; color: #FFFFFF; font-weight: 700; border-radius: 999px; }
.btn-pill-dark:hover { background: #1a1210; }


/* ============================================================
   CHECKOUT VIEW (#view-checkout)
   ============================================================ */
.checkout-scroll-area { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; padding: 0 24px 24px; }
.checkout-scroll-area::-webkit-scrollbar { display: none; }

.form-card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: 22px;
    padding: 24px;
    margin-bottom: 24px;
}

.field-group { margin-bottom: 18px; }
.field-group.last-field { margin-bottom: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.field-label { display: block; font-size: 13px; font-weight: 600; color: var(--text-body); margin-bottom: 8px; }

.field-input, .custom-select-wrap {
    width: 100%;
    background: var(--bg-outside);
    border: 1.5px solid transparent;
    border-radius: 14px;
    padding: 16px;
    font-size: 15px; font-weight: 500; font-family: var(--font-ui);
    color: var(--text-strong);
    transition: all 0.2s;
}
.field-input:focus, .custom-select-wrap:focus-within {
    border-color: var(--primary);
    background: var(--surface);
    box-shadow: 0 4px 16px rgba(37, 27, 25, 0.1);
}

.custom-select-wrap { display: flex; align-items: center; padding: 0 16px; position: relative;}
.select-icon { color: var(--primary); font-size: 18px; margin-right: 12px; }
.select-arrow { position: absolute; right: 16px; color: var(--text-muted); font-size: 16px; pointer-events: none;}
.field-select {
    flex: 1;
    padding: 16px 0; padding-right: 20px;
    font-size: 15px; font-weight: 500;
    color: var(--text-strong);
}
.field-select:invalid, .field-select option[value=""] { color: var(--text-muted); }

/* Erros de Validação */
.error-msg {
    display: none;
    font-size: 12px; font-weight: 600; color: #D94A26;
    margin-top: 6px;
}
.field-group.error .field-input, .field-group.error .custom-select-wrap {
    border-color: #D94A26;
    background: #FFF5F2;
}
.shake { animation: shakeX 0.35s ease; }
@keyframes shakeX {
    0%,100%{transform:translateX(0)}
    20%,60%{transform:translateX(-5px)}
    40%,80%{transform:translateX(5px)}
}

/* Step Resume / Review Screen New Architecture */
.resume-title { font-family: var(--font-brand); font-size: 18px; font-weight: 700; border-bottom: 1px solid var(--border-light); padding-bottom: 16px; margin-bottom: 16px; }
.resume-items { margin-bottom: 16px; }
.resume-item-row { display: flex; justify-content: space-between; font-size: 14px; font-weight: 500; color: var(--text-body); margin-bottom: 10px; }
.resume-divider { height: 1px; background: rgba(0, 0, 0, 0.08); margin-bottom: 16px; }
.resume-row { display: flex; justify-content: space-between; font-size: 14px; font-weight: 500; color: var(--text-body); margin-bottom: 10px; }
.total-row {
    border-top: 1px solid rgba(0, 0, 0, 0.08) !important;
    margin-top: 24px !important;
    padding-top: 20px !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.resume-label-strong { font-size: 15px; font-weight: 600; color: var(--text-strong); }
.resume-value-strong { font-size: 20px; font-weight: 700; font-family: var(--font-brand); color: var(--primary); }

.review-group-card {
    background: #FFF;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}
.review-item-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.review-item-card:last-child {
    margin-bottom: 0;
}
.review-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.review-item-img {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}
.review-item-text-group {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}
.review-item-obs {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
.review-item-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    line-height: 1.3;
}
.review-item-price {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
}

.review-delivery-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.review-delivery-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.review-icon-circle {
    width: 36px;
    height: 36px;
    border-radius: 18px;
    background: #F4F0EE;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 18px;
    flex-shrink: 0;
}
.review-delivery-text {
    display: flex;
    flex-direction: column;
}
.rd-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
}
.rd-subtitle {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
}
.review-price-light {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
}

#review-screen {
    flex-direction: column;
    background-color: #FAF9F8;
    margin: -24px -24px 0 -24px;
    padding-top: 24px;
    padding-bottom: 24px;
    min-height: 100%;
}
/* Ensure it displays as flex when active */
#review-screen.active {
    display: flex !important;
}

.items-list-wrapper {
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* TOAST GLOBAL */
.toast {
    position: fixed; bottom: 100px; left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #FFF;
    padding: 14px 24px;
    border-radius: var(--radius-pill);
    font-size: 14px; font-weight: 600; text-align: center;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 9999;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.toast-error { background: #E95634; }
.toast.toast-success { background: #37B863; }

/* ============================================================
   LIGHTBOX (Visualizador de Imagem)
   ============================================================ */
.lightbox-overlay {
    position: fixed;
    top: 0; left: 50%; transform: translateX(-50%);
    width: 100%; max-width: 430px; 
    height: 100%;
    z-index: 99999;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

.lightbox-overlay.is-active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-close {
    position: absolute;
    top: 24px; right: 24px;
    width: 44px; height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: none;
    display: flex; justify-content: center; align-items: center;
    color: #FFF;
    font-size: 20px;
    cursor: pointer;
    z-index: 2;
    transition: transform 0.2s;
}

.lightbox-close:active {
    transform: scale(0.9);
}

.lightbox-overlay img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.4);
    transform: scale(0.9);
    transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

.lightbox-overlay.is-active img {
    transform: scale(1);
}


/* ============================================================
   BOTTOM SHEET DE BAIRRO
   ============================================================ */
.sheet-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9990;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease;
    display: flex; flex-direction: column; justify-content: flex-end;
}
.sheet-overlay.active {
    opacity: 1; pointer-events: auto;
}

.sheet-container {
    background: var(--surface);
    border-top-left-radius: 28px;
    border-top-right-radius: 28px;
    padding: 16px 24px 32px;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
    box-shadow: 0 -10px 40px rgba(0,0,0,0.1);
    max-height: 85vh;
    display: flex; flex-direction: column;
}
.sheet-overlay.active .sheet-container {
    transform: translateY(0);
}

.sheet-handle {
    width: 40px; height: 5px;
    background: var(--border-light);
    border-radius: 4px;
    margin: 0 auto 24px;
}

.sheet-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 20px;
}
.sheet-title {
    font-family: var(--font-brand);
    font-size: 20px; font-weight: 700; color: var(--text-strong);
}

.sheet-content {
    overflow-y: auto; scrollbar-width: none;
}
.sheet-content::-webkit-scrollbar { display: none; }

.bairro-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.bairro-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px;
    background: var(--bg-outside);
    border: 1px solid transparent;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s;
}
.bairro-item:active { transform: scale(0.98); background: var(--border-light); }
.bairro-item.selected {
    background: #FDF4E7;
    border-color: rgba(37, 27, 25, 0.1);
}
.bairro-item-name { font-weight: 600; font-size: 15px; color: var(--text-strong); }
.bairro-item-taxa { font-weight: 600; font-size: 14px; color: var(--text-muted); }
.bairro-item.selected .bairro-item-name,
.bairro-item.selected .bairro-item-taxa { color: var(--primary); }

/* ============================================================
   STEP NAME (#step-name)
   ============================================================ */
.name-step-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    min-height: 45vh;
    padding: 32px 24px;
    text-align: left;
}

.name-step-header {
    margin-bottom: 36px;
    width: 100%;
}

.name-step-title {
    font-family: var(--font-brand);
    font-size: 26px;
    font-weight: 800;
    color: var(--text-strong);
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}

.name-step-subtitle {
    font-size: 14.5px;
    color: var(--text-muted);
    font-weight: 500;
}

.name-step-input-box {
    position: relative;
    width: 100%;
    margin-bottom: 44px;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.name-large-input {
    width: 100%;
    border: none;
    background: transparent;
    border-bottom: 2px solid var(--border-light);
    padding: 12px 0;
    font-family: var(--font-brand);
    font-size: 24px;
    font-weight: 700;
    color: var(--text-strong);
    text-align: left;
    outline: none;
    transition: border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    caret-color: var(--primary);
}

.name-large-input::placeholder {
    color: #CBC5C1;
    font-weight: 500;
    transition: opacity 0.2s ease, color 0.2s ease;
}

.name-large-input:focus::placeholder {
    color: transparent;
    opacity: 0;
}

.name-large-underline {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.name-large-input:focus ~ .name-large-underline {
    width: 100%;
}

.name-large-input:focus {
    border-color: rgba(0, 0, 0, 0);
}

.name-step-footer {
    width: 100%;
}

.name-confirm-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: #251B19;
    color: #FFFFFF;
    font-weight: 700;
    border-radius: var(--radius-pill);
    padding: 16px 32px;
    font-size: 15px;
    transition: transform 0.2s, background-color 0.2s;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(37, 27, 25, 0.15);
}

.name-confirm-btn:hover {
    background: #1a1210;
}

.name-confirm-btn:active {
    transform: scale(0.98);
}

.name-btn-icon {
    font-size: 15px;
    transition: transform 0.2s;
}

.name-confirm-btn:hover .name-btn-icon {
    transform: translateX(4px);
}

/* Erros Estilizados para Nome */
.name-error-msg {
    display: none;
    color: #D94A26;
    font-size: 13px;
    font-weight: 600;
    margin-top: 20px;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

/* Slide Up em Cascata */
.ck-step .animate-slide-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.ck-step.active .animate-slide-up {
    opacity: 1;
    transform: translateY(0);
}

.ck-step.active .delay-100 {
    transition-delay: 0.1s;
}

.ck-step.active .delay-200 {
    transition-delay: 0.2s;
}

.name-step-input-box.error .name-large-input {
    border-bottom-color: #D94A26 !important;
}

/* Regra para a linha condicional de desconto */
.discount-row .resume-label,
.discount-row .resume-value {
    color: #37B863 !important;
    font-weight: 600 !important;
}

.discreet-link {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    text-decoration: underline;
    cursor: pointer;
    padding: 12px 0;
    width: 100%;
    text-align: center;
    transition: color 0.2s;
}

.discreet-link:hover,
.discreet-link:active {
    color: var(--primary);
}

.discount-row-animated {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin-top: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* Curva Apple: Começa rápido, aterrissa suave */
    transition: max-height 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.4s ease-out,
                margin-top 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.discount-row-animated.is-active {
    max-height: 50px; /* Altura suficiente para revelar o conteúdo */
    opacity: 1;
    margin-top: 12px; /* Empurra o conteúdo para baixo dando respiro */
}

/* Garanta que o texto interno seja verde */
.discount-row-animated .resume-label,
.discount-row-animated .resume-value {
    color: #37B863;
    font-weight: 600;
    font-size: 14px;
}

.cupom-transition-enter {
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.3s ease-out;
}
.cupom-transition-active {
    opacity: 1;
    transform: translateY(0);
}

.ck-step {
    display: none; /* Continua sendo controlado pelo JS */
    opacity: 0;
    transform: translateX(15px); /* Inicia levemente à direita */
    transition: opacity 0.4s ease-out, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.ck-step.fade-in-active {
    opacity: 1;
    transform: translateX(0); /* Pousa no lugar correto */
}

.obs-animated-wrapper {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin-top: 0;
    transition: max-height 0.5s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.4s ease-out,
                margin-top 0.4s ease-out;
}

.obs-animated-wrapper.is-open {
    max-height: 100px;
    opacity: 1;
    margin-top: 12px;
}

#input-produto-obs {
    width: 100%;
    background: #F5F3F2;
    border: 1.5px solid transparent;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 14px;
    font-family: var(--font-ui);
    color: var(--text-strong);
    resize: none;
    transition: all 0.2s;
}

#input-produto-obs:focus {
    background: #FFFFFF;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(37, 27, 25, 0.08);
    outline: none;
}

/* ============================================================
   TAG MODAL (Glassmorphism)
   ============================================================ */
.tag-modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99999;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease-out;
}

.tag-modal-overlay.is-active {
    opacity: 1; pointer-events: auto;
}

.tag-modal-card {
    background: #FFFFFF;
    width: 85%; max-width: 320px;
    border-radius: 24px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 24px 48px rgba(0,0,0,0.12);
    transform: scale(0.9);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease-out;
}

.tag-modal-overlay.is-active .tag-modal-card {
    transform: scale(1);
    opacity: 1;
}

.tag-modal-icon {
    font-size: 32px; color: var(--primary); margin-bottom: 12px;
}
.tag-modal-title {
    font-family: var(--font-brand); font-size: 20px; font-weight: 700; color: var(--text-strong); margin-bottom: 8px;
}
.tag-modal-text {
    font-size: 14px; color: var(--text-body); line-height: 1.5; margin-bottom: 24px;
}
.tag-modal-btn {
    background: #F5F3F2; color: var(--text-strong); border: none; width: 100%;
    padding: 14px; border-radius: 16px; font-weight: 700; font-size: 15px; cursor: pointer;
    transition: background 0.2s;
}
.tag-modal-btn:active { background: #EAE6E5; transform: scale(0.98); }