/* ===== Božićna akcija: Giga bez briga pod bor (01.12. – 31.12.2026.) =====
   Sve božićno je ovdje: nakon akcije dovoljno je maknuti ovaj CSS,
   js/giga-bozic.js i $xmasLights pozive u views/giga-bez-briga.php. */

body.page-giga {
    --xmas-red: #e23b3b;
    --xmas-red-deep: #8f1d1d;
    --xmas-gold: #f6c453;
    --xmas-snow: #f4f8ff;
}

/* ----- Naslov ----- */
.xmas-title-accent {
    display: inline-block;
    background: linear-gradient(100deg, var(--xmas-gold) 0%, #ffe9a8 40%, var(--xmas-red) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    padding-right: 0.06em;
}

.giga-promo-flag i,
.giga-price-tag__flag i {
    color: var(--xmas-gold);
}

body.page-giga .giga-promo-flag::before {
    display: none;
}

.giga-hero__anchor strong {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 700;
}

.giga-price-tag__base,
.giga-final__base {
    margin: 0.55rem 0 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.78);
}

.giga-final__base {
    margin-top: 1rem;
}

.giga-hero__after {
    margin: -0.85rem 0 1.1rem;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
}

.giga-hero__anchor {
    margin: -0.6rem 0 1.1rem;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.6);
}

/* ----- Pozadina heroa: topli božićni sjaj ----- */
body.page-giga .giga-hero::before {
    background:
        radial-gradient(ellipse 45% 60% at 78% 40%, rgba(33, 132, 85, 0.3) 0%, transparent 65%),
        radial-gradient(ellipse 35% 45% at 8% 100%, rgba(226, 59, 59, 0.18) 0%, transparent 70%),
        radial-gradient(ellipse 30% 30% at 20% 10%, rgba(246, 196, 83, 0.12) 0%, transparent 70%);
}

/* ----- Žaruljice ----- */
.xmas-lights {
    --gap: 52px;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 3;
    display: flex;
    height: 44px;
    margin: 0;
    padding: 0;
    list-style: none;
    overflow: hidden;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='52' height='24' viewBox='0 0 52 24'%3E%3Cpath d='M0 3 Q26 26 52 3' fill='none' stroke='%235b6b61' stroke-width='2'/%3E%3C/svg%3E");
    background-repeat: repeat-x;
    background-size: var(--gap) 24px;
}

.xmas-lights li {
    position: relative;
    flex: 0 0 var(--gap);
    height: 100%;
}

/* grlo žarulje */
.xmas-lights li::before {
    content: '';
    position: absolute;
    top: 12px;
    left: calc(50% - 4px);
    width: 8px;
    height: 7px;
    border-radius: 2px;
    background: #2e3a33;
}

/* žarulja */
.xmas-lights li::after {
    --c: var(--xmas-red);
    content: '';
    position: absolute;
    top: 17px;
    left: calc(50% - 7px);
    width: 14px;
    height: 22px;
    border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
    background: var(--c);
    box-shadow:
        0 0 6px 1px var(--c),
        0 0 22px 4px color-mix(in srgb, var(--c) 55%, transparent);
    animation: xmasTwinkle 2.4s ease-in-out infinite;
    animation-delay: calc(var(--b) * -0.37s);
}

