/* Desenvolvido por Dule Digital | Alex Vieira | https://duledigital.com.br */

/* Cores da marca: o layout redefine --brand/--accent com o que foi
   configurado no painel; estes são os padrões (azul, laranja e branco). */
:root {
    --brand: #0066FF;
    --brand-dark: #003d99;
    --accent: #FF5A00;
    --ink: #14213D;
    --soft: #F3F7FF;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: #1f2937;
    background: #ffffff;
    line-height: 1.6;
}

.dg-content {
    max-width: 1040px;
    margin: 0 auto;
    padding: 48px 24px;
}

.dg-hero h1 {
    font-size: 2rem;
    color: var(--ink);
    line-height: 1.2;
    margin-bottom: 8px;
}

.dg-badge {
    display: inline-block;
    margin-top: 12px;
    padding: 4px 10px;
    font-size: 0.8rem;
    background: #f5f5f5;
    border-radius: 4px;
    color: #555;
}

.dg-info {
    margin-top: 32px;
}

.dg-footer {
    margin-top: 40px;
    padding: 32px 24px;
    background: var(--ink);
    font-size: 0.85rem;
    color: #c7d2e8;
    text-align: center;
    border-top: 4px solid var(--accent);
}

.dg-footer p { margin: 4px 0; }

.dg-footer a {
    color: #fff;
}
.dg-footer__notice { color: #ffb37f; }

.dg-catalog {
    margin-top: 32px;
}

.dg-catalog__list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dg-catalog__list a {
    color: #1f1f1f;
    font-weight: 600;
    text-decoration: none;
}

.dg-catalog__list a:hover {
    text-decoration: underline;
}

/* Envolve toda .dg-variant-table: em telas estreitas a tabela rola na
   horizontal dentro desta faixa, em vez de estourar a página inteira. */
.dg-table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 12px;
}

.dg-variant-table {
    width: 100%;
    min-width: 480px;
    border-collapse: collapse;
}

.dg-table-scroll .dg-variant-table {
    margin-top: 0;
}

.dg-variant-table th,
.dg-variant-table td {
    text-align: left;
    padding: 8px;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
}

.dg-variant-table form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.dg-form-hint {
    color: #888;
    font-size: 0.82rem;
    margin-top: 16px;
}

.dg-form {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 480px;
}

.dg-form label {
    font-weight: 600;
    font-size: 0.85rem;
    margin-top: 12px;
}

.dg-form input,
.dg-form select,
.dg-form textarea {
    padding: 9px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
}

.dg-alert {
    background: #FCE8E6;
    color: #D93025;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 0.9rem;
    margin: 16px 0;
}

.dule-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 6px;
    border: 1px solid transparent;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.95rem;
}

.dule-btn--primary {
    background: var(--brand);
    color: #fff;
}

.dule-btn--whatsapp {
    background: #25D366;
    color: #fff;
}

.dule-muted {
    color: #6B7280;
    font-size: 0.85rem;
}


