:root {
    --primary-text-color: #fff;
    --primary-bg-color: #23705b;
    --primary-hover-color: #fff700;
    --red: #ff3030;
}

header {
    background-color: var(--primary-bg-color);
}

article {
    background-color: #fff;
    color: #000;
}

.top-header {
    font-size: 14px;
    padding: 0px 12px;
    min-height: 36px;
    padding-top: 7px;
}

.top-header a {
    color: #fff;
    padding: 5px 6px;
    text-decoration: none; /* Remove the default underline */
    position: relative; /* Position relative for the pseudo-element */
}

.top-header a::before {
    content: ""; /* Add an empty content to the pseudo-element */
    position: absolute; /* Position absolutely within the parent element */
    bottom: 0; /* Align the pseudo-element to the bottom of the parent */
    left: 0; /* Start the pseudo-element from the left side of the parent */
    width: 0; /* Initially, the width is 0 */
    height: 2px; /* Set the border height */
    background-color: var(--primary-hover-color); /* Border color */
    transition: width 0.4s ease-in-out; /* Add a transition for width change */
}

.top-header a:hover::before {
    width: 100%; /* When hovered, set the width to 100% for the animation effect */
}

.top-header a:hover {
    color: var(--primary-hover-color);
}

.navbar-light .navbar-nav .nav-link {
    font-family: "Josefin Slab", serif;
    font-size: 19px;
    letter-spacing: -1px;
    position: relative;
    padding: 3px 10px;
    color: #373737;
    outline: none;
    transition: 0.9s;
}

.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link.active {
    color: var(--red);
}

.navbar .navbar-nav .dropdown .dropdown-menu {
    font-family: "Josefin Slab", serif;
    font-size: 18px;
    border: none;
    border-radius: 0px 0px 5px 5px;
    border-bottom: #eeeeee 2px solid;
    border-right: #eeeeee 2px solid;
    border-left: #eeeeee 2px solid;
    margin-top: 21px !important;
    padding: 0;
}

.navbar .navbar-nav .dropdown-menu a {
    color: #000;
    padding: 6px 12px;
    border-bottom: #eeeeee 1px solid;
}

.navbar .navbar-nav .dropdown-menu a:last-child {
    border-bottom: none;
}

.navbar .navbar-nav .dropdown-menu a:hover {
    color: #fff;
    background-color: var(--red);
}

.navbar-toggler {
    border: none !important;
    outline: none !important;
}

.dropdown-toggle::after {
    top: 45% !important;
    right: -5px !important;
}

/* Navbar Font Size */
@media (max-width: 1200px) {
    .navbar-light .navbar-nav .nav-link {
        font-size: 14px;
    }
}

@media (min-width: 992px) {
    .navbar-light .navbar-nav .nav-link::before {
        position: absolute;
        content: "";
        width: 0;
        height: 2px;
        bottom: 0;
        left: 50%;
        background: var(--red);
        transition: 0.5s;
    }

    .navbar-light .navbar-nav .nav-link:hover::before,
    .navbar-light .navbar-nav .nav-link.active::before {
        width: 100%;
        left: 0;
    }

    .navbar-light .navbar-nav .nav-link:after {
        content: "";
        position: absolute;
        top: 1px;
        right: 0;
        width: 1px;
        height: 32px;
        background: linear-gradient(
            180deg,
            rgba(62, 71, 80, 0) 0,
            #3e4750 51.56%,
            rgba(62, 71, 80, 0) 100%
        );
    }

    .navbar-light .navbar-nav .nav-link:last-child::after {
        width: 0px;
    }

    .navbar-light .navbar-nav .dropdown:after {
        content: "";
        position: absolute;
        top: 1px;
        right: 0;
        width: 1px;
        height: 32px;
        background: linear-gradient(
            180deg,
            rgba(62, 71, 80, 0) 0,
            #3e4750 51.56%,
            rgba(62, 71, 80, 0) 100%
        );
    }
    .navbar-light .navbar-nav .dropdown:last-child::after {
        width: 0px;
    }
}

@media (max-width: 991.98px) {
    .navbar-light .navbar-nav .nav-link {
        margin-left: 0;
        padding: 10px 0;
    }
}

