
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    /* overflow-x: hidden; */
}

ul {
    list-style: none;
}

.site-header {

    display: flex;
    position: relative; 
    z-index: 1000;
    overflow: hidden;
    height: 50px;
}
.header-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between; /* Key for mobile layout */
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding-left: 0.5rem;
}


.logo img {
    height: 30px; /* Adjust as needed */
    vertical-align: middle;
    padding-block: 0.25rem;
    filter: invert(100%);
}

/* Mobile Menu Toggle */
.menu-toggle {
    font-size: 1.5rem; /* Icon size */
    color: #333;
    display: block; /* Shown on mobile */
}


.main-navigation {
    display: block; 
    position: fixed;
    top: 0; 
    left: -280px;
    width: 280px;
    height: 100vh;
    background-color: #333;
    color: #fff;
    padding-top: 60px;
    box-shadow: 2px 0 5px rgba(0,0,0,0.2);
    transition: all 0.3s ease-in-out;
    z-index: 1001;
}

.main-navigation.nav-open {
    left: 0;
    display: block;
}

.main-navigation ul {
    display: flex;
    flex-direction: column;
}

.main-navigation li a {
    display: block;
    padding: 2px 2px;
    color: #fff;
    font-size: 14px;
    transition: all 0.1s ease-in-out;
    text-decoration: none;
}


.header-container {
    max-width: 100%;
}

.menu-toggle {
    display: none; /* Hide hamburger on desktop */
}

.logo {
    position: static;
    transform: none;  
    left: auto;       
    top: auto;        
    margin-right: 20px;
    display: inline-block; /* Or block, depending on content */
    z-index: 1;
}

.main-navigation {
    display: flex !important;
    position: static;
    width: auto;
    height: auto;
    background-color: transparent;
    color: #fff; 
    padding-top: 0;
    box-shadow: none;
    transition: none;
    margin-right: auto;
    flex-grow: 1;
}

.main-navigation.nav-open {
    left: auto;
}

.main-navigation ul {
    flex-direction: row;
    margin-bottom: 0;
    gap: min(20px, 6vw);

}
.header-actions {
    position: fixed;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1;
    width: 100%;
    margin-top: 1rem;
}
.login-button-container, .basket-button-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    padding-inline: 0.5rem;
    padding-block: 0.25rem;
    cursor: pointer;
}
.login-button-container {
    border-radius: 0 0.5rem 0.5rem 0;
    transition: all 0.3s ease;
    left: 0;
    opacity: 1;
    
}
.login-button-container.open {
    left: -40px;
    opacity: 0;
}
.basket-button-container {
    border-radius: 0.5rem 0 0 0.5rem;
    transition: all 0.3s ease;
    right: 0;
    opacity: 1;
}
.basket-button-container.open {
    right: -40px;
    opacity: 0;
}
.action-button {
    font-size: 1.2rem;
    margin-left: 12px;
    position: relative;
    color: #333;
}

.action-button:first-child {
    margin-left: 0;
}

.cart-counter.hidden {
    opacity: 0;
    
}

.cart-counter {
    opacity: 1;
    transition: all 0.3s ease-in-out;
}

.basket-count.hidden{
    opacity: 0;
    pointer-events: none;
}

.basket-count {
    position: absolute;
    top: -9px;
    left: -11px;
    background-color: var(--color-red-logo);
    color: white;
    border-radius: 50%;
    font-size: 0.7rem;
    padding: 2px 5px;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    line-height: normal;
    width: 22px;
    height: 22px;
    opacity: 1;
    transition: all 0.3s ease-in-out;
    user-select: none;
    cursor: pointer;
}

.logged-in-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #01a817;
    position: absolute;
    top: 3px;
    right: -1px;
    border: 1px solid #333;
    transition: all 0.3s ease;

}

