/* RESET */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', Arial, sans-serif;
}

body {
    background: #f4f6f9;
    color: #1e293b;
}

button {
    cursor: pointer;
}

small {
    font-size: 0.95em;
}


/* overlay mais leve */

.header-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient( rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.2));
}

.header-hero * {
    position: relative;
}


/* TOPO */

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topbar h1 {
    font-size: 16px;
    font-weight: 600;
}


/* TEXTO */

.hero-content {
    max-width: 500px;
}

.hero-content h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.hero-content p {
    font-size: 14px;
    opacity: 0.9;
}


/* ========================= */


/* BOTÃO CARRINHO            */


/* ========================= */

.btn-cart {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 12px 18px;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.2s;
}

.btn-cart i {
    font-size: 1.25rem;
}

.btn-cart:hover {
    transform: scale(1.05);
}

.btn-cart:active {
    transform: scale(0.9);
}

.badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #22c55e;
    color: #fff;
    font-size: 13px;
    padding: 3px 8px;
    border-radius: 10px;
}


/* ========================= */


/* GRID PRODUTOS             */


/* ========================= */

.container {
    padding: 30px;
}

.produtos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
}


/* CARD */

.produto {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    padding: 16px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    transition: 0.25s;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.produto:hover {
    transform: translateY(-6px) scale(1.01);
}

.produto img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 10px;
}

.produto h3 {
    font-size: 16px;
    font-weight: 600;
}

.price {
    font-size: 18px;
    font-weight: bold;
    color: #16a34a;
}


/* BOTÃO */

.produto button {
    margin-top: auto;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border: none;
    color: #fff;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

.produto button:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
}


/* ========================= */


/* CARRINHO                 */


/* ========================= */

.cart {
    position: fixed;
    right: -380px;
    top: 0;
    width: 360px;
    height: 100%;
    background: #fff;
    box-shadow: -8px 0 25px rgba(0, 0, 0, 0.1);
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    border-left: 1px solid #eee;
}

.cart.open {
    right: 0;
}

.cart-header {
    padding: 16px;
    font-weight: 600;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
}

.cart-header button {
    border: none;
    background: none;
    color: #334155;
    cursor: pointer;
    font-size: 1.5rem;
}


/* ITENS */

.cart-item {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    border-bottom: 1px solid #f1f1f1;
    align-content: center;
    align-items: center;
}

.dsc {
    width: 70%;
}


/* BOTÕES QTD */

.qtd button {
    background: #eee;
    border: none;
    border-radius: 6px;
    padding: 4px 8px;
    cursor: pointer;
}


/* REMOVER */

.btn-remove {
    border: none;
    background: none;
    color: #ef4444;
    cursor: pointer;
    vertical-align: middle;
    display: contents;
    font-size: 1rem;
}

.btn-remove:hover {
    color: #e92222;
}


/* FOOTER */

.cart-footer {
    padding: 16px;
    margin-top: auto;
    border-top: 1px solid #eee;
    position: sticky;
    bottom: 0;
}

.cart-footer input {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 8px;
    border: 1px solid #22c55e;
}

.cart-footer h3 {
    padding: 0 0 15px 0;
}


/* BOTÕES */

.btn-pagar {
    width: 100%;
    background: linear-gradient(135deg, #16a34a, #15803d);
    border: none;
    color: #fff;
    padding: 12px;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
}

.btn-limpar {
    width: 100%;
    margin-bottom: 10px;
    background: #334155;
    color: #fff;
    border: none;
    padding: 8px;
    border-radius: 8px;
}

.btn-limpar:hover {
    background: #355165;
}

.cart-header button:hover {
    color: #355165;
}

.cart-header button:hover,
.btn-limpar:hover,
.btn-remove:hover i,
.btn-pagar:hover {
    transform: scale(1.05);
    transition: ease 0.2s all;
}


/* EMPTY */

.empty-cart {
    text-align: center;
    padding: 20px;
    color: #888;
}


/* ========================= */


/* TOAST                    */


/* ========================= */

.cart .toast {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background: #0f172a;
    color: #fff;
    padding: 14px 18px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0;
    transition: all 0.25s ease;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.35);
    z-index: 999;
    width: 75%;
}

