:root {
    --textColor: rgb(0, 0, 0);
    --hoverColorText: rgb(100, 100, 100);
    --hoverColorBtn: rgb(0, 110, 228);
    --btnColor: rgb(0, 123, 255);
    --cardText: rgb(0, 0, 0);
    --cardColor1: rgb(255, 255, 255);
    --whiteText: rgb(255, 255, 255);
    --checked: rgb(103, 201, 247);
}

/*slider*/
#slider {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 80px auto;
    overflow: hidden; 
    height: 650px;
}

.slider-inner {
    display: flex;
    align-items: center;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1); /* Hladší pohyb */
    height: 550px;
    gap: 40px; /* Medzera medzi kartami */
}

.sliderCard {
    display: flex;
    flex: 0 0 50%;
    height: 100%;
    align-items: center;
    background-color: var(--cardColor1);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    box-sizing: border-box;
}

.sliderCard:not(.active) {
    opacity: 0.7;     /* Bočné karty budú vyblednuté */
    transform: scale(0.9);
    filter: blur(1px);
}

#btnNext, #btnPrev {
    color: black;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    cursor: pointer;
    font-size: 30px;
    border: none;
    background: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

#btnPrev { left: 20px; }
#btnNext { right: 20px; }

#btnNext:hover, #btnPrev:hover {
    background: var(--btnColor);
    color: white;
}

.sliderImgDiv {
    flex: 1.3;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    padding: 20px;
}

.sliderImg {
    width: 100%;
    height: 100%;
    max-height: 400px;
    object-fit: contain;
}

.sliderText {
    flex: 1;
    padding: 50px;
    text-align: left;
}

.sliderNadpis {
    font-size: 38px;
    font-weight: 800;
    margin-bottom: 15px;
}

.sliderPodnadpis {
    font-size: 18px;
    margin-bottom: 30px;
    color: #555;
}

.sliderBtn {
    background-color: var(--btnColor);
    color: var(--whiteText);
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    align-self: center;
    transition: 0.3s;
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.3);
}
.sliderBtn:hover {
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.7);
    color: var(--whiteText);
    background-color: var(--hoverColorBtn);
}
.sliderImgDiv {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    margin-bottom: 20px;
}
.sliderImg {
    height: 100%;
    max-height: 350px;
    width: auto;
}

/* RESPONZIVITA PRE MOBILY */
@media (max-width: 900px) {
    .sliderCard {
        flex-direction: column-reverse;
        flex: 0 0 90%;
        text-align: center;
    }
    .slider-inner { padding: 0 5%; }
    .sliderText { padding: 20px; }
    .sliderNadpis { font-size: 24px; }
    .sliderImg { max-height: 200px; }
}

/*popularne produkty*/
.nadpis {
    text-align: center;
    font-size: 32px;
    font-weight: 800;
    margin: 60px 0 30px;
}

.popularneProdukty {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 25px;
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto 80px;
}

.popularCard {
    background-color: var(--cardColor1);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    height: 100%;
}

.popularCard:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.ImgContainer {
    width: 100%;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #fff;
    padding: 15px;
}

.popularImg {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
}

.popularCard:hover .popularImg {
    transform: scale(1.05);
}

.popularText {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.popularNadpis {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.2;
}

.popularPopis {
    font-size: 0.85rem;
    color: var(--hoverColorText);
    margin-bottom: 15px;
    line-height: 1.5;
    /* Obmedzenie na 2 riadky */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

#popularKupitCena {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
    margin: 5px 10px;
}

.popularCena {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--textColor);
}

.popularKupit {
    background-color: var(--btnColor);
    color: var(--whiteText);
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s;
    display: inline-flex;   
    align-items: center;    
    justify-content: center; 
    gap: 8px;
}

.pridatCart {
    margin: 0; 
    display: block;
}

.popularKupit:hover { background-color: var(--hoverColorBtn); }

@media (min-width: 640px) {
    .nadpis {
        font-size: 40px;
    }
    .popularneProdukty {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
        max-width: 750px;
        padding: 40px 30px;
    }
}

@media (min-width: 1024px) {
    .nadpis {
        font-size: 44px;
    }
    .popularneProdukty {
        grid-template-columns: 1fr 1fr 1fr;
        max-width: 1100px;
        gap: 30px;
        padding: 40px 30px;
    }
}

@media (min-width: 1280px) {
    .nadpis {
        font-size: 50px;
    }
    .popularneProdukty {
        grid-template-columns: 1fr 1fr 1fr 1fr;
        max-width: 1400px;
        gap: 30px;
        padding: 50px 40px;
        margin-bottom: 100px;
    }
    .popularCard:hover {
        scale: 1.05;
    }
}


/* Notifikačný systém */
.notification-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.notification-overlay.active {
    opacity: 1;
    visibility: visible;
}

.notification-box {
    background-color: var(--cardColor1);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 400px;
    overflow: hidden;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.notification-overlay.active .notification-box {
    transform: translateY(0);
}

.notification-content {
    padding: 2rem;
    text-align: center;
    color: var(--textColor);
}

.notification-icon {
    display: inline-block;
    width: 60px;
    height: 60px;
    background-color: #27ae60;
    color: var(--whiteText);
    border-radius: 50%;
    font-size: 2rem;
    line-height: 60px;
    margin-bottom: 1rem;
}

.notification-title {
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
}

.notification-message {
    margin: 0;
    line-height: 1.5;
}

.notification-close-btn {
    width: 100%;
    padding: 1rem;
    background-color: var(--btnColor);
    color: var(--whiteText);
    border: none;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.notification-close-btn:hover {
    background-color: var(--hoverColorBtn);
}

.notification-box.notification-success .notification-icon {
    background-color: #27ae60;
}

.notification-box.notification-error .notification-icon {
    background-color: #e74c3c;
}

.notification-box.notification-warning .notification-icon {
    background-color: #f39c12;
}