/* Loader: fallback se JS falhar */
#ms-overlay[data-hidden="1"],
#ms-overlay.is-hidden { display: none !important; opacity: 0 !important; pointer-events: none !important; }

:root {
    --mcbda-asphalt: #121417;
    --mcbda-asphalt-2: #1c2229;
    --mcbda-amber: #d4a017;
    --mcbda-amber-2: #f0c14b;
    --mcbda-road: #2a3038;
}
.loja-hero {
    background:
        linear-gradient(120deg, rgba(18,20,23,.92) 0%, rgba(28,34,41,.88) 45%, rgba(42,48,56,.75) 100%),
        repeating-linear-gradient(
            90deg,
            transparent 0,
            transparent 46px,
            rgba(212,160,23,.08) 46px,
            rgba(212,160,23,.08) 48px
        ),
        linear-gradient(180deg, #121417 0%, #1c2229 100%);
}
.loja-hero img {
    filter: drop-shadow(0 10px 20px rgba(0,0,0,.4));
}
.ms-btn-salah,
.ms-btn-mcbda {
    background: var(--mcbda-amber);
    color: #121417;
}
.ms-btn-salah:hover,
.ms-btn-mcbda:hover {
    background: var(--mcbda-amber-2);
    color: #121417;
}
.checkout-alert {
    border-radius: 6px;
    padding: 12px 14px;
    margin-bottom: 16px;
    font-size: 14px;
}
.checkout-alert.ok { background: #e8f7ee; color: #1f6b3f; border: 1px solid #b9e3c8; }
.checkout-alert.err { background: #fdecec; color: #8a1f1f; border: 1px solid #f3bcbc; }
.frete-opcao {
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 10px;
    cursor: pointer;
}
.frete-opcao.active {
    border-color: #d4a017;
    background: #fff8e8;
}
.ms-product-thumb:hover .ms-thumb-hover { opacity: 1; }
.ms-product-thumb:hover .ms-thumb-main { opacity: 0; }

/* Galeria produto */
.galeria-principal-wrap { cursor: zoom-in; position: relative; }
.galeria-principal-wrap::after {
    content: 'Clique para ampliar';
    position: absolute;
    bottom: 12px;
    right: 12px;
    font-size: 11px;
    color: #888;
    background: rgba(255,255,255,.9);
    padding: 4px 8px;
    border-radius: 4px;
    pointer-events: none;
}
.loja-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,.92);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s, visibility .25s;
}
.loja-lightbox.is-open { opacity: 1; visibility: visible; }
.loja-lightbox img {
    max-width: min(96vw, 900px);
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
}
.loja-lightbox-caption {
    position: absolute;
    bottom: 24px;
    left: 0;
    right: 0;
    text-align: center;
    color: #ddd;
    font-size: 14px;
    padding: 0 60px;
}
.loja-lightbox-close {
    position: absolute;
    top: 16px;
    right: 20px;
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(255,255,255,.15);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    border-radius: 50%;
    cursor: pointer;
}
.loja-lightbox-close:hover { background: rgba(255,255,255,.25); }
.loja-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: none;
    background: rgba(255,255,255,.15);
    color: #fff;
    font-size: 24px;
    border-radius: 50%;
    cursor: pointer;
}
.loja-lightbox-nav:hover { background: rgba(255,255,255,.3); }
.loja-lightbox-prev { left: 16px; }
.loja-lightbox-next { right: 16px; }

/* Linha do tempo do pedido */
.pedido-timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.pedido-timeline .pt-step { position: relative; padding: 0 0 22px 28px; }
.pedido-timeline .pt-step:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 8px;
    top: 18px;
    bottom: -4px;
    width: 2px;
    background: #e5e5e5;
}
.pedido-timeline .pt-dot {
    position: absolute;
    left: 0;
    top: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #ccc;
    box-sizing: border-box;
}
.pedido-timeline .pt-body { display: flex; flex-direction: column; }
.pedido-timeline .pt-body strong { font-size: 14px; }
.pedido-timeline .pt-desc { font-size: 12px; color: #888; }
.pedido-timeline .pt-rastreio { font-size: 12px; color: #444; margin-top: 4px; }
.pedido-timeline .pt-rastreio a { color: #d4a017; font-weight: 600; }
.pedido-timeline .pt-feito .pt-dot { background: #1e7e34; border-color: #1e7e34; }
.pedido-timeline .pt-feito:not(:last-child)::before { background: #1e7e34; }
.pedido-timeline .pt-atual .pt-dot { background: #d4a017; border-color: #d4a017; box-shadow: 0 0 0 4px rgba(196,30,58,.15); }
.pedido-timeline .pt-futuro .pt-body strong,
.pedido-timeline .pt-futuro .pt-desc { color: #bbb; }

/* Endereços salvos no checkout */
.endereco-salvo:has(input:checked) { border-color: #d4a017; background: #fff8e8; }

/* Forma de pagamento e parcelas no checkout */
.forma-pag:has(input:checked),
.parcela-opcao:has(input:checked) { border-color: #d4a017; background: #fff8e8; }
