/* ================================================
   AutoBell Shopping Cart Styles (2026-06-27)
   ================================================ */

/* Cart Count Badge (in nav) */
.cart-count-badge {
    display: none;
    position: absolute;
    top: -6px;
    right: -10px;
    background: var(--success-color, #10B981);
    color: #000;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0 4px;
}

/* Nav Cart Link */
.nav-cart-link {
    position: relative;
}

/* Toast Notification */
.cart-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--dark-surface, #1E293B);
    border: 1px solid var(--success-color, #10B981);
    border-radius: var(--radius-md, 0.75rem);
    padding: 1rem 1.5rem;
    color: var(--text-primary, #fff);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
    animation: cartSlideIn 0.3s ease;
    max-width: 380px;
}

.cart-toast.removing {
    animation: cartSlideOut 0.3s ease forwards;
}

@keyframes cartSlideIn {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes cartSlideOut {
    from { transform: translateY(0); opacity: 1; }
    to { transform: translateY(20px); opacity: 0; }
}

.cart-toast-icon {
    font-size: 1.5rem;
    color: var(--success-color, #10B981);
}

.cart-toast-body {
    flex: 1;
}

.cart-toast-body strong {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 0.15rem;
}

.cart-toast-body span {
    font-size: 0.8rem;
    color: var(--text-muted, #94A3B8);
}

.cart-toast-actions {
    display: flex;
    gap: 0.5rem;
}

.cart-toast-actions .btn {
    font-size: 0.8rem;
}

/* Add to Cart Button Animation */
.btn-add-cart {
    transition: all 0.2s ease;
}

.btn-add-cart.added {
    background: var(--success-color, #10B981) !important;
    border-color: var(--success-color, #10B981) !important;
    color: #000 !important;
}

.btn-add-cart.added i::before {
    content: "\f26b"; /* Bootstrap check-circle icon */
}

/* ================================================
   Cart Page Specific Styles
   ================================================ */

.cart-page {
    padding-top: 6rem;
    padding-bottom: 4rem;
    min-height: 80vh;
}

.cart-item {
    background: var(--dark-surface, #1E293B);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-md, 0.75rem);
    padding: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: all 0.3s ease;
}

.cart-item:hover {
    border-color: rgba(255,255,255,0.15);
}

.cart-item-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: contain;
    background: rgba(255,255,255,0.05);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--text-muted, #94A3B8);
}

.cart-item-details {
    flex: 1;
    min-width: 0;
}

.cart-item-details h6 {
    margin: 0 0 0.25rem;
    font-weight: 600;
}

.cart-item-details .cart-item-price {
    color: var(--text-muted, #94A3B8);
    font-size: 0.85rem;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-item-quantity .qty-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.2);
    background: transparent;
    color: var(--text-primary, #fff);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.cart-item-quantity .qty-btn:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.4);
}

.cart-item-quantity .qty-input {
    width: 50px;
    text-align: center;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 6px;
    color: var(--text-primary, #fff);
    padding: 0.3rem;
    font-size: 0.9rem;
}

.cart-item-total {
    text-align: right;
    min-width: 100px;
}

.cart-item-total .item-total-price {
    font-weight: 700;
    font-size: 1.1rem;
}

.cart-item-total .remove-item {
    color: var(--text-muted, #94A3B8);
    font-size: 0.8rem;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    transition: color 0.2s;
}

.cart-item-total .remove-item:hover {
    color: var(--error-color, #EF4444);
}

/* Cart Summary Box */
.cart-summary {
    background: var(--dark-surface, #1E293B);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-lg, 1rem);
    padding: 2rem;
    position: sticky;
    top: 6rem;
}

.cart-summary h4 {
    font-weight: 700;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-size: 0.9rem;
    color: var(--text-secondary, #CBD5E1);
}

.cart-summary-row.total {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--text-primary, #fff);
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 1rem;
    margin-top: 0.5rem;
}

.cart-summary .paypal-container {
    margin-top: 1.5rem;
}

/* Empty Cart State */
.cart-empty {
    text-align: center;
    padding: 4rem 2rem;
}

.cart-empty .empty-icon {
    font-size: 4rem;
    color: var(--text-muted, #94A3B8);
    margin-bottom: 1rem;
}

.cart-empty h4 {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.cart-empty p {
    color: var(--text-muted, #94A3B8);
    margin-bottom: 2rem;
}

/* PayPal Button Wrapper */
.paypal-button-wrapper {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius-md, 0.75rem);
    padding: 1.5rem;
    text-align: center;
}

.paypal-button-wrapper .secure-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: var(--text-muted, #94A3B8);
    margin-top: 0.75rem;
}

/* Responsive */
@media (max-width: 768px) {
    .cart-item {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .cart-item-image {
        width: 60px;
        height: 60px;
    }

    .cart-item-quantity {
        margin-top: 0.5rem;
    }

    .cart-item-total {
        text-align: left;
        min-width: auto;
    }

    .cart-summary {
        position: static;
        margin-top: 2rem;
    }

    .cart-toast {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
        max-width: none;
    }
}