/* ============================================
   PARAÍSO DA MAGIA — NOVO MENU PÚBLICO
============================================ */

.pdm-shop-header {
    --sh-gold: #e4c491;
    --sh-muted: #c7b5d5;
    --sh-border: rgba(228, 196, 145, .15);

    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(18, 13, 27, .97);
    border-bottom: 1px solid var(--sh-border);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, .14);
}

.pdm-shop-announcement {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 9px 15px;
    background: linear-gradient(90deg, #2a1b38, #3a254b, #2a1b38);
    color: #e4c491;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
}

.pdm-shop-announcement span {
    font-size: 13px;
}

/* ============================================
   ESTRUTURA DESKTOP
============================================ */

.pdm-shop-header .pdm-shop-header-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "brand actions"
        "nav nav";
    align-items: center;
    gap: 0 20px;
    min-height: 0;
}

.pdm-shop-brand {
    grid-area: brand;
    display: inline-flex;
    align-items: center;
    justify-self: start;
    min-width: 0;
    padding: 13px 0;
}

.pdm-shop-header .pdm-shop-logo {
    display: block;
    width: auto;
    height: auto;
    max-width: 210px;
    max-height: 72px;
    object-fit: contain;
}

.pdm-shop-brand .public-brand-text strong {
    color: #fff;
    font-size: clamp(16px, 2vw, 22px);
}

.pdm-shop-brand .public-brand-text small {
    color: var(--sh-gold);
    letter-spacing: 1.2px;
}

/* ============================================
   AÇÕES: PESQUISA E CARRINHO
============================================ */

.pdm-shop-actions {
    grid-area: actions;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 11px;
}

.pdm-shop-action,
.pdm-shop-header .pdm-shop-cart-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 43px;
    padding: 10px 14px;
    border: 1px solid rgba(202, 171, 228, .22);
    border-radius: 11px;
    background: #261b33;
    color: #f3eaf9;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition:
        border-color .2s ease,
        background .2s ease,
        transform .2s ease;
}

.pdm-shop-action:hover,
.pdm-shop-header .pdm-shop-cart-button:hover {
    border-color: rgba(228, 196, 145, .48);
    background: #362547;
    color: #fff;
    transform: translateY(-1px);
}

.pdm-shop-action svg,
.pdm-shop-header .pdm-shop-cart-button svg {
    display: block;
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pdm-shop-header .pdm-header-cart-count {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    min-width: 23px;
    height: 23px;
    padding: 0 5px;
    border-radius: 50px;
    background: #8c5db4;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}

/* ============================================
   NAVEGAÇÃO DESKTOP
============================================ */

.pdm-shop-header .pdm-shop-nav {
    grid-area: nav;
    display: block;
    min-width: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--sh-border);
}

.pdm-shop-header .pdm-shop-nav-list {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2px 8px;
    margin: 0;
    padding: 8px 0;
}

.pdm-shop-header .pdm-shop-nav-list>li {
    position: relative;
    width: auto;
    flex: 0 0 auto;
}

.pdm-shop-header .pdm-shop-nav-list>li>a,
.pdm-shop-header .pdm-shop-nav-list>li>.site-category-dropdown>summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 42px;
    padding: 11px 15px;
    border-radius: 9px;
    background: transparent;
    color: #dfd2ea;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
    text-decoration: none;
    transition:
        background .2s ease,
        color .2s ease;
}

.pdm-shop-header .pdm-shop-nav-list>li>a:hover,
.pdm-shop-header .pdm-shop-nav-list>li>.site-category-dropdown>summary:hover,
.pdm-shop-header .pdm-shop-nav-list>li>a[aria-current="page"] {
    background: rgba(157, 104, 196, .13);
    color: var(--sh-gold);
}

.pdm-shop-header .site-category-dropdown[open]>summary {
    color: var(--sh-gold);
}

/* SUBCATEGORIAS */

.pdm-shop-header .site-category-submenu {
    z-index: 90;
    padding: 8px;
    border: 1px solid rgba(228, 196, 145, .19);
    border-radius: 12px;
    background: #251a34;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .45);
}

