/* =====================================================================
   New Year mode, Buylaptop look: "the gift" — loaded only while it is
   switched on in admin (Options → New Year mode).
   Brand: black bars, logo red; festive gold for ribbons.
   ===================================================================== */

:root {
    --ny-red: #d7182a;
    --ny-red-dark: #a60d1b;
    --ny-gold: #f4c542;
    --ny-gold-dark: #b8860b;
    --ny-ink: #141414;
}

/* ---------- colored snowflakes canvas ---------- */
.ny-sky {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1031; /* over the sticky menu bar (500), under modals and drawers (1040+) */
    pointer-events: none;
    transition: opacity .35s ease;
}
.ny-sky.is-muted {
    opacity: 0;
}

/* ---------- the menu bar wrapped like a present ---------- */
.ny-wrap {
    position: absolute;
    z-index: 2;
    left: 0;
    right: 0;
    bottom: -3px;
    height: 6px;
    pointer-events: none;
    background: linear-gradient(180deg, #ff4352 0%, var(--ny-red) 45%, #8e0b17 100%);
    box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
}
/* satin sheen running along the ribbon */
.ny-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, transparent 40%, rgba(255, 255, 255, .5) 50%, transparent 60%) 150% 0 / 300% 100% no-repeat;
    animation: ny-sheen 7s ease-in-out infinite;
}
.ny-wrap__bow {
    position: absolute;
    top: 50%;
    left: 62%; /* the empty middle of the bar, clear of the menu items and icons */
    width: 96px;
    height: auto;
    overflow: visible;
    filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .35));
    transform-origin: 50% 40%;
    transform: translate(-50%, -34%);
    animation: ny-bow 6s ease-in-out infinite;
}
@media (max-width: 991.98px) {
    .ny-wrap__bow {
        left: 50%;
        width: 70px;
    }
}
/* out of the way while the mobile menu is open */
.navbar:has(.navbar-collapse.show) .ny-wrap,
.navbar:has(.navbar-collapse.collapsing) .ny-wrap {
    opacity: 0;
}

/* ---------- the gift box in the corner ---------- */
.ny-gift {
    position: fixed;
    left: 18px;
    bottom: 16px;
    z-index: 1032;
}
.ny-gift__box {
    position: relative;
    display: block;
    width: 64px;
    height: 64px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .28));
    -webkit-tap-highlight-color: transparent;
}
.ny-gift__svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
    transform-origin: 50% 100%;
    animation: ny-shake 6s ease-in-out 2s infinite; /* someone is curious what's inside */
}
.ny-gift__lid {
    transform-box: fill-box;
    transform-origin: 12% 100%;
    transition: transform .45s cubic-bezier(.34, 1.56, .64, 1);
}
.ny-gift__box:hover .ny-gift__lid {
    transform: translateY(-3px) rotate(-4deg);
}
.ny-gift.is-open .ny-gift__lid {
    transform: translate(-8px, -16px) rotate(-24deg);
}
.ny-gift.is-open .ny-gift__svg {
    animation: none;
}
.ny-gift__box:focus-visible {
    outline: 2px solid var(--ny-gold);
    outline-offset: 4px;
    border-radius: 12px;
}

/* gift tag on a string: days left (the year in January) */
.ny-gift__tag {
    position: absolute;
    top: -2px;
    left: 84%;
    display: flex;
    align-items: baseline;
    gap: 3px;
    padding: 4px 9px 4px 13px;
    border-radius: 3px 7px 7px 3px;
    color: var(--ny-red);
    background: #fff;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
    transform-origin: 0 50%;
    transform: rotate(12deg);
    transition: opacity .25s ease, transform .25s ease;
}
.ny-gift__tag::before { /* the hole */
    content: '';
    position: absolute;
    top: 50%;
    left: 4px;
    width: 4px;
    height: 4px;
    margin-top: -2px;
    border-radius: 50%;
    background: #d5d9de;
}
.ny-gift__tag::after { /* the string */
    content: '';
    position: absolute;
    top: 50%;
    right: 100%;
    width: 16px;
    height: 1.5px;
    background: var(--ny-gold-dark);
    transform-origin: right center;
    transform: rotate(-28deg);
}
.ny-gift__tag small {
    color: #8e0b17;
    font-size: 10px;
    font-weight: 600;
}
.ny-gift__tag-year,
.ny-celebrating .ny-gift__tag-days {
    display: none;
}
.ny-celebrating .ny-gift__tag-year {
    display: inline;
}
.ny-gift.is-open .ny-gift__tag {
    opacity: 0;
    transform: rotate(12deg) translateY(6px);
}

