/* Custom styles for the homepage */
.btn--discount {
    max-width: 140px;
    padding: 5px;
    font-size: 1.3rem !important;
    transform: translateX(10px);
}

/* A non intrusive animation to push the user to buy
 his card*/
.pulse-anim {
    animation: pulse 3s infinite ease-in-out alternate-reverse 50ms;
    transition: 0.1s;
}

.btn.outlined:hover {
    color: #fff !important;
    text-decoration: none;
}

.pulse-anim:hover {
    animation-play-state: paused;
}

span.user-name {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.m-right {
    margin-right: 10px;
}

.notification-holder {
    position: fixed;
    top: 85px;
    right: 0;
    left: 0;
    z-index: 9999999;
    pointer-events: none;
}

.notification {
    max-width: 100%;
    padding: 10px 20px;
    text-align: center;
    font-size: 1.6rem;
    border-radius: 1rem;
    color: #fff;
    animation: hideNotification 0.5s forwards 10s;

    &.notification-success {
        background: rgba(32, 115, 69, 0.8);
    }

    &.notification-error {
        background: rgba(222, 34, 42, 0.8);
    }
}

.box-category a {
    min-height: 100px;

    .category-icon {
        padding: 0 1.5rem 0 0;
    }

    .category-heading h3 {
        padding: 5px 5px 5px 1.5rem;
        font-size: 1.8rem;
        text-align: left;
    }
}

.box-category a .category-icon img {
    max-width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 0.5rem 0 0 0.5rem;
}

.img-new {
    object-fit: contain;
}

/* Styles for the slick carousel */
.carousel-holder {
    max-width: 1300px;
    background-color: white;
    border-radius: 15px;
    position: absolute;
    bottom: 30px;
}

.homepage-carousel .carousel-item {
    padding: 20px 15px;
    max-width: 337px;
}

.home .header-large .container--carousel {
    position: relative;
    padding-top: 0;
}

.arrow--carousel {
    position: absolute;
    top: 50%;
    transform: translate(0, -50%);
    display: flex;
    align-content: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1;
}

.slick-disabled {
    opacity: 0.8;
}

.prev--carousel {
    left: -25px;
}

.next--carousel {
    right: -25px;
}

.arrow--carousel.prev--carousel i.fa {
    position: relative;
    top: -1px;
    left: -1px;
}

.arrow--carousel.next--carousel i.fa {
    position: relative;
    top: -1px;
    left: 2px;
}

.header-dropdown {
    position: relative;
    overflow: visible;
    border: 1px solid #ccc;
    border-radius: 1rem;
    padding: 1rem 3rem;
    margin-right: 20px;
    cursor: pointer;
    min-width: 280px;
    display: flex;
    justify-content: center;
    align-items: center;

    &::after {
        content: '';
        position: absolute;
        bottom: -5px;
        left: 50%;
        width: 10px;
        height: 10px;
        background: #fff;
        border: 1px solid #d9d9d9;
        border-top-color: #fff;
        border-left-color: #fff;
        border-bottom-left-radius: 2px;
        border-bottom-right-radius: 2px;
        transform: translateX(-50%) rotate(43deg);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
    }

    > div:first-of-type {
        display: flex;
        align-items: center;
        gap: 20px;

        span {
            font-size: 2rem;
            color: #de222a;
            text-decoration: none;
            transition: color 0.3s ease-in-out;

            &:hover {
                color: #c62b2b;
            }
        }

        .header-dropdown-arrow {
            display: flex;
            width: 25px;
            justify-content: center;
            height: 25px;
            border: 1px solid #ccc;
            border-radius: 0.7rem;
            align-items: center;

            i {
                color: #de222a;
                transition: color 0.3s ease-in-out, rotate 0.3s ease-in-out;
            }
        }
    }

    .header-dropdown-inner {
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background: #fff;
        border: 1px solid #ccc;
        border-radius: 1rem;
        padding: 1.5rem;
        opacity: 0;
        visibility: hidden;
        transform-origin: top;
        transform: scaleY(0);
        transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
        z-index: 10;
        cursor: auto;

        span {
            color: #333333;
            transition: color 0.3s ease-in-out;

            &:hover {
                color: #de222a;
            }
        }

        li {
            position: relative;

            &:not(:last-child) {
                margin-bottom: 1rem;
                border-bottom: 1px solid #e6e6e6;

                a {
                    padding-bottom: 1rem;
                }
            }
        }

        a {
            width: 100%;
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 1.6rem;
            padding: 0;
            text-decoration: none;
            color: #de222a;
            transition: color 0.3s ease;

            &:hover {
                color: #c62b2b;
            }
        }
    }

    &:hover {
        &::after {
            opacity: 1;
        }

        > div:first-of-type {
            .header-dropdown-arrow {
                background-color: #de222a;
                border: 1px solid #de222a;

                > i {
                    color: white;
                    rotate: -90deg;
                }
            }
        }

        .header-dropdown-inner {
            opacity: 1;
            visibility: visible;
            transform: scaleY(1);
        }
    }

    .dropdown-item {
        padding: 0;

        span {
            white-space: nowrap;
        }

        &:hover {
            .rotate-chevron {
                rotate: -90deg;
            }
        }

        .dropdown-item-icon {
            width: 4rem;
            height: 3rem;
            display: flex;
            align-items: center;
            justify-content: center;

            img {
                max-width: 3.5rem;
                max-height: 2.5rem;
                object-fit: contain;
            }
        }

        .dropdown-item-count {
            height: 21px;
            display: flex;
            justify-content: center;
            align-items: center;
            background-color: white;
            border: 1px solid #cccccc;
            border-radius: 0.8rem;
            padding: 0 6px;
            min-width: 20px;

            span {
                font-weight: bold;
                color: #333;
                font-size: 1.2rem;
            }
        }

        i {
            position: absolute;
            right: 0;
            transition: color 0.3s ease, rotate 0.3s ease-in-out;

            &:hover {
                color: #c62b2b;
            }
        }

        .dropdown-item-circle {
            background-color: #de222a;
            justify-content: center;
            align-items: center;
            width: 20px;
            height: 20px;
            border-radius: 20px;

            span {
                color: white;
                font-size: 1rem;
            }
        }

        .inner-dropdown {
            display: flex;
            flex-direction: column;
            justify-content: flex-start;
            align-items: stretch;
            color: red;
            position: absolute;
            left: 110%;
            width: auto;
            top: -20px;
            background: #fff;
            border: 1px solid #ccc;
            border-radius: 1rem;
            text-align: center;
            padding: 1.5rem;
            opacity: 0;
            transform-origin: top left;
            transform: translateX(-20px) scaleX(.9);
            pointer-events: none;
            transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;

            &::before {
                content: '';
                position: absolute;
                top: 30px;
                left: -4px;
                width: 8px;
                height: 8px;
                background: #fff;
                border: 1px solid #d9d9d9;
                border-top-color: #fff;
                border-left-color: #fff;
                border-bottom-left-radius: 2px;
                border-bottom-right-radius: 2px;
                transform: rotate(135deg);
                opacity: 0;
                pointer-events: none;
                transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
            }

            li {
                width: 100%;
                margin-bottom: 1.2rem;

                &:last-child {
                    margin-bottom: 0;
                }

                a {
                    font-size: 1.6rem;
                    padding-bottom: 0;
                    text-decoration: none;
                    width: fit-content;
                    color: #333333;
                    transition: color 0.3s ease-in-out;
                    white-space: nowrap;

                    &:hover {
                        color: #de222a;
                    }
                }
            }
        }

        &.is-active {
            .inner-dropdown {
                opacity: 1;
                transform: translateX(0) scaleX(1);
                pointer-events: auto;

                &::before {
                    opacity: 1;
                }
            }
        }
    }
}

.footer-column {
    margin-bottom: 6rem !important;
}

.ml-20 {
    margin-left: 20px;
}

.whatsapp-icon {
    position: fixed;
    bottom: 20px;
    right: 10px;
    z-index: 10001;
    cursor: pointer;
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
    opacity: 0;
    transform: translateY(20px) scale(0.8);
    animation: whatsappFadeIn 0.6s ease-in-out forwards;
    
    img {
        transition: transform 0.3s ease-in-out;
        width: 65px;
        height: 65px;
    }

    &:hover {
        transform: translateY(0) scale(1.15);
        
        img {
            transform: rotate(5deg) scale(1.05);
        }
    }

    &:active {
        transform: translateY(0) scale(1.05);
    }
}

.grecaptcha-badge { 
    visibility: hidden !important;
}   

/* Animation styles */
@keyframes pulse {
    0% {
        rotate: -3deg
    }
    2% {
        rotate: 3deg;
    }
    3% {
        rotate: 0deg;
    }
    97% {
        rotate: 0deg;
    }
    98% {
        rotate: 3deg;
    }
    100% {
        rotate: -3deg;
    }
}

@keyframes hideNotification {
    to {
        opacity: 0;
        transform: translateY(-100%);
    }
}

/* WhatsApp icon animations */
@keyframes whatsappFadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
.blog-section .container{
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}
.blog-section .title{
    margin-bottom: 25px;
}
.blog-section .title::after{
    width: 250px;
}
.blog-section__view-all{
    width: 450px;
    height: 35px;
    border-radius: 7px;
    border: 2px solid #D91C20;
    color: #D91C20;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    transition-property: color, background-color;
    transition: 0.3s ease-in-out; 
}
.blog-section__view-all:hover{
    text-decoration: none;
    color: #fff;
    background-color: #D91C20;
}
.blog-section__content {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
}
.blog-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.blog-item__title {
    font-size: 20px;
    color: #2F2F2F;
    margin-top: 0px;
}
.blog-item__date {
    font-size: 14px;
    color: #2F2F2F;
}
.blog-item__learn-more {
    color: #E03138;
    font-size: 16px;
    margin-top: 5px;
    text-decoration: underline;
    text-decoration-color: #E03138;
}
.blog-item__content {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.blog-item__img-wrapper {
    border-radius: 5px;
    overflow: hidden;
}
.blog-item__img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    border-radius: 5px;
    transition: transform 0.2s ease;
}
.blog-item:hover {
    color: unset;
    text-decoration: none;
}
.blog-item:hover .blog-item__img {
    transform: scale(1.1);
}

/* Responsive styles */
@media only screen and (max-width: 1024px) {
    .home .header-large .container--carousel {
        padding-top: 13rem;
    }

    .carousel-holder {
        max-width: 80%;
        position: static;
        margin-bottom: 10px;
    }
}

@media only screen and (max-width: 768px) {
    .user-control {
        flex: none !important;
    }

    .footer-column {
        margin-bottom: 0 !important;
    }

    .carousel-holder {
        max-width: 90%;
        position: static;
        margin-bottom: 10px;
    }

    .homepage-carousel .carousel-item {
        padding: 15px 20px;
        max-width: 100%;
    }

    .carousel-item h3 {
        font-size: 1.6rem;
    }

    .img-new {
        margin-left: 10px !important;
        transform: translateX(-5px);
    }

    .user-name {
        margin-left: 10px !important;
        margin-right: 15px !important;
    }

    .menu-icon {
        margin-right: 10px;
    }

    .notification-holder {
        top: 62px;
    }
    .blog-section__content {
        display: flex;
        flex-direction: column;
    }
    .blog-section__view-all{
        width: 350px;
    }
}