.cart .toast.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.toast button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.75);
    color: #22c55e;
    padding: 4px 10px;
    border-radius: 8px;
    cursor: pointer;
}


/* ========================= */


/* SKELETON                 */


/* ========================= */

.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
}

.skeleton-card {
    background: #fff;
    padding: 16px;
    border-radius: 14px;
}

.shimmer {
    background: linear-gradient(110deg, #f0f0f0 25%, #e6e6e6 37%, #f0f0f0 63%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}


/* ========================= */


/* RESPONSIVO               */


/* ========================= */

@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
        margin: 0 auto;
    }
    .produtos {
        grid-template-columns: repeat(4, 1fr);
    }
    .btn-cart {
        top: 100px;
        right: -10px;
    }
}


/* ========================= */


/* MOBILE PROFISSIONAL */


/* ========================= */

@media screen and (max-width: 768px) {
    /* HEADER NÃO SOME */
    .header-hero {
        height: auto;
        background-size: contain;
        background-position: center;
        width: 100%;
    }
    .hero-content h2 {
        font-size: 14px;
    }
    .hero-content p {
        font-size: 10px;
    }
    /* GRID */
    .produtos {
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
    }
    .produto {
        padding: 10px !important;
    }
    .produto img {
        height: 110px !important;
    }
    /* BOTÕES MAIORES */
    .produto button {
        padding: 10px !important;
        font-size: 14px !important;
    }
    /* CARRINHO BOTÃO GRANDE */
    .btn-cart {
        position: fixed !important;
        top: 125px;
        right: 20px;
        width: 65px;
        height: 65px;
        border-radius: 50%;
        background: linear-gradient(135deg, #22c55e, #16a34a);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 22px;
        z-index: 99999;
    }
    /* CARRINHO FULL */
    .cart {
        width: 100% !important;
        right: -100% !important;
    }
    .cart.open {
        right: 0 !important;
    }
    /* ITENS MAIS CONFORTÁVEIS */
    .cart-item {
        padding: 16px 12px;
    }
    .qtd button {
        min-width: 36px;
        min-height: 36px;
        font-size: 16px;
    }
    .btn-remove {
        font-size: 18px;
        margin-left: 10px;
    }
    /* INPUTS MAIORES */
    .cart-footer input {
        padding: 12px;
        font-size: 14px;
    }
    /* BOTÕES GRANDES */
    .btn-pagar {
        padding: 14px;
        font-size: 16px;
    }
    .btn-limpar {
        padding: 12px;
    }
}


/* ========================= */


/* HEADER + HERO UNIFICADO   */


/* ========================= */

.header-hero {
    position: relative;
    height: 180px;
    background: url("https://saojoaobatista.dwddesigner.com.br/images/banner-desktop.webp");
    background-size: cover;
    /* troca aqui */
    background-repeat: no-repeat;
    background-color: #15803d;
    background-position: center 30%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 16px 20px;
    color: #fff;
    text-shadow: 1px 3px 4px rgb(0, 0, 0);
    aspect-ratio: 7/1;
    margin: 0 auto;
}

@media screen and (max-width: 920px) {
    .header-hero {
        height: 198px;
        background-image: url("https://saojoaobatista.dwddesigner.com.br/images/banner-mobile.webp");
        margin: 0 auto;
        width: 100%;
    }
}

@media screen and (max-width: 768px) {
    .header-hero {
        height: 198px;
        background-image: url("https://saojoaobatista.dwddesigner.com.br/images/banner-mobile1.webp");
        margin: 0 auto;
        width: 100%;
    }
    .container {
        padding: 30px;
        height: calc(100vh - 264px) !important;
        overflow-y: auto;
    }
    .btn-cart {
        top: 130px !important;
    }
    .produto img {
        height: auto !important;
        width: 100%;
    }
}


/* ========================= */


/* FIX HEADER SEM QUEBRAR DESKTOP */


/* ========================= */

.header-hero {
    background-size: cover !important;
    /* volta padrão bonito */
    background-position: center !important;
}


/* ========================= */


/* FIX ALIGN CARRINHO (SEM MEXER NO RESTO) */


/* ========================= */

.cart-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dsc {
    flex: 1;
}

.qtd {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-remove {
    margin-left: 8px;
}


/* ========================= */


/* MOBILE REAL (AGORA VAI FUNCIONAR) */


/* ========================= */

@media screen and (max-width: 768px) {
    /* HEADER CORRIGIDO (SEM BORDA FEIA) */
    .header-hero {
        background-size: contain !important;
        background-position: center !important;
    }
    /* TEXTO LEGÍVEL */
    .hero-content h2 {
        font-size: 14px !important;
    }
    .hero-content p {
        font-size: 10px !important;
    }
    /* GRID MAIS USÁVEL */
    .produtos {
        grid-template-columns: 1fr 1fr !important;
        gap: 14px !important;
    }
    /* CARDS */
    .produto {
        padding: 10px !important;
    }
    .produto img {
        height: 110px !important;
    }
    .produto h3 {
        font-size: 12px !important;
    }
    .price {
        font-size: 15px !important;
    }
    /* BOTÃO MAIS CLICÁVEL */
    .produto button {
        padding: 10px !important;
        font-size: 14px !important;
    }
    /* BOTÃO CARRINHO VISÍVEL */
    .btn-cart {
        position: fixed !important;
        bottom: 28px !important;
        right: 15px !important;
        width: 50px !important;
        height: 50px !important;
        border-radius: 50% !important;
        background: linear-gradient(135deg, #22c55e, #16a34a) !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
        font-size: 22px !important;
        z-index: 99999 !important;
    }
    /* CARRINHO FULLSCREEN (TIPO SHOPEE) */
    .cart {
        width: 100% !important;
        right: -100% !important;
    }
    .cart.open {
        right: 0 !important;
    }
    /* ITENS GRANDES */
    .cart-item {
        padding: 16px !important;
    }
    .qtd button {
        min-width: 36px !important;
        min-height: 36px !important;
        font-size: 16px !important;
    }
    .btn-remove {
        font-size: 18px !important;
    }
    /* INPUTS */
    .cart-footer input {
        padding: 12px !important;
        font-size: 14px !important;
    }
    /* BOTÕES */
    .btn-pagar {
        padding: 14px !important;
        font-size: 16px !important;
    }
    .btn-limpar {
        padding: 12px !important;
    }
}

@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }
    /* CART FULLSCREEN REAL */
    .cart {
        position: fixed !important;
        top: 0 !important;
        right: -100vw !important;
        width: 100vw !important;
        height: 100vh !important;
        max-width: 100vw !important;
        background: #fff;
        z-index: 999999 !important;
        transition: right 0.3s ease;
    }
    .cart.open {
        right: 0 !important;
    }
    /* HEADER DO CART */
    .cart-header {
        padding: 16px;
        font-size: 16px;
    }
    /* ITENS */
    .cart-item {
        padding: 16px !important;
        gap: 12px;
    }
    .qtd button {
        width: 40px !important;
        height: 40px !important;
        font-size: 18px !important;
    }
    .btn-remove {
        font-size: 20px !important;
    }
    /* FOOTER */
    .cart-footer {
        padding: 16px;
    }
    .cart-footer input {
        padding: 14px;
        font-size: 15px;
    }
    .btn-pagar {
        padding: 16px;
        font-size: 16px;
    }
    .btn-limpar {
        padding: 14px;
    }
}

@media (max-width: 768px) {
    .btn-cart {
        position: fixed !important;
        bottom: 20px !important;
        right: 20px !important;
        width: 60px !important;
        height: 60px !important;
        border-radius: 50%;
        background: #16a34a;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 22px;
        z-index: 999999;
    }
}

.pix-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
    z-index: 999999;
}

