/* =======================================
   KOLEDNI PAGE — CHRISTMAS THEME
======================================= */

/* Background */
body.koledni {
    background: #fff5f5;
    padding-top: 140px; /* more space under top bar */
}

/* Page title */
body.koledni h1 {
    color: #d60000;
    font-weight: bold;
    margin: 40px 0 20px 0;  /* adds top spacing */
}

/* =======================================
   MAIN LAYOUT
======================================= */

#shopWrapper {
    display: flex;
    gap: 30px;
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
}

/* ----- SIDEBAR FILTERS ----- */
#shopSidebar {
    width: 220px;
    background: #ffffff;
    border: 2px solid #d60000;
    border-radius: 10px;
    padding: 20px;
    align-self: flex-start; /* prevents stretching */
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* Sidebar Title */
#shopSidebar h3 {
    color: #d60000 !important;
    margin-bottom: 15px;
    text-align: center;
}

/* List-style vertical layout */
#shopSidebar .filterGroup {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;        /* FIX */
}

/* Left-align filter labels */
#shopSidebar label {
    text-align: left;        /* FIX */
    display: flex;           /* aligns checkbox + text nicely */
    align-items: center;     /* vertical alignment */
    gap: 6px;
}

/* Inputs */
#shopSidebar input[type="number"] {
    width: 100%;
    padding: 6px;
    border-radius: 4px;
    border: 1px solid #aaa;
}

/* Buttons */
#shopSidebar button {
    width: 100%;
    padding: 10px;
    background-color: #d60000 !important;
    color: white;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    margin-top: 5px;
    font-weight: bold;
}

#shopSidebar button:hover {
    background-color: #8b0000 !important;
}

/* =======================================
   PRODUCT GRID
======================================= */

#productContainer {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: flex-start;
    align-items: flex-start;
    flex-grow: 1; /* takes the remaining space next to sidebar */
}

/* Base product card */
#productContainer .card,
#productContainer .altCard {
    width: 250px;
    background: #fff8f8;
    border: 4px solid #fff8f8;        /* outline same color as card */
    border-radius: 12px;
    padding: 10px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

/* Hover zoom on image */
#productContainer .card img,
#productContainer .altCard img {
    width: 100%;
    border-radius: 8px;
    transition: transform 0.35s ease;
}

#productContainer .card:hover img,
#productContainer .altCard:hover img {
    transform: scale(1.07);
}

/* Product title */
.cardTitle {
    color: #d60000;
    margin: 8px 0 5px;
    font-size: 17px;
    font-weight: bold;
}

/* Product price */
.cardPrice {
    color: #008000;
    font-size: 15px;
    margin-bottom: 10px;
}

/* Hover button (hidden until card hover) */
.cardHoverArea {
    opacity: 0;
    transition: opacity 0.25s ease;
    margin-bottom: 10px;
    pointer-events: none;
}

#productContainer .card:hover .cardHoverArea,
#productContainer .altCard:hover .cardHoverArea {
    opacity: 1;
    pointer-events: auto;
}

.cardHoverArea button {
    background: #d60000;
    color: white;
    padding: 8px 15px;
    border-radius: 6px;
    border: none;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.25s;
}

.cardHoverArea button:hover {
    background: #8b0000;
}

/* Accent when product is in cart */
#productContainer .inCart {
    border-color: #d60000 !important;
}

/* In-cart badge */
.inCartBadge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #d60000;
    color: white;
    padding: 4px 8px 4px 18px;
    font-size: 13px;
    border-radius: 4px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Remove item X */
.removeBadge {
    cursor: pointer;
    font-weight: bold;
    margin-right: 4px;
    font-size: 14px;
}

/* =======================================
   SNOW (FALLING FLAKES)
======================================= */

.snowflake {
    position: fixed;
    top: -20vh;
    color: rgb(152, 181, 204);
    user-select: none;
    pointer-events: none;
    text-shadow: 0 0 8px white;
    z-index: -1;

    animation-name: fall;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    animation-duration: var(--fallSpeed, 8s);
}

/* Fall animation */
@keyframes fall {
    0%   { transform: translateY(-20vh); }
    100% { transform: translateY(120vh); }
}

/* Rotating ones */
.rotateFlake {
    animation-name: fall, slowRotate;
    animation-duration: var(--fallSpeed), var(--rotateSpeed);
    animation-timing-function: linear, linear;
    animation-iteration-count: infinite, infinite;
}

@keyframes slowRotate {
    from { transform: rotate(0deg); }
    to   { transform: rotate(calc(360deg * var(--rotateDirection))); }
}

/* =======================================
   RESPONSIVE
======================================= */

@media (max-width: 900px) {
    #shopWrapper {
        flex-direction: column;
        align-items: center;
    }
    #shopSidebar {
        width: 90%;
        position: static;
    }
}

@media (max-width: 650px) {
    body.koledni {
        padding-top: 180px;
    }
}
