/* ============================================
   Elas Lideram o Agro — Loja de Livros
============================================ */
:root {
    --verde-profundo: #2C5F2D;
    --verde-escuro:   #1a3c1b;
    --dourado:        #C9A96E;
    --dourado-claro:  #D4BC8B;
    --off-white:      #FAF8F5;
    --bege-claro:     #F5F0EB;
    --bege-medio:     #E8DDD3;
    --terracota:      #A0715A;
    --texto-escuro:   #2D2A26;
    --texto-medio:    #5A5550;
    --branco:         #FFFFFF;

    --font-titulo: 'Playfair Display', Georgia, serif;
    --font-texto:  'Inter', 'Segoe UI', sans-serif;

    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 40px rgba(44, 95, 45, 0.18);
}

body {
    background-color: var(--off-white);
    color: var(--texto-escuro);
    font-family: var(--font-texto);
    line-height: 1.7;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-titulo);
    line-height: 1.3;
}

/* ============================================
   Header
============================================ */
.header-marca {
    background: var(--verde-profundo);
    padding: 20px 0;
    border-bottom: 3px solid var(--dourado);
}
.header-logo {
    max-width: 200px;
    max-height: 80px;
    filter: brightness(0) invert(1);
}
.header-nome {
    font-family: var(--font-titulo);
    font-size: 1.9rem;
    color: var(--dourado);
    font-weight: 700;
    letter-spacing: 0.5px;
    display: block;
    line-height: 1.2;
}
.header-nome:hover { color: var(--dourado-claro); }
.header-tag {
    color: var(--dourado-claro);
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    margin-top: 4px;
}
.cart-icon-link { color: #fff; transition: color 0.2s; }
.cart-icon-link:hover { color: var(--dourado); }

/* ============================================
   Catálogo
============================================ */
.catalogo-hero {
    background: linear-gradient(180deg, var(--bege-claro) 0%, var(--off-white) 100%);
    padding: 50px 0 40px;
    text-align: center;
}
.hero-titulo {
    color: var(--verde-profundo);
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: 15px;
}
.hero-subtitulo {
    color: var(--texto-medio);
    font-size: 1.05rem;
    max-width: 700px;
    margin: 0 auto;
}

.card-livro {
    background: var(--branco);
    border-radius: 14px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card-livro:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}
.card-livro-img {
    position: relative;
    background: var(--bege-claro);
    padding: 30px 20px;
    text-align: center;
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.card-livro-img img {
    max-width: 180px;
    max-height: 240px;
    width: auto;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    border-radius: 4px;
}
.tag-ebook {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--dourado);
    color: var(--branco);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}
.card-livro-body {
    padding: 22px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.card-livro-titulo {
    color: var(--verde-profundo);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 8px;
}
.card-livro-subtitulo {
    color: var(--texto-medio);
    font-size: 0.9rem;
    font-style: italic;
    margin-bottom: 10px;
    min-height: 2.5em;
}
.card-livro-autor {
    color: var(--dourado);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 18px;
}
.card-livro-preco {
    color: var(--verde-profundo);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 15px;
    margin-top: auto;
}
.card-livro-preco.small-preco {
    font-size: 1rem;
    color: var(--terracota);
    font-weight: 500;
}

.voltar-catalogo {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--verde-profundo);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    margin-top: 10px;
}
.voltar-catalogo:hover { color: var(--dourado); }

/* ============================================
   Página do livro (checkout)
============================================ */
.capa-container {
    text-align: center;
    padding: 30px 0 10px;
}
.capa-container img {
    max-width: 280px;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(44, 95, 45, 0.25);
    transition: transform 0.3s;
}
.capa-container img:hover { transform: scale(1.03); }

.livro-info h2 {
    color: var(--verde-profundo);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
}
.livro-info .subtitulo {
    color: var(--texto-medio);
    font-style: italic;
    font-size: 1rem;
    margin-bottom: 6px;
}
.livro-info .autor {
    color: var(--dourado);
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 3px;
}
.livro-info .editora {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 15px;
}
.livro-info .preco {
    font-size: 2rem;
    font-weight: 700;
    color: var(--verde-profundo);
    margin: 10px 0;
}
.livro-info .descricao {
    color: var(--texto-medio);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-top: 15px;
}
.livro-info .detalhes-fisicos {
    font-size: 0.85rem;
    color: #888;
}

/* Seletor de quantidade */
.quantidade-selector {
    margin: 18px 0 10px;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.qty-label {
    font-weight: 600;
    font-size: 1rem;
    color: var(--texto-escuro);
    margin: 0;
}
.qty-wrapper {
    display: inline-flex;
    align-items: center;
    background: #fff;
    border: 2px solid var(--verde-profundo);
    border-radius: 50px;
    padding: 4px 6px;
    box-shadow: 0 2px 8px rgba(44, 95, 45, 0.1);
}
.btn-qty {
    width: 38px; height: 38px;
    border-radius: 50%;
    border: none;
    background: var(--verde-profundo);
    color: #fff;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1;
    padding: 0;
}
.btn-qty i, .btn-qty * { pointer-events: none; }
.btn-qty:hover:not(:disabled) { background: var(--verde-escuro); transform: scale(1.08); }
.btn-qty:disabled { background: #d5d5d5; cursor: not-allowed; }
.qty-display {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--verde-profundo);
    min-width: 44px;
    text-align: center;
    user-select: none;
}

/* Stepper */
.stepper {
    display: flex;
    justify-content: center;
    margin: 30px 0;
    padding: 0;
    list-style: none;
}
.stepper li {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: #aaa;
    font-weight: 600;
}
.stepper li .step-circle {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: #ddd;
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    margin-right: 8px;
    transition: all 0.3s;
}
.stepper li.active .step-circle    { background: var(--verde-profundo); }
.stepper li.completed .step-circle { background: var(--dourado); }
.stepper li.active, .stepper li.completed { color: var(--verde-profundo); }
.stepper li .step-line {
    width: 60px; height: 2px;
    background: #ddd;
    margin: 0 12px;
}
.stepper li.completed .step-line { background: var(--dourado); }

/* Form cards */
.form-card {
    background: #fff;
    border-radius: 14px;
    padding: 30px;
    box-shadow: var(--shadow-md);
    margin-bottom: 20px;
}
.form-card h4 {
    color: var(--verde-profundo);
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--dourado);
}

/* Botões */
.btn-primario {
    background: var(--verde-profundo);
    color: #fff;
    border: none;
    padding: 12px 40px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
}
.btn-primario:hover {
    background: var(--verde-escuro);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(44, 95, 45, 0.3);
}
.btn-primario:disabled { background: #ccc; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-secundario {
    background: var(--dourado);
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
}
.btn-secundario:hover { background: #b8923f; color: #fff; }
.btn-outline-voltar {
    border: 2px solid var(--verde-profundo);
    color: var(--verde-profundo);
    background: transparent;
    padding: 10px 30px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
}
.btn-outline-voltar:hover { background: var(--verde-profundo); color: #fff; }

/* Frete */
.frete-opcao {
    border: 2px solid #eee;
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 10px;
}
.frete-opcao:hover, .frete-opcao.selected {
    border-color: var(--verde-profundo);
    background: rgba(44, 95, 45, 0.04);
}
.frete-opcao .frete-nome  { font-weight: 700; color: var(--verde-profundo); }
.frete-opcao .frete-preco { font-weight: 700; color: var(--dourado); font-size: 1.1rem; }
.frete-opcao .frete-prazo { font-size: 0.85rem; color: #888; }

/* Resumo */
.resumo-box {
    background: linear-gradient(135deg, var(--verde-profundo), var(--verde-escuro));
    border-radius: 12px;
    padding: 20px;
    color: #fff;
}
.resumo-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 0.95rem;
}
.resumo-total {
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 12px;
    margin-top: 8px;
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
}
.resumo-total .valor-total { color: var(--dourado); }

/* Abas pagamento */
.payment-tabs .nav-link {
    color: var(--verde-profundo);
    font-weight: 600;
    border: 2px solid transparent;
    border-radius: 8px 8px 0 0;
    padding: 12px 30px;
}
.payment-tabs .nav-link.active {
    color: #fff;
    background: var(--verde-profundo);
    border-color: var(--verde-profundo);
}
.payment-tabs .nav-link:hover:not(.active) { border-color: var(--dourado); }

/* PIX */
.pix-container { text-align: center; padding: 20px; }
.qrcode-img {
    max-width: 250px;
    border: 3px solid var(--verde-profundo);
    border-radius: 12px;
    padding: 10px;
    background: #fff;
}
.pix-payload {
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px;
    font-family: monospace;
    font-size: 0.8rem;
    word-break: break-all;
    cursor: pointer;
}
.pix-payload:hover { background: #eee; }
.btn-copiar {
    background: var(--dourado);
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: 600;
    margin-top: 10px;
}

/* Sucesso */
.sucesso-container { text-align: center; padding: 40px 20px; }
.icone-sucesso { font-size: 80px; color: var(--verde-profundo); margin-bottom: 20px; }
.sucesso-container h3 { color: var(--verde-profundo); font-weight: 700; }
.resumo-sucesso {
    background: var(--bege-claro);
    border-radius: 10px;
    border-left: 4px solid var(--dourado);
    text-align: left;
    max-width: 400px;
    margin: 0 auto;
}

/* Loading */
.loading-overlay {
    display: none;
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    justify-content: center; align-items: center;
}
.loading-overlay.show { display: flex; }
.loading-overlay .spinner-border { width: 3rem; height: 3rem; color: var(--dourado); }

/* Footer */
.footer {
    background: var(--verde-profundo);
    color: rgba(255,255,255,0.75);
    padding: 25px 0;
    text-align: center;
    font-size: 0.85rem;
    margin-top: 40px;
    border-top: 3px solid var(--dourado);
}
.footer a { color: var(--dourado-claro); }
.footer a:hover { color: #fff; }

/* Responsivo */
@media (max-width: 768px) {
    .hero-titulo { font-size: 1.6rem; }
    .capa-container img { max-width: 200px; }
    .livro-info h2 { font-size: 1.5rem; }
    .livro-info .preco { font-size: 1.6rem; }
    .stepper li .step-line { width: 30px; margin: 0 6px; }
    .form-card { padding: 20px; }
    .quantidade-selector { justify-content: center; }
}
