/* ============================================================
   LOJA DE IMPRESSÕES -- página própria (loja.php)
   Pedido do cliente 22/set/2026 ("a loja poderia abrir em uma nova
   pagina, vinculando as fotos para ela selecionar para imprimir").
   ============================================================ */

* { box-sizing: border-box; }

body.loja-page-body {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    background: #fafafa;
    color: #1a1a1a;
    -webkit-font-smoothing: antialiased;
}

/* ── Cabeçalho ────────────────────────────────────────────── */
.loja-page-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 18px 24px;
    background: #1a1a1a;
    color: #fff;
    flex-wrap: wrap;
}
.loja-voltar {
    display: inline-flex; align-items: center; gap: 6px;
    color: #ccc; text-decoration: none; font-size: 13px; font-weight: 500;
    letter-spacing: .3px; white-space: nowrap;
}
.loja-voltar:hover { color: #fff; }
.loja-page-header-info h1 {
    margin: 0; font-size: 17px; font-weight: 700; letter-spacing: .3px;
}
.loja-page-header-info p {
    margin: 2px 0 0; font-size: 11px; color: #aaa; text-transform: uppercase; letter-spacing: 1px;
}

/* ── Layout principal (grid de fotos + carrinho) ─────────────── */
.loja-page-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 24px;
    align-items: start;
}
@media (max-width: 900px) {
    .loja-page-main { grid-template-columns: 1fr; padding: 16px; }
}

/* ── Capa / vitrine da loja (MODELO -- edite títulos, descrições e
   categorias à vontade em loja.php; os mockups são preenchidos com
   fotos reais da galeria por renderLojaCapaFotos() em loja.js) ────── */
.loja-capa {
    grid-column: 1 / -1;
    background: #fff;
    border-radius: 14px;
    padding: 32px 28px;
    margin-bottom: 4px;
}
.loja-capa-intro { text-align: center; margin-bottom: 28px; }
.loja-capa-intro h2 { margin: 0 0 6px; font-size: 22px; font-weight: 700; color: #1a1a1a; }
.loja-capa-intro p { margin: 0; font-size: 13.5px; color: #777; }

.loja-capa-categorias {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}
@media (max-width: 900px) {
    .loja-capa-categorias { grid-template-columns: 1fr; }
}

.loja-capa-categoria-titulo {
    margin: 0 0 14px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #1a1a1a;
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}
.loja-capa-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}
.loja-capa-card { text-align: center; }
.loja-capa-card-mockup {
    position: relative;
    width: 100%;
    max-width: 150px;
    aspect-ratio: 1;
    margin: 0 auto 12px;
}
.loja-capa-card-mockup img { width: 100%; height: 100%; object-fit: cover; display: block; }

.loja-capa-card-mockup.mockup-quadro {
    padding: 12px;
    background: #fff;
    border: 12px solid #2b2b2b;
    border-radius: 2px;
    box-shadow: 0 12px 24px rgba(0,0,0,.22), 0 2px 6px rgba(0,0,0,.12);
}
.loja-capa-card-mockup.mockup-quadro img { border-radius: 1px; }

.loja-capa-card-mockup.mockup-album {
    padding: 10px;
    background: linear-gradient(135deg, #4a3728, #2e2018);
    border-radius: 3px 8px 8px 3px;
    box-shadow: 5px 7px 16px rgba(0,0,0,.3), inset -4px 0 0 rgba(0,0,0,.25);
}
.loja-capa-card-mockup.mockup-album img { border-radius: 1px; box-shadow: 0 0 0 1px rgba(255,255,255,.15); }

.loja-capa-card-mockup.mockup-impressao {
    padding: 10px 10px 24px;
    background: #fff;
    border-radius: 2px;
    box-shadow: 0 9px 20px rgba(0,0,0,.16);
    transform: rotate(-2deg);
}

.loja-capa-card-nome { font-size: 13px; font-weight: 600; color: #1a1a1a; margin-bottom: 3px; }
.loja-capa-card-desc { font-size: 11.5px; color: #888; line-height: 1.4; }

.loja-capa-cta {
    text-align: center;
    margin-top: 28px;
    font-size: 12.5px;
    color: #aaa;
    letter-spacing: .3px;
}

#loja-page-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: #888;
    font-size: 13px;
}
#loja-page-erro {
    display: none;
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #dc2626;
    font-size: 14px;
}

/* ── Grid de fotos ────────────────────────────────────────── */
.loja-page-fotos-toolbar {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 12px; font-size: 13px; color: #555; gap: 10px;
}
#btn-loja-page-limpar {
    background: none; border: none; color: #dc2626; font-size: 12px; font-weight: 600;
    cursor: pointer; text-decoration: underline; padding: 0; white-space: nowrap;
}
.loja-page-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 8px;
}
.loja-page-foto {
    position: relative; cursor: pointer; border-radius: 8px; overflow: hidden;
    aspect-ratio: 1 / 1; background: #eee;
}
.loja-page-foto img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    transition: transform .15s ease, opacity .15s ease;
}
.loja-page-foto.selecionada img { opacity: .8; transform: scale(0.94); }
.loja-page-foto-check {
    position: absolute; top: 6px; right: 6px; width: 22px; height: 22px;
    border-radius: 50%; background: rgba(255,255,255,0.9); border: 2px solid #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; color: transparent; box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.loja-page-foto.selecionada .loja-page-foto-check {
    background: #16a34a; border-color: #16a34a; color: #fff;
}