.logged-in-indicator.open {
    border: 1px solid var(--color-red-logo);

}
.mobile {
    display: flex;
}
.desktop {
    display: none;
}
@media (max-width: 372px) {
    .logo {
        margin: 0;
    }
    .site-header {
        padding-left: 0;
        padding-top: 0.5rem;
    }
    .header-container {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding-left: 0;
    }
    .main-navigation {
        margin-inline: auto;
    }
    .main-navigation li a {
        font-size: min(5vw, 14px);
    }
    
}
@media (min-width: 400px) {
    .site-header {
        padding-left: 1rem;
    }
    .logo {
        margin-right: 2.5rem;
    }
    
}

/* Desktop Styles (Breakpoint: e.g., 768px) */
@media (min-width: 768px) {
    .site-header {
        padding-left: 2rem;
    }
    .logo {
        margin-right: 4rem;
    }
    .mobile {
        display: none;
    }
    .desktop {
        display: flex;
    }
}


/* Optional: Add an overlay when mobile menu is open */
.nav-overlay {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000; /* Below nav, above page content */
}
.nav-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.account-menu-container {
    width: 0%;
    z-index: 1002;
    position: absolute;
    left: 0;
    top: 0;
    max-width: 100vw;
}


.account-menu {
    transform: translateX(-150%);
    transition: all 0.3s ease;
    position: fixed;
    top: 55px;
    left: 8px;
    width: 280px;
    min-height: fit-content;
    background-color: #111;
    color: #ccc;
    
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 1002;
    border-radius: 0.5rem;
    opacity: 0;
    display: flex;
    flex-direction: column;

}

.account-menu-container.open {
    width: 100%;
}


.account-menu-container.open .account-menu {
    transform: translateX(0);
    opacity: 1;

}

.account-menu-overlay {
    width: 100%;
    height: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    opacity: 0;
    
}

.account-menu-overlay.open {
    height: 100dvh;
    pointer-events: all;
    opacity: 1;

}

.account-icon {
    color: #000;
    transition: all 0.3s ease;
}

.account-icon.open {
    color: var(--color-red-logo);
}

.account-menu-user-info {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-evenly;
    width: 100%;
    padding: 1rem;
    background-color: #111;
    color: #ccc;
    height: auto;
    border-radius: 0.5rem;
}

.account-menu-user-info img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    filter: invert(90%);

}

.user-info-name-email {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
}

.user-info-name {
    font-weight: bold;
    line-height: 1.1rem;
}

.user-info-email {
    font-size: 0.8rem;
    opacity: 0.8;
}

.user-info-email, .user-info-name a{
    cursor: pointer;
}

.account-menu-divider {
    width: calc(100% - 1.5rem);
    height: 2px;
    background: var(--color-red-logo);
    margin-inline: 0.75rem;
    border-radius: 1px;
}

.account-menu-links {
    display: flex;
    flex-direction: column;
    text-align: center;
    height: 100%;
    gap: 0.5rem;
    padding-inline: 1rem;
    padding-block: 0.8rem;
}

.menu-link-container {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    gap: 1rem;
    align-items: center;
    text-align: center;
    height: 100%;
    font-weight: 700;
}

.login-register-account-container{
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    height: 100%;
}

