/* Cart Sidebar Styles */

#shoppingCartOffcanvas {
    width: 380px !important;
}

#shoppingCartOffcanvas .offcanvas-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e9ecef;
    background: #fff;
}

#shoppingCartOffcanvas .offcanvas-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #000;
}

#shoppingCartOffcanvas .offcanvas-body {
    padding: 0;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 60px);
    position: relative;
}

#cart-sidebar-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* Empty Cart */
.cart-sidebar-empty {
    padding: 3rem 1.5rem;
    text-align: center;
}

.cart-sidebar-empty i {
    font-size: 3rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

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

/* Free Shipping Progress */
.cart-sidebar-shipping {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.free-shipping-progress .progress {
    height: 6px;
    background-color: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
}

.free-shipping-progress .progress-bar {
    background-color: #fc2779;
    transition: width 0.3s ease;
}

.free-shipping-progress p {
    font-size: 12px;
    margin-top: 0.5rem;
    margin-bottom: 0;
}

/* Cart Items Container */
.cart-sidebar-items {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
}

.cart-sidebar-items::-webkit-scrollbar {
    width: 6px;
}

.cart-sidebar-items::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.cart-sidebar-items::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.cart-sidebar-items::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Cart Item */
.cart-sidebar-item {
    background: #fff;
    transition: background-color 0.2s ease;
}

.cart-sidebar-item:hover {
    background: #f8f9fa;
}

.cart-item-image img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.cart-item-name {
    font-size: 13px;
    font-weight: 400;
    color: #000;
    line-height: 1.4;
    display: block;
    margin-bottom: 0.5rem;
    transition: color 0.2s ease;
}

.cart-item-name:hover {
    color: #fc2779;
    text-decoration: none;
}

.cart-item-price {
    font-size: 14px;
    margin-bottom: 0.75rem;
}

.cart-item-price .text-decoration-line-through {
    font-size: 12px;
    color: #6c757d;
}

.cart-item-price .text-danger {
    font-weight: 700;
    font-size: 15px;
}

/* Quantity Controls */
.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-control {
    display: flex;
    align-items: center;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    overflow: hidden;
}

.quantity-control .btn-decrease,
.quantity-control .btn-increase {
    border: none;
    background: none;
    padding: 4px 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #495057;
    transition: all 0.2s ease;
    min-width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-control .btn-decrease:hover,
.quantity-control .btn-increase:hover {
    background: #f8f9fa;
    color: #fc2779;
}

.quantity-control .btn-decrease:active,
.quantity-control .btn-increase:active {
    background: #e9ecef;
}

.quantity-control .quantity-input {
    width: 50px;
    padding: 4px;
    border: none;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    background: transparent;
}

.quantity-control .quantity-input:focus {
    outline: none;
    box-shadow: none;
}

.cart-item-controls .btn-link {
    padding: 4px 8px;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.2s ease;
    min-width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.cart-item-controls .btn-link:hover {
    opacity: 0.8;
    background-color: rgba(220, 53, 69, 0.1);
}

.cart-item-controls .btn-link.text-danger {
    color: #dc3545 !important;
}

.cart-item-controls .btn-link.text-danger:hover {
    background-color: rgba(220, 53, 69, 0.15);
    color: #c82333 !important;
}

/* Remove button specific styling */
.cart-remove-btn {
    padding: 6px 10px !important;
    min-width: 36px !important;
    height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1px solid #dc3545 !important;
    border-radius: 4px !important;
    background-color: transparent !important;
    color: #dc3545 !important;
    transition: all 0.2s ease !important;
}

.cart-remove-btn i {
    font-size: 18px !important;
    line-height: 1 !important;
    display: inline-block !important;
}

.cart-remove-btn:hover {
    background-color: #dc3545 !important;
    color: #fff !important;
    border-color: #dc3545 !important;
    transform: scale(1.05);
}

.cart-remove-btn:active {
    transform: scale(0.95);
}

/* Remove Confirmation Dialog */
.cart-remove-confirm {
    position: absolute;
    bottom: -70px;
    right: 0;
    background: #fff;
    border: 1px solid #dc3545;
    border-radius: 6px;
    padding: 8px 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    min-width: 140px;
    animation: slideUp 0.2s ease;
}

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

.cart-remove-confirm .confirm-message {
    font-size: 11px;
    color: #333;
    margin-bottom: 8px;
    text-align: center;
    font-weight: 500;
}

.cart-remove-confirm .confirm-buttons {
    display: flex;
    gap: 6px;
    justify-content: center;
}

.cart-remove-confirm .btn-confirm-yes,
.cart-remove-confirm .btn-confirm-no {
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 45px;
}

.cart-remove-confirm .btn-confirm-yes {
    background-color: #dc3545;
    color: #fff;
}

.cart-remove-confirm .btn-confirm-yes:hover {
    background-color: #c82333;
    transform: scale(1.05);
}

.cart-remove-confirm .btn-confirm-no {
    background-color: #6c757d;
    color: #fff;
}

.cart-remove-confirm .btn-confirm-no:hover {
    background-color: #5a6268;
    transform: scale(1.05);
}

.cart-remove-confirm .btn-confirm-yes:active,
.cart-remove-confirm .btn-confirm-no:active {
    transform: scale(0.95);
}

/* Ensure controls container can position the dialog */
.cart-item-controls {
    position: relative;
}

/* Cart Summary */
.cart-sidebar-summary {
    background: #fff !important;
    border-top: 2px solid #e9ecef;
    position: sticky;
    bottom: 0;
    z-index: 10;
    margin-top: auto;
    padding: 12px 16px !important;
}

.cart-sidebar-summary .d-flex.justify-content-between {
    font-size: 14px;
    margin-bottom: 8px;
}

.cart-sidebar-summary .fw-bold {
    font-size: 14px;
}

.cart-sidebar-summary .text-muted {
    font-size: 12px;
    line-height: 1.4;
}

.cart-sidebar-summary .form-check {
    margin-bottom: 10px;
}

.cart-sidebar-summary .form-check-input {
    margin-top: 0.2rem;
}

.cart-sidebar-summary .form-check-label {
    font-size: 11px;
    line-height: 1.3;
    cursor: pointer;
}

.cart-sidebar-summary .btn {
    font-weight: 600;
    padding: 8px 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.cart-sidebar-summary .btn-outline-dark {
    border: 2px solid #000;
    color: #000;
}

.cart-sidebar-summary .btn-outline-dark:hover {
    background: #000;
    color: #fff;
}

.cart-sidebar-summary .btn-primary {
    background: #fc2779;
    border-color: #fc2779;
    color: #fff;
}

.cart-sidebar-summary .btn-primary:hover {
    background: #3d2651;
    border-color: #3d2651;
}

/* Security Badges - Removed */

/* Coupon Section */
.cart-sidebar-coupon {
    background: #fff;
    padding: 12px 16px !important;
}

.applied-coupon-sidebar {
    padding: 0.75rem;
    background: #f0f8ff;
    border-radius: 4px;
    border: 1px solid #b3d9ff;
}

.coupon-input-group-sidebar {
    display: flex;
    gap: 0.5rem;
}

.coupon-input-group-sidebar .form-control {
    flex: 1;
    font-size: 13px;
}

.coupon-input-group-sidebar .btn {
    white-space: nowrap;
    font-size: 13px;
    padding: 0.375rem 1rem;
}

.sidebar-coupon-message {
    font-size: 12px;
    padding: 0.5rem;
    border-radius: 4px;
}

/* Promo Popup */
.promo-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000 !important;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.promo-popup {
    background: #fff;
    border-radius: 8px;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.3s ease;
}

.promo-popup.show {
    transform: scale(1);
    opacity: 1;
}

.promo-popup-header {
    padding: 1.25rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

.promo-popup-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #000;
}

.promo-close-btn {
    background: none;
    border: none;
    font-size: 28px;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: color 0.2s ease;
}

.promo-close-btn:hover {
    color: #000;
}

.promo-list {
    padding: 1rem;
    overflow-y: auto;
    max-height: calc(80vh - 80px);
}

.promo-item {
    padding: 1rem;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    margin-bottom: 0.75rem;
    background: #fff;
    transition: all 0.2s ease;
}

.promo-item:hover {
    border-color: #fc2779;
    box-shadow: 0 2px 8px rgba(79, 50, 103, 0.1);
}

.promo-code {
    font-size: 16px;
    font-weight: 700;
    color: #fc2779;
    margin-bottom: 0.5rem;
}

.promo-description {
    font-size: 13px;
    color: #6c757d;
    margin-bottom: 0.75rem;
}

.promo-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.promo-discount {
    display: inline-block;
    background: #fc2779;
    color: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-right: 0.5rem;
}

.promo-minimum {
    font-size: 11px;
    color: #6c757d;
}

.promo-apply-btn {
    background: #fc2779;
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.promo-apply-btn:hover {
    background: #3d2651;
}

/* Responsive */
@media (max-width: 576px) {
    #shoppingCartOffcanvas {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .promo-popup {
        max-width: 100%;
        margin: 0;
        border-radius: 0;
        max-height: 100vh;
    }
    
    .cart-item-image img {
        width: 60px;
        height: 60px;
    }
    
    .cart-item-name {
        font-size: 13px;
    }
    
    .cart-sidebar-summary .btn {
        font-size: 12px;
        padding: 0.6rem;
    }
}

/* Loading State */
#cart-sidebar-content .spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3em;
}

/* Animation */
.cart-sidebar-item {
    animation: fadeIn 0.3s ease-in;
}

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

