h2 {
	font-size: 1.2em;
	line-height: 120%;
	padding-top: 15px;
	padding-bottom: 20px;
}

h3 {
	font-size: 1em;
}

h4 {
	font-size: 0.9em;
	line-height: 150%;
	padding-bottom: 10px;
}

h5 {
	font-size: 0.88em;
	line-height: 120%;
	padding-bottom: 10px;
}

html {
    scroll-behavior: smooth;
}

a {
	text-decoration: none;
	font-weight: normal;
	color: #3366CC;
}

a:hover { 
	text-decoration: underline; 
}

input, textarea {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 0.85em;
    width: 100%;
    margin-bottom: 15px;
    padding: 6px;
    box-sizing: border-box;
    border: 1px solid #CCC;
}

textarea {
    min-height: 50px;
    max-height: 100px;
    max-width: 100%;    
}

select {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 0.85em;
    width: 100%;
    margin-bottom: 15px;
    padding: 6px;
    box-sizing: border-box;
    border: 1px solid #CCC;
}

input[type='checkbox'] {
    height: 18px;
    width: 18px;   
}

input[type='submit']:hover {
    background-color: #b4b1b1;
	cursor: pointer; 
}

.adq {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-weight: normal;
	color: #3366CC;
}

.jaadquirido {
	color: #AA0000;
}

/* Cores e pesos para "Comprado por:" (Exclusivo dos Noivos) - Preto Sem Cinza */
.txt-comprado-por {
    color: #333 !important;
    font-weight: bold !important;
}

.txt-buyer-name {
    color: #333 !important;
    font-weight: normal !important;
}

.presentes-page {
	box-sizing: border-box;
	width: calc(100% - 32px);
	max-width: 1100px;
	margin: 28px auto 44px;
	padding: 0;
	font-family: Verdana, Arial, Helvetica, sans-serif;
	color: #333;
}

.presentes-card {
	padding: 26px 30px;
	background: #fff;
	border: 1px solid #e7e2d5;
	border-top: 4px solid #BAA367;
	box-shadow: 0 4px 16px rgba(0, 0, 0, .07);
}

.presentes-page h2,
.presentes-page h3 {
	font-family: 'Taviraj', 'PT Serif', Georgia, serif;
	color: #BAA367;
	letter-spacing: 1px;
}

.presentes-page h2 {
	font-size: 1.55em;
	line-height: 1.35;
	margin: 0 0 18px;
	padding: 0 0 12px;
	border-bottom: 1px solid #e7e2d5;
}

.presentes-page h3 {
	font-size: 1.15em;
	margin: 24px 0 12px;
}

.presentes-page p,
.presentes-page label {
	line-height: 1.6;
	font-size: 0.95em;
	color: #333;
}

.presentes-page input:not([type='hidden']),
.presentes-page textarea,
.presentes-page select {
	width: 100%;
	box-sizing: border-box;
	padding: 8px 10px;
	border: 1px solid #d8d3c7;
	border-radius: 3px;
	background: #fff;
	font: 0.9em Verdana, Arial, sans-serif;
	color: #333;
}

.presentes-page input:focus,
.presentes-page textarea:focus,
.presentes-page select:focus {
	border-color: #BAA367;
	outline: 2px solid rgba(186, 163, 103, .18);
}

.presentes-page button {
	border: 0;
	border-radius: 3px;
	padding: 8px 14px !important;
	background: #BAA367 !important;
	color: #fff !important;
	font: 600 0.88em Verdana, Arial, sans-serif;
	cursor: pointer;
}

.presentes-page button:hover {
	background: #9e8954 !important;
}

/* Botões uniformizados (mesma largura e tamanho) */
.btn-acao-uniforme {
    border: 0 !important;
    border-radius: 3px !important;
    padding: 8px 14px !important;
    background: #BAA367 !important;
    color: #fff !important;
    font: 600 0.88em Verdana, Arial, sans-serif !important;
    cursor: pointer !important;
    text-align: center !important;
    box-sizing: border-box !important;
    display: inline-block !important;
    width: 170px !important;
    white-space: nowrap !important;
}

