/* ---------- Sidebar panel ---------- */
.sidebar {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    height: 100%;
    background: rgba(15, 25, 34, 0.82);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: -12px 0 32px rgba(0, 0, 0, 0.45);
    transition: right 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    padding: 88px 18px 24px;
    z-index: 1500;
    display: flex;
    flex-direction: column;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-y: auto;
}

.sidebar.open {
    right: 0;
}

.sidebar nav {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar nav a {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 16px;
    color: #cfd6de;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: -0.005em;
    border-radius: 10px;
    border: 1px solid transparent;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.sidebar nav a:hover,
.sidebar nav a:focus-visible {
    background: rgba(79, 195, 255, 0.1);
    border-color: rgba(79, 195, 255, 0.3);
    color: #fff;
    outline: none;
}

.sidebar nav a::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 50%;
    width: 3px;
    height: 0;
    background: #4fc3ff;
    border-radius: 2px;
    transform: translateY(-50%);
    transition: height 0.2s ease;
}

.sidebar nav a:hover::before,
.sidebar nav a:focus-visible::before {
    height: 60%;
}

/* ---------- Badges ---------- */
.sidebar .badge {
    display: inline-block;
    background: rgba(79, 195, 255, 0.15);
    border: 1px solid rgba(79, 195, 255, 0.35);
    color: #a9e2ff;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 2px 8px;
    border-radius: 999px;
}

/* ---------- Cart link ---------- */
.sidebar nav a.cart-link {
    margin-top: 14px;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(79, 195, 255, 0.14), rgba(79, 195, 255, 0.06));
    border: 1px solid rgba(79, 195, 255, 0.35);
    color: #fff;
    font-weight: 600;
    justify-content: flex-start;
    gap: 10px;
}

.sidebar nav a.cart-link:hover,
.sidebar nav a.cart-link:focus-visible {
    background: linear-gradient(135deg, rgba(79, 195, 255, 0.22), rgba(79, 195, 255, 0.1));
    border-color: rgba(79, 195, 255, 0.6);
}

.sidebar nav a.cart-link::before {
    display: none;
}

.cart-count {
    margin-left: auto;
    min-width: 24px;
    padding: 2px 8px;
    background: #4fc3ff;
    color: #0a1016;
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: 999px;
    text-align: center;
    line-height: 1.4;
}

/* ---------- Open (hamburger) button ---------- */
.open-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: rgba(15, 25, 34, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e8edf2;
    font-size: 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
    z-index: 2000;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.open-btn:hover,
.open-btn:focus-visible {
    background: rgba(79, 195, 255, 0.15);
    border-color: rgba(79, 195, 255, 0.5);
    color: #4fc3ff;
    outline: none;
}

/* ---------- Close button (used by some pages that render one) ---------- */
.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #cfd6de;
    font-size: 18px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.close-btn:hover,
.close-btn:focus-visible {
    background: rgba(255, 77, 77, 0.15);
    border-color: rgba(255, 77, 77, 0.4);
    color: #ff8a8a;
    outline: none;
}

/* ---------- Small screens ---------- */
@media (max-width: 420px) {
    .sidebar {
        width: 86vw;
        right: -92vw;
    }
}
