/*
 * Коледна визия в магазина (patilanci.bg).
 * Зарежда се от header.tpl.html, когато тече кампания с визия christmas.
 * Цветовете: синьото на сайта, тъмносиньото, жълтото и червеното от коледния банер.
 */
:root {
    --xm-blue: #5d9ed4;         /* основният син на сайта */
    --xm-blue-dark: #2f5fae;
    --xm-navy: #1f2f6b;
    --xm-yellow: #ffd24a;
    --xm-red: #e53935;
    --xm-snow: #f2f8fd;
    --xm-line: #dbe8f4;
}

/* ---------- Лента най-горе: срок за доставка + подаръци ---------- */
.xm-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 7px 12px;
    background: var(--xm-snow);
    border-bottom: 1px solid var(--xm-line);
    font-size: 13px;
    line-height: 1.3;
}

.xm-strip a,
.xm-strip a:visited {
    text-decoration: none !important;
}

.xm-strip .xm-strip-text {
    color: #333;
    font-weight: 600;
}

.xm-strip .xm-strip-text strong {
    color: var(--xm-red);
}

.xm-strip .xm-countdown {
    color: var(--xm-navy);
    font-variant-numeric: tabular-nums;
}

.xm-strip .xm-short {
    display: none;
}

.xm-strip .xm-strip-gifts {
    flex: 0 0 auto;
    padding: 3px 12px;
    border-radius: 999px;
    background: var(--xm-red);
    color: #fff !important;
    font-weight: 700;
}

.xm-strip .xm-strip-gifts:hover {
    background: #c62828;
}

@media (max-width: 768px) {
    .xm-strip {
        justify-content: space-between;
        gap: 8px;
        font-size: 12px;
    }

    .xm-strip .xm-long,
    .xm-strip .xm-countdown {
        display: none;
    }

    .xm-strip .xm-short {
        display: inline;
    }
}

/* ---------- Хедър ---------- */

/* Коледна шапка на логото */
.logo-wrapper .logo {
    position: relative;
    display: inline-block;
}

.logo-wrapper .logo::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -10px;
    width: 30px;
    height: 27px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 56'%3E%3Cpath d='M8 44 C14 22 30 6 50 10 C56 12 58 20 54 30 C50 22 44 20 40 24 C34 30 34 38 36 44 Z' fill='%23e53935'/%3E%3Cpath d='M8 44 C14 22 30 6 50 10 C44 12 30 22 26 44 Z' fill='%23ff6f60' opacity='.5'/%3E%3Crect x='2' y='40' width='42' height='12' rx='6' fill='%23fff' stroke='%23e6e6e6'/%3E%3Ccircle cx='54' cy='34' r='7' fill='%23fff' stroke='%23e6e6e6'/%3E%3C/svg%3E") no-repeat center / contain;
    transform: rotate(-16deg);
    pointer-events: none;
    z-index: 2;
}

/* „Подаръци“ в синята лента */
.additional-main-nav .xm-nav-gifts a {
    margin: 0 4px;
    padding-left: 14px !important;
    padding-right: 14px !important;
    border-radius: 6px;
    background: var(--xm-red);
    color: #fff !important;
    font-weight: 700;
}

.additional-main-nav .xm-nav-gifts a:hover {
    background: #c62828;
}

/* „Коледни подаръци“ в мобилното меню */
.responsive-menu-additional-info .xm-menu-gifts {
    color: var(--xm-red) !important;
    font-weight: 700;
}

/* Гирлянд под синята лента */
.new-header header {
    position: relative;
}

.new-header .xm-garland {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -18px;
    height: 26px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='26' viewBox='0 0 160 26'%3E%3Cpath d='M0 3 Q20 13 40 3 T80 3 T120 3 T160 3' fill='none' stroke='%23555' stroke-width='1.3'/%3E%3Cg%3E%3Crect x='17.5' y='7' width='5' height='4' rx='1' fill='%23666'/%3E%3Cellipse cx='20' cy='16' rx='4.5' ry='6.5' fill='%23ffd24a'/%3E%3C/g%3E%3Cg%3E%3Crect x='57.5' y='7' width='5' height='4' rx='1' fill='%23666'/%3E%3Cellipse cx='60' cy='16' rx='4.5' ry='6.5' fill='%23e53935'/%3E%3C/g%3E%3Cg%3E%3Crect x='97.5' y='7' width='5' height='4' rx='1' fill='%23666'/%3E%3Cellipse cx='100' cy='16' rx='4.5' ry='6.5' fill='%23ffffff'/%3E%3C/g%3E%3Cg%3E%3Crect x='137.5' y='7' width='5' height='4' rx='1' fill='%23666'/%3E%3Cellipse cx='140' cy='16' rx='4.5' ry='6.5' fill='%234caf50'/%3E%3C/g%3E%3C/svg%3E") repeat-x 0 0 / 160px 26px;
    filter: drop-shadow(0 0 3px rgba(255, 210, 74, 0.55));
    animation: xm-twinkle 2.6s ease-in-out infinite;
    pointer-events: none;
    z-index: 5;
}