.pix-box {
    background: #fff;
    padding: 25px;
    border-radius: 16px;
    text-align: center;
    max-width: 340px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: fadeIn .3s ease;
}

@media screen and (max-width: 745px) {
    .pix-box {
        height: 95% !important;
        width: 95% !important;
    }
}

.pix-box h3 {
    margin-bottom: 15px;
}

.qr-wrapper {
    background: #f8f8f8;
    padding: 12px;
    border-radius: 12px;
    display: inline-block;
}

.qr-wrapper img {
    width: 200px;
}

.total {
    margin: 15px 0;
    font-size: 18px;
}

.total span {
    font-weight: bold;
    color: #18bb33;
}

.pix-key-box {
    display: flex;
    margin: 10px 0;
}

.pix-key-box input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px 0 0 8px;
    text-align: center;
}

.pix-key-box button {
    padding: 10px 12px;
    border: none;
    background: #18bb33;
    color: white;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
}

.btn-primary {
    width: 100%;
    padding: 12px;
    margin-top: 10px;
    border: none;
    background: #25D366;
    color: white;
    border-radius: 10px;
    font-size: 15px;
    cursor: pointer;
}

.btn-close {
    margin-top: 10px;
    background: transparent;
    border: none;
    color: #777;
    cursor: pointer;
}