/* ── Sidebar do carrinho ──────────────────────────────────── */
.loja-page-sidebar {
    background: #fff; border-radius: 12px; border: 1px solid #eee;
    padding: 18px; position: sticky; top: 20px;
}
.loja-page-sidebar h3 { margin: 0 0 6px; font-size: 15px; font-weight: 700; color: #1a1a1a; }
.loja-intro { font-size: 12.5px; color: #666; line-height: 1.5; margin: 0 0 14px; }
.loja-aviso {
    background: #fff3cd; color: #7a5c00; border-radius: 8px;
    padding: 12px 14px; font-size: 13px; line-height: 1.5; margin-bottom: 14px;
}

.loja-selecao-atual-info {
    font-size: 12px; font-weight: 600; color: #16a34a;
    background: #f0fdf4; border: 1px solid #dcfce7; border-radius: 6px;
    padding: 8px 10px; margin-bottom: 12px;
}
.loja-selecao-atual-info.vazio { color: #94a3b8; background: #f8fafc; border-color: #e2e8f0; }

/* ── Prévia do produto com a foto do cliente (mockup em CSS) ─────
   Pedido do cliente 22/set/2026 -- mostra como a foto ficaria no
   produto escolhido (quadro emoldurado, capa de álbum, impressão
   avulsa) ANTES de adicionar ao carrinho. Sem depender de fotos de
   produto reais -- é tudo desenhado em CSS a partir da miniatura já
   carregada da própria foto do cliente. */
.loja-preview-wrap {
    margin: 0 0 14px;
    padding: 18px;
    background: #f1f5f9;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 150px;
}
.loja-preview-vazio { font-size: 12px; color: #94a3b8; text-align: center; line-height: 1.5; }

.loja-preview-mockup {
    position: relative;
    width: 118px;
    height: 118px;
}
.loja-preview-mockup img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Quadro/Tela: moldura escura + passe-partout branco + sombra de parede */
.loja-preview-mockup.mockup-quadro {
    padding: 11px;
    background: #fff;
    border: 11px solid #2b2b2b;
    border-radius: 2px;
    box-shadow: 0 12px 24px rgba(0,0,0,.28), 0 2px 6px rgba(0,0,0,.15);
}
.loja-preview-mockup.mockup-quadro img { border-radius: 1px; }

/* Álbum/Fotolivro: capa com lombada e sombra de livro fechado */
.loja-preview-mockup.mockup-album {
    padding: 9px;
    background: linear-gradient(135deg, #4a3728, #2e2018);
    border-radius: 3px 7px 7px 3px;
    box-shadow: 5px 7px 16px rgba(0,0,0,.35), inset -4px 0 0 rgba(0,0,0,.25);
}
.loja-preview-mockup.mockup-album img { border-radius: 1px; box-shadow: 0 0 0 1px rgba(255,255,255,.15); }

/* Impressão avulsa: foto impressa com borda branca, levemente torta */
.loja-preview-mockup.mockup-impressao {
    padding: 9px 9px 22px;
    background: #fff;
    border-radius: 2px;
    box-shadow: 0 9px 20px rgba(0,0,0,.2);
    transform: rotate(-2deg);
}

/* ── Desconto progressivo do carrinho ─────────────────────────── */
.loja-desconto-linha {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 12.5px; color: #16a34a; font-weight: 600;
    margin-top: 4px;
}
.loja-carrinho-subtotal-bruto {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 12.5px; color: #94a3b8; text-decoration: line-through;
    margin-top: 8px; padding-top: 8px; border-top: 1px dashed #e2e8f0;
}
.loja-desconto-proximo {
    font-size: 11.5px; color: #94a3b8; margin-top: 4px; line-height: 1.4;
}

.loja-campo { margin-bottom: 12px; }
.loja-campo label { display: block; margin-bottom: 6px; font-weight: 700; font-size: 12px; color: #333; text-transform: uppercase; letter-spacing: .3px; }
.loja-campo select,
.loja-campo input[type="number"] {
    width: 100%; padding: 10px 12px; border: 1px solid #e2e8f0; border-radius: 6px;
    font-family: inherit; font-size: 14px; color: #1a1a1a; background: #fff;
}

#btn-loja-adicionar-carrinho {
    width: 100%; padding: 11px 16px; border-radius: 6px; border: none;
    background: #1a1a1a; color: #fff; font-weight: 600; font-size: 13px; cursor: pointer; margin-top: 4px;
}
#btn-loja-adicionar-carrinho:hover { background: #333; }
#btn-loja-adicionar-carrinho:disabled { opacity: .5; cursor: not-allowed; }

#loja-carrinho-wrap { margin: 18px 0 12px; }
.resumo-secao-titulo { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; color: #555; }
.loja-carrinho-vazio { font-size: 13px; color: #999; padding: 10px 0; }
.loja-carrinho-lista { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.loja-carrinho-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; background: #f8f9fa; border-radius: 8px; border: 1px solid #eee;
}
.loja-carrinho-item-thumbs { display: flex; flex-shrink: 0; }
.loja-carrinho-item-thumbs img {
    width: 34px; height: 34px; object-fit: cover; border-radius: 5px;
    border: 2px solid #fff; box-shadow: 0 0 0 1px #ddd; margin-left: -10px;
}
.loja-carrinho-item-thumbs img:first-child { margin-left: 0; }
.loja-carrinho-item-info { flex: 1; min-width: 0; }
.loja-carrinho-item-nome { font-size: 13px; font-weight: 700; color: #1a1a1a; }
.loja-carrinho-item-meta { font-size: 11px; color: #888; }
.loja-carrinho-item-preco { font-size: 13px; font-weight: 700; color: #16a34a; white-space: nowrap; }
.loja-carrinho-item-remover {
    background: none; border: none; color: #dc2626; font-size: 18px; cursor: pointer;
    padding: 2px 4px; line-height: 1; flex-shrink: 0;
}
.loja-carrinho-total {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 10px; padding-top: 10px; border-top: 1px dashed #ddd;
    font-size: 15px; font-weight: 700; color: #1a1a1a;
}

.loja-obs-label { display: block; margin-bottom: 8px; font-weight: bold; font-size: 13px; color: #333; }
#loja-obs { width: 100%; min-height: 60px; padding: 10px; border: 1px solid #e2e8f0; border-radius: 6px; font-family: inherit; font-size: 13px; resize: vertical; margin-bottom: 12px; }

#loja-erro { font-size: 12px; color: #dc2626; text-align: left; margin: 0 0 10px; }

#btn-loja-finalizar {
    width: 100%; padding: 13px 20px; border-radius: 6px; border: none;
    background: #009ee3; color: #ffffff; font-weight: 700; font-size: 13px; cursor: pointer;
}
#btn-loja-finalizar:hover { background: #0089c7; }
#btn-loja-finalizar:disabled { opacity: 0.6; cursor: not-allowed; }

@media (max-width: 900px) {
    .loja-page-sidebar { position: static; }
}

/* ── Página de produto "Impressões" (loja_impressao.php) -- estrutura
   inspirada em loja de fotógrafo tipo Pic-Time, a pedido do cliente
   22/set/2026 ("usar essa estrutura" + "para impressoes"). Tipo de
   papel/acabamento (borda) são só VISUAIS por enquanto -- não mudam
   preço nem vão pro pedido, é só estética até o cliente decidir se
   quer cadastrar variantes de verdade em produtos_loja. ─────────── */
#loja-prod-loading, #loja-prod-erro {
    grid-column: 1 / -1;
    text-align: center; padding: 80px 20px; color: #888; font-size: 13px;
}
#loja-prod-erro { display: none; color: #dc2626; }

.loja-prod-conteudo {
    background: #fff; border-radius: 12px; border: 1px solid #eee; padding: 26px;
}
.loja-prod-titulo { margin: 0 0 10px; font-size: 20px; font-weight: 700; color: #1a1a1a; }
.loja-prod-desc { margin: 0 0 20px; font-size: 13.5px; color: #666; line-height: 1.6; max-width: 60ch; }

.loja-prod-amostras { display: flex; gap: 10px; margin-bottom: 26px; }
.loja-prod-amostra {
    width: 78px; height: 78px; border-radius: 8px; overflow: hidden; background: #eee;
}
.loja-prod-amostra img { width: 100%; height: 100%; object-fit: cover; display: block; }

.loja-prod-secao { margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid #f0f0f0; }
.loja-prod-secao:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.loja-prod-secao h3 {
    margin: 0 0 12px; font-size: 12px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .5px; color: #333;
}

.loja-prod-tamanhos { display: flex; flex-wrap: wrap; gap: 10px; }
.loja-prod-tamanho {
    padding: 10px 14px; border: 1.5px solid #e2e8f0; border-radius: 8px;
    background: #fff; cursor: pointer; text-align: left; font-family: inherit;
    transition: border-color .15s ease, background .15s ease;
}
.loja-prod-tamanho:hover { border-color: #bbb; }
.loja-prod-tamanho.ativo { border-color: #1a1a1a; background: #1a1a1a; color: #fff; }
.loja-prod-tamanho-nome { display: block; font-size: 12.5px; font-weight: 700; }
.loja-prod-tamanho-preco { display: block; font-size: 11px; opacity: .75; margin-top: 2px; }

.loja-prod-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.loja-prod-tab {
    padding: 8px 14px; border: 1.5px solid #e2e8f0; border-radius: 20px;
    background: #fff; color: #555; font-family: inherit; font-size: 12px; font-weight: 600;
    cursor: pointer; transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.loja-prod-tab:hover { border-color: #bbb; }
.loja-prod-tab.ativo { border-color: #1a1a1a; background: #1a1a1a; color: #fff; }

.loja-prod-fotos-topo { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.loja-prod-fotos-contagem { font-size: 12px; color: #16a34a; font-weight: 600; white-space: nowrap; }
.loja-prod-fotos-aviso {
    font-size: 12px; color: #b45309; background: #fff7ed; border: 1px solid #fed7aa;
    border-radius: 6px; padding: 8px 10px; margin-bottom: 12px;
}
.loja-prod-fotos-aviso.oculto { display: none; }

.loja-prod-filmstrip {
    display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity;
}
.loja-prod-foto {
    position: relative; flex: 0 0 auto; width: 84px; height: 84px; border-radius: 8px;
    overflow: hidden; cursor: pointer; background: #eee; scroll-snap-align: start;
}
.loja-prod-foto img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    transition: transform .15s ease, opacity .15s ease;
}
.loja-prod-foto.selecionada img { opacity: .8; transform: scale(0.94); }
.loja-prod-foto-check {
    position: absolute; top: 5px; right: 5px; width: 18px; height: 18px;
    border-radius: 50%; background: rgba(255,255,255,0.9); border: 2px solid #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; color: transparent; box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.loja-prod-foto.selecionada .loja-prod-foto-check { background: #16a34a; border-color: #16a34a; color: #fff; }

.loja-prod-resumo-nome { font-size: 13px; font-weight: 700; color: #1a1a1a; text-align: center; margin-bottom: 4px; }
.loja-prod-resumo-preco { font-size: 22px; font-weight: 700; color: #1a1a1a; text-align: center; margin-bottom: 16px; }

#btn-loja-prod-adicionar {
    width: 100%; padding: 12px 16px; border-radius: 6px; border: none;
    background: #1a1a1a; color: #fff; font-weight: 600; font-size: 13px; cursor: pointer;
}
#btn-loja-prod-adicionar:hover { background: #333; }
#btn-loja-prod-adicionar:disabled { opacity: .5; cursor: not-allowed; }

.loja-prod-erro-form { font-size: 12px; color: #dc2626; text-align: center; margin: 10px 0 0; }

/* Cards da capa (vitrine) que levam pra loja_impressao.php -- ficam
   clicáveis (só os de "Impressões Avulsas" por enquanto). */
a.loja-capa-card-link { display: block; text-decoration: none; color: inherit; border-radius: 10px; transition: transform .15s ease, box-shadow .15s ease; }
a.loja-capa-card-link:hover { transform: translateY(-2px); }

/* ---- Dados do comprador + entrega + frete (25/set/2026) ----
   Formulário estilizado por loja-checkout.css; aqui só o encaixe no sidebar. */
#loja-checkout-box { margin: 18px 0 6px; padding-top: 14px; border-top: 1px solid #e2e8f0; }
.loja-checkout-resumo { margin: 14px 0 12px; padding-top: 10px; border-top: 1px solid #e2e8f0; }
.loja-resumo-linha { display: flex; justify-content: space-between; font-size: 13px; padding: 3px 0; }
.loja-resumo-total { font-size: 15px; font-weight: 700; padding-top: 6px; }
