/* CART MODAL CSS - WORKING */
.open-cart { 
    position: relative; 
    cursor: pointer;
}
.wc-cart-count-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    min-width: 20px;
    height: 20px;
    background: #E73144;
    color: #FFF;
    font-size: 12px;
    font-weight: 600;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
}

/* Modal Container */
.wc-cart-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.wc-cart-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.wc-cart-panel {
    position: relative;
    z-index: 100;
    background: #1a1a1a;
    border: 1px solid rgba(255, 184, 0, 0.2);
    border-radius: 12px;
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease;
}

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

/* FIX 1: Close Button - Updated styles */
.wc-cart-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    padding: 0;
    background: rgba(255, 184, 0, 0.15);
    color: #FFB800;
    border: 2px solid rgba(255, 184, 0, 0.3);
    border-radius: 50%;
    cursor: pointer;
    z-index: 101;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.wc-cart-close:hover {
    background: rgba(255, 184, 0, 0.25);
    transform: scale(1.05);
    border-color: rgba(255, 184, 0, 0.4);
}
.wc-cart-close svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.5;
}

/* Loading Overlay */
.wc-cart-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99;
    border-radius: 12px;
}
.wc-cart-loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255,184,0,0.3);
    border-radius: 50%;
    border-top-color: #FFB800;
    animation: wc-spin 1s linear infinite;
}
@keyframes wc-spin {
    to { transform: rotate(360deg); }
}

/* Header */
.wc-cart-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 184, 0, 0.2);
}
.wc-cart-header-inner {
    display: flex;
    align-items: center;
    gap: 14px;
}
/* FIX 2: Cart Icon in Header - Updated styles */
.wc-cart-header-inner svg {
    color: #9ca3af;
    flex-shrink: 0;
    margin-top: 0;
    width: 28px;
    height: 28px;
    stroke-width: 1.8;
}
.wc-cart-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 4px;
}
.wc-cart-header p {
    font-size: 13px;
    color: #9ca3af;
    margin: 0;
}

/* Scrollable Content */
.wc-cart-content {
    flex: 1;
    overflow: auto;
    padding: 20px;
    max-height: calc(90vh - 200px);
}
.wc-cart-content::-webkit-scrollbar {
    width: 6px;
}
.wc-cart-content::-webkit-scrollbar-track {
    background: #111;
}
.wc-cart-content::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 3px;
}

/* Sections */
.wc-cart-section {
    margin-bottom: 24px;
}
.wc-cart-section h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 16px;
}
.wc-cart-section h3 svg {
    color: #FFB800;
    width: 18px;
    height: 18px;
}
.wc-collection-title {
    font-size: 12px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 12px;
}

/* Cart & Upsell Items */
.wc-cart-item, .wc-upsell-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #222;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}
.wc-upsell-item {
    background: rgba(255, 184, 0, 0.05);
    border-color: rgba(255, 184, 0, 0.2);
}
.wc-item-info {
    flex: 1;
}
.wc-item-info h4, .wc-item-info h5 {
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    margin: 0 0 4px;
    line-height: 1.4;
}
.wc-item-badge, .wc-upsell-badge {
    font-size: 11px;
    font-weight: 600;
    color: #00ff88;
    background: rgba(0, 255, 136, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
}
.wc-upsell-badge {
    color: #00ff88;
    margin-top: 4px;
}

/* Item Actions */
.wc-item-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}
.wc-item-pricing {
    text-align: right;
}
.wc-price-old {
    font-size: 11px;
    color: #9ca3af;
    text-decoration: line-through;
    margin-bottom: 2px;
}
.wc-price-new {
    font-size: 16px;
    font-weight: 900;
    color: #FFB800;
}

/* Buttons */
.wc-remove-item, .wc-add-item {
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.wc-remove-item {
    background: none;
    color: #9ca3af;
    padding: 6px;
    border-radius: 6px;
}
.wc-remove-item:hover {
    color: #ff4444;
    background: rgba(255, 68, 68, 0.1);
}
.wc-add-item {
    background: #FFB800;
    color: #000;
    padding: 8px 20px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
}
.wc-add-item:hover {
    background: #ffcc44;
    transform: translateY(-1px);
}
.wc-add-item.processing {
    background: #666;
    cursor: wait;
}
.wc-add-item.added {
    background: #00ff88;
    animation: pulse 0.5s;
}

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

/* Totals */
.wc-totals {
    padding: 16px;
    background: #222;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin: 24px 0;
}
.wc-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 14px;
    color: #9ca3af;
}
.wc-total-row.wc-savings {
    color: #00ff88;
    font-weight: 600;
}
.wc-total-row.wc-grand-total {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 8px;
}
.wc-total-price {
    color: #FFB800;
    font-size: 22px;
}

/* Form */
.wc-form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 16px;
}
@media (min-width: 768px) {
    .wc-form-grid {
        grid-template-columns: 1fr 1fr;
    }
}
.wc-form-group {
    width: 100%;
}
.wc-form-group label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 500;
    color: #9ca3af;
    margin-bottom: 8px;
}
.wc-form-group label svg {
    width: 14px;
    height: 14px;
    opacity: 0.7;
}
.wc-form-input {
    width: 100%;
    padding: 12px 16px;
    background: #222;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    transition: all 0.2s;
}
.wc-form-input:focus {
    outline: none;
    border-color: rgba(255, 184, 0, 0.6);
}

