/* Slide-out Cart Styles */
.cart-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 90;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
    backdrop-filter: blur(4px);
}

.cart-overlay.open {
    opacity: 1;
    visibility: visible;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 100%;
    max-width: 400px;
    background-color: white;
    z-index: 100;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: -5px 0 25px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
}

.dark .cart-drawer {
    background-color: #0f172a; /* slate-900 */
    border-left: 1px solid rgba(255,255,255,0.1);
}

.cart-drawer.open {
    transform: translateX(0);
}

.cart-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dark .cart-header {
    border-bottom-color: #1e293b;
}

.cart-title {
    font-family: 'Anton', sans-serif;
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #0f172a;
}

.dark .cart-title {
    color: white;
}

.cart-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: #64748b;
    transition: color 0.2s;
}

.cart-close:hover {
    color: #ec4899; /* artist-accent */
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cart-empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #64748b;
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background-color: #f8fafc;
    border-radius: 0.75rem;
    position: relative;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.dark .cart-item {
    background-color: #1e293b;
}

.cart-item:hover {
    border-color: #ec4899;
}

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

.cart-item-title {
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

.dark .cart-item-title {
    color: white;
}

.cart-item-price {
    font-weight: 600;
    color: #ec4899;
}

.cart-item-owned-badge {
    display: inline-block;
    margin-top: 0.4rem;
    padding: 0.2rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #b91c1c;
    background-color: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: 999px;
}

.dark .cart-item-owned-badge {
    color: #fecaca;
    background-color: rgba(239, 68, 68, 0.18);
    border-color: rgba(239, 68, 68, 0.45);
}

.cart-item-remove {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.2s;
}

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

.cart-footer {
    padding: 1.5rem;
    border-top: 1px solid #e2e8f0;
    background-color: #f8fafc;
}

.dark .cart-footer {
    border-top-color: #1e293b;
    background-color: #020617;
}

/* Discount Section */
.cart-discount {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e2e8f0;
    background-color: #f8fafc;
}

.dark .cart-discount {
    border-top-color: #1e293b;
    background-color: #020617;
}

.cart-discount-form {
    display: flex;
    gap: 0.5rem;
}

.cart-discount-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    background-color: white;
    color: #0f172a;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.2s;
}

.dark .cart-discount-input {
    background-color: #1e293b;
    border-color: #334155;
    color: white;
}

.cart-discount-input:focus {
    border-color: #ec4899;
    box-shadow: 0 0 0 2px rgba(236, 72, 153, 0.1);
}

.cart-discount-btn {
    padding: 0.75rem 1.25rem;
    background-color: #0f172a;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dark .cart-discount-btn {
    background-color: #334155;
}

.cart-discount-btn:hover {
    background-color: #ec4899;
}

.dark .cart-discount-btn:hover {
    background-color: #ec4899;
}

.cart-discount-active {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(236, 72, 153, 0.1);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(236, 72, 153, 0.2);
}

.cart-discount-active span {
    color: #be185d;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dark .cart-discount-active span {
    color: #fce7f3;
}

.cart-discount-remove {
    background: none;
    border: none;
    color: #be185d;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    padding: 0 0.25rem;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.dark .cart-discount-remove {
    color: #fce7f3;
}

.cart-discount-remove:hover {
    opacity: 1;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 700;
}

.cart-total-amount {
    color: #ec4899;
    font-size: 1.5rem;
}

.cart-checkout-btn {
    width: 100%;
    padding: 1rem;
    background-color: #ec4899;
    color: white;
    border: none;
    border-radius: 9999px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3);
}

.cart-checkout-btn:hover {
    background-color: #be185d;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(236, 72, 153, 0.4);
}

.cart-checkout-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Floating Cart Toggle Button */
.cart-toggle-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3.5rem;
    height: 3.5rem;
    background-color: #ec4899;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.4);
    cursor: pointer;
    z-index: 80;
    transition: all 0.2s;
    animation: bounce-in 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cart-toggle-float:hover {
    transform: scale(1.1);
}

.cart-count-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #0f172a;
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

.dark .cart-count-badge {
    background-color: white;
    color: #ec4899;
    border-color: #0f172a;
}

@keyframes bounce-in {
    0% { transform: scale(0); opacity: 0; }
    60% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); }
}
