/* CDG Orçamentos — visual estilo WooCommerce/Storefront, namespace .cdg- */

/* Fonte Montserrat em todos os textos das telas do plugin */
.cdg-catalog, .cdg-catalog *,
.cdg-shop, .cdg-shop *,
.cdg-single, .cdg-single *,
.cdg-checkout, .cdg-checkout *,
.cdg-archive-wrap, .cdg-archive-wrap *,
.cdg-related, .cdg-related *,
.cdg-mini-cart, .cdg-mini-cart *,
.cdg-toast { font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important; }

.cdg-catalog,
.cdg-checkout,
.cdg-single { --cdg-accent: #052a57; --cdg-accent-dark: #03203f; --cdg-border: #e3e3e3; --cdg-text: #404040; }

/* Remove o chrome do tema (Astra) nas páginas de checkout.
   Atenção: .ast-container também envolve o conteúdo, por isso é
   removido apenas dentro do cabeçalho. */
body.cdg-checkout-page .site-primary-header-wrap,
body.cdg-checkout-page .ast-builder-grid-row-container,
body.cdg-checkout-page .site-header-focus-item,
body.cdg-checkout-page .site-header .ast-container,
body.cdg-checkout-page #masthead .ast-container,
body.cdg-checkout-page .entry-title { display: none !important; }

/* Esconde o título da página na página de Categorias */
body.cdg-categorias-page .entry-title { display: none !important; }

/* Esconde o cabeçalho (título) e a navegação de posts nas páginas de produto */
body.cdg-produto-page .entry-header,
body.cdg-produto-page .post-navigation { display: none !important; }

/* ---------- Filtro de categorias ---------- */
.cdg-cat-filter { list-style: none; margin: 0 0 1.6em; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.cdg-cat-filter li { margin: 0; }
.cdg-cat-filter a { display: inline-block; padding: 6px 14px; border: 1px solid var(--cdg-border); border-radius: 999px; text-decoration: none; color: var(--cdg-text); font-size: .9em; transition: all .15s; }
.cdg-cat-filter a:hover { border-color: var(--cdg-accent); color: var(--cdg-accent); }
.cdg-cat-filter li.cdg-active a { background: var(--cdg-accent); border-color: var(--cdg-accent); color: #fff; }

/* ---------- Grade de produtos ---------- */
.cdg-products { list-style: none; margin: 0; padding: 0; display: grid; gap: 24px; }
.cdg-columns-2 { grid-template-columns: repeat(2, 1fr); }
.cdg-columns-3 { grid-template-columns: repeat(3, 1fr); }
.cdg-columns-4 { grid-template-columns: repeat(4, 1fr); }
.cdg-columns-5 { grid-template-columns: repeat(5, 1fr); }
.cdg-columns-6 { grid-template-columns: repeat(6, 1fr); }

.cdg-product { display: flex; flex-direction: column; border: 1px solid var(--cdg-border); border-radius: 6px; overflow: hidden; background: #fff; transition: box-shadow .2s, transform .2s; }
.cdg-product:hover { box-shadow: 0 8px 24px rgba(0,0,0,.1); transform: translateY(-2px); }
/* padding-bottom garante 15px entre o texto do card e os botões, mesmo quando
   o título ocupa várias linhas e "encosta" na área de ações. */
.cdg-product-link { display: flex; flex-direction: column; text-decoration: none; color: inherit; flex: 1; padding-bottom: 15px; }
.cdg-product-thumb { display: block; position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: #f0f0f0; }
.cdg-product-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cdg-no-image { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; background: #f0f0f0; color: #9a9a9a; font-size: .85em; text-transform: uppercase; letter-spacing: .04em; }
.cdg-product-title { font-size: 1.02em; line-height: 1.3; margin: 14px 14px 0; font-weight: 600; }
.cdg-product-sku { display: block; margin: 4px 14px 0; font-size: .8em; color: #888; }

/* ---------- Botões ---------- */
.cdg-button { display: inline-block; background: var(--cdg-accent); color: #fff; border: none; border-radius: 6px; padding: 11px 18px; font-size: .95em; font-weight: 600; cursor: pointer; text-decoration: none !important; text-align: center; transition: background .15s; line-height: 1.2; }
.cdg-button:hover, .cdg-button:focus { background: var(--cdg-accent-dark); color: #fff; text-decoration: none !important; }
.cdg-button[disabled] { opacity: .6; cursor: default; }
.cdg-button-large { padding: 14px 28px; font-size: 1.05em; }
.cdg-button-secondary { background: #fff; color: var(--cdg-accent); border: 1px solid var(--cdg-accent); }
.cdg-button-secondary:hover { background: #eef2f8; color: var(--cdg-accent-dark); }
.cdg-product .cdg-button { margin: auto 14px 14px; border-radius: 0; }
.cdg-card-actions { margin: auto 14px 14px; display: flex; flex-direction: row; align-items: stretch; justify-content: space-between; gap: 8px; }
.cdg-card-actions .cdg-button { margin: 0; padding: 10px 12px; font-size: .88em; border-radius: 6px; }
.cdg-button-details { flex: 0 0 80%; }
.cdg-button-icon { flex: 0 0 15%; min-width: 40px; padding: 10px 0; display: inline-flex; align-items: center; justify-content: center; }
.cdg-button-icon svg { width: 18px; height: 18px; display: block; }
.cdg-add-to-cart.cdg-added { background: #1f8a4c; }

/* ---------- Seletor de quantidade ---------- */
.cdg-qty { display: inline-flex; align-items: stretch; border: 1px solid var(--cdg-border); border-radius: 6px; overflow: hidden; }
.cdg-qty button { background: #f3f3f3; border: none; width: 34px; cursor: pointer; font-size: 1.1em; color: var(--cdg-text); }
.cdg-qty button:hover { background: #e8e8e8; }
.cdg-qty-input { width: 52px; border: none; border-left: 1px solid var(--cdg-border); border-right: 1px solid var(--cdg-border); text-align: center; font-size: 1em; -moz-appearance: textfield; }
.cdg-qty-input::-webkit-outer-spin-button, .cdg-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ---------- Paginação ---------- */
.cdg-pagination { margin-top: 2em; }
.cdg-pagination .page-numbers { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0; flex-wrap: wrap; }
.cdg-pagination .page-numbers li a, .cdg-pagination .page-numbers li span { display: inline-block; padding: 8px 14px; border: 1px solid var(--cdg-border); border-radius: 6px; text-decoration: none; color: var(--cdg-text); }
.cdg-pagination .page-numbers li span.current { background: var(--cdg-accent); border-color: var(--cdg-accent); color: #fff; }

/* ---------- Página Categorias: layout de loja (sidebar + grade) ---------- */
.cdg-shop { --cdg-accent: #052a57; --cdg-accent-dark: #03203f; --cdg-border: #e3e3e3; --cdg-text: #404040; display: grid; grid-template-columns: 240px 1fr; gap: 32px; align-items: start; }
.cdg-shop-main { min-width: 0; }
.cdg-shop-sidebar-title { font-size: 1.15em; margin: 0 0 .6em; padding-bottom: .5em; border-bottom: 2px solid var(--cdg-accent); }
.cdg-cat-list { list-style: none; margin: 0; padding: 0; }
.cdg-cat-list li { margin: 0; border-bottom: 1px solid var(--cdg-border); }
.cdg-cat-list a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 11px 6px; text-decoration: none; color: var(--cdg-text); transition: color .15s; }
.cdg-cat-list a:hover { color: var(--cdg-accent); }
.cdg-cat-list li.cdg-active a { color: var(--cdg-accent); font-weight: 700; }
.cdg-cat-count { background: #eef0f4; color: #667; border-radius: 999px; font-size: .78em; min-width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; padding: 0 6px; }
.cdg-cat-list li.cdg-active .cdg-cat-count { background: var(--cdg-accent); color: #fff; }

@media (max-width: 782px) {
	.cdg-shop { grid-template-columns: 1fr; gap: 18px; }
	.cdg-cat-list { display: flex; flex-wrap: wrap; gap: 8px; }
	.cdg-cat-list li { border: 1px solid var(--cdg-border); border-radius: 999px; }
	.cdg-cat-list a { padding: 7px 14px; }
}

/* ---------- Arquivo de categoria ---------- */
.cdg-archive-wrap { --cdg-accent: #052a57; --cdg-accent-dark: #03203f; --cdg-border: #e3e3e3; --cdg-text: #404040; max-width: 1240px; margin: 0 auto; padding: 40px 20px 60px; }
.cdg-archive-breadcrumb { font-size: .9em; color: #888; margin: 0 0 .4em; }
.cdg-archive-breadcrumb a { color: var(--cdg-accent); text-decoration: none; }
.cdg-archive-breadcrumb a:hover { text-decoration: underline; }
.cdg-archive-breadcrumb span { margin: 0 4px; }
.cdg-archive-title { margin: 0 0 .3em; }
.cdg-archive-description { color: #555; margin-bottom: 1.4em; }

/* ---------- Relacionados (single) ---------- */
.cdg-related { --cdg-accent: #052a57; --cdg-accent-dark: #03203f; --cdg-border: #e3e3e3; --cdg-text: #404040; margin: 50px 0 10px; padding-top: 34px; border-top: 1px solid var(--cdg-border); clear: both; }
.cdg-related-title { font-size: 1.5em; margin: 0 0 1em; }

/* ---------- Página individual ---------- */
.cdg-single { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; margin: 1em 0; }
.cdg-single-main-image img { width: 100%; height: auto; border: 1px solid var(--cdg-border); border-radius: 8px; display: block; }
.cdg-single-main-image .cdg-no-image { aspect-ratio: 1/1; border: 1px solid var(--cdg-border); border-radius: 8px; }
.cdg-single-thumbs { list-style: none; display: flex; gap: 10px; padding: 0; margin: 12px 0 0; flex-wrap: wrap; }
.cdg-single-thumbs li { margin: 0; }
.cdg-single-thumbs a { display: block; border: 1px solid var(--cdg-border); border-radius: 6px; overflow: hidden; width: 70px; height: 70px; }
.cdg-single-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.cdg-single-title { margin-top: 0; }
.cdg-single-sku, .cdg-single-cats { color: #777; font-size: .92em; margin: .2em 0; }
.cdg-single-description { margin: 1.2em 0; line-height: 1.6; }
.cdg-single-specs { width: 100%; border-collapse: collapse; margin: 1em 0 1.6em; }
.cdg-single-specs th, .cdg-single-specs td { text-align: left; padding: 9px 12px; border: 1px solid var(--cdg-border); font-size: .94em; }
.cdg-single-specs th { background: #f7f7f7; width: 40%; font-weight: 600; }
.cdg-single-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 1em; }

/* ---------- Checkout / carrinho ---------- */
.cdg-checkout-title { margin: 1.4em 0 .8em; font-size: 1.25em; }

/* Indicador de etapas — container de setas (arrows).
   Seletor com .cdg-checkout para vencer a regra do Astra
   (.entry-content ol { padding-left:20px }) e alinhar com a tabela/título. */
.cdg-checkout .cdg-steps { list-style: none; display: flex; gap: 4px; padding: 0; margin: .5em 0 2.2em; }
.cdg-steps li {
	flex: 1 1 0;
	display: flex; align-items: center; justify-content: center; gap: 12px;
	min-height: 56px; padding: 10px 18px 10px 40px;
	background: #e8eae9; color: #8a8a8a; font-weight: 700; font-size: 1.12em;
	clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 50%, calc(100% - 22px) 100%, 0 100%, 22px 50%);
	transition: background .2s, color .2s;
}
.cdg-steps li:first-child { padding-left: 22px; clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 50%, calc(100% - 22px) 100%, 0 100%); }
.cdg-steps li:last-child { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 22px 50%); }
.cdg-steps li span { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: rgba(0,0,0,.14); color: #fff; font-size: .92em; flex-shrink: 0; }
.cdg-steps li.cdg-step-current { background: var(--cdg-accent); color: #fff; }
.cdg-steps li.cdg-step-done { background: var(--cdg-accent-dark); color: #fff; }
.cdg-steps li.cdg-step-current span,
.cdg-steps li.cdg-step-done span { background: rgba(255,255,255,.28); }

/* Tela de finalizado / agradecimento */
.cdg-thankyou { text-align: center; padding: 2.5em 1em 1.5em; max-width: 560px; margin: 0 auto; }
.cdg-thankyou-icon { display: inline-flex; align-items: center; justify-content: center; width: 92px; height: 92px; border-radius: 50%; background: #e6edf5; color: var(--cdg-accent); margin-bottom: .6em; }
.cdg-thankyou-title { font-size: 2em; margin: .2em 0 .3em; }
.cdg-thankyou-text { font-size: 1.15em; color: #555; margin: 0 auto 1.6em; line-height: 1.5; }

/* Ações */
.cdg-cart-actions { display: flex; justify-content: flex-end; margin-top: 1.2em; }

.cdg-cart-table { width: 100%; border-collapse: collapse; margin-bottom: 1em; }
.cdg-cart-table th, .cdg-cart-table td { padding: 12px; border-bottom: 1px solid var(--cdg-border); vertical-align: middle; text-align: left; }
.cdg-cart-table thead th { font-size: .82em; text-transform: uppercase; letter-spacing: .03em; color: #888; }
.cdg-col-img { width: 72px; }
.cdg-col-img img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; border: 1px solid var(--cdg-border); }
.cdg-col-rm { width: 40px; text-align: right; }
.cdg-remove { background: none; border: none; font-size: 1.4em; line-height: 1; color: #c0392b; cursor: pointer; padding: 0 6px; }
.cdg-remove:hover { color: #922b21; }

.cdg-quote-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; width: 100%; max-width: none; margin: 0; }
.cdg-field { display: flex; flex-direction: column; margin: 0; }
.cdg-field-full, .cdg-submit { grid-column: 1 / -1; }
.cdg-submit { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-top: .8em; }
.cdg-field label { font-weight: 600; margin-bottom: 5px; font-size: .92em; }
.cdg-field input, .cdg-field textarea, .cdg-field select { padding: 11px 12px; border: 1px solid var(--cdg-border); border-radius: 6px; font-size: 1em; font-family: inherit; width: 100%; background: #fff; color: var(--cdg-text); height: auto; }
.cdg-field input:focus, .cdg-field textarea:focus, .cdg-field select:focus { outline: none; border-color: var(--cdg-accent); box-shadow: none; }
.cdg-form-section-title { grid-column: 1 / -1; margin: .6em 0 0; padding-bottom: .5em; border-bottom: 2px solid var(--cdg-accent); font-size: 1.25em; }
.cdg-address-row { display: flex; gap: 16px; margin: 0; }
.cdg-address-row .cdg-field { margin: 0; }
.cdg-address-row .cdg-field-endereco { flex: 0 0 calc(80% - 8px); }
.cdg-address-row .cdg-field-numero { flex: 0 0 calc(20% - 8px); }
@media (max-width: 600px) {
	.cdg-address-row { flex-wrap: wrap; }
	.cdg-address-row .cdg-field-endereco,
	.cdg-address-row .cdg-field-numero { flex: 1 1 100%; }
}

/* ---------- Avisos ---------- */
.cdg-notice { padding: 14px 18px; border-radius: 6px; margin-bottom: 1.4em; font-size: .96em; }
.cdg-notice-success { background: #e7f6ec; border: 1px solid #aadcb9; color: #1d6b35; }
.cdg-notice-error { background: #fdecea; border: 1px solid #f3b6ae; color: #a02216; }
.cdg-empty { padding: 2em; text-align: center; color: #888; }

/* ---------- Mini-carrinho (apenas ícone + badge) ---------- */
.cdg-mini-cart { --cdg-accent: #052a57; position: relative; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; color: inherit; line-height: 0; }
.cdg-mini-cart .cdg-mini-cart-icon { display: block; }
.cdg-mini-cart .cdg-count-badge { position: absolute; top: -8px; right: -10px; }
.cdg-count-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--cdg-accent); color: #fff; font-size: .72em; font-weight: 700; line-height: 1; }

/* ---------- Toast de feedback ---------- */
.cdg-toast { position: fixed; right: 20px; bottom: 20px; background: #052a57; color: #fff; padding: 14px 20px; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.2); z-index: 99999; opacity: 0; transform: translateY(12px); transition: opacity .25s, transform .25s; max-width: 320px; }
.cdg-toast.cdg-toast-show { opacity: 1; transform: translateY(0); }
.cdg-toast.cdg-toast-error { background: #a02216; }

/* ---------- Responsivo ---------- */
@media (max-width: 1024px) {
	.cdg-columns-5, .cdg-columns-6 { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 782px) {
	.cdg-single { grid-template-columns: 1fr; gap: 24px; }
	.cdg-columns-3, .cdg-columns-4, .cdg-columns-5, .cdg-columns-6 { grid-template-columns: repeat(2, 1fr); }
	.cdg-quote-form { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
	.cdg-steps li { font-size: .9em; gap: 7px; padding: 8px 12px 8px 28px; min-height: 46px; }
	.cdg-steps li:first-child { padding-left: 14px; }
	.cdg-steps li span { width: 26px; height: 26px; }
	.cdg-steps li { clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%, 14px 50%); }
	.cdg-steps li:first-child { clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%); }
	.cdg-steps li:last-child { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 14px 50%); }
}
@media (max-width: 480px) {
	.cdg-products { gap: 16px; }
	.cdg-col-img { display: none; }
}
