/* =========================================================
   Paraíso da Magia — Acabamentos visuais V2
   Apenas aparência: hero, camadas do menu, galeria e footer.
   Não altera checkout, produtos, preços ou encomendas.
   ========================================================= */

/* A navegação mantém-se por cima da galeria mesmo durante o scroll. */
.public-header.pdm-shop-header {
    position: sticky;
    top: 0;
    z-index: 400;
    isolation: isolate;
}
.pdm-detail-gallery,
.public-product-gallery {
    position: relative;
    z-index: 0;
    isolation: isolate;
}
.pdm-detail-featured,
.pdm-detail-thumbnails,
.public-product-page-image { z-index: auto; }

/* Homepage: o banner mantém todas as suas margens sem cortes laterais. */
.public-hero-visual:has(.public-hero-banner) {
    display: flex;
    align-items: center;
    justify-content: center;
    height: auto;
    min-height: 0;
    max-height: none;
    padding: clamp(12px, 2vw, 22px);
    background: radial-gradient(circle at 50% 36%, #382249 0%, #21152f 73%);
}
.public-hero-visual:has(.public-hero-banner)::after { opacity: .35; }
.public-hero-visual .public-hero-banner {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto !important;
    min-height: 0 !important;
    max-height: 560px;
    object-fit: contain !important;
    object-position: center;
    border-radius: 12px;
}

/* Ficha de produto: galeria de leitura clara, horizontal nas miniaturas. */
.pdm-detail-gallery { max-width: 100%; min-width: 0; }
.pdm-detail-featured {
    z-index: 0;
    box-shadow: 0 24px 60px rgba(5, 2, 10, .22);
}
.pdm-detail-featured > img {
    opacity: 1;
    transform: scale(1);
    transition: opacity .19s ease, transform .25s ease;
    will-change: opacity;
}
.pdm-detail-featured > img.pdm-photo-swapping {
    opacity: .12;
    transform: scale(.987);
}
.pdm-detail-featured > img.pdm-photo-zoomable { cursor: zoom-in; }
.pdm-detail-thumbnails {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 11px;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 5px 2px 12px;
    scrollbar-color: rgba(228,196,145,.5) transparent;
    scrollbar-width: thin;
    scroll-snap-type: x proximity;
}
.pdm-detail-thumb {
    display: block;
    flex: 0 0 clamp(68px, 17%, 92px);
    min-width: 0;
    scroll-snap-align: start;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.pdm-detail-thumb:hover { transform: translateY(-2px); }
.pdm-detail-thumb.is-active {
    box-shadow: 0 0 0 2px rgba(228,196,145,.18), 0 7px 17px rgba(0,0,0,.15);
}
.pdm-detail-thumb:focus-visible,
.pdm-detail-featured > img.pdm-photo-zoomable:focus-visible {
    outline: 3px solid #e4c491;
    outline-offset: 3px;
}

/* A galeria antiga permanece contida e nunca concorre com o menu. */
.public-product-gallery { max-width: 100%; overflow: clip; }
.public-product-gallery .public-product-page-image { min-width: 0; }

/* Ampliação acessível da imagem principal. */
.pdm-photo-dialog {
    max-width: min(95vw, 1100px);
    max-height: 95vh;
    width: min(95vw, 1050px);
    margin: auto;
    padding: clamp(12px, 2vw, 24px);
    border: 1px solid rgba(228,196,145,.38);
    border-radius: 20px;
    background: #1b1326;
    color: #f8f0ff;
    box-shadow: 0 30px 95px rgba(0,0,0,.6);
}
.pdm-photo-dialog::backdrop { background: rgba(5,3,10,.87); backdrop-filter: blur(8px); }
.pdm-photo-dialog img { display:block; width:100%; max-height:80vh; object-fit:contain; }
.pdm-photo-dialog-close {
    position: absolute; right: 11px; top: 11px;
    display: grid; place-items: center; width: 38px; height: 38px;
    border: 1px solid rgba(228,196,145,.3); border-radius: 50%;
    background: rgba(25,15,37,.92); color:#f6e5c6;
    font-size: 25px; line-height:1; cursor:pointer;
}
.pdm-photo-dialog-close:hover { background: #48305b; }
.pdm-photo-dialog-close:focus-visible { outline: 2px solid #e4c491; outline-offset: 3px; }

/* Footer mágico, subtil, com brilho discreto e sem imagens externas. */
.public-footer {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 12% 5%, rgba(116,69,145,.24), transparent 38%),
        radial-gradient(ellipse at 90% 90%, rgba(100,61,137,.17), transparent 43%),
        linear-gradient(145deg, #1d122c 0%, #110c1d 70%, #100b18 100%);
    border-top: 1px solid rgba(236,199,142,.26);
}
.public-footer::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: .33;
    background-image:
        radial-gradient(circle, rgba(252,218,165,.8) 1px, transparent 1.8px),
        radial-gradient(circle, rgba(214,168,248,.67) 1px, transparent 1.8px),
        radial-gradient(circle, rgba(255,234,192,.55) .8px, transparent 1.8px);
    background-size: 157px 149px, 223px 201px, 277px 241px;
    background-position: 15px 20px, 84px 97px, 141px 38px;
    transform: translate3d(0,0,0);
    animation: pdm-footer-stardust 22s ease-in-out infinite alternate;
}
.public-footer::after {
    content: "";
    position: absolute;
    top: 0;
    left: 8%;
    right: 8%;
    height: 1px;
    background: linear-gradient(90deg,transparent,rgba(248,210,148,.85),transparent);
    box-shadow: 0 0 24px rgba(228,196,145,.3);
    pointer-events: none;
}
.public-footer > .public-container { position: relative; z-index: 1; }
.pdm-footer-grid { gap: clamp(28px,4vw,65px); }
.pdm-footer-brand a { transition: transform .28s ease, filter .28s ease; }
.pdm-footer-brand a:hover { transform: translateY(-3px); filter: drop-shadow(0 0 10px rgba(228,196,145,.2)); }
.pdm-footer-column h3 {
    position:relative;
    margin-bottom:18px;
    padding-bottom:12px;
    letter-spacing: .055em;
}
.pdm-footer-column h3::after {
    content: "";
    position:absolute;
    left:0;
    bottom:0;
    width:42px;
    height:1px;
    background:linear-gradient(90deg, #e4c491, transparent);
}
.pdm-footer-column > a,
.pdm-footer-socials a,
.pdm-footer-cookie-link {
    transition: color .25s ease, transform .25s ease;
}
.pdm-footer-column > a:hover,
.pdm-footer-socials a:hover,
.pdm-footer-cookie-link:hover { color: #f5d5a0; transform:translateX(3px); }
.pdm-footer-column > a:focus-visible,
.pdm-footer-socials a:focus-visible,
.pdm-footer-cookie-link:focus-visible { outline:2px solid #e4c491;outline-offset:4px; }
.pdm-footer-bottom { border-top-color: rgba(236,199,142,.18); }
@keyframes pdm-footer-stardust {
    0% { transform: translate3d(0,0,0); opacity:.22; }
    50% { opacity:.39; }
    100% { transform: translate3d(0,-14px,0); opacity:.28; }
}
@media (max-width: 700px) {
    .public-hero-visual:has(.public-hero-banner) { padding: 10px; max-height:none; }
    .public-hero-visual .public-hero-banner { height:auto !important; max-height:320px; }
    .pdm-detail-thumbnails { gap:8px; }
    .pdm-detail-thumb { flex-basis:73px; }
    .pdm-footer-grid { gap:33px; }
}
@media (prefers-reduced-motion: reduce) {
    .public-footer::before { animation:none; }
    .pdm-detail-featured > img,
    .pdm-detail-thumb,
    .pdm-footer-column > a,
    .pdm-footer-socials a,
    .pdm-footer-cookie-link,
    .pdm-footer-brand a { transition:none !important; }
}