.xmas-lights li:nth-child(4n + 2)::after { --c: var(--xmas-gold); }
.xmas-lights li:nth-child(4n + 3)::after { --c: #3ddc84; }
.xmas-lights li:nth-child(4n + 4)::after { --c: #4aa8ff; }
.xmas-lights li:nth-child(odd)::after { transform: rotate(-6deg); }
.xmas-lights li:nth-child(even)::after { transform: rotate(6deg); }

@keyframes xmasTwinkle {
    0%, 100% {
        opacity: 1;
        filter: brightness(1.15);
    }
    45% {
        opacity: 0.35;
        filter: brightness(0.6);
        box-shadow: 0 0 2px 0 var(--c);
    }
}

body.page-giga .giga-hero__container {
    padding-top: clamp(4rem, 7vw, 5.5rem);
}

body.page-giga .giga-final__panel {
    padding-top: clamp(3.5rem, 6vw, 5rem);
}

/* ----- Snijeg na cjenovnoj oznaci ----- */
body.page-giga .giga-price-tag {
    position: relative;
    padding-top: 1.45rem;
    background:
        radial-gradient(ellipse 80% 120% at 100% 0%, rgba(246, 196, 83, 0.2) 0%, transparent 60%),
        linear-gradient(150deg, #c22f2f 0%, var(--xmas-red-deep) 60%, #4d0f0f 100%);
}

body.page-giga .giga-price-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 14px;
    background:
        radial-gradient(circle at 10px 0, var(--xmas-snow) 10px, transparent 10.5px) 0 0 / 34px 14px repeat-x,
        radial-gradient(circle at 26px 0, var(--xmas-snow) 7px, transparent 7.5px) 0 0 / 34px 14px repeat-x;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.18));
}

body.page-giga .giga-price-tag__flag,
body.page-giga .giga-price-tag__currency {
    color: #ffe9a8;
}

/* ----- Poklon s gigom ----- */
.giga-hero__copy,
.giga-final__copy {
    position: relative;
}

.xmas-gift {
    display: block;
    overflow: visible;
    pointer-events: none;
}

.xmas-gift--hero {
    position: absolute;
    top: -5rem;
    right: -2rem;
    width: clamp(170px, 14vw, 205px);
    height: auto;
}

.xmas-gift__lid {
    animation: xmasLid 3.2s ease-in-out infinite;
}

.xmas-gift__giga {
    animation: xmasGiga 3.2s ease-in-out infinite;
}

.xmas-gift__beam,
.xmas-gift__aura {
    animation: xmasGlow 3.2s ease-in-out infinite;
}

.xmas-gift__fibers path {
    stroke-dasharray: 6 5;
    animation: xmasFiber 1.4s linear infinite;
}

.xmas-gift__fiber-tips circle,
.xmas-gift__sparks path {
    animation: xmasBall 1.8s ease-in-out infinite;
}

.xmas-gift__sparks path {
    transform-box: fill-box;
    transform-origin: center;
    animation-name: xmasSpark;
    animation-delay: calc(var(--s) * -0.45s);
}

@keyframes xmasLid {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@keyframes xmasGiga {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

@keyframes xmasFiber {
    to { stroke-dashoffset: -22; }
}

@keyframes xmasSpark {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(0.6); }
}

@keyframes xmasGlow {
    0%, 100% { opacity: 0.75; }
    50% { opacity: 1; }
}

@keyframes xmasBall {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ----- Saonice: forma koju vuku sobovi ----- */
.giga-final__sleigh {
    position: relative;
    margin: 7.5rem 0 3rem;
}

.giga-final__sleigh .giga-box {
    position: relative;
    z-index: 2;
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.35), 0 0 0 4px rgba(246, 196, 83, 0.55);
}

.xmas-gift--sleigh {
    position: absolute;
    z-index: 1;
    top: -132px;
    right: 1.5rem;
    width: 118px;
    height: auto;
}

.xmas-runner {
    position: absolute;
    z-index: 1;
    left: -18px;
    right: -6px;
    bottom: -34px;
    width: calc(100% + 24px);
    height: 44px;
}

.xmas-reindeer {
    position: absolute;
    z-index: 3;
    top: -92px;
    right: calc(100% - 14px);
    width: clamp(400px, 38vw, 560px);
    pointer-events: none;
}

.xmas-reindeer img {
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 10px 14px rgba(2, 26, 14, 0.45));
    animation: xmasGallop 1.6s ease-in-out infinite;
}

