/* ==========================================================================
   Loja STE (buy) — segue o Brand Guide STE Travel v1.0
   Tudo é escopado em .buy-system-wrapper para não alterar o menu e o rodapé
   que vêm do CMS. Os tokens repetem os do brand guide para funcionar também
   sem o CMS (modo standalone).
   ========================================================================== */

.buy-system-wrapper {
    --buy-amber:    #F5A000;
    --buy-lava:     #E8440A;
    --buy-magenta:  #E8187A;
    --buy-purple:   #8B2FC9;
    --buy-cyan:     #00B8E8;
    --buy-gradient: linear-gradient(90deg, #F5A000, #E8440A, #E8187A, #8B2FC9, #00B8E8);

    --buy-bg-deep:     #08090F;
    --buy-bg-surface:  #0E1020;
    --buy-bg-card:     #141628;
    --buy-bg-elevated: #1C2038;
    --buy-border:      rgba(255, 255, 255, 0.07);
    --buy-border-hover:rgba(255, 255, 255, 0.15);
    --buy-text:        #F0F2FF;
    --buy-muted:       rgba(240, 242, 255, 0.50);
    --buy-faint:       rgba(240, 242, 255, 0.25);

    --buy-font-display: 'Nunito', sans-serif;
    --buy-font-body:    'DM Sans', sans-serif;
    --buy-ease: cubic-bezier(0.16, 1, 0.3, 1);

    display: block;
    width: 100%;
    flex: 1 0 auto;
    background: var(--buy-bg-deep);
    color: var(--buy-text);
    font-family: var(--buy-font-body);
    line-height: 1.6;
    padding-bottom: 80px;
}
.buy-system-wrapper *,
.buy-system-wrapper *::before,
.buy-system-wrapper *::after { box-sizing: border-box; }
.buy-system-wrapper a { text-decoration: none; color: inherit; }
.buy-system-wrapper img { display: block; max-width: 100%; }
.buy-system-wrapper [hidden] { display: none !important; }

.buy-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Hero ---------- */
.buy-hero {
    position: relative;
    /* O menu do CMS é fixo: compensamos a altura dele */
    padding: calc(var(--header-height, 72px) + 32px) 0 28px;
    text-align: center;
    overflow: hidden;
}
.buy-hero::before {
    /* Brilho sutil com as cores da marca, sem usar o gradiente como fundo */
    content: "";
    position: absolute;
    inset: -40% -10% auto;
    height: 120%;
    background:
        radial-gradient(40% 50% at 30% 40%, rgba(0, 184, 232, 0.10), transparent 70%),
        radial-gradient(35% 45% at 72% 35%, rgba(232, 24, 122, 0.08), transparent 70%);
    pointer-events: none;
}
.buy-hero .buy-container { position: relative; max-width: 760px; }

.buy-title {
    font: 800 clamp(26px, 3.5vw, 36px)/1.1 var(--buy-font-display);
    letter-spacing: -0.01em;
    margin: 0 0 8px;
    color: var(--buy-text);
    text-wrap: balance;
}
.buy-gradient-text {
    background: var(--buy-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
.buy-lead {
    font: 400 15px/1.6 var(--buy-font-body);
    color: var(--buy-muted);
    margin: 0 auto;
}

/* ---------- Filtros ---------- */
.buy-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 32px;
}
.buy-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.buy-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 100px;
    border: 1px solid var(--buy-border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--buy-muted);
    font: 700 14px/1 var(--buy-font-display);
    cursor: pointer;
    transition: all 0.2s ease-out;
}
.buy-chip span {
    font: 500 12px/1 var(--buy-font-body);
    color: var(--buy-faint);
}
.buy-chip:hover { color: var(--buy-text); border-color: var(--buy-border-hover); }
.buy-chip.active {
    background: rgba(0, 184, 232, 0.15);
    border-color: rgba(0, 184, 232, 0.35);
    color: var(--buy-cyan);
}
.buy-chip.active span { color: rgba(0, 184, 232, 0.7); }

.buy-segmented {
    display: inline-flex;
    padding: 4px;
    gap: 4px;
    border-radius: 100px;
    background: var(--buy-bg-card);
    border: 1px solid var(--buy-border);
}
.buy-segmented button {
    padding: 8px 16px;
    border: none;
    border-radius: 100px;
    background: transparent;
    color: var(--buy-muted);
    font: 500 13px/1 var(--buy-font-body);
    cursor: pointer;
    transition: all 0.2s ease-out;
    white-space: nowrap;
}
.buy-segmented button:hover { color: var(--buy-text); }
.buy-segmented button.active {
    background: var(--buy-bg-elevated);
    color: var(--buy-text);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset;
}

.buy-chip:focus-visible,
.buy-segmented button:focus-visible,
.buy-card:focus-visible {
    outline: 2px solid var(--buy-cyan);
    outline-offset: 2px;
}

/* ---------- Grid e cards ---------- */
.buy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
}

