.sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100vh;
    background-color: #11385d;
    color: white;
    transition: left 0.3s ease;
    z-index: 1002;
    overflow-y: auto;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
}

.sidebar.active {
    left: 0;
    opacity: 0.9;
}

.sidebar .btn-close,
.cart-sidebar .btn-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
}

.sidebar .btn-close {
    color: white;
}

.cart-sidebar .btn-close {
    color: #11385d;
}

.sidebar-nav {
    margin-top: 60px;
    padding: 20px 0;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li {
    margin: 0;
}

.sidebar-nav a {
    display: block;
    padding: 15px 20px;
    color: white;
    text-decoration: none;
    transition: background-color 0.2s ease;
    border-left: 4px solid transparent;
}

.sidebar-nav a:hover {
    background-color: rgba(255, 255, 255, 0.95);
    border-left-color: #ccdeeb;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
    transition: background-color 0.3s ease;
    z-index: 999;
    display: none;
}

.sidebar-overlay.active {
    display: block;
    background-color: rgba(0, 0, 0, 0.5);
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -360px;
    width: 360px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.9);
    color: #11385d;
    transition: right 0.3s ease, background-color 0.3s ease, opacity 0.3s ease;
    z-index: 1002;
    overflow-y: auto;
    box-shadow: -2px 0 12px rgba(0, 0, 0, 0.18);
    opacity: 0;
}

.cart-sidebar.active {
    right: 0;
    opacity: 1;
}

.cart-sidebar-header,
.cart-sidebar-footer {
    padding: 1.25rem;
}

.cart-sidebar-header {
    margin-top: 3rem;
    border-bottom: 1px solid rgba(17, 56, 93, 0.12);
}

.cart-sidebar-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
}

.cart-sidebar-kicker {
    margin: 0 0 0.25rem;
    color: #2caa3f;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.cart-items {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cart-item,
.cart-empty-state {
    border-radius: 1.25rem;
    background: rgba(204, 222, 235, 0.38);
}

.cart-item {
    padding: 1rem;
}

.cart-item-top {
    display: flex;
    gap: 0.875rem;
}

.cart-item-image {
    width: 72px;
    height: 72px;
    object-fit: contain;
    border-radius: 1rem;
    background: #fff;
    padding: 0.5rem;
}

.cart-item-title {
    margin: 0 0 0.25rem;
    font-size: 1rem;
    font-weight: 700;
}

.cart-item-meta,
.cart-item-price {
    margin: 0;
    font-size: 0.92rem;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 1rem;
}

.cart-qty-controls {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(17, 56, 93, 0.16);
    border-radius: 999px;
    overflow: hidden;
    background: #fff;
}

.cart-qty-btn {
    border: 0;
    background: transparent;
    width: 2rem;
    height: 2rem;
    color: #11385d;
}

.cart-qty-value {
    min-width: 2rem;
    text-align: center;
    font-weight: 600;
}

.cart-remove-btn {
    border: 0;
    background: transparent;
    color: #11385d;
    text-decoration: underline;
    padding: 0;
}

.cart-empty-state {
    padding: 1.5rem;
    text-align: center;
}

.cart-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.6rem;
}

.cart-summary-total {
    font-size: 1.05rem;
    margin-bottom: 1rem;
}

.cart-checkout-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cart-sidebar-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-decoration: none;
}

.cart-count-badge {
    position: absolute;
    top: -0.2rem;
    right: -0.35rem;
    min-width: 1.2rem;
    height: 1.2rem;
    padding: 0 0.3rem;
    border-radius: 999px;
    background: #2caa3f;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.2rem;
}

.navbar-shell {
    position: relative;
    z-index: 1001;
}

.nav-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    border: none;
    padding: 0;
    line-height: 0;
    cursor: pointer;
    min-width: 2.6rem;
    min-height: 2.6rem;
}

.nav-icon {
    display: block;
    font-size: clamp(1.3rem, 4.5vw, 2.3rem);
    line-height: 1;
}

@media (max-width: 767.98px) {
    .cart-sidebar {
        width: min(360px, 100vw);
    }

    .cart-sidebar-header,
    .cart-sidebar-footer,
    .cart-items {
        padding: 1rem;
    }

    .cart-item-top {
        align-items: flex-start;
    }
}