@keyframes xm-twinkle {
    0%, 100% { filter: drop-shadow(0 0 2px rgba(255, 210, 74, 0.35)); }
    50%      { filter: drop-shadow(0 0 6px rgba(255, 210, 74, 0.85)); }
}

@media (max-width: 768px) {
    .new-header .xm-garland {
        bottom: -14px;
        height: 20px;
        background-size: 124px 20px;
    }
}

/* Сняг върху страницата */
.xm-snowfall {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 998;
}

@media (prefers-reduced-motion: reduce) {
    .new-header .xm-garland {
        animation: none;
    }

    .xm-snowfall {
        display: none;
    }
}

/* ---------- Продуктови карти (промо продуктите на кампанията) ---------- */
.product_new.xm-product .one_product_image {
    position: relative;
}

.product_new.xm-product .one_product_image::after {
    content: '🎁';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--xm-yellow);
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    font-size: 15px;
    pointer-events: none;
    z-index: 2;
}

.product_new.xm-product .one_product_discount_new {
    background: var(--xm-red) !important;
    color: #fff !important;
}

/* ---------- Продуктова страница ---------- */
.xm-product-note {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 10px 0 4px;
}

.xm-product-note .xm-product-tag {
    align-self: flex-start;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--xm-red);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

.xm-product-note .xm-product-deadline {
    padding: 8px 12px;
    border: 1px dashed var(--xm-blue);
    border-radius: 8px;
    background: var(--xm-snow);
    color: #333;
    font-size: 13px;
    font-weight: 600;
}

.xm-product-note .xm-product-deadline strong {
    color: var(--xm-red);
}

/* ---------- Корекции на разположението ---------- */

/* Компютър: място под хедъра, за да не стъпва гирляндът върху пътечката (Начало › ...) */
@media (min-width: 769px) {
    .page-wrapper > .header-container {
        margin-bottom: 18px;
    }
}

/* Телефон: хедърът е фиксиран горе, затова лентата също е фиксирана над него */
@media (max-width: 768px) {
    .xm-strip {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1001;
        height: 32px;
        padding: 0 10px;
    }

    .header-container {
        top: 32px !important;
    }

    .page-wrapper {
        padding-top: 32px;
    }

    /* Гирляндът виси от долния ръб на целия фиксиран хедър, а не над търсачката */
    .new-header .xm-garland {
        display: none;
    }

    .header-container::after {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        bottom: -17px;
        height: 20px;
        background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='26' viewBox='0 0 160 26'%3E%3Cpath d='M0 3 Q20 13 40 3 T80 3 T120 3 T160 3' fill='none' stroke='%23555' stroke-width='1.3'/%3E%3Cg%3E%3Crect x='17.5' y='7' width='5' height='4' rx='1' fill='%23666'/%3E%3Cellipse cx='20' cy='16' rx='4.5' ry='6.5' fill='%23ffd24a'/%3E%3C/g%3E%3Cg%3E%3Crect x='57.5' y='7' width='5' height='4' rx='1' fill='%23666'/%3E%3Cellipse cx='60' cy='16' rx='4.5' ry='6.5' fill='%23e53935'/%3E%3C/g%3E%3Cg%3E%3Crect x='97.5' y='7' width='5' height='4' rx='1' fill='%23666'/%3E%3Cellipse cx='100' cy='16' rx='4.5' ry='6.5' fill='%23ffffff'/%3E%3C/g%3E%3Cg%3E%3Crect x='137.5' y='7' width='5' height='4' rx='1' fill='%23666'/%3E%3Cellipse cx='140' cy='16' rx='4.5' ry='6.5' fill='%234caf50'/%3E%3C/g%3E%3C/svg%3E") repeat-x 0 0 / 124px 20px;
        pointer-events: none;
    }
}