/* Footer */
footer {
    color: white;
    background: -moz-radial-gradient(
        center,
        ellipse cover,
        #20876c 0%,
        #0b533e 100%
    );
    /* ff3.6+ */
    background: -webkit-gradient(
        radial,
        center center,
        0px,
        center center,
        100%,
        color-stop(0%, #20876c),
        color-stop(100%, #0b533e)
    );
    /* safari4+,chrome */
    background: -webkit-radial-gradient(
        center,
        ellipse cover,
        #20876c 0%,
        #0b533e 100%
    );
    /* safari5.1+,chrome10+ */
    background: -o-radial-gradient(
        center,
        ellipse cover,
        #20876c 0%,
        #0b533e 100%
    );
    /* opera 11.10+ */
    background: -ms-radial-gradient(
        center,
        ellipse cover,
        #20876c 0%,
        #0b533e 100%
    );
    /* ie10+ */
    background: radial-gradient(ellipse at center, #20876c 0%, #0b533e 100%);
    /* w3c */
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#20876c', endColorstr='#0b533e', GradientType=1);
    /* ie6-9 */
}

.footer a {
    color: #fff !important;
    text-decoration: none;
}

.footer a:hover {
    color: var(--primary-hover-color) !important;
}

.footer .btn:hover {
    background-color: var(--red) !important;
    color: #fff !important;
    border-color: var(--red) !important;
    box-shadow: inset 0 0 0 20rem var(--red);
}

.back-to-top {
    position: fixed;
    display: none;
    left: 50px;
    bottom: 0px;
    border-radius: 50% 50% 0 0;
    z-index: 99;
}

.footer-bottom a {
    color: #fbff07 !important;
}

.footer-bottom a:hover {
    color: var(--red) !important;
    text-shadow: 0 0 5px #000000;
}


/* Enhanced Cart and Wishlist Styles */
.cart-wishlist-container {
    position: relative;
}

.cart-wishlist-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 5px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid #0b533e;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.cart-wishlist-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.1), rgba(0, 123, 255, 0.05));
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.3s ease;
    z-index: 1;
}

.cart-wishlist-link:hover::before {
    transform: scale(1);
}

.cart-wishlist-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: rgba(0, 123, 255, 0.3);
}

.cart-link:hover {
    background: linear-gradient(135deg, #007bff, #0056b3);
}

.cart-link:hover .icon-wrapper i {
    color: white;
    transform: scale(1.1);
}

.wishlist-link:hover {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.wishlist-link:hover .icon-wrapper i {
    color: white;
    transform: scale(1.1);
}

.icon-wrapper {
    position: relative;
    z-index: 2;
}

.icon-wrapper i {
    font-size: 1.4rem;
    color: #495057;
    transition: all 0.3s ease;
}

.item-badge {
    position: absolute;
    top: -14px;
    right: -14px;
    min-width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    animation: pulse 2s infinite;
}

.cart-badge {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.wishlist-badge {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

/* Pulse animation for badges */
@keyframes pulse {
    0% {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }
    50% {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15), 0 0 0 5px rgba(231, 76, 60, 0.3);
    }
    100% {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }
}

/* Badge bounce animation on hover */
.cart-wishlist-link:hover .item-badge {
    animation: bounce 0.6s ease;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-3px);
    }
    60% {
        transform: translateY(-2px);
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .cart-wishlist-link {
        width: 45px;
        height: 45px;
    }
    
    .icon-wrapper i {
        font-size: 1.2rem;
    }
    
    .item-badge {
        min-width: 18px;
        height: 18px;
        font-size: 0.7rem;
        top: -6px;
        right: -6px;
    }
    
    .cart-wishlist-link::after {
        display: none; /* Hide tooltips on mobile */
    }
}

/* Smooth color transition */
.cart-wishlist-link {
    background-size: 200% 200%;
    background-position: 0% 50%;
}

.cart-wishlist-link:hover {
    background-position: 100% 50%;
}

/* Loading state for cart updates */
.cart-wishlist-link.loading {
    pointer-events: none;
}

.cart-wishlist-link.loading .icon-wrapper i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}