/* Cart Sidebar Styles */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -420px;
    width: 400px;
    height: 100vh;
    background: #fafafa;
    box-shadow: -4px 0 20px rgba(0,0,0,0.08);
    z-index: 10000;
    transition: right 0.3s;
    display: flex;
    flex-direction: column;
}

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

.cart-header {
    padding: 24px;
    border-bottom: 1px solid #ececec;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
}

.cart-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #2c2c2c;
}

.close-cart {
    width: 36px;
    height: 36px;
    border: none;
    background: #f5f5f5;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: #666666;
}

.close-cart:hover {
    background: #ececec;
    color: #10b981;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.empty-cart {
    text-align: center;
    color: #888888;
    padding: 40px 20px;
}

.cart-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    border: 1px solid #ececec;
    border-radius: 12px;
    margin-bottom: 12px;
    background: #fff;
    transition: all 0.2s;
}

.cart-item:hover {
    border-color: #e0e0e0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.cart-item-img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
}

.cart-item-info {
    flex: 1;
}

.cart-item-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
    color: #2c2c2c;
}

.cart-item-author {
    font-size: 12px;
    color: #888888;
    margin-bottom: 4px;
}

.cart-item-prices {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.cart-item-price {
    color: #10b981;
    font-weight: 700;
    white-space: nowrap;
}

.cart-item-old-price {
    font-size: 12px;
    color: #9ca3af;
    text-decoration: line-through;
    white-space: nowrap;
}

.cart-item-remove {
    background: none;
    border: none;
    color: #999999;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.2s;
}

.cart-item-remove:hover {
    color: #ef4444;
}

.cart-footer {
    padding: 24px;
    border-top: 1px solid #ececec;
    background: #fff;
}

.cart-summary {
    background: transparent;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 14px;
    color: #666666;
}

.cart-summary-row span:last-child {
    color: #2c2c2c;
    font-weight: 500;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    padding-top: 12px;
    border-top: 1px solid #ececec;
    color: #2c2c2c;
}

.btn-checkout {
    width: 100%;
    padding: 14px;
    background: #10b981;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: block;
    text-align: center;
}

.btn-checkout:hover {
    background: #059669;
}

.btn-clear-cart {
    width: 100%;
    padding: 12px;
    background: transparent;
    color: #888888;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
}

.btn-clear-cart:hover {
    background: #f5f5f5;
    border-color: #d0d0d0;
    color: #666666;
}

.cart-security {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    font-size: 11px;
    color: #888888;
}

.cart-security i {
    color: #10b981;
}

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: none;
}

.cart-overlay.active {
    display: block;
}

.empty-cart-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.empty-cart-state i {
    font-size: 64px;
    color: #e5e7eb;
    margin-bottom: 16px;
}

.empty-cart-state h3 {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
}

.empty-cart-state p {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 24px;
}

.btn-explore {
    padding: 12px 24px;
    background: #10b981;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-explore:hover {
    background: #059669;
}

/* Dark Theme */
body.dark-theme .cart-sidebar {
    background: #1e1e1e;
}

body.dark-theme .cart-header {
    border-bottom-color: #2a2a2a;
    background: #252525;
}

body.dark-theme .cart-header h3 {
    color: #e5e5e5;
}

body.dark-theme .close-cart {
    background: #2a2a2a;
    color: #b0b0b0;
}

body.dark-theme .close-cart:hover {
    background: #353535;
    color: #10b981;
}

body.dark-theme .cart-items {
    background: #1e1e1e;
}

body.dark-theme .cart-item {
    background: #252525;
    border-color: #2a2a2a;
}

body.dark-theme .cart-item:hover {
    background: #2a2a2a;
    border-color: #353535;
}

body.dark-theme .cart-item-title {
    color: #e5e5e5;
}

body.dark-theme .cart-item-author {
    color: #888888;
}

body.dark-theme .cart-item-remove {
    color: #888888;
}

body.dark-theme .cart-item-remove:hover {
    color: #ef4444;
}

body.dark-theme .cart-footer {
    border-top-color: #2a2a2a;
    background: #252525;
}

body.dark-theme .cart-total {
    color: #e5e5e5;
    border-top-color: #2a2a2a;
}

body.dark-theme .cart-summary-row {
    color: #b0b0b0;
}

body.dark-theme .cart-summary-row span:last-child {
    color: #e5e5e5;
}

body.dark-theme .btn-clear-cart {
    background: transparent;
    border-color: #3a3a3a;
    color: #888888;
}

body.dark-theme .btn-clear-cart:hover {
    background: #2a2a2a;
    border-color: #4a4a4a;
    color: #b0b0b0;
}

body.dark-theme .cart-security {
    color: #888888;
}

body.dark-theme .empty-cart-state h3 {
    color: #e5e5e5;
}

body.dark-theme .empty-cart-state p {
    color: #888888;
}

body.dark-theme .empty-cart-state i {
    color: #2a2a2a;
}

@media (max-width: 768px) {
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
}
