/**
 * Enhanced Cart Drawer - Ultra Smooth & Advanced
 * Next-Level Details & Animations
 */

/* ========================================
   ENHANCED CART DRAWER
======================================== */
.adc-cart-drawer {
    position: fixed;
    top: 0;
    right: -500px;
    width: 500px;
    height: 100%;
    background: linear-gradient(180deg, #0a0e27 0%, #1a1f3a 100%);
    z-index: 99998;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -10px 0 50px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}

.adc-cart-drawer.open {
    right: 0;
}

.adc-cart-drawer.loading {
    pointer-events: none;
}

.adc-cart-drawer.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(2px);
    z-index: 999;
}

/* Cart Header Enhanced */
.adc-cart-header {
    padding: 24px 30px;
    border-bottom: 1px solid rgba(0, 102, 204, 0.2);
    background: linear-gradient(135deg, 
        rgba(0, 102, 204, 0.15) 0%, 
        transparent 100%);
}

.adc-cart-title {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 12px;
}

.adc-cart-count-badge {
    background: linear-gradient(135deg, #34c759, #00cc99);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 0 20px rgba(52, 199, 89, 0.5);
    animation: badgePulse 2s ease-in-out infinite;
}

/* Free Shipping Progress - Enhanced */
.adc-cart-free-shipping {
    padding: 24px 30px;
    background: linear-gradient(135deg, 
        rgba(52, 199, 89, 0.1) 0%, 
        rgba(0, 204, 153, 0.1) 100%);
    border-bottom: 1px solid rgba(0, 102, 204, 0.2);
}

.adc-shipping-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.adc-shipping-message {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
}

.adc-shipping-percentage {
    font-size: 13px;
    color: #34c759;
    font-weight: 700;
}

.adc-shipping-progress {
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    margin-bottom: 10px;
}

.adc-shipping-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #34c759, #00cc99);
    border-radius: 10px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 15px rgba(52, 199, 89, 0.6);
    position: relative;
}

.adc-shipping-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.3), 
        transparent);
    animation: shimmer 2s linear infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.adc-shipping-amount {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    gap: 8px;
}

.adc-shipping-icon {
    font-size: 16px;
}

/* Cart Items Enhanced */
.adc-cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px 30px;
}

.adc-cart-items::-webkit-scrollbar {
    width: 8px;
}

.adc-cart-items::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.adc-cart-items::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #0066cc, #00cc99);
    border-radius: 10px;
}

.adc-cart-item {
    display: flex;
    gap: 14px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 14px;
    margin-bottom: 12px;
    border: 1px solid rgba(0, 102, 204, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: slideInCart 0.4s ease;
    position: relative;
}

@keyframes slideInCart {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.adc-cart-item:hover {
    border-color: rgba(0, 204, 153, 0.4);
    box-shadow: 0 8px 25px rgba(0, 102, 204, 0.2);
    transform: translateX(-5px);
}

.adc-cart-item.removing {
    animation: slideOutCart 0.3s ease forwards;
}

@keyframes slideOutCart {
    to {
        opacity: 0;
        transform: translateX(50px);
        height: 0;
        padding: 0;
        margin: 0;
    }
}

.adc-cart-item-image {
    width: 90px;
    height: 90px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.1);
    position: relative;
}

.adc-cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.adc-cart-item:hover .adc-cart-item-image img {
    transform: scale(1.05);
}

.adc-cart-item-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    background: #ff3b30;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 10px;
    text-transform: uppercase;
}

.adc-cart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.adc-cart-item-name {
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 4px;
}

.adc-cart-item-meta {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.adc-cart-item-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.adc-cart-item-price-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-top: auto;
}

.adc-cart-item-price {
    color: #00cc99;
    font-size: 18px;
    font-weight: 700;
}

.adc-cart-item-unit-price {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: line-through;
}

.adc-cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.adc-qty-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(0, 102, 204, 0.2);
    border: 1px solid rgba(0, 102, 204, 0.3);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.adc-qty-btn:hover:not(:disabled) {
    background: rgba(0, 102, 204, 0.4);
    border-color: #0066cc;
    transform: scale(1.05);
}

.adc-qty-btn:active {
    transform: scale(0.95);
}

.adc-qty-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.adc-qty-value {
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    min-width: 30px;
    text-align: center;
}

.adc-cart-item-remove {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 59, 48, 0.2);
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: #ff3b30;
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    opacity: 0;
}

.adc-cart-item:hover .adc-cart-item-remove {
    opacity: 1;
}

.adc-cart-item-remove:hover {
    background: #ff3b30;
    color: #fff;
    transform: scale(1.1) rotate(90deg);
}