.btn-acao-uniforme:hover {
    background: #9e8954 !important;
}

.presentes-page button.btn-acao {
	background: #BAA367 !important;
	color: #fff !important;
	padding: 4px 10px !important;
	font-size: 0.85em !important;
}

.presentes-page button.btn-acao:hover {
	background: #9e8954 !important;
}

/* Botão Excluir em Vermelho com texto branco */
.presentes-page button.btn-excluir {
	background: #a71d2a !important;
	color: #fff !important;
	padding: 4px 10px !important;
	font-size: 0.85em !important;
	border: 0 !important;
	border-radius: 3px !important;
	cursor: pointer !important;
}

.presentes-page button.btn-excluir:hover {
	background: #82141f !important;
}

.presentes-page button.btn-cancelar {
	background: none !important;
	color: #333 !important;
	border: none !important;
	padding: 0 !important;
	font-size: 13px !important;
	font-weight: normal !important;
	text-decoration: underline !important;
}

.presentes-page hr {
	border: 0;
	border-top: 1px solid #e7e2d5;
	margin: 24px 0;
}

/* Estilo do botão Voltar ao Topo */
.btn-voltar-topo {
    font-size: 0.85em;
    font-weight: bold;
    color: #666;
    background: #f4f3ed;
    padding: 6px 12px;
    border-radius: 4px;
    border: 1px solid #d8d3c7;
    display: inline-block;
    transition: all 0.2s;
}

.btn-voltar-topo:hover {
    background: #BAA367;
    color: #fff;
    border-color: #BAA367;
    text-decoration: none;
}

/* Espaçamento idêntico aos blocos superiores antes de "Itens na Lista" */
.print-section-title {
    margin-top: 24px !important;
}

.presentes-copy-box {
	display: flex;
	gap: 4px;
	align-items: center;
	margin-bottom: 8px;
}

.presentes-copy-box input {
	margin-bottom: 0 !important;
}

/* Botão verde "ver" */
.btn-ver {
	background-color: #2b7a4b !important;
	color: #fff !important;
	display: inline-block;
	border-radius: 4px;
	padding: 3px 9px;
	font-size: 0.75em;
	font-weight: 500;
	text-decoration: none !important;
	margin-right: 6px;
	vertical-align: middle;
}

.link-externo {
	color: #009900 !important;
	text-decoration: underline;
}

/* --- ESTILO DA TABELA (APENAS DESKTOP - FLUÍDA) --- */
.presentes-table-wrap {
	width: 100%;
	overflow-x: auto;
}

.presentes-table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0 10px;
	font-size: .92em;
}

.presentes-table th {
	padding: 12px;
	background: #f4f3ed;
	color: #665b3e;
	text-align: left;
	font-weight: bold;
}

.presentes-table td {
	padding: 15px 14px;
	background: #fbfaf7;
	border-top: 1px solid #eee9dd;
	border-bottom: 1px solid #eee9dd;
	vertical-align: middle;
	line-height: 1.7;
	color: #333;
}

.nowrap-col {
    white-space: nowrap !important;
}

.presentes-table td:first-child {
	border-left: 1px solid #eee9dd;
	border-radius: 3px 0 0 3px;
}

.presentes-table td:last-child {
	border-right: 1px solid #eee9dd;
	border-radius: 0 3px 3px 0;
}

.mobile-only {
    display: none !important;
}
.desktop-only {
    display: block !important;
}