.login-account-btn, .register-account-btn{
    width: 80%;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    /* background: #bdbdbd; */
    color: #ddd;
    border-radius: 4px;
    padding: 12px;
    /* box-shadow: rgba(0, 0, 0, 0.2) 0px 4px 6px -1px, rgba(0, 0, 0, 0.12) 0px 2px 4px -1px; */
    transition: all 0.3s ease;
    font-weight: 600;
    margin: 0.5rem;
    cursor: pointer;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.login-account-btn {
    background-color: transparent;
    box-shadow: inset 0 0 0 3px var(--color-red-logo);
    transition: all 0.3s ease;

}
.login-account-btn:hover{
    box-shadow: inset 0 0 0 4px #d32f2f;
    padding: 12px;
}

.register-account-btn:hover {
    background: #d32f2f;
    transition: all 0.3s ease;
    padding: 12px;
}

.basket-icon {
    color: #333;
    transition: all 0.3s ease;
}

.basket-icon.open {
    color: var(--color-red-logo);
}


.basket-menu-container {
    width: 0%;
    z-index: 10000;
    position: absolute;
    right: 0;
    top: 0;
    max-width: 100vw;
}


.basket-menu {
    transform: translateX(150%);
    transition: all 0.3s ease;
    position: fixed;
    top: 4px;
    bottom: 0;
    right: 8px;
    width: 90vw;
    max-width: 400px;
    min-height: fit-content;
    background-color: #000;
    color: #000;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 1002;
    border-radius: 0.8rem;
    opacity: 0;
    display: flex;
    flex-direction: column;

}

.basket-menu-container.open {
    width: 100%;
}


.basket-menu-container.open .basket-menu {
    transform: translateX(0);
    opacity: 1;

}

.basket-menu-overlay {
    width: 100%;
    height: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    opacity: 0;
    
}

.basket-menu-overlay.open {
    height: 120dvh;
    pointer-events: all;
    opacity: 1;
}

.basket-menu-header {
    height: 60px;
    background: #111111;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    padding-inline: 1rem;
    border-radius: 0.5rem 0.5rem 0 0;
    position: relative;
    line-height: normal;
}

.close-cart-icon {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 18px;
    cursor: pointer;
    color: #fff;
    transition: all 0.3s ease;
    align-self: center;
}

.basket-menu-header h2 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--color-red-logo);
    flex-grow: 1;
}

.basket-menu-header-item-count {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-neutral-300);
    align-self: center;
}

.basket-menu-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-block: 0.5rem;
    padding-inline: 0.3rem;
    overflow-y: auto;
    max-height: 50%;
}

.basket-menu-empty-message {
    text-align: center;
    font-weight: 600;
    color: var(--color-red-logo);
}

.basket-menu-item {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    align-items: center;
    padding: 0.5rem;
    border-radius: 0.5rem;
    /* box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1); */
    transition: all 0.3s ease;
    height: 140px;
    /* border: 1px solid var(--color-red-logo); */
    background: #111111;
    position: relative;
    transform: scale3d(1,1,1);
    transition: all 0.3s ease;
}

.basket-menu-item.removing-shrink {
    transform: scale3d(0,0,0);
}

.basket-menu-item-image-container {
    align-items: center;
    flex-shrink: 0;
    height: 100%;
    max-width: 33%;
    display: flex;

}

.basket-menu-item-image {
    object-fit: scale-down;
    max-width: 100%;
    max-height: 122px;
}

.basket-menu-item-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    flex-shrink: 1;
    overflow: hidden;
}

.basket-menu-item-brand {
    font-weight: 300;
    font-size: 0.8rem;
    color: #aaa;
    line-height: normal;
    margin-bottom: 0;
}

.basket-menu-item-name {
    font-weight: 600;
    font-size: clamp(0.8rem, 4.5vw, 1.1rem);
    margin-bottom: 0;
    color: #fff;
    line-height: normal;
}

.basket-menu-item-suffix {
    font-weight: 300;
    font-size: 0.6rem;
    color: #aaa;
    line-height: normal;
    margin-bottom: 0;
}

.basket-menu-item-price-container {
    position: relative;
    max-width: 100%;
    display: flex;
    flex-direction: row;
    line-height: normal;
    gap: 0.2rem;
}

.basket-menu-item-price-each {
    position: relative;
    font-weight: 300;
    font-size: 0.7rem;
    color: #aaa;
    white-space: nowrap;
    opacity: 1;
    bottom: 1px;
    align-self: flex-end;
    transition: all 0.1s ease;
    margin-bottom: 0;
}

.basket-menu-item-price-each.hidden {
    opacity: 0;
}

.basket-menu-item-price {
    font-weight: 300;
    font-size: 1rem;
    color: #ccc;
    margin-bottom: 0;
}

.quantity-selector-container{
    position: relative;
}

.quantity-selector {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100px;
    background-color: #111111;
    color: #fff;
    border-radius: 0.5rem;
    overflow: hidden;
    padding-inline: 0.4rem;
    padding-block: 0.2rem;
    border: 1px solid #333;
    position: relative;
    font-weight: 800;
    user-select: none;
    cursor: auto;
}

