﻿.cart-count-badge {
    position: absolute;
    top: -6px;
    right: -12px;
    background-color: red;
    color: white;
    font-size: 12px;
    font-weight: bold;
    padding: 1px 5px;
    border-radius: 20px;
    line-height: 1;
    z-index: 99;
}

.top-right-cart-btn {
    position: fixed;
    top: 88px;
    right: 27px;
    z-index: 98;
    background-color: var(--color-primary);
    color: white;
    padding: 5px;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s ease;
}

    .top-right-cart-btn:hover {
        background-color: var(--color-primary-dark);
    }

    .top-right-cart-btn svg {
        display: block;
        fill: white;
    }

@media (min-width: 768px) {
    .cart-count-badge {
        top: -8px;
        right: -14px;
        font-size: 14px;
        padding: 2px 7px;
    }

    .top-right-cart-btn {
        top: 100px;
        right: 36px;
        padding: 8px;
    }

        .top-right-cart-btn svg {
            width: 28px;
            height: 28px;
        }
}

/* =======================
   Layout & Navigation Styles
========================== */

header {
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--color-primary);
    padding: 1rem 2rem;
    color: var(--color-text-inverse);
}

.navbar-logo img {
    height: 45px;
}

.nav-links {
    display: flex;
    gap: 1.2rem;
    align-items: center;
}

    .nav-links a {
        color: var(--color-text-inverse);
        text-decoration: none;
        font-weight: 600;
        font-size: 1rem;
        padding: 10px;
        transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        backface-visibility: hidden;
    }

        .nav-links a:hover {
            color: var(--color-accent);
        }

/* ====== Mobile Menu ====== */
.menu-toggle {
    display: none;
    font-size: 1.8rem;
    color: var(--color-text-inverse);
    cursor: pointer;
    position: relative;
    z-index: 2001;
    width: 30px;
    height: 26px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

    .menu-toggle .bar {
        border-radius: 25px;
        width: 100%;
        height: 3px;
        background: white;
        transition: 0.3s ease, opacity 0.3s ease;
    }

    /* Change to 'X' when active */
    .menu-toggle.active .bar:nth-child(1) {
        transform: translateY(15.4px) rotate(45deg);
    }

    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-7.5px) rotate(-45deg);
    }

/* ========== Footer Styling ========== */
.site-footer {
    background-color: var(--color-primary);
    color: var(--color-text-inverse);
    margin-top: 2rem;
    padding: 3rem 1rem;
    font-size: 0.95rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 40px;
}

.footer-section {
    flex: 1;
    min-width: 250px;
}

    .footer-section h3 {
        font-size: 1.4rem;
        margin-bottom: 1rem;
        color: var(--color-accent);
    }

    .footer-section ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }

        .footer-section ul li {
            margin-bottom: 10px;
        }

            .footer-section ul li a {
                color: var(--color-text-inverse);
                text-decoration: none;
                transition: color 0.3s;
            }

                .footer-section ul li a:hover {
                    color: var(--color-accent);
                    text-decoration: underline;
                }

/* IMNIY Section Enhancements */
.imniy-logo img {
    height: 50px;
    width: auto;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
    margin-bottom: 10px;
    background-color: #001f3f;
    padding: 6px;
}

.imniy-credit {
    font-weight: 500;
    margin-bottom: 10px;
    color: var(--color-text-inverse);
}

.imniy-contact i,
.imniy-location i {
    margin-right: 8px;
    color: var(--color-accent);
}

.imniy-contact {
    margin: 8px 0;
    font-weight: 600;
}

.imniy-social-icons {
    margin: 12px 0;
    display: flex;
    gap: 15px;
}

    .imniy-social-icons a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        background-color: var(--color-primary-dark);
        color: var(--color-accent);
        border-radius: 50%;
        font-size: 1.1rem;
        transition: transform 0.3s ease, background-color 0.3s ease;
        text-decoration: none;
    }

        .imniy-social-icons a:hover {
            background-color: var(--color-accent);
            color: var(--color-primary);
            transform: scale(1.05);
        }

.imniy-location {
    margin-top: 10px;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--color-text-inverse);
}

/* Responsive Footer */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }

    .footer-section ul li {
        margin-bottom: 12px;
    }

    .imniy-social-icons {
        justify-content: center;
    }
}


/* Scroll To Top Button Style */
.scroll-to-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--color-primary-dark);
    color: var(--color-text-inverse);
    border: none;
    border-radius: 50%;
    display: flex; /* Always keep flex to allow transition */
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    z-index: 9999;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    opacity: 0; /* Initially hidden */
    visibility: hidden; /* Hide from screen readers */
    pointer-events: none; /* Prevent clicking when invisible */
    transition: background-color 0.3s ease, color 0.3s ease, opacity 0.3s ease, visibility 0.3s ease, transform 0.3s;
}

    .scroll-to-top-btn.show {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .scroll-to-top-btn:hover {
        background-color: var(--color-primary);
        color: var(--color-accent);
        transform: translateY(-3px);
    }

/* ====== Responsive Design ====== */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-links {
        flex-direction: column;
        background: var(--color-primary-light);
        position: absolute;
        top: 82px;
        right: 0;
        gap: 2px;
        border-radius: 5px;
        margin-right: 3px;
        width: 120px;
        display: flex;
        transform: translateY(-22%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
        opacity: 0;
        pointer-events: none;
    }

        .nav-links.show {
            transform: translateY(0) scale(1);
            opacity: 1;
            box-shadow: 0 6px 6px rgba(0, 0, 0, 0.5);
            pointer-events: auto;
        }

        .nav-links.hide {
            transform: translateY(-22%) scale(0.95);
            opacity: 0;
            pointer-events: none; /* Prevent clicking when invisible */
        }

        /* Smooth staggered animation for each link */
        .nav-links a {
            opacity: 0;
            transform: translateY(-20px);
            transition-property: opacity, transform, color;
            transition-duration: 0.5s;
            transition-timing-function: ease;
            transition-delay: 0s;
        }

        .nav-links.show a:nth-child(1) {
            transition-delay: 0.1s;
            opacity: 1;
            transform: translateY(0);
        }

        .nav-links.show a:nth-child(2) {
            transition-delay: 0.2s;
            opacity: 1;
            transform: translateY(0);
        }

        .nav-links.show a:nth-child(3) {
            transition-delay: 0.3s;
            opacity: 1;
            transform: translateY(0);
        }

        .nav-links.show a:nth-child(4) {
            transition-delay: 0.4s;
            opacity: 1;
            transform: translateY(0);
        }

        .nav-links.show a:nth-child(5) {
            transition-delay: 0.5s;
            opacity: 1;
            transform: translateY(0);
        }

        /* Hover effect on menu items */
        .nav-links a:hover {
            color: var(--color-accent);
            transition: color 0.3s ease !important;
            transition-delay: 0s !important;
        }
}

@media (min-width: 769px) {
    .menu-toggle {
        display: none;
    }
}