/* ---------- the card inside ---------- */
.ny-gift__card {
    position: absolute;
    left: 0;
    bottom: calc(100% + 14px);
    width: min(310px, calc(100vw - 36px));
    overflow: hidden;
    color: #fff;
    background: var(--ny-ink);
    border-radius: 16px;
    box-shadow: 0 22px 48px rgba(0, 0, 0, .38), 0 0 0 1px rgba(255, 255, 255, .06);
    outline: none;
    transform-origin: 28px 100%;
    animation: ny-pop .38s cubic-bezier(.34, 1.56, .64, 1);
}
.ny-gift__card[hidden] {
    display: none;
}
/* wrapping paper with a gold ribbon */
.ny-gift__wrap {
    position: relative;
    height: 46px;
    background:
        repeating-linear-gradient(-45deg, rgba(255, 255, 255, .08) 0 8px, transparent 8px 16px),
        linear-gradient(180deg, #e3202f, #b30f1e);
}
.ny-gift__wrap::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 14px;
    margin-left: -7px;
    background: linear-gradient(90deg, #d9a521, var(--ny-gold) 50%, #d9a521);
}
.ny-gift__wrap::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    background: var(--ny-gold);
}
.ny-gift__close {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: rgba(0, 0, 0, .25);
    transition: background-color .2s ease;
}
.ny-gift__close:hover {
    background: rgba(0, 0, 0, .45);
}
.ny-gift__body {
    padding: 16px 18px 14px;
}
.ny-gift__title {
    margin: 0 0 14px;
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.25;
}
.ny-celebrating .ny-gift__title {
    font-size: 20px;
}
.ny-countdown {
    display: block;
    margin-bottom: 14px;
}
.ny-countdown[hidden] {
    display: none;
}
.ny-countdown__label {
    display: block;
    margin-bottom: 7px;
    color: rgba(255, 255, 255, .65);
    font-size: 12px;
}
.ny-countdown__units {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}
.ny-countdown__unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 0 6px;
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 10px;
    background: #222;
}
.ny-countdown__unit b {
    font-size: 21px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}
.ny-countdown__unit small {
    margin-top: 4px;
    color: #ff5a67;
    font-size: 11px;
}
.ny-gift__snow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 11px 0 0;
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, .1);
    color: #fff;
    background: none;
    font-size: 14px;
    font-weight: 600;
}
.ny-gift__snow-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.ny-switch {
    position: relative;
    flex-shrink: 0;
    width: 40px;
    height: 22px;
    border-radius: 999px;
    background: #3a3a3a;
    transition: background-color .2s ease;
}
.ny-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
    transition: transform .2s ease;
}
.ny-gift__snow[aria-pressed="true"] .ny-switch {
    background: var(--ny-red);
}
.ny-gift__snow[aria-pressed="true"] .ny-switch::after {
    transform: translateX(18px);
}
.ny-gift__close:focus-visible,
.ny-gift__snow:focus-visible {
    outline: 2px solid var(--ny-gold);
    outline-offset: 2px;
}
@media (max-width: 991.98px) {
    .ny-gift {
        left: 12px;
        bottom: 12px;
    }
    .ny-gift__box {
        width: 56px;
        height: 56px;
    }
    /* stay above the mobile checkout bar */
    .ny-mode:has(.checkout-mobile-bar) .ny-gift {
        bottom: 86px;
    }
}