@media screen and (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }
    .mobile-only {
        display: block !important;
    }

    body {
        overflow-x: hidden !important;
    }

    .presentes-page {
        width: 100% !important;
        margin: 10px auto 20px !important;
        padding: 0 8px !important;
        box-sizing: border-box !important;
    }

    .presentes-card {
        padding: 14px 12px !important;
        box-sizing: border-box !important;
    }

    .m-card {
        background: #fbfaf7;
        border: 1px solid #e7e2d5;
        border-radius: 6px;
        padding: 12px;
        margin-bottom: 12px;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
        box-sizing: border-box;
        color: #333;
    }

    .m-header {
        font-size: 0.95em;
        font-weight: bold;
        color: #333;
        margin-bottom: 6px;
        padding-bottom: 0px;
        border-bottom: none;
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 6px;
    }

    .m-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 0.82em;
        padding: 5px 0;
        color: #333;
    }

    .m-row span:first-child {
        color: #333;
    }

    .m-row-desc {
        display: block !important;
        font-size: 0.82em;
        padding: 8px 0;
        margin: 4px 0;
        border-top: 1px solid #eee9dd;
        border-bottom: 1px solid #f2ede1;
        color: #333;
    }

    .m-desc-label {
        font-weight: bold;
        color: #333;
        display: block;
        margin-bottom: 5px;
    }

    .m-desc-text {
        display: block;
        color: #333;
        line-height: 1.5;
        word-break: break-word;
    }

    .m-footer-row {
        margin-top: 6px;
        padding-top: 8px;
        border-top: 1px dashed #eee9dd;
    }

    .m-buy-form {
        display: flex;
        gap: 6px;
        align-items: center;
        margin: 0;
    }

    .m-input-name {
        width: 100px !important;
        margin-bottom: 0 !important;
        padding: 3px 5px !important;
        font-size: 0.78em !important;
    }

    .m-btn-buy {
        padding: 4px 8px !important;
        font-size: 0.78em !important;
        margin-bottom: 0 !important;
    }
}

/* --- ESTILOS PARA IMPRESSÃO / SALVAR PDF (COM CINZA CLARO NO CABEÇALHO) --- */
.print-only-header {
    display: none;
}

@media print {
    #topo, header, .busca, .localiza, footer,
    #rodape, .footer, .site-footer, 
    div:not(.presentes-page):not(.presentes-card):not(.presentes-table-wrap),
    .no-print {
        display: none !important;
    }

    body, .presentes-page, .presentes-card {
        background: #fff !important;
        color: #000 !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        box-shadow: none !important;
    }

    .print-only-header {
        display: block !important;
        margin-bottom: 15px;
        padding-bottom: 8px;
        border-bottom: 2px solid #000 !important;
    }

    .print-only-header h2 {
        margin: 0 0 3px 0;
        padding: 0;
        border: none;
        font-size: 1.3em;
        color: #000 !important;
        font-weight: bold !important;
    }

    .print-section-title h3 {
        color: #000 !important;
        font-weight: bold !important;
        font-size: 1.1em !important;
        margin: 0 0 10px 0 !important;
        padding: 0 !important;
        border: none !important;
    }

    .mobile-only {
        display: none !important;
    }
    .desktop-only {
        display: block !important;
    }

    .presentes-table {
        border-collapse: collapse !important;
        width: 100% !important;
        font-size: 10pt !important;
    }

    .presentes-table th,
    .presentes-table td {
        border: 1px solid #000 !important;
        padding: 6px 8px !important;
        color: #000 !important;
    }

    /* Linha superior (cabeçalho) com fundo cinza claro na impressão */
    .presentes-table th {
        background: #e6e6e6 !important;
        font-weight: bold !important;
        color: #000 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .presentes-table td {
        background: #fff !important;
    }

    .presentes-table td strong {
        font-weight: bold !important;
    }

    .txt-comprado-por {
        color: #000 !important;
        font-weight: bold !important;
    }

    .txt-buyer-name {
        color: #000 !important;
        font-weight: normal !important;
    }

    .presentes-table th:last-child,
    .presentes-table td:last-child,
    .btn-ver {
        display: none !important;
    }
}