/* Shopping Basket Off-Canvas Styles */
.shopping-basket-panel {
    position: fixed;
    top: 0;
    right: -450px;
    width: 450px;
    height: 100vh;
    background: linear-gradient(135deg, #ffffff 0%, #f8fffe 100%);
    box-shadow: -4px 0 20px rgba(67, 160, 71, 0.15);
    z-index: 2000;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    border-left: 3px solid #43a047;
}

.shopping-basket-panel.active {
    right: 0;
}

/* Basket Header */
.basket-header {
    background: linear-gradient(135deg, #2e7d32 0%, #43a047 100%);
    color: #ffffff;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(67, 160, 71, 0.2);
    position: relative;
}

.basket-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #66bb6a, #81c784, #66bb6a);
}

.basket-title {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.basket-close-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-size: 1.4rem;
    cursor: pointer;
    padding: 0.6rem;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.basket-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: rotate(90deg) scale(1.1);
}

/* Basket Content Area */
.basket-content-area {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #f9fff9 100%);
}

/* Custom Scrollbar */
.basket-content-area::-webkit-scrollbar {
    width: 6px;
}

.basket-content-area::-webkit-scrollbar-track {
    background: rgba(67, 160, 71, 0.1);
    border-radius: 3px;
}

.basket-content-area::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #43a047, #66bb6a);
    border-radius: 3px;
}

.basket-content-area::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #2e7d32, #43a047);
}

/* Basket Items Table */
.basket-items-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(67, 160, 71, 0.1);
    margin-bottom: 1.5rem;
}

.basket-items-table th,
.basket-items-table td {
    padding: 1rem 0.8rem;
    text-align: left;
    border-bottom: 1px solid rgba(67, 160, 71, 0.08);
    transition: all 0.3s ease;
}

.basket-items-table th {
    background: linear-gradient(135deg, #f1f8e9 0%, #e8f5e8 100%);
    font-weight: 600;
    color: #2e7d32;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.basket-items-table tbody tr {
    transition: all 0.3s ease;
}

.basket-items-table tbody tr:hover {
    background: linear-gradient(135deg, #f9fff9 0%, #f1f8e9 100%);
    transform: translateY(-1px);
}

/* Product Image in Basket */
.basket-product-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid rgba(67, 160, 71, 0.1);
    transition: all 0.3s ease;
}

.basket-product-img:hover {
    border-color: #43a047;
    transform: scale(1.05);
}

/* Quantity Input */
.basket-qty-control {
    width: 80px;
    padding: 0.6rem 0.8rem;
    border: 2px solid rgba(67, 160, 71, 0.2);
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    color: #2e7d32;
    background: linear-gradient(135deg, #ffffff 0%, #f9fff9 100%);
    transition: all 0.3s ease;
}

.basket-qty-control:focus {
    outline: none;
    border-color: #43a047;
    box-shadow: 0 0 0 3px rgba(67, 160, 71, 0.1);
}

/* Remove Button */
.basket-remove-btn {
    background: linear-gradient(135deg, #f44336 0%, #e53935 100%);
    border: none;
    color: #ffffff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1rem;
}

.basket-remove-btn:hover {
    background: linear-gradient(135deg, #d32f2f 0%, #c62828 100%);
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.3);
}

/* Basket Total */
.basket-total-section {
    background: linear-gradient(135deg, #e8f5e8 0%, #f1f8e9 100%);
    padding: 1.5rem;
    border-radius: 12px;
    margin: 1rem 0;
    border: 2px solid rgba(67, 160, 71, 0.1);
    position: relative;
    overflow: hidden;
}

.basket-total-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #43a047, #66bb6a, #43a047);
}

.basket-total-amount {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2e7d32;
    text-align: center;
    margin: 0;
    letter-spacing: 0.5px;
}

/* Action Buttons */
.basket-actions {
    padding: 1.5rem;
    background: linear-gradient(135deg, #f9fff9 0%, #ffffff 100%);
    border-top: 2px solid rgba(67, 160, 71, 0.1);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.basket-action-btn {
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.basket-action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.basket-action-btn:hover::before {
    left: 100%;
}

.basket-primary-btn {
    background: linear-gradient(135deg, #43a047 0%, #66bb6a 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(67, 160, 71, 0.3);
}

.basket-primary-btn:hover {
    background: linear-gradient(135deg, #2e7d32 0%, #43a047 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(67, 160, 71, 0.4);
}

.basket-secondary-btn {
    background: linear-gradient(135deg, #ffffff 0%, #f9fff9 100%);
    color: #43a047;
    border: 2px solid #43a047;
}

.basket-secondary-btn:hover {
    background: linear-gradient(135deg, #43a047 0%, #66bb6a 100%);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(67, 160, 71, 0.3);
}

/* Empty Basket State */
.basket-empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #666666;
}

.basket-empty-icon {
    font-size: 4rem;
    color: #43a047;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.basket-empty-message {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #2e7d32;
    font-weight: 600;
}

.basket-empty-submessage {
    font-size: 1rem;
    color: #666666;
}

/* Responsive Design */
@media (max-width: 768px) {
    .shopping-basket-panel {
        width: 100%;
        right: -100%;
    }
    
    .basket-header {
        padding: 1rem;
    }
    
    .basket-title {
        font-size: 1.3rem;
    }
    
    .basket-content-area {
        padding: 1rem;
    }
    
    .basket-items-table th,
    .basket-items-table td {
        padding: 0.8rem 0.5rem;
        font-size: 0.9rem;
    }
    
    .basket-product-img {
        width: 50px;
        height: 50px;
    }
    
    .basket-qty-control {
        width: 60px;
        padding: 0.5rem;
    }
    
    .basket-actions {
        padding: 1rem;
    }
    
    .basket-action-btn {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .basket-header {
        padding: 0.8rem;
    }
    
    .basket-title {
        font-size: 1.1rem;
    }
    
    .basket-close-btn {
        width: 36px;
        height: 36px;
        font-size: 1.2rem;
    }
    
    .basket-content-area {
        padding: 0.8rem;
    }
    
    .basket-items-table th,
    .basket-items-table td {
        padding: 0.6rem 0.4rem;
        font-size: 0.85rem;
    }
    
    .basket-product-img {
        width: 45px;
        height: 45px;
    }
    
    .basket-qty-control {
        width: 50px;
        padding: 0.4rem;
    }
    
    .basket-remove-btn {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    
    .basket-total-section {
        padding: 1rem;
    }
    
    .basket-total-amount {
        font-size: 1.2rem;
    }
    
    .basket-actions {
        padding: 0.8rem;
    }
    
    .basket-action-btn {
        padding: 0.7rem 0.8rem;
        font-size: 0.85rem;
    }
}

/* Animation for opening/closing */
@keyframes basketSlideIn {
    from {
        right: -450px;
        opacity: 0;
    }
    to {
        right: 0;
        opacity: 1;
    }
}

@keyframes basketSlideOut {
    from {
        right: 0;
        opacity: 1;
    }
    to {
        right: -450px;
        opacity: 0;
    }
}

.shopping-basket-panel.slide-in {
    animation: basketSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.shopping-basket-panel.slide-out {
    animation: basketSlideOut 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Overlay */
.basket-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.basket-overlay.active {
    opacity: 1;
    visibility: visible;
}