/* Cart Sidebar Styles */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.cart-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    height: 100%;
    background: #0b090a;
    /* Dark theme background */
    z-index: 9999;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    border-left: 1px solid #333;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
}

.cart-sidebar.active {
    transform: translateX(0);
}

/* Header */
.cart-sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-transform: uppercase;
}

.cart-sidebar-header h2 {
    margin: 0;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1.16rem;
    color: #f3f3f3;
    letter-spacing: 0em;
    text-transform: uppercase;
}

.close-cart-btn {
    background: none;
    border: none;
    color: #f3f3f3;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

/* Items List */
.cart-sidebar-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cart-sidebar-item {
    display: flex;
    gap: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #222;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.cart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.cart-item-title {
    font-family: Hiragino Kaku Gothic Std W8;
    font-weight: 600;
    font-size: 0.9rem;
    color: #f3f3f3;
    word-break: keep-all;
    overflow-wrap: break-word;
}

.cart-item-price {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.85rem;
    color: #aaa;
    margin-top: 4px;
}

.cart-item-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.qty-control-sm {
    display: flex;
    align-items: center;
    border: 1px solid #444;
    border-radius: 4px;
}

.qty-control-sm button {
    background: none;
    border: none;
    color: #f3f3f3;
    padding: 2px 8px;
    cursor: pointer;
}

.qty-control-sm span {
    padding: 0 5px;
    font-size: 0.85rem;
    color: #f3f3f3;
}

.remove-item-btn {
    background: none;
    border: none;
    color: #888;
    text-decoration: underline;
    font-size: 0.75rem;
    cursor: pointer;
}

.remove-item-btn:hover {
    color: #ff4444;
}

/* Footer */
.cart-sidebar-footer {
    padding: 20px;
    border-top: 1px solid #333;
    background: #0b090a;
}

.cart-subtotal {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1rem;
    color: #f3f3f3;
}

.checkout-btn-full {
    font-family: 'IBM Plex Mono', monospace;
    width: 100%;
    padding: 12px;
    background: #671f21;
    color: #f3f3f3;
    border: none;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.2s;
}

.checkout-btn-full:hover {
    background: #5b1b1d;
}

.checkout-btn-full:disabled {
    background: #555;
    cursor: not-allowed;
    color: #888;
}

.view-cart-link {
    text-align: center;
    margin-top: 10px;
}

.view-cart-link a {
    color: #aaa;
    font-size: 0.85rem;
    text-decoration: underline;
}

.empty-cart-msg {
    font-family: 'IBM Plex Mono', monospace;
    text-transform: uppercase;
    text-align: center;
    color: #888;
    margin-top: 40px;
}

/* Responsive */
@media (max-width: 480px) {
    .cart-sidebar {
        width: 100%;
    }
}