.buy-card {
    display: flex;
    flex-direction: column;
    background: var(--buy-bg-card);
    border: 1px solid var(--buy-border);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s var(--buy-ease), border-color 0.2s ease-out, box-shadow 0.3s ease-out;
}
.buy-card:hover {
    transform: translateY(-4px);
    border-color: var(--buy-border-hover);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.buy-card-media {
    position: relative;
    aspect-ratio: 1;
    background: #fff;
    overflow: hidden;
}
.buy-card-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 16px;
    transition: transform 0.4s var(--buy-ease);
}
.buy-card:hover .buy-card-media img { transform: scale(1.04); }

.buy-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 100px;
    font: 600 12px/1.2 var(--buy-font-body);
    letter-spacing: 0.03em;
}
.buy-tag-ok {
    background: #0E1020;
    color: #00B864;
    border: 1px solid rgba(0, 184, 100, 0.35);
}

.buy-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 16px;
}
.buy-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}
.buy-card-cat {
    font: 500 11px/1 var(--buy-font-body);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--buy-faint);
}
.buy-store {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font: 500 12px/1 var(--buy-font-body);
    color: var(--buy-muted);
    white-space: nowrap;
}
.buy-store::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.buy-store-ml::before  { background: #FFE600; }
.buy-store-ali::before { background: #FF4F1F; }

.buy-card-title {
    font: 700 17px/1.3 var(--buy-font-display);
    color: var(--buy-text);
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.buy-card-tip {
    font: 400 14px/1.5 var(--buy-font-body);
    color: var(--buy-muted);
    margin: 0 0 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.buy-card-tip strong { color: var(--buy-cyan); font-weight: 500; }

.buy-card-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--buy-border);
}
.buy-price {
    font: 800 20px/1.1 var(--buy-font-display);
    color: var(--buy-text);
    font-variant-numeric: tabular-nums;
}
.buy-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 100px;
    background: var(--buy-magenta);
    color: #fff;
    font: 700 13px/1 var(--buy-font-display);
    white-space: nowrap;
    box-shadow: 0 4px 16px rgba(232, 24, 122, 0.25);
    transition: all 0.2s ease-out;
}
.buy-cta i { font-size: 11px; }
.buy-card:hover .buy-cta {
    background: #F0338C;
    box-shadow: 0 6px 22px rgba(232, 24, 122, 0.4);
}

/* ---------- Estado vazio e aviso ---------- */
.buy-empty {
    text-align: center;
    padding: 64px 24px;
    border: 1px dashed var(--buy-border-hover);
    border-radius: 16px;
    color: var(--buy-muted);
}
.buy-empty i { font-size: 28px; color: var(--buy-cyan); margin-bottom: 12px; }
.buy-empty p { margin: 0; }

.buy-disclosure {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: baseline;
    margin: 48px auto 0;
    max-width: 640px;
    text-align: center;
    font: 400 13px/1.6 var(--buy-font-body);
    color: var(--buy-faint);
}

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
    .buy-container { padding: 0 16px; }
    .buy-hero { padding: calc(var(--header-height, 64px) + 24px) 0 20px; }
    .buy-lead { font-size: 14px; }

    .buy-toolbar { flex-direction: column; align-items: stretch; margin-bottom: 24px; }
    .buy-chips {
        flex-wrap: nowrap;
        overflow-x: auto;
        margin: 0 -16px;
        padding: 0 16px 4px;
        scrollbar-width: none;
    }
    .buy-chips::-webkit-scrollbar { display: none; }
    .buy-chip { flex-shrink: 0; }
    .buy-segmented { align-self: flex-start; max-width: 100%; overflow-x: auto; }

    .buy-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .buy-card-media img { padding: 10px; }
    .buy-card-body { padding: 12px; }
    .buy-card-meta { flex-direction: column; align-items: flex-start; gap: 6px; }
    .buy-card-title { font-size: 15px; }
    .buy-card-tip { display: none; }
    .buy-card-footer { flex-direction: column; align-items: stretch; gap: 10px; }
    .buy-price { font-size: 18px; }
    .buy-cta { justify-content: center; }
    .buy-tag { top: 8px; left: 8px; padding: 4px 8px; font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
    .buy-card, .buy-card-media img, .buy-cta { transition: none; }
    .buy-card:hover, .buy-card:hover .buy-card-media img { transform: none; }
}

/* ---------- Modo standalone (sem o CMS) ---------- */
body.buy-standalone {
    margin: 0;
    background: #08090F;
    color: #F0F2FF;
    font-family: 'DM Sans', sans-serif;
}
.buy-standalone-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    background: rgba(14, 16, 32, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.buy-standalone-header img { height: 32px; width: auto; }
.buy-btn-ghost {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 20px; border-radius: 100px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: #F0F2FF; text-decoration: none;
    font: 700 13px/1 'Nunito', sans-serif;
}
.buy-standalone-footer {
    text-align: center;
    padding: 32px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    color: rgba(240, 242, 255, 0.5);
    font-size: 14px;
}