.pdm-shop-header .site-category-submenu a,
.pdm-shop-header .site-category-submenu summary {
    border-radius: 8px;
    color: #e6d9ee;
    font-size: 12px;
    line-height: 1.6;
}

.pdm-shop-header .site-category-submenu a:hover,
.pdm-shop-header .site-category-submenu summary:hover {
    background: #382448;
    color: var(--sh-gold);
}

.pdm-shop-header .pdm-shop-all-products {
    color: var(--sh-gold) !important;
}

.pdm-shop-all-products span {
    font-size: 15px;
}

/* ELEMENTOS QUE SÓ APARECEM NO MOBILE */

.pdm-shop-mobile-title {
    display: none;
}

.pdm-shop-menu-backdrop {
    display: none;
}

/* ============================================
   TABLET + MOBILE: MENU LATERAL
============================================ */

@media (max-width: 1000px) {

    .pdm-shop-header .pdm-shop-header-inner {
        display: flex;
        flex-wrap: nowrap;
        justify-content: space-between;
        gap: 12px;
        min-height: 75px;
    }

    .pdm-shop-brand {
        flex: 0 1 auto;
        min-width: 0;
        padding: 10px 0;
    }

    .pdm-shop-header .pdm-shop-logo {
        max-width: 160px;
        max-height: 55px;
    }

    .pdm-shop-actions {
        flex: 0 0 auto;
        gap: 8px;
    }

    .pdm-shop-header .pdm-shop-cart-button {
        margin: 0;
    }

    /* O MENU ANTIGO É SUBSTITUÍDO POR UM DRAWER */

    .pdm-shop-header .public-nav.site-main-nav.pdm-shop-nav,
    .pdm-shop-header .public-nav.site-main-nav.pdm-shop-nav.is-open {
        position: fixed;
        z-index: 102;
        top: 0;
        left: 0;
        bottom: 0;
        display: flex;
        flex-direction: column;
        box-sizing: border-box;
        width: min(88vw, 360px);
        height: 100dvh;
        margin: 0;
        padding: 0 0 25px;
        overflow-x: hidden;
        overflow-y: auto;
        border: 0;
        border-right: 1px solid rgba(228, 196, 145, .23);
        border-radius: 0;
        background: #191122;
        box-shadow: 20px 0 60px rgba(0, 0, 0, .38);
        transform: translateX(-105%);
        visibility: hidden;
        pointer-events: none;
        transition:
            transform .38s cubic-bezier(.22, 1, .36, 1),
            visibility .38s;
        overscroll-behavior: contain;
    }

    .pdm-shop-header .public-nav.site-main-nav.pdm-shop-nav.is-open {
        transform: translateX(0);
        visibility: visible;
        pointer-events: auto;
    }

    .pdm-shop-mobile-title {
        display: flex;
        flex: 0 0 auto;
        flex-direction: column;
        gap: 5px;
        padding: 31px 23px 24px;
        border-bottom: 1px solid rgba(228, 196, 145, .15);
    }

    .pdm-shop-mobile-title>span {
        color: #fff;
        font-size: 23px;
        font-weight: 650;
    }

    .pdm-shop-mobile-title small {
        color: var(--sh-gold);
        font-size: 10px;
        letter-spacing: 1.5px;
    }

    .pdm-shop-header .pdm-shop-nav-list {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 5px;
        padding: 18px 13px;
        margin: 0;
    }

    .pdm-shop-header .pdm-shop-nav-list>li {
        width: 100%;
    }

    .pdm-shop-header .pdm-shop-nav-list>li>a,
    .pdm-shop-header .pdm-shop-nav-list>li>.site-category-dropdown>summary {
        width: 100%;
        min-height: 47px;
        padding: 13px 15px;
        border-radius: 10px;
        font-size: 14px;
    }

    /* SUBCATEGORIAS PASSAM A ABRIR DENTRO DO MENU */

    .pdm-shop-header .site-category-submenu,
    .pdm-shop-header .site-category-submenu .site-category-submenu {
        position: static;
        top: auto;
        left: auto;
        width: auto;
        min-width: 0;
        max-width: none;
        margin: 5px 0 12px 13px;
        padding: 4px 0 4px 10px;
        border: 0;
        border-left: 1px solid rgba(228, 196, 145, .26);
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    /* FUNDO ESCURECIDO */

    .pdm-shop-menu-backdrop {
        position: fixed;
        z-index: 81;
        inset: 0;
        display: block;
        background: rgba(5, 3, 10, .72);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition:
            opacity .35s ease,
            visibility .35s;
    }

    body:has(.pdm-shop-nav.is-open) .pdm-shop-menu-backdrop {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    body.pdm-shop-menu-open {
        overflow: hidden;
    }

    /* BOTÃO MENU */

    .pdm-shop-header .pdm-shop-menu-toggle {
        position: relative;
        z-index: 103;
        display: flex;
        flex: 0 0 43px;
        align-items: center;
        justify-content: center;
        gap: 5px;
        width: 43px;
        height: 43px;
        margin: 0;
        padding: 11px;
        border: 1px solid rgba(228, 196, 145, .24);
        border-radius: 11px;
        background: #2b1e3a;
    }

    .pdm-shop-menu-toggle span {
        transition: transform .25s ease, opacity .2s ease;
    }

    .pdm-shop-menu-toggle[aria-expanded="true"] span:first-child {
        transform: translateY(7px) rotate(45deg);
    }

    .pdm-shop-menu-toggle[aria-expanded="true"] span:nth-child(2) {
        opacity: 0;
    }

    .pdm-shop-menu-toggle[aria-expanded="true"] span:last-child {
        transform: translateY(-7px) rotate(-45deg);
    }

    /* Garantir que o botão de fechar fica acima do drawer */

    .pdm-shop-header:has(.pdm-shop-nav.is-open) {
        z-index: 100;
    }

    .pdm-shop-header:has(.pdm-shop-nav.is-open) .pdm-shop-menu-toggle {
        position: fixed;
        top: 20px;
        left: min(calc(88vw - 60px), 300px);
        z-index: 104;
    }
}

/* ============================================
   TELEMÓVEIS PEQUENOS
============================================ */

@media (max-width: 600px) {

    .pdm-shop-announcement {
        padding: 8px 12px;
        font-size: 9px;
        letter-spacing: .35px;
        text-align: center;
    }

    .pdm-shop-header .pdm-shop-header-inner {
        min-height: 67px;
        gap: 8px;
    }

    .pdm-shop-header .pdm-shop-logo {
        max-width: min(32vw, 120px);
        max-height: 46px;
    }

    .pdm-shop-brand .public-brand-text strong {
        font-size: 14px;
    }

    .pdm-shop-brand .public-brand-text small {
        display: none;
    }

    .pdm-shop-actions {
        gap: 6px;
    }

    .pdm-shop-search span,
    .pdm-shop-cart-button>span:not(.pdm-header-cart-count) {
        display: none;
    }

    .pdm-shop-header .pdm-shop-action,
    .pdm-shop-header .pdm-shop-cart-button {
        width: 40px;
        min-width: 40px;
        height: 42px;
        min-height: 42px;
        padding: 0;
        border-radius: 10px;
    }

    .pdm-shop-header .pdm-shop-cart-button {
        position: relative;
    }

    .pdm-shop-header .pdm-header-cart-count {
        position: absolute;
        top: -7px;
        right: -7px;
        min-width: 20px;
        height: 20px;
        font-size: 10px;
    }

    .pdm-shop-header .pdm-shop-menu-toggle {
        width: 40px;
        height: 42px;
        flex-basis: 40px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .pdm-shop-header *,
    .pdm-shop-menu-backdrop {
        transition: none !important;
    }
}

@media (max-width: 1000px) {
    .pdm-shop-header {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
}


/* BANNER DA HOMEPAGE NO CABEÇALHO */

.pdm-shop-header .pdm-shop-banner-brand {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-width: 0;
}

.pdm-shop-header .pdm-shop-header-banner {
    display: block;
    width: auto;
    height: auto;
    max-width: 260px;
    max-height: 82px;
    object-fit: contain;
    object-position: left center;
}

@media (max-width: 1000px) {
    .pdm-shop-header .pdm-shop-header-banner {
        max-width: 170px;
        max-height: 60px;
    }
}

@media (max-width: 600px) {
    .pdm-shop-header .pdm-shop-header-banner {
        max-width: min(34vw, 135px);
        max-height: 49px;
    }
}


/* ============================================
   PARAÍSO DA MAGIA — HEADER MAIS COMPACTO
============================================ */

/* Faixa superior mais discreta */
.pdm-shop-announcement {
    padding: 6px 12px;
    font-size: 9px;
    letter-spacing: .7px;
}

/* Menos espaço na zona do logótipo */
.pdm-shop-header .pdm-shop-header-inner {
    gap: 0 16px;
}

/* Banner do cabeçalho mais pequeno */
.pdm-shop-header .pdm-shop-banner-brand {
    padding: 7px 0;
}

.pdm-shop-header .pdm-shop-header-banner {
    max-width: 195px;
    max-height: 54px;
}

/* Botões mais discretos */
.pdm-shop-header .pdm-shop-action,
.pdm-shop-header .pdm-shop-cart-button {
    min-height: 37px;
    padding: 8px 12px;
    border-radius: 9px;
    font-size: 11px;
}

.pdm-shop-header .pdm-shop-action svg,
.pdm-shop-header .pdm-shop-cart-button svg {
    width: 18px;
    height: 18px;
}

/* Navegação mais estreita */
.pdm-shop-header .pdm-shop-nav-list {
    gap: 2px 5px;
    padding: 3px 0;
}

.pdm-shop-header .pdm-shop-nav-list>li>a,
.pdm-shop-header .pdm-shop-nav-list>li>.site-category-dropdown>summary {
    min-height: 35px;
    padding: 7px 12px;
    border-radius: 7px;
    font-size: 11px;
}

/* Hover subtil */
.pdm-shop-header .pdm-shop-nav-list>li>a:hover,
.pdm-shop-header .pdm-shop-nav-list>li>.site-category-dropdown>summary:hover {
    background: rgba(167, 122, 222, .09);
}

/* ============================================
   MOBILE — COMPACTO SEM ESTRAGAR O MENU LATERAL
============================================ */

@media (max-width: 1000px) {
    .pdm-shop-header .pdm-shop-header-inner {
        min-height: 62px;
        gap: 9px;
    }

    .pdm-shop-header .pdm-shop-header-banner {
        max-width: 145px;
        max-height: 45px;
    }

    /* Preservar botões acessíveis ao toque */
    .pdm-shop-header .pdm-shop-action,
    .pdm-shop-header .pdm-shop-cart-button,
    .pdm-shop-header .pdm-shop-menu-toggle {
        min-height: 42px;
    }

    /* O menu lateral mantém os links confortáveis */
    .pdm-shop-header .pdm-shop-nav-list {
        padding: 18px 13px;
        gap: 5px;
    }

    .pdm-shop-header .pdm-shop-nav-list>li>a,
    .pdm-shop-header .pdm-shop-nav-list>li>.site-category-dropdown>summary {
        min-height: 46px;
        padding: 12px 15px;
        font-size: 13px;
    }
}

@media (max-width: 600px) {
    .pdm-shop-announcement {
        padding: 5px 10px;
        font-size: 8px;
    }

    .pdm-shop-header .pdm-shop-header-inner {
        min-height: 59px;
    }

    .pdm-shop-header .pdm-shop-header-banner {
        max-width: min(32vw, 120px);
        max-height: 40px;
    }
}

/* PDM_VISUAL_V3_START — menu acima da galeria e outros elementos */
.pdm-shop-header{z-index:500}
.pdm-shop-mobile-panel{z-index:520}
.pdm-shop-announcement{position:relative; z-index:510}
/* PDM_VISUAL_V3_END */
