:root {
    --pcd-exact-header-height: 203px;
    --pcd-exact-header-shift: 67px;
    --pcd-exact-logo-width: min(24.50vw, 413px);
    --pcd-exact-branch-width: min(23.14vw, 390px);
}

#pcd-exact-christmas,
#pcd-exact-christmas * {
    box-sizing: border-box;
}

#pcd-exact-christmas {
    position: absolute;
    inset: 0 0 auto 0;
    width: 100%;
    height: 270px;
    pointer-events: none;
    z-index: 2147482000;
    overflow: visible;
}

body.admin-bar #pcd-exact-christmas {
    top: 32px;
}

/* The detected site header is made taller so the navigation and cart sit at the
   same vertical level as in the approved reference image. */
.pcd-exact-header-target {
    min-height: var(--pcd-exact-header-height) !important;
    padding-top: var(--pcd-exact-header-shift) !important;
    box-sizing: border-box !important;
    overflow: visible !important;
    position: relative !important;
}

.pcd-exact-original-logo {
    opacity: 0 !important;
    visibility: hidden !important;
}

.pcd-exact-snow {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.pcd-exact-branch {
    position: absolute;
    top: 0;
    width: var(--pcd-exact-branch-width);
    height: auto;
    max-width: none !important;
    display: block !important;
    z-index: 5;
    user-select: none;
}

.pcd-exact-branch-left { left: 0; }
.pcd-exact-branch-right { right: 0; }

.pcd-exact-logo-wrap {
    position: absolute;
    left: 50%;
    top: 22px;
    width: var(--pcd-exact-logo-width);
    transform: translateX(-50%);
    z-index: 7;
    line-height: 0;
    opacity: 0;
    animation: pcd-exact-logo-in .55s ease-out .08s forwards;
}

.pcd-exact-logo {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-width: none !important;
    filter: drop-shadow(0 3px 4px rgba(70, 42, 20, .08));
}

.pcd-exact-hanger {
    position: absolute;
    top: 0;
    display: block;
    transform-origin: 50% 0;
    z-index: 4;
    line-height: 0;
    will-change: transform;
}

.pcd-exact-hanger img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-width: none !important;
    filter: drop-shadow(0 6px 6px rgba(31, 20, 15, .18));
}

.pcd-exact-hanger-left-red {
    left: 18px;
    width: 114px;
    animation: pcd-exact-sway-a 5.4s ease-in-out infinite;
}

.pcd-exact-hanger-left-gold {
    left: 123px;
    width: 109px;
    animation: pcd-exact-sway-b 6.2s ease-in-out -1.8s infinite;
}

.pcd-exact-hanger-right-red {
    right: 224px;
    width: 125px;
    animation: pcd-exact-sway-c 5.8s ease-in-out -.9s infinite;
}

.pcd-exact-no-animation .pcd-exact-hanger {
    animation: none !important;
}

@keyframes pcd-exact-logo-in {
    from { opacity: 0; transform: translateX(-50%) translateY(-4px) scale(.985); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

@keyframes pcd-exact-sway-a {
    0%, 100% { transform: rotate(-2.3deg); }
    50%      { transform: rotate(2.0deg); }
}

@keyframes pcd-exact-sway-b {
    0%, 100% { transform: rotate(1.7deg); }
    50%      { transform: rotate(-2.1deg); }
}

@keyframes pcd-exact-sway-c {
    0%, 100% { transform: rotate(-1.8deg); }
    50%      { transform: rotate(2.4deg); }
}

@media (prefers-reduced-motion: reduce) {
    .pcd-exact-hanger,
    .pcd-exact-logo-wrap {
        animation: none !important;
        opacity: 1 !important;
    }
}

@media (max-width: 1180px) {
    :root {
        --pcd-exact-logo-width: min(31vw, 390px);
        --pcd-exact-branch-width: min(31vw, 360px);
        --pcd-exact-header-shift: 62px;
        --pcd-exact-header-height: 196px;
    }

    .pcd-exact-hanger-left-red { left: 8px; width: 108px; }
    .pcd-exact-hanger-left-gold { left: 104px; width: 101px; }
    .pcd-exact-hanger-right-red { right: 158px; width: 116px; }
}

@media (max-width: 900px) {
    :root {
        --pcd-exact-logo-width: 320px;
        --pcd-exact-branch-width: 270px;
        --pcd-exact-header-height: 184px;
        --pcd-exact-header-shift: 56px;
    }

    .pcd-exact-logo-wrap { top: 20px; }
    .pcd-exact-hanger-left-red { left: -8px; width: 94px; }
    .pcd-exact-hanger-left-gold { left: 74px; width: 88px; }
    .pcd-exact-hanger-right-red { right: 94px; width: 101px; }
}

@media (max-width: 680px) {
    :root {
        --pcd-exact-logo-width: 255px;
        --pcd-exact-branch-width: 205px;
        --pcd-exact-header-height: 164px;
        --pcd-exact-header-shift: 48px;
    }

    #pcd-exact-christmas { height: 210px; }
    .pcd-exact-logo-wrap { top: 14px; }
    .pcd-exact-hanger-left-red { left: -22px; width: 78px; }
    .pcd-exact-hanger-left-gold { display: none; }
    .pcd-exact-hanger-right-red { right: -12px; width: 84px; }
}

@media (max-width: 782px) {
    body.admin-bar #pcd-exact-christmas { top: 46px; }
}
