/* Enhanced Professional Quantity Calculator */
.enhanced-quantity-calculator {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafb 100%);
    border: 2px solid #e9ecef;
    border-radius: 20px;
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.1),
        0 4px 10px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    margin: 25px 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    direction: ltr !important;
    text-align: left !important;
}

.enhanced-quantity-calculator::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #B8860B, #DAA520, #FFD700, #DAA520, #B8860B);
    background-size: 300% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { background-position: 0% 0%; }
    50% { background-position: 100% 0%; }
}

.enhanced-quantity-calculator:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.15),
        0 8px 20px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    border-color: #B8860B;
}

/* Calculator Header */
.enhanced-calculator-header {
    background: linear-gradient(135deg, #B8860B 0%, #DAA520 50%, #FFD700 100%);
    color: white;
    padding: 20px 25px;
    position: relative;
    overflow: hidden;
}

.enhanced-calculator-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    animation: shine 4s ease-in-out infinite;
}

@keyframes shine {
    0%, 100% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    50% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.enhanced-calculator-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.enhanced-calculator-title i {
    font-size: 20px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Calculator Body */
.enhanced-calculator-body {
    padding: 30px 25px;
    direction: ltr !important;
    text-align: left !important;
}

/* Quantity Section */
.enhanced-quantity-section {
    margin-bottom: 25px;
}

.quantity-label {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.quantity-label i {
    color: #B8860B;
    font-size: 18px;
}

/* Enhanced Quantity Controls */
.enhanced-quantity-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    background: #f8f9fa;
    border-radius: 16px;
    padding: 8px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    direction: ltr !important;
}

.enhanced-quantity-controls:hover {
    border-color: #B8860B;
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.1),
        0 0 0 4px rgba(184, 134, 11, 0.1);
}

.enhanced-qty-btn {
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(145deg, #ffffff, #f1f3f4);
    color: #495057;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.enhanced-qty-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(145deg, #B8860B, #DAA520);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.enhanced-qty-btn:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 15px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.enhanced-qty-btn:hover::before {
    opacity: 1;
}

.enhanced-qty-btn:hover i {
    color: white;
    transform: scale(1.1);
    position: relative;
    z-index: 2;
}

.enhanced-qty-btn:active {
    transform: translateY(0) scale(0.95);
}

.enhanced-qty-btn.decrease:hover {
    background: linear-gradient(145deg, #dc3545, #c82333);
}

.enhanced-qty-btn.increase:hover {
    background: linear-gradient(145deg, #28a745, #1e7e34);
}

/* Enhanced Quantity Input */
.enhanced-quantity-input {
    width: 120px;
    height: 56px;
    border: none;
    background: white;
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    color: #2c3e50;
    border-radius: 12px;
    margin: 0 12px;
    box-shadow: 
        inset 0 3px 6px rgba(0, 0, 0, 0.1),
        0 1px 0 rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    outline: none;
    position: relative;
}

.enhanced-quantity-input:focus {
    box-shadow: 
        inset 0 3px 6px rgba(0, 0, 0, 0.1),
        0 0 0 4px rgba(184, 134, 11, 0.2),
        0 2px 8px rgba(184, 134, 11, 0.3);
    background: #fffef7;
}

/* Quick Add Buttons */
.enhanced-quick-add {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 20px 0;
    flex-wrap: wrap;
}

.enhanced-quick-btn {
    min-width: 80px;
    height: 44px;
    border: 2px solid #B8860B;
    background: linear-gradient(145deg, white, #f8f9fa);
    color: #B8860B;
    border-radius: 22px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.enhanced-quick-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.enhanced-quick-btn:hover::before {
    left: 100%;
}

.enhanced-quick-btn:hover {
    background: linear-gradient(145deg, #B8860B, #DAA520);
    color: white;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 20px rgba(184, 134, 11, 0.3);
}

.enhanced-quick-btn:active {
    transform: translateY(0) scale(1);
}

.enhanced-quick-btn.reset {
    border-color: #6c757d;
    color: #6c757d;
}

.enhanced-quick-btn.reset:hover {
    background: linear-gradient(145deg, #6c757d, #5a6268);
    border-color: #6c757d;
}

/* Price Display */
.enhanced-price-display {
    background: linear-gradient(145deg, #f8f9fa, #e9ecef);
    border-radius: 16px;
    padding: 20px;
    margin: 20px 0;
    border: 2px solid #dee2e6;
    position: relative;
    overflow: hidden;
}

.enhanced-price-display::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #B8860B, #DAA520, #FFD700);
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 16px;
}

.price-row:last-child {
    margin-bottom: 0;
}

.price-row.total {
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
    padding-top: 12px;
    border-top: 2px solid #dee2e6;
    margin-top: 12px;
}

.price-value {
    font-weight: 600;
    color: #B8860B;
}

.price-value.total {
    font-size: 24px;
    color: #28a745;
}

/* Action Buttons Container */
.enhanced-action-buttons {
    display: flex;
    gap: 12px;
    width: 100%;
}

/* Add to Cart & Buy Now Buttons */
.enhanced-add-to-cart,
.enhanced-buy-now {
    flex: 1;
    height: 56px;
    border: none;
    border-radius: 16px;
    color: white;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    min-height: 56px;
}

.enhanced-add-to-cart {
    background: linear-gradient(145deg, #28a745, #20c997);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.3);
}

.enhanced-buy-now {
    background: linear-gradient(145deg, #B8860B, #DAA520);
    box-shadow: 0 6px 20px rgba(184, 134, 11, 0.3);
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.enhanced-add-to-cart::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.enhanced-add-to-cart:hover::before {
    left: 100%;
}

.enhanced-add-to-cart:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(40, 167, 69, 0.4);
}

.enhanced-buy-now:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(184, 134, 11, 0.4);
}

.enhanced-add-to-cart:active,
.enhanced-buy-now:active {
    transform: translateY(-1px);
}

.enhanced-add-to-cart i {
    font-size: 20px;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

/* Discount Badge */
.enhanced-discount-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(145deg, #ff6b35, #f7931e);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4); }
    to { box-shadow: 0 6px 20px rgba(255, 107, 53, 0.6); }
}

/* Loading State */
.enhanced-quantity-calculator.loading {
    opacity: 0.8;
    pointer-events: none;
}

.enhanced-quantity-calculator.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

/* Success Animation */
.enhanced-quantity-calculator.success {
    animation: success-pulse 0.6s ease-in-out;
}

@keyframes success-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .enhanced-quantity-calculator {
        margin: 20px 0;
        border-radius: 16px;
    }
    
    .enhanced-calculator-body {
        padding: 20px;
    }
    
    .enhanced-quantity-controls {
        flex-direction: column;
        gap: 12px;
        padding: 16px;
    }
    
    .enhanced-quantity-input {
        width: 100%;
        margin: 0;
        order: 2;
    }
    
    .enhanced-qty-btn {
        width: 60px;
        height: 60px;
    }
    
    .enhanced-quick-add {
        gap: 8px;
    }
    
    .enhanced-quick-btn {
        min-width: 70px;
        height: 40px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .enhanced-calculator-header {
        padding: 15px 20px;
    }
    
    .enhanced-calculator-title {
        font-size: 16px;
    }
    
    .enhanced-calculator-body {
        padding: 15px;
    }
    
    .enhanced-price-display {
        padding: 15px;
    }
    
    .price-row {
        font-size: 14px;
    }
    
    .price-row.total {
        font-size: 18px;
    }
    
    .enhanced-add-to-cart {
        height: 50px;
        font-size: 16px;
    }
}