/* Bootstrap 5 navbar layout loaded from the document head to avoid first-paint resizing. */
.cis-navbar {
    background: transparent !important;
    box-shadow: none;
    border: none;
    padding: 0rem 2rem 0rem 6rem;
}

.navbar-brand-switcher {
    position: relative;
    gap: 1rem;
    display: flex;
    align-items: center;
    margin-right: 2rem;
}

.cis-navbar #logocis {
    position: static !important;
    display: inline-flex;
}

.navbar-brand-switcher #stickers {
    display: none !important;
    position: absolute;
    top: 70px;
    left: 0;
    background: #fff;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
    gap: 0.5rem;
    z-index: 10;
    list-style: none;
    margin: 0;
}

.navbar-brand-switcher:hover #stickers {
    display: flex !important;
}

.navbar-brand-switcher #stickers li {
    margin: 0;
    padding: 0.25rem;
}

.navbar-brand-switcher #stickers li img {
    width: 50px;
    cursor: pointer;
}

.cis-navbar .nav-link {
    font-family: "Delivery Condensed Bold", sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: black;
    position: relative;
    display: inline-block;
}

.cis-navbar .nav-link:hover,
.cis-navbar .nav-link:focus {
    color: inherit;
    background: transparent;
}

.cis-navbar .nav-link.active {
    position: relative;
}

.cis-navbar .nav-link::after {
    display: none;
}

.cis-navbar .nav-link.active::after {
    display: block;
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: #d40511;
    border: none;
    margin: 0;
}

.cis-navbar .dropdown-menu {
    border-radius: var(--bs-border-radius) !important;
    padding: 1rem;
    min-width: 16rem;
    border: none;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.cis-navbar .dropdown-item {
    font-weight: 500;
    border-radius: 0.75rem;
    padding: 0.5rem 0.75rem;
}

.cis-navbar .dropdown-item:hover {
    background: rgba(0,0,0,0.05);
    color: inherit;
}

.dropdown-submenu {
    position: static;
}

.dropdown-submenu .dropdown-menu {
    position: absolute;
    top: 0;
    left: 98%;
    margin-top: 0;
    margin-left: 0.125rem;
    display: none;
    grid-template-columns: repeat(2, 1fr);
    align-content: start;
    gap: 0.5rem 1rem;
    padding: 1rem;
    width: 36rem;
    max-width: 90vw;
}

.dropdown-submenu .dropdown-menu.show {
    display: grid;
}

.dropdown-submenu .dropdown-menu > li {
    margin: 0;
    padding: 0;
    min-width: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.dropdown-submenu .dropdown-menu .dropdown-item {
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    width: 100%;
    display: flex;
    align-items: center;
    min-height: 2.5rem;
}

.dropdown-submenu .dropdown-toggle::after {
    display: none;
}

.dropdown-submenu .fa-chevron-right {
    float: right;
    margin-top: 0.125rem;
    font-size: 0.75rem;
    opacity: 0.6;
}

.dropdown-submenu.dropstart .dropdown-menu {
    left: auto;
    right: 100%;
    top: 0;
    margin-left: 0;
    margin-right: 0.125rem;
}

.cis-navbar .dropdown-menu {
    overflow: visible;
}

.navbar-actions {
    display: flex;
    align-items: center;
}

.cis-navbar .container-fluid.align-items-center {
    min-height: 60px;
    align-items: center;
}

.cis-profile {
    width: 100%;
    justify-content: flex-end;
}

.cis-profile .search-box {
    max-width: 260px;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 0.5rem;
    z-index: 1000;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 8px 18px rgba(0,0,0,0.12);
}

.cis-profile .search-box .form-control {
    border: 1px solid #ddd;
    box-shadow: none;
    border-radius: 0.5rem;
}

.cis-profile .profile-toggle {
    color: #111;
    text-decoration: none;
}

.cis-profile .profile-toggle:hover {
    color: #d40511;
}

.cis-profile .dropdown-menu {
    border-radius: 1rem;
    min-width: 18rem;
    padding: 0;
    border: none;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.cis-profile .dropdown-header {
    padding: 1rem;
    color: black;
}

.cis-profile .brand-icon {
    border-radius: 4px;
}

.cis-profile .dropdown-item-text {
    padding: 1rem;
}

.cis-profile .brand-switcher {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.cis-profile .brand-switch-item {
    text-decoration: none;
    color: #495057;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.cis-profile .brand-switch-item:hover {
    background: rgba(212, 5, 17, 0.05);
    color: #d40511;
    border-color: rgba(212, 5, 17, 0.1);
    text-decoration: none;
}

.cis-profile .brand-icon-small {
    border-radius: 3px;
}

.cis-profile .profile-actions {
    margin: 0;
}

.cis-profile .profile-action-item {
    text-decoration: none;
    color: #495057;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.cis-profile .profile-action-item:hover {
    background: rgba(0,0,0,0.05);
    color: #212529;
    text-decoration: none;
}

.cis-profile .profile-action-item.text-danger:hover {
    background: rgba(220, 53, 69, 0.05);
    color: #dc3545;
}

.cis-profile .action-icon {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

.cis-profile .dropdown-divider {
    margin: 0;
    opacity: 0.3;
}

.cis-profile .icon-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 18px rgba(0,0,0,0.12);
    font-size: 1rem;
    color: #111;
}

.cis-profile .menu_ico .circle {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #d40511;
    color: #fff;
    font-size: 0.75rem;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cis-profile .menu_ico .circle.hidden {
    display: none;
}

.cis-profile .menu_ico {
    cursor: pointer;
    transition: transform 0.2s ease;
    position: relative;
}

.cis-profile .menu_ico:hover {
    transform: scale(1.05);
}

.cis-profile .search-icon,
.cis-profile .cart-icon {
    width: 24px;
    height: 24px;
    color: #111;
    transition: color 0.2s ease;
}

.cis-profile .menu_ico:hover .search-icon,
.cis-profile .menu_ico:hover .cart-icon {
    color: #d40511;
}

#basket {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    padding: 1.5rem;
    min-width: 300px;
    z-index: 1000;
    display: none;
}

#basket h3 {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    font-weight: 600;
}

#basket .list ul {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
    max-height: 200px;
    overflow-y: auto;
}

#basket .list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#basket .list li:last-child {
    border-bottom: none;
}

#basket .removeFromBasket {
    margin-left: auto;
    cursor: pointer;
    color: #d40511;
}

#basket .button {
    display: inline-block;
    background: #d40511;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 500;
}

#basket .isEmpty {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

#menu_search,
#menu_cart {
    position: relative;
    width: 24px;
    top: -4px;
}

#menu_cart {
    left: -15px;
}

#menu_search {
    left: 0;
    top: -2px;
}

#search_input {
    top: 50px;
}

.profile-menu ul.dropdown-menu {
    margin-top: 12px;
}