@keyframes fadeIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.pix-info {
    display: flex;
    gap: 10px;
    background: #f5f7fa;
    border-left: 4px solid #18bb33;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
    text-align: left;
    font-size: 13px;
    color: #555;
}

.pix-info i {
    color: #18bb33;
    font-size: 16px;
    margin-top: 2px;
}

.pix-info strong {
    color: #000;
}


/* Skeleton dentro do card real */

.produto.skeleton {
    pointer-events: none;
}


/* imagem */

.sk-img {
    width: 100%;
    height: 140px;
    border-radius: 10px;
}


/* título */

.sk-line {
    height: 14px;
    border-radius: 6px;
    margin-top: 8px;
}

.sk-line.small {
    width: 70%;
    height: 12px;
}


/* preço */

.sk-price {
    width: 40%;
    height: 16px;
    border-radius: 6px;
    margin-top: 10px;
}


/* botão */

.sk-btn {
    height: 38px;
    border-radius: 8px;
    margin-top: auto;
}


/* shimmer melhorado */

.shimmer {
    background: linear-gradient( 110deg, #f0f0f0 25%, #e4e4e4 37%, #f0f0f0 63%);
    background-size: 200% 100%;
    animation: shimmer 1.2s infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}


/* Skeleton dentro do card real */

.produto.skeleton {
    pointer-events: none;
}


/* imagem */

.sk-img {
    width: 100%;
    height: 140px;
    border-radius: 10px;
}


/* título */

.sk-line {
    height: 14px;
    border-radius: 6px;
    margin-top: 8px;
}

.sk-line.small {
    width: 70%;
    height: 12px;
}


/* preço */

.sk-price {
    width: 40%;
    height: 16px;
    border-radius: 6px;
    margin-top: 10px;
}


/* botão */

.sk-btn {
    height: 38px;
    border-radius: 8px;
    margin-top: auto;
}


/* shimmer melhorado */

.shimmer {
    background: linear-gradient( 110deg, #f0f0f0 25%, #e4e4e4 37%, #f0f0f0 63%);
    background-size: 200% 100%;
    animation: shimmer 1.2s infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.real {
    opacity: 0;
    transition: opacity 0.4s ease;
}

.real.show {
    opacity: 1;
}

.intro-doacao {
    background: #ffffff;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    line-height: 1.6;
    font-size: 14px;
    color: #334155;
}

.intro-doacao strong {
    color: #15803d;
}


/**/

.selo-oficial {
    position: absolute;
    top: 6px;
    right: 8px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(6px);
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.selo-oficial i {
    color: #22c55e;
}

.info-igreja span {
    font-size: 12px;
    opacity: 0.9;
}

.aviso-oficial {
    font-size: 12px;
    text-align: center;
    padding: 6px;
    background: #e1e4e7;
    color: #555;
    border-top: 1px solid #ccc
}

.aviso-oficial img {
    vertical-align: middle;
    height: 52px;
}