:root {
    --ms-orange: #F85606;
    --ms-black: #222;
    --light-gray: #f7f7f7;
}

body { background-color: var(--light-gray); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; }

/* Desktop Top Nav */
.desktop-nav {
    background-color: var(--ms-orange);
    color: white;
    padding: 8px 0;
    position: sticky;
    top: 0;
    z-index: 1030;
}
.desktop-nav .nav-link { color: white; font-size: 0.9rem; font-weight: 500; }
.desktop-search-input { border-radius: 50px 0 0 50px; border: none; padding: 10px 20px; }
.desktop-search-btn { border-radius: 0 50px 50px 0; background: var(--ms-black); border: none; color: white; padding: 0 20px; }

.navbar-brand-img { height: 50px; width: auto; max-width: 220px; }
.bg-promo { background-color: #000; color: white; font-size: 0.85rem; padding: 8px 0; }
.bg-promo a { color: white; text-decoration: none; margin: 0 15px; }
.bg-promo a:hover { text-decoration: underline; }

/* Mobile Search */
.mobile-search-container {
    background: var(--ms-orange);
    padding: 10px;
    position: sticky;
    top: 0;
    z-index: 1020;
    border-bottom: 1px solid #ddd;
}

/* Product Card Styles */
.product-card {
    border: none;
    border-radius: 8px;
    transition: transform 0.2s;
    overflow: hidden;
    background: #fff;
    position: relative;
}
.product-card:hover { transform: translateY(-3px); box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
.product-img { aspect-ratio: 1 / 1; object-fit: cover; }
.price-text { color: #000; font-weight: 700; font-size: 1.1rem; margin-right: 5px; }
.rrp-text { font-size: 0.75rem; color: #999; text-decoration: line-through; }
.selection-badge { border: 1px solid red; color: red; font-size: 0.7rem; font-weight: bold; padding: 1px 4px; border-radius: 3px; display: inline-block; margin-bottom: 5px; }
.star-rating { color: #000; font-size: 0.8rem; }
.cart-btn-round { border: 1px solid #ddd; border-radius: 50%; width: 35px; height: 35px; display: flex; align-items: center; justify-content: center; float: right; cursor: pointer; }

/* Back to Top */
#btn-back-to-top {
    position: fixed;
    bottom: 80px;
    right: 20px;
    display: none;
    z-index: 1040;
    background-color: white;
    border: 1px solid #ddd;
    width: 45px; height: 45px;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.dropdown-submenu { position: relative; }
.dropdown-submenu .dropdown-menu { top: 0; left: 100%; margin-top: -1px; }

/* Language Overlay */
#langOverlay {
    display:none; position:fixed; top:0; left:0; width:100%; height:100%; 
    background:rgba(0,0,0,0.9); z-index:10000; justify-content:center; 
    align-items:center; flex-direction:column; color:white;
}

/* Custom Alert Overlay */
.ms-alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    z-index: 11000;
    backdrop-filter: blur(4px);
}

/* Alert Box */
.ms-alert-box {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    animation: slideIn 0.3s ease-out;
}

.ms-alert-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

.ms-alert-msg {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 25px;
    display: block;
    font-weight: 500;
}

.ms-alert-btn {
    background-color: var(--ms-orange);
    color: white;
    border: none;
    padding: 10px 40px;
    border-radius: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

.ms-alert-btn:hover {
    background-color: #e04e05;
}

@keyframes slideIn {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Enable Multi-Level Dropdowns on Hover for Desktop */
@media (min-width: 992px) {
    .dropdown-menu .dropdown-submenu {
        position: relative;
    }

    .dropdown-menu .dropdown-submenu .dropdown-menu {
        top: 0;
        left: 100%; /* Positions the sub-menu to the right of the main category */
        margin-top: -1px;
        display: none; /* Hidden by default */
    }

    /* Display the sub-menu when hovering over the parent list item */
    .dropdown-submenu:hover > .dropdown-menu {
        display: block;
    }
}