/* Cart Empty State Enhanced */
.adc-cart-empty {
    text-align: center;
    padding: 80px 30px;
    color: rgba(255, 255, 255, 0.5);
}

.adc-cart-empty-icon {
    font-size: 80px;
    margin-bottom: 20px;
    opacity: 0.3;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.adc-cart-empty p:first-of-type {
    font-size: 18px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
}

.adc-empty-cta {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 28px;
    background: linear-gradient(135deg, #0066cc, #00cc99);
    color: #fff;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.adc-empty-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 102, 204, 0.4);
}

/* Cart Summary Section */
.adc-cart-summary {
    padding: 20px 30px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(0, 102, 204, 0.2);
}

.adc-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
}

.adc-summary-row.total {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 8px;
    padding-top: 16px;
}

.adc-summary-label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.adc-summary-value {
    font-weight: 700;
}

.adc-summary-row.total .adc-summary-label {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}

.adc-summary-row.total .adc-summary-value {
    font-size: 22px;
    color: #34c759;
}

.adc-savings {
    color: #34c759;
    font-size: 13px;
}

/* Coupon Code Field */
.adc-coupon-section {
    padding: 16px 30px;
    border-top: 1px solid rgba(0, 102, 204, 0.2);
}

.adc-coupon-form {
    display: flex;
    gap: 10px;
}

.adc-coupon-input {
    flex: 1;
    padding: 12px 16px;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 14px;
    transition: all 0.2s ease;
}

.adc-coupon-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.adc-coupon-input:focus {
    outline: none;
    border-color: #00cc99;
    background: rgba(255, 255, 255, 0.08);
}

.adc-coupon-btn {
    padding: 12px 24px;
    background: rgba(0, 102, 204, 0.3);
    border: 1px solid rgba(0, 102, 204, 0.4);
    color: #fff;
    border-radius: 10px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.adc-coupon-btn:hover {
    background: rgba(0, 102, 204, 0.5);
    border-color: #0066cc;
}

.adc-coupon-applied {
    margin-top: 12px;
    padding: 10px 14px;
    background: rgba(52, 199, 89, 0.2);
    border: 1px solid rgba(52, 199, 89, 0.3);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.adc-coupon-code {
    font-size: 13px;
    color: #34c759;
    font-weight: 700;
}

.adc-coupon-remove {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s ease;
}

.adc-coupon-remove:hover {
    color: #ff3b30;
    transform: rotate(90deg);
}

/* Cart Actions Enhanced */
.adc-cart-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px 30px;
}

.adc-cart-btn {
    padding: 16px 28px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.adc-cart-btn-primary {
    background: linear-gradient(135deg, #34c759, #00cc99);
    color: #fff;
    box-shadow: 0 8px 25px rgba(52, 199, 89, 0.4);
}

.adc-cart-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(52, 199, 89, 0.5);
}

.adc-cart-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1.5px solid rgba(0, 102, 204, 0.3);
}

.adc-cart-btn-secondary:hover {
    background: rgba(0, 102, 204, 0.2);
    border-color: #0066cc;
}

/* Recommended Products in Cart */
.adc-cart-recommendations {
    padding: 20px 30px;
    border-top: 1px solid rgba(0, 102, 204, 0.2);
}

.adc-recommendations-title {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.adc-recommended-products {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.adc-recommended-item {
    flex-shrink: 0;
    width: 120px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 12px;
    border: 1px solid rgba(0, 102, 204, 0.2);
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
}

.adc-recommended-item:hover {
    border-color: #00cc99;
    transform: translateY(-4px);
}

.adc-recommended-image {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 8px;
}

.adc-recommended-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.adc-recommended-name {
    font-size: 12px;
    color: #fff;
    font-weight: 600;
    margin-bottom: 6px;
    line-height: 1.3;
}

.adc-recommended-price {
    font-size: 14px;
    color: #00cc99;
    font-weight: 700;
}

/* Loading Overlay */
.adc-cart-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 1000;
}

.adc-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: #00cc99;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.adc-loading-text {
    color: #fff;
    font-size: 14px;
    margin-top: 12px;
    font-weight: 600;
}

/* Success/Error Messages */
.adc-cart-message {
    padding: 14px 20px;
    margin: 16px 30px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideDown 0.3s ease;
}

.adc-cart-message.success {
    background: rgba(52, 199, 89, 0.2);
    border: 1px solid rgba(52, 199, 89, 0.3);
    color: #34c759;
}

.adc-cart-message.error {
    background: rgba(255, 59, 48, 0.2);
    border: 1px solid rgba(255, 59, 48, 0.3);
    color: #ff3b30;
}

/* Responsive */
@media (max-width: 768px) {
    .adc-cart-drawer {
        width: 100%;
        max-width: 450px;
        right: -100%;
    }
}