/* ===== Cabeçalho, home e cartões ===== */
.dg-header { border-bottom: 3px solid var(--accent); box-shadow: 0 2px 10px rgba(20,33,61,.06); background: #fff; position: sticky; top: 0; z-index: 10; }
.dg-header__inner { max-width: 1040px; margin: 0 auto; padding: 12px 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.dg-header__brand { font-weight: 800; font-size: 1.2rem; color: var(--brand); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.dg-header__brand img { height: 40px; width: auto; max-width: 180px; object-fit: contain; display: block; }
.dg-header__nav { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-left: auto; align-items: center; }
.dg-header__nav a { color: #1f1f1f; text-decoration: none; font-weight: 600; font-size: 0.9rem; }
.dg-header__nav a:hover { color: var(--brand); }
.dg-header__cta { background: var(--brand); color: #fff !important; padding: 6px 14px; border-radius: 6px; }
.dg-header__cta:hover { color: #fff !important; opacity: 0.9; }
.dg-nav-toggle, .dg-nav-toggle-btn { display: none; }

.dg-hero-banner { position: relative; margin: -48px calc(50% - 50vw) 0; padding: 72px 24px; color: #fff; background: linear-gradient(120deg, var(--brand) 0%, var(--brand-dark) 62%, var(--accent) 150%); background-size: cover; background-position: center; }
.dg-hero-banner::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,25,60,.78) 0%, rgba(10,25,60,.35) 70%, rgba(10,25,60,.1) 100%); }
.dg-hero-banner:not(.dg-hero-banner--image)::before { display: none; }
.dg-hero-banner__inner { position: relative; max-width: 992px; margin: 0 auto; }
.dg-hero-banner h1 { font-size: 2.6rem; margin: 0 0 10px; color: #fff; line-height: 1.15; }
.dg-hero__lead { font-size: 1.15rem; color: rgba(255,255,255,.92); max-width: 560px; margin: 0; }
.dg-hero-banner .dule-btn--primary { background: var(--accent); }
.dg-hero-banner .dule-btn--outline { background: transparent; color: #fff; border-color: #fff; }
.dg-hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.dule-btn--outline { background: #fff; color: var(--brand); border-color: var(--brand); }

.dg-section { margin-top: 40px; }
.dg-section h2 { margin: 0 0 16px; font-size: 1.4rem; color: var(--ink); padding-left: 12px; border-left: 4px solid var(--accent); }
.dg-card-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.dg-card { border: 1px solid #e3e9f5; border-radius: 12px; overflow: hidden; background: #fff; transition: box-shadow .15s, transform .15s; }
.dg-card:hover { box-shadow: 0 6px 18px rgba(0,0,0,.08); transform: translateY(-2px); }
.dg-card a { display: flex; flex-direction: column; gap: 6px; padding: 0 0 16px; color: inherit; text-decoration: none; height: 100%; }
.dg-card span { color: #666; font-size: 0.88rem; }
.dg-card .dg-card__tag { color: var(--accent); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; }
.dg-card .dg-card__price { color: var(--brand); font-weight: 700; font-size: 0.95rem; margin-top: auto; }
.dg-steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.dg-steps li { counter-increment: step; background: var(--soft); border-radius: 10px; padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.dg-steps li::before { content: counter(step); width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; display: grid; place-items: center; }
.dg-steps span { color: #555; font-size: 0.9rem; }

@media (max-width: 720px) {
    .dg-header__inner { padding: 10px 16px; }
    .dg-nav-toggle-btn { display: inline-flex; margin-left: auto; font-size: 1.4rem; padding: 4px 10px; border-radius: 6px; cursor: pointer; }
    .dg-header__nav { order: 3; flex-basis: 100%; flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 0; max-height: 0; overflow: hidden; margin-left: 0; transition: max-height .2s ease; }
    .dg-nav-toggle:checked ~ .dg-header__nav { max-height: 760px; }
    .dg-header__nav a { padding: 10px 4px; border-top: 1px solid #eee; }
    .dg-header__cta { text-align: center; margin-top: 6px; }
    .dg-hero-banner { padding: 48px 16px; margin-top: -32px; }
    .dg-hero-banner h1 { font-size: 1.9rem; }
}

/* ==========================================================================
   Responsividade — site público
   ========================================================================== */

@media (max-width: 600px) {
    .dg-content {
        padding: 32px 16px;
    }

    .dg-footer {
        padding: 20px 16px;
    }

    .dg-hero h1 {
        font-size: 1.6rem;
    }

    /* Botão de envio dos formulários principais (orçamento, arquivo,
       checkout) ocupa a largura toda — mais fácil de tocar no celular.
       Não se aplica a botões dentro de linhas da tabela (carrinho,
       variações), que têm seu próprio layout em flex com outros campos. */
    .dg-form > button[type="submit"] {
        width: 100%;
        justify-content: center;
    }

    /* Tabelas de variação/carrinho/pedido (.dg-variant-table) em telas
       estreitas: rolagem horizontal escondia colunas inteiras sem
       nenhum indício visual (o botão "Remover" do carrinho, por
       exemplo, ficava fora da área visível). Em vez de depender de
       scroll, cada linha vira um bloco empilhado — mais fácil de ler e
       de tocar, e nada fica escondido. Os rótulos vêm do atributo
       data-label em cada <td> (ver views públicas de carrinho,
       catálogo, checkout e minha-conta).
       Combinado com overflow-x:auto do .dg-table-scroll, que continua
       sendo a rede de segurança caso o conteúdo de alguma célula
       nova ainda seja mais largo que a tela. */
    .dg-variant-table {
        min-width: 0;
    }

    .dg-variant-table thead {
        display: none;
    }

    .dg-variant-table tbody,
    .dg-variant-table tr,
    .dg-variant-table td {
        display: block;
        width: 100%;
    }

    .dg-variant-table tr {
        border: 1px solid #eee;
        border-radius: 8px;
        padding: 10px 12px;
        margin-bottom: 10px;
    }

    .dg-variant-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
        padding: 6px 0;
        border-bottom: 1px dashed #f0f0f0;
    }

    .dg-variant-table td:last-child {
        border-bottom: none;
    }

    .dg-variant-table td[data-label]::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 0.78rem;
        text-transform: uppercase;
        color: #888;
        flex-shrink: 0;
    }

    /* Células com formulário (atualizar quantidade, remover, adicionar
       ao carrinho): rótulo em cima, formulário ocupando a largura
       toda embaixo — um input pequeno ao lado de um botão não cabe
       ao lado do rótulo sem espremer os dois. */
    .dg-variant-table td.dg-cell--stack {
        flex-direction: column;
        align-items: stretch;
    }

    .dg-variant-table td.dg-cell--stack::before {
        margin-bottom: 4px;
    }

    .dg-variant-table td form {
        width: 100%;
    }

    .dg-variant-table td form input[type="number"] {
        flex: 1;
        min-width: 0;
    }

    .dg-variant-table td form button[type="submit"] {
        flex-shrink: 0;
    }
}

@media (max-width: 400px) {
    .dg-hero h1 {
        font-size: 1.4rem;
    }
}


/* ===== Imagens (cartões, produto, miniaturas) ===== */
.dg-card__img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--soft); }
.dg-card__body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 0; flex: 1; }
.dg-card strong { color: var(--ink); }
.dg-card__placeholder { aspect-ratio: 4 / 3; display: grid; place-items: center; background: linear-gradient(135deg, var(--soft), #fff1e8); color: var(--brand); font-size: 2.2rem; font-weight: 800; }

.dg-product { display: grid; grid-template-columns: minmax(0, 360px) 1fr; gap: 28px; align-items: start; }
.dg-product__img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; border: 1px solid #e3e9f5; background: var(--soft); }
.dg-product .dg-hero p { color: #4b5563; }
.dg-catalog h2 { color: var(--ink); }
.dg-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.dg-variant-table th { color: var(--brand); font-size: 0.8rem; text-transform: uppercase; letter-spacing: .03em; }
.dule-btn--primary:hover { filter: brightness(.92); }

@media (max-width: 720px) {
    .dg-product { grid-template-columns: 1fr; }
}
body { overflow-x: clip; }


/* ===== Menu de produtos (mega menu) ===== */
.dg-header__inner { position: relative; }
.dg-mega { position: static; }
.dg-mega__trigger { display: inline-flex; gap: 4px; align-items: center; padding: 16px 0; margin: -16px 0; }
.dg-mega__panel { display: none; position: absolute; left: 24px; right: 24px; top: 100%; z-index: 30; background: #fff; border: 1px solid #e3e9f5; border-top: 3px solid var(--accent); border-radius: 0 0 12px 12px; box-shadow: 0 18px 40px rgba(20,33,61,.18); padding: 22px 26px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 22px; }
.dg-mega:hover .dg-mega__panel, .dg-mega:focus-within .dg-mega__panel { display: grid; }
.dg-mega__col ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.dg-mega__col li a { display: block; padding: 5px 0; color: #374151 !important; font-weight: 500 !important; font-size: 0.9rem !important; }
.dg-mega__col li a:hover { color: var(--brand) !important; }
.dg-mega__title { color: var(--brand) !important; font-weight: 800 !important; font-size: 0.78rem !important; text-transform: uppercase; letter-spacing: .05em; padding-bottom: 6px; border-bottom: 2px solid var(--accent); display: block; }

/* ===== Configurador de produto ===== */
.dg-config { margin-top: 32px; padding-bottom: 110px; }
.dg-config__title { font-size: 1.2rem; color: var(--ink); margin: 26px 0 10px; }
.dg-config__group { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
.dg-config__group legend { font-weight: 800; font-size: 1.05rem; color: var(--ink); padding: 0; margin-bottom: 8px; }
.dg-opts { display: flex; flex-wrap: wrap; gap: 10px; }
.dg-opt { font: inherit; font-weight: 600; font-size: 0.92rem; color: #1f2937; background: #fff; border: 2px solid #dbe3f3; border-radius: 10px; padding: 12px 18px; min-height: 48px; cursor: pointer; transition: border-color .12s, background .12s, box-shadow .12s; }
.dg-opt:hover { border-color: var(--brand); }
.dg-opt.is-on { border-color: var(--brand); background: var(--soft); color: var(--brand); box-shadow: 0 0 0 3px rgba(0,102,255,.12); }
.dg-opt.is-off { opacity: .55; border-style: dashed; }
.dg-qty { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid #e3e9f5; border-radius: 12px; overflow: hidden; }
.dg-qty th { text-align: left; font-size: 0.74rem; text-transform: uppercase; letter-spacing: .04em; color: #6b7280; padding: 10px 16px; background: #f8faff; }
.dg-qty td { padding: 13px 16px; border-top: 1px solid #eef2fa; }
.dg-qty tbody tr { cursor: pointer; transition: background .1s; }
.dg-qty tbody tr:hover { background: #f8faff; }
.dg-qty tbody tr.is-on { background: var(--soft); box-shadow: inset 4px 0 0 var(--accent); }
.dg-qty tbody tr.is-on td:last-child strong { color: var(--brand); }
.dg-qty th:last-child, .dg-qty td:last-child, .dg-qty__unit { text-align: right; }

.dg-buybar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--ink); color: #fff; box-shadow: 0 -6px 24px rgba(20,33,61,.25); }
.dg-buybar__inner { max-width: 1040px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; gap: 14px 24px; flex-wrap: wrap; }
.dg-buybar__info { display: flex; flex-direction: column; flex: 1 1 220px; min-width: 0; }
.dg-buybar__info span { font-size: 0.82rem; color: #c7d2e8; }
.dg-buybar__eta { color: #ffb37f !important; }
.dg-buybar__price { font-size: 1.6rem; font-weight: 800; white-space: nowrap; }
.dg-buybar__actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dg-buybar__actions form { margin: 0; }
.dg-buybar .dule-btn--primary, .dg-buybar__buy { background: var(--accent); padding: 12px 26px; font-size: 1rem; }
.dg-buybar .dule-btn--outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.dg-buybar__link { color: #c7d2e8; font-size: 0.85rem; text-decoration: underline; }

/* ===== Checkout: resumo e entrega ===== */
.dg-summary { background: var(--soft); border-radius: 12px; padding: 14px 18px; margin: 16px 0; max-width: 480px; }
.dg-summary > div { display: flex; justify-content: space-between; padding: 4px 0; }
.dg-summary__total { border-top: 1px solid #d7e3fb; margin-top: 6px; padding-top: 8px !important; font-size: 1.2rem; }
.dg-summary__total strong { color: var(--brand); }
.dg-summary__eta { margin: 8px 0 0; color: #b84300; font-weight: 600; font-size: 0.9rem; }
.dg-choice { border: 0; padding: 0; margin: 18px 0 4px; display: grid; gap: 10px; }
.dg-choice legend { font-weight: 700; font-size: 0.9rem; margin-bottom: 8px; padding: 0; }
.dg-choice__opt { display: flex !important; gap: 12px; align-items: flex-start; border: 2px solid #dbe3f3; border-radius: 12px; padding: 14px 16px; cursor: pointer; margin: 0 !important; font-weight: 400 !important; }
.dg-choice__opt:has(input:checked) { border-color: var(--brand); background: var(--soft); }
.dg-choice__opt input { margin-top: 4px; }
.dg-choice__opt span { display: flex; flex-direction: column; }
.dg-choice__opt small { color: #6b7280; font-size: 0.82rem; }

@media (max-width: 720px) {
    .dg-mega__panel { position: static; display: block; box-shadow: none; border: 0; padding: 0 0 6px; }
    .dg-mega__col ul { display: none; }
    .dg-mega__col { padding: 0; }
    .dg-mega__title { border: 0; text-transform: none; letter-spacing: 0; font-size: 0.9rem !important; padding: 10px 4px 10px 16px; font-weight: 600 !important; color: #1f2937 !important; border-top: 1px solid #eee; }
    .dg-mega__trigger span { display: none; }
    .dg-opt { flex: 1 1 calc(50% - 10px); padding: 12px; }
    .dg-buybar__inner { padding: 10px 16px; gap: 8px 14px; }
    .dg-buybar__price { font-size: 1.3rem; }
    .dg-buybar__info { flex-basis: 100%; order: 3; }
    .dg-buybar__actions { margin-left: auto; flex-wrap: nowrap; }
    .dg-buybar__actions .dule-btn--outline, .dg-buybar__link { display: none; }
    .dg-buybar__buy { padding: 11px 22px; }
    .dg-buybar__info strong, .dg-buybar__info #cfg-summary { display: none; }
    .dg-buybar__eta { font-size: 0.78rem; }
    .dg-content { padding-bottom: 110px; }
    .dg-qty th, .dg-qty td { padding: 11px 10px; }
    .dg-config { padding-bottom: 150px; }
}