@keyframes xmasGallop {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* Sobovi idu iznad forme kad je raspored u jednom stupcu */
@media (max-width: 960px) {
    .giga-final__sleigh {
        margin-top: 8.5rem;
        width: 100%;
        max-width: 520px;
        justify-self: start;
    }

    .xmas-reindeer {
        top: -80px;
        right: auto;
        left: -0.5rem;
        width: min(60vw, 300px);
    }

    .xmas-gift--sleigh {
        width: 96px;
        top: -110px;
        right: -0.25rem;
    }
}

/* ----- Prednosti kao ikone ----- */
.xmas-perks {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
    max-width: 22rem;
    margin: 0 0 1.4rem;
    padding: 0;
    list-style: none;
}

.xmas-perks li {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 0.4rem 0.75rem;
    text-align: center;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.2;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 14px;
}

.xmas-perks__icon {
    display: grid;
    place-items: center;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 50%;
    font-size: 1.05rem;
    color: #ffffff;
    background: linear-gradient(150deg, var(--giga-promo) 0%, var(--giga-promo-deep) 100%);
    box-shadow: 0 0 0 3px rgba(158, 230, 191, 0.12);
}

.xmas-perks li:nth-child(2) .xmas-perks__icon,
.xmas-perks li:nth-child(4) .xmas-perks__icon {
    background: linear-gradient(150deg, #d63434 0%, var(--xmas-red-deep) 100%);
    box-shadow: 0 0 0 3px rgba(226, 59, 59, 0.14);
}

.xmas-perks li {
    flex-direction: row;
    justify-content: flex-start;
    text-align: left;
    padding: 0.6rem 0.7rem;
}

.xmas-perks__icon {
    flex: 0 0 auto;
    width: 2.2rem;
    height: 2.2rem;
    font-size: 0.9rem;
}

/* Kad nema mjesta desno od naslova, poklon ide ispod prednosti. */
@media (max-width: 1180px) {
    .xmas-gift--hero {
        position: relative;
        top: auto;
        right: auto;
        order: 10;
        width: 230px;
        margin: 1.25rem auto 0;
    }

    .giga-hero__copy {
        display: flex;
        flex-direction: column;
    }

    .giga-hero__copy > .giga-promo-flag,
    .giga-hero__copy > .giga-hero__phone {
        align-self: flex-start;
    }
}

@media (max-width: 640px) {

        .xmas-perks {
        max-width: none;
    }
}

/* ----- Snijeg (canvas iz giga-bozic.js) ----- */
.xmas-snow {
    position: fixed;
    inset: 0;
    z-index: 900;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

@media (max-width: 768px) {
    .xmas-lights {
        --gap: 40px;
        background-size: var(--gap) 24px;
        height: 40px;
    }

    .xmas-lights li::after {
        width: 11px;
        height: 18px;
        left: calc(50% - 5.5px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .xmas-lights li::after,
    .xmas-gift__lid,
    .xmas-gift__giga,
    .xmas-gift__beam,
    .xmas-gift__aura,
    .xmas-gift__fibers path,
    .xmas-gift__fiber-tips circle,
    .xmas-gift__sparks path,
    .xmas-reindeer img {
        animation: none;
    }
}

/* ----- Mobitel: poklon uz naslov, sažeti blok cijene ----- */
@media (max-width: 640px) {
    .xmas-gift--hero {
        position: absolute;
        top: 2.4rem;
        right: -0.5rem;
        order: 0;
        width: 104px;
        margin: 0;
    }

    .giga-hero__title {
        position: relative;
        z-index: 1;
    }

    .giga-hero__deal {
        position: relative;
        z-index: 1;
        margin-bottom: 1rem;
    }

    .giga-hero__deal-meta {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: baseline;
        gap: 0.2rem 0.45rem;
        padding: 0;
        border-left: 0;
    }

    .giga-hero__deal-meta strong {
        font-size: 1rem;
    }

    .giga-hero__deal-meta span {
        font-size: 0.85rem;
    }

    .giga-hero__anchor {
        margin-top: 0;
    }

    .xmas-perks {
        gap: 0.5rem;
    }

    .xmas-perks li {
        padding: 0.55rem 0.6rem;
        font-size: 0.76rem;
    }

    .xmas-perks__icon {
        width: 2rem;
        height: 2rem;
        font-size: 0.82rem;
    }

    .giga-hero__container {
        padding-top: 3.4rem;
    }
}

.giga-hero__anchor strong {
    white-space: nowrap;
}