.quantity-selector-button {
    width: 1rem;
}

.quantity-selector-value {
    font-weight: 800;
    font-size: 1rem;
    color: #fff;
    cursor: auto;
    margin-bottom: 0;
    width: 40px;
    text-align: center;
    appearance: none;
    -webkit-appearance: none;
    
    margin: 0;
}

.basket-menu-item-remove-button {
    position: absolute;
    top: -100%;
    right: 0;
    color: #ccc;
    font-size: 0.8rem;
    text-decoration: underline;
}

.cart-product-spinner-container.htmx-request {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    opacity: 1;
    transition: all 0.0s ease;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #111111;
    border-radius: 0.5rem;

}

.cart-product-spinner-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #111111;
    border-radius: 0.5rem;
    pointer-events: none;
}

.basket-menu-totals-container {
    position: relative;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: flex-end;
    font-weight: 500;


}

.basket-menu-totals {
    display: flex;
    flex-direction: column;
    padding-inline: 1rem;
    background: #111111;
    padding-bottom: 2rem;
    padding-top: 1rem;
    gap: 0.5rem;
    position: relative;
    justify-content: flex-end;
    width: 100%;
    color: #fff;
}

.basket-menu-totals-shipping-label-container {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 0.4rem;
    position: relative;
    cursor: pointer;
}

.basket-menu-totals-shipping-label-container p {
    margin-bottom: 0;
}

.basket-menu-totals-shipping-label-container i {
    font-size: 0.8rem;
    height: 0.8rem;
    line-height: normal;
}

.basket-menu-totals-shipping-info {
    position: absolute;
    background: white;
    line-height: normal;
    font-size: 0.7rem;
    color: #555;
    padding: 0.4rem;
    top: 100%;
    transition: all 0.3s ease;
    z-index: 1;
    border: 1px solid rgba(0,0,0,0.25);
    border-radius: 0.3rem;
    opacity: 0;
}


.basket-menu-totals-shipping-label-container:hover .basket-menu-totals-shipping-info {
    opacity: 1;
}

.basket-menu-totals hr{
    margin-block: 0.5rem;
}

.basket-menu-totals-subtotal,
.basket-menu-totals-shipping,
.basket-menu-totals-discount,
.basket-menu-totals-total
{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}


.basket-menu-totals-shipping-value,
.basket-menu-totals-discount-value {
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
}

.basket-menu-totals-subtotal-value,
.basket-menu-totals-subtotal-label
{
    font-weight: 800;
    font-size: 1rem;
    color: #fff;
}

.basket-menu-totals-total {
    margin-top: 1rem;
}

.basket-menu-totals-total-label,
.basket-menu-totals-total-value {
    font-weight: 900;
    font-size: 1.2rem;
}

.basket-menu-checkout-button-container {
    color: #fff;
}


.basket-menu-checkout-button {
    background: var(--color-red-logo);
    color: #fff;
    border: 0px;
    border-radius: 0 0 0.5rem 0.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 48px;
    font-size: 16px;
    font-weight: 700;
    line-height: 32px;
    text-transform: uppercase;
    box-shadow: rgba(50, 50, 93, 0.25) 0px 6px 12px -2px, rgba(0, 0, 0, 0.3) 0px 3px 7px -3px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.basket-menu-checkout-button.disabled {
    background: var(--color-red-logo);
    color: #fff;
    border: 0px;
    border-radius: 0 0 0.5rem 0.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 48px;
    font-size: 16px;
    font-weight: 700;
    line-height: 32px;
    text-transform: uppercase;
    box-shadow: rgba(50, 50, 93, 0.25) 0px 6px 12px -2px, rgba(0, 0, 0, 0.3) 0px 3px 7px -3px;
    transition: all 0.3s ease;
    pointer-events: none;
    opacity: 0.5;

}

.cart-totals-spinner-container {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    opacity: 1;
    pointer-events: all;
    transition: all 0.0s ease;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #111111;
}

.cart-totals-spinner-container.hidden {
    opacity: 0;
    pointer-events: none;
    transition: all 0.0s ease;
}