/* ---------- a pine forest with presents growing out of the footer ---------- */
.ny-mode footer {
    position: relative;
}
.ny-mode footer::before {
    content: '';
    position: absolute;
    z-index: 1;
    top: -47px;
    left: 0;
    right: 0;
    height: 48px;
    pointer-events: none;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 360 48'%3E%3Cpath fill='%231c1c1c' d='M28 8L34.9 21.6H31.7L37.9 33.6H34.4L40.4 44H29.7V48H26.3V44H15.6L21.6 33.6H18.1L24.3 21.6H21.1ZM52 21L56.7 30.2H54.5L58.7 38.3H56.4L60.4 44H53.2V48H50.8V44H43.6L47.6 38.3H45.3L49.5 30.2H47.3ZM148 4L155.6 19H152.1L158.9 32.2H155.1L161.6 44H149.9V48H146.1V44H134.4L140.9 32.2H137.1L143.9 19H140.4ZM171 18L176.2 28.2H173.8L178.4 37.2H175.8L180.3 44H172.3V48H169.7V44H161.7L166.2 37.2H163.6L168.2 28.2H165.8ZM246 12L252.2 24.2H249.3L254.9 35H251.8L257.2 44H247.6V48H244.4V44H234.8L240.2 35H237.1L242.7 24.2H239.8ZM316 6L323.3 20.3H319.9L326.4 32.9H322.8L329 44H317.8V48H314.2V44H303L309.2 32.9H305.6L312.1 20.3H308.7ZM340 22L344.5 30.8H342.4L346.4 38.6H344.2L348.1 44H341.1V48H338.9V44H331.9L335.8 38.6H333.6L337.6 30.8H335.5Z'/%3E%3Cpath fill='%23fff' d='M28 8L31.2 14.4Q28 12.8 24.8 14.4ZM52 21L54.2 25.3Q52 24.2 49.8 25.3ZM171 18L173.4 22.8Q171 21.6 168.6 22.8ZM246 12L248.9 17.8Q246 16.3 243.1 17.8ZM316 6L319.4 12.7Q316 11 312.6 12.7ZM340 22L342.1 26.2Q340 25.1 337.9 26.2Z'/%3E%3Cpath fill='%23f4c542' d='M148 -1.2L149.1 1.5L152 1.7L149.7 3.6L150.5 6.4L148 4.8L145.5 6.4L146.3 3.6L144 1.7L146.9 1.5Z'/%3E%3Cpath fill='%23d7182a' d='M88 36h14v12h-14ZM103 39h10v9h-10ZM203 37h12v11h-12ZM272 35h16v13h-16ZM290 40h9v8h-9Z'/%3E%3Cpath fill='%23f4c542' d='M94 36h2v12h-2ZM88 41.4h14v1.6h-14ZM95 36c-3 -4 -6 -3 -4 0zM95 36c3 -4 6 -3 4 0zM107 39h2v9h-2ZM103 43.1h10v1.6h-10ZM108 39c-3 -4 -6 -3 -4 0zM108 39c3 -4 6 -3 4 0zM208 37h2v11h-2ZM203 42h12v1.6h-12ZM209 37c-3 -4 -6 -3 -4 0zM209 37c3 -4 6 -3 4 0zM279 35h2v13h-2ZM272 40.9h16v1.6h-16ZM280 35c-3 -4 -6 -3 -4 0zM280 35c3 -4 6 -3 4 0zM293.5 40h2v8h-2ZM290 43.6h9v1.6h-9ZM294.5 40c-3 -4 -6 -3 -4 0zM294.5 40c3 -4 6 -3 4 0z'/%3E%3C/svg%3E") repeat-x 0 0 / 360px 48px;
}

/* ---------- animations ---------- */
@keyframes ny-shake {
    0%, 80%, 100% { transform: rotate(0); }
    83% { transform: rotate(-9deg); }
    86% { transform: rotate(8deg); }
    89% { transform: rotate(-6deg); }
    92% { transform: rotate(4deg); }
    95% { transform: rotate(-2deg); }
}
@keyframes ny-pop {
    from { opacity: 0; transform: translateY(10px) scale(.92); }
    to { opacity: 1; transform: none; }
}
@keyframes ny-sheen {
    0%, 55% { background-position: 150% 0; }
    100% { background-position: -50% 0; }
}
@keyframes ny-bow {
    0%, 86%, 100% { transform: translate(-50%, -34%) scale(1); }
    90% { transform: translate(-50%, -34%) scale(1.07); }
    94% { transform: translate(-50%, -34%) scale(.97); }
}

@media (prefers-reduced-motion: reduce) {
    .ny-wrap::after,
    .ny-wrap__bow,
    .ny-gift__svg,
    .ny-gift__card {
        animation: none;
    }
    .ny-gift__lid,
    .ny-gift__tag,
    .ny-switch,
    .ny-switch::after {
        transition: none;
    }
}

@media print {
    .ny-sky,
    .ny-gift,
    .ny-wrap,
    .ny-mode footer::before {
        display: none !important;
    }
}