/* Trust Badges - REPLACED Stripe Branding */
.wc-trust-badges {
    text-align: center;
    padding: 16px;
    background: rgba(0, 255, 136, 0.05);
    border: 1px solid rgba(0, 255, 136, 0.15);
    border-radius: 8px;
    margin: 20px 0;
}
.wc-trust-title {
    font-size: 11px;
    font-weight: 700;
    color: #00ff88;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 12px;
}
.wc-trust-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.wc-trust-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #9ca3af;
    transition: all 0.2s ease;
}
.wc-trust-icon:hover {
    background: rgba(255, 184, 0, 0.1);
    border-color: rgba(255, 184, 0, 0.3);
    color: #FFB800;
    transform: translateY(-1px);
}
.wc-trust-icon svg {
    width: 20px;
    height: 20px;
}
.wc-trust-subtitle {
    font-size: 11px;
    color: #9ca3af;
    font-weight: 500;
    margin: 0;
}

/* Footer */
.wc-cart-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 184, 0, 0.2);
    background: rgba(26, 26, 26, 0.5);
}
.wc-checkout-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 16px;
    background: linear-gradient(to right, #FFB800, #ff9d00);
    color: #000;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
}
.wc-checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(255, 184, 0, 0.3);
}
.wc-checkout-btn svg {
    width: 18px;
    height: 18px;
}

/* Empty States */
.wc-empty-cart, .wc-no-upsells {
    text-align: center;
    color: #9ca3af;
    font-style: italic;
    padding: 20px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
}

/* Responsive */
@media (max-width: 640px) {
    .wc-cart-modal {
        padding: 10px;
    }
    .wc-cart-panel {
        max-height: 95vh;
    }
    .wc-cart-header,
    .wc-cart-content,
    .wc-cart-footer {
        padding: 16px;
    }
    .wc-form-grid {
        grid-template-columns: 1fr;
    }
    /* Mobile fix for close button */
    .wc-cart-close {
        top: 12px;
        right: 12px;
        width: 40px;
        height: 40px;
    }
    .wc-cart-close svg {
        width: 18px;
        height: 18px;
    }
    /* Mobile fix for header cart icon */
    .wc-cart-header-inner svg {
        width: 24px;
        height: 24px;
    }
    /* Mobile fix for trust icons */
    .wc-trust-icons {
        gap: 12px;
    }
    .wc-trust-icon {
        width: 32px;
        height: 32px;
    }
    .wc-trust-icon svg {
        width: 18px;
        height: 18px;
    }
}

/* ADD THESE NEW STYLES TO YOUR EXISTING CSS FILE */

/* Form Required Indicators */
.wc-required-label {
    font-size: 11px;
    font-weight: 500;
    color: #FFB800;
    margin-left: 8px;
    background: rgba(255, 184, 0, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
}

.wc-required-star {
    color: #FF4444;
    font-weight: 700;
    margin-left: 2px;
}

/* Form Error States */
.wc-form-error {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid rgba(255, 68, 68, 0.3);
    border-radius: 8px;
    margin-bottom: 16px;
    animation: slideDown 0.3s ease;
}

.wc-form-error svg {
    color: #FF4444;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

.wc-form-error span {
    font-size: 13px;
    font-weight: 500;
    color: #FF4444;
}

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

/* Field Error Messages */
.wc-field-error {
    font-size: 11px;
    color: #FF4444;
    margin-top: 4px;
    min-height: 16px;
    display: none;
}

/* Invalid Field Styling */
.wc-form-input:invalid:not(:placeholder-shown) {
    border-color: rgba(255, 68, 68, 0.5);
    background: rgba(255, 68, 68, 0.05);
}

.wc-form-input:valid:not(:placeholder-shown) {
    border-color: rgba(0, 255, 136, 0.3);
    background: rgba(0, 255, 136, 0.05);
}

/* Focus States */
.wc-form-input:focus:invalid {
    border-color: rgba(255, 68, 68, 0.7);
    box-shadow: 0 0 0 2px rgba(255, 68, 68, 0.1);
}

.wc-form-input:focus:valid {
    border-color: rgba(0, 255, 136, 0.5);
    box-shadow: 0 0 0 2px rgba(0, 255, 136, 0.1);
}

/* Checkout Button Disabled State */
.wc-checkout-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.wc-checkout-btn:disabled:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* Form Grid Adjustment for 4 Fields */
.wc-form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

@media (min-width: 768px) {
    .wc-form-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Shake animation for errors */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.wc-form-error-shake {
    animation: shake 0.5s ease;
}

/* Success state for validated fields */
.wc-form-input.valid {
    border-color: rgba(0, 255, 136, 0.3) !important;
    background: rgba(0, 255, 136, 0.05) !important;
}

/* Success feedback animation */
@keyframes validPulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(0, 255, 136, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 255, 136, 0); }
}

.wc-form-input.valid:focus {
    animation: validPulse 1.5s;
}

/* Checkout button success state */
.wc-checkout-btn.validated {
    background: linear-gradient(to right, #00ff88, #00cc6a);
    color: #000;
}

.wc-checkout-btn.validated:hover {
    background: linear-gradient(to right, #00ff88, #00cc6a);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 255, 136, 0.3);
}