/* Main Container */
.aliexpress-product-fetcher {
    margin: 0 auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}


.variations_form {
    display: none;
}

/* Input Section */
.input-section {
    padding: 2.5rem;
    background: linear-gradient(135deg, #fff6f0 0%, #ffebdc 100%);
    text-align: center;
    border-bottom: 1px solid #ffddd3;
}

.input-section h3 {
    color: #333;
    margin: 0 0 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
}

#aliexpress-url {
    width: 70%;
    padding: 0.8rem 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.25s ease;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

#aliexpress-url:focus {
    border-color: #ff6a00;
    box-shadow: 0 0 0 3px rgba(255, 106, 0, 0.15);
    outline: none;
}

#fetch-product {
    background: #ff6a00;
    color: white;
    border: none;
    padding: 0.8rem 1.8rem;
    margin-left: 0.8rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

#fetch-product:hover {
    background: #e05d00;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 106, 0, 0.3);
}

.loading {
    display: none;
    align-items: center;
    justify-content: center;
    margin: 12px auto 0;
    padding: 10px 16px;
    width: fit-content;
    color: #ff6a00;
    font-size: 14px;
    font-weight: 500;
    background: rgba(255, 106, 0, 0.05);
    border-radius: 6px;
    border: 1px dashed rgba(255, 106, 0, 0.3);
}

.loading:before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23FF6A00'%3E%3Cpath d='M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,20a9,9,0,1,1,9-9A9,9,0,0,1,12,21Z' opacity='.15'/%3E%3Cpath d='M10.14,1.16a11,11,0,0,0-9,8.92A1.59,1.59,0,0,0,2.46,12,1.52,1.52,0,0,0,4.11,10.7a8,8,0,0,1,6.66-6.61A1.42,1.42,0,0,0,12,2.69h0A1.57,1.57,0,0,0,10.14,1.16Z'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='0.75s' repeatCount='indefinite'/%3E%3C/path%3E%3C/svg%3E");
    background-size: contain;
    animation: spin 1s linear infinite;
}

.ajax-alert {
    display: none;
    margin: 8px auto 0;
    padding: 10px 16px;
    width: fit-content;
    color: #d63638;
    font-size: 14px;
    background: rgba(214, 54, 56, 0.08);
    border-radius: 6px;
    border-left: 3px solid #d63638;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.aliexpress-variations {
    margin: 20px 0;
    padding: 15px;
    border: 1px solid #ffddd3;
    border-radius: 5px;
    background: #fff8f5;
}

.aliexpress-variations h3 {
    margin-top: 0;
    color: #333;
}

.variation-group {
    margin-bottom: 15px;
}

.variation-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.variation-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.variation-option {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 120px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.variation-option:hover {
    border-color: #a0a0a0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.variation-option img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 4px;
    transition: transform 0.3s ease;
}

.variation-option:hover img {
    transform: scale(1.05);
}

.option-name {
    font-size: 14px;
    color: #333;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.variation-option.selected {
    border-color: #ff6a00;
    background-color: #fff1e6;
    box-shadow: 0 0 0 2px rgba(255, 106, 0, 0.2);
}
.ajax-text-and-image .price, .single-product .col-lg-6 .price {
    display: none;
}
.price-display {
    margin: 15px 0;
}

.original-price {
    text-decoration: line-through;
    color: #999;
    margin-right: 10px;
}

.current-price {
    font-weight: bold;
    color: #ff6a00;
    font-size: 1.2em;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.quantity-selector label {
    font-size: 14px;
    color: #666;
}

.quantity-input {
    width: 60px;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
    -moz-appearance: textfield;
    transition: border 0.2s ease;
}

.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.quantity-input:focus {
    outline: none;
    border-color: #999;
}

.shipping-section {
    margin: 24px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.shipping-options {
    margin-bottom: 16px;
}

.shipping-options label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #4a5568;
    font-weight: 500;
}

.shipping-options p {
    padding: 16px 20px;
    margin: 16px 0;
    color: #2d3748;
    font-size: 14px;
    font-weight: 500;
    background: #f8fafc;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.shipping-options p::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30%;
    height: 2px;
    background: #ff6a00;
    animation: loadingBar 1.5s infinite ease-in-out;
}

@keyframes loadingBar {
    0% { left: -30%; width: 30%; }
    50% { width: 60%; }
    100% { left: 100%; width: 30%; }
}

.shipping-method-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background-color: white;
    font-size: 14px;
    color: #1a202c;
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, #718096 50%),
        linear-gradient(135deg, #718096 50%, transparent 50%);
    background-position:
        calc(100% - 16px) 50%,
        calc(100% - 12px) 50%;
    background-size: 4px 4px;
    background-repeat: no-repeat;
    transition: border 0.2s ease;
}

.shipping-method-select:focus {
    outline: none;
    border-color: #ff6a00;
    box-shadow: 0 0 0 1px rgba(255, 106, 0, 0.2);
}

.delivery-time {
    font-size: 13px;
    color: #b34d00;
    margin: 12px 0;
    display: flex;
    align-items: center;
    background: #fff1e6;
    padding: 8px 12px;
    border-radius: 6px;
}

.delivery-time::before {
    content: "→";
    margin-right: 6px;
    color: #ff6a00;
}

.total-amount {
    padding: 16px;
    background: #fff8f5;
    border-radius: 6px;
    border-left: 3px solid #ff6a00;
}

.total-amount strong {
    display: block;
    font-size: 15px;
    color: #2d3748;
    margin-bottom: 4px;
}

.total-amount br {
    display: none;
}

.total-amount span {
    font-size: 13px;
    color: #718096;
    display: block;
    line-height: 1.5;
}

.shipping-method-select:hover {
    border-color: #cbd5e0;
}

@media (max-width: 480px) {
    #aliexpress-url {
        width: 100%;
        margin-bottom: 20px;
    }
    .shipping-method-select {
        padding: 10px 14px;
    }
}

.loading-variations {
    padding: 16px 24px;
    margin: 20px 0;
    text-align: center;
    color: #4a5568;
    font-size: 15px;
    font-weight: 500;
    border-radius: 8px;
    background-color: #f8fafc;
    border: 1px solid #edf2f7;
    position: relative;
    overflow: hidden;
}

.loading-variations:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        rgba(237, 242, 247, 0) 0%,
        rgba(237, 242, 247, 0.8) 50%,
        rgba(237, 242, 247, 0) 100%);
    animation: shimmer 1.5s infinite;
    z-index: 1;
}

.loading-variations:after {
    content: "";
    display: inline-block;
    width: 18px;
    height: 18px;
    margin-left: 12px;
    border: 2px solid #cbd5e0;
    border-top-color: #ff6a00;
    border-radius: 50%;
    vertical-align: middle;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.single_add_to_cart_button {
    display: none;
}

.error {
    color: #cc0000;
    padding: 10px;
    background: #ffebeb;
    border-radius: 4px;
}

/* Main Container */
.rpi-order-tracking-container {
    background: #f1f1f1;
    margin: 0 auto;
    color: #333;
    line-height: 1.6;
}

/* Header Section */
.rpi-tracking-header {
    background: linear-gradient(135deg, #4b6cb7 0%, #182848 100%);
    padding: 30px;
    border-radius: 8px 8px 0 0;
    color: white;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.rpi-tracking-title {
    margin: 0 0 20px 0;
    font-size: 28px;
    font-weight: 600;
    color: #fff;
}

/* Form Styles */
.rpi-tracking-form-container {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 6px;
}

.rpi-tracking-form {
    display: flex;
    gap: 10px;
}

.rpi-tracking-input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.rpi-tracking-input:focus {
    background: white;
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.rpi-tracking-button {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.rpi-tracking-button:hover {
    background: #ff5252;
    transform: translateY(-2px);
}

/* Order Overview */
.rpi-order-details {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 25px;
    margin-bottom: 30px;
}

.rpi-order-overview {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.rpi-order-number {
    margin: 0;
    font-size: 22px;
    color: #2c3e50;
}

.rpi-order-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rpi-status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.rpi-status-processing {
    background: #3498db;
    animation: pulse 2s infinite;
}

.rpi-status-completed, .rpi-status-delivered {
    background: #2ecc71;
}

.rpi-status-pending, .rpi-status-on-hold {
    background: #f39c12;
}

.rpi-status-cancelled, .rpi-status-failed, .rpi-status-refunded {
    background: #e74c3c;
}

.rpi-status-text {
    font-weight: 600;
    font-size: 15px;
}

.rpi-order-meta {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.rpi-meta-item {
    display: flex;
    gap: 5px;
}

.rpi-meta-label {
    font-weight: 600;
    color: #7f8c8d;
}

/* Tracking Items */
.rpi-tracking-item {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #eee;
    transition: all 0.3s ease;
}

.rpi-tracking-item:hover {
    border-color: #ddd;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.rpi-tracking-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.rpi-product-name {
    margin: 0;
    font-size: 18px;
    color: #2c3e50;
}

.rpi-tracking-id {
    background: #e8f4fd;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 14px;
}

.rpi-id-label {
    color: #3498db;
    font-weight: 600;
}

/* Tracking Details */
.rpi-tracking-details {
    margin-top: 15px;
}

.rpi-loading-animation {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 4px;
}

.rpi-loading-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #3498db;
    animation: spin 1s ease-in-out infinite;
}

/* Tracking Summary Card */
.rpi-tracking-summary-card {
    background: white;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    overflow: hidden;
}

.rpi-summary-header {
    background: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rpi-summary-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: #2c3e50;
}

.rpi-shipment-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rpi-status-badge {
    background: #4b6cb7;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
}

/* Tracking Grid */
.rpi-tracking-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    padding: 20px;
}

.rpi-grid-item {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 6px;
}

.rpi-grid-label {
    font-size: 13px;
    color: #7f8c8d;
    margin-bottom: 5px;
}

.rpi-grid-value {
    font-weight: 600;
    color: #2c3e50;
}

/* Progress Timeline */
.rpi-progress-timeline {
    padding: 20px;
    position: relative;
}

.rpi-timeline-header {
    padding: 0 20px;
    margin-bottom: 15px;
}

.rpi-timeline-header h4 {
    margin: 0;
    font-size: 16px;
    color: #2c3e50;
}

.rpi-timeline-item {
    position: relative;
    padding-left: 30px;
    margin-bottom: 20px;
}

.rpi-timeline-item:last-child {
    margin-bottom: 0;
}

.rpi-timeline-marker {
    position: absolute;
    left: 0;
    top: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.rpi-timeline-active .rpi-timeline-marker {
    background: #4b6cb7;
}

.rpi-timeline-reload {
    font-size: 10px;
    color: #fff;
    background: #f39c12;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
}

.rpi-timeline-content {
    padding: 8px 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.rpi-timeline-title {
    font-weight: 500;
    color: #2c3e50;
}

/* Tracking Events */
.rpi-tracking-events {
    padding: 0 20px 20px;
}

.rpi-event-item {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    position: relative;
    padding-left: 25px;
}

.rpi-event-item:last-child {
    border-bottom: none;
}

.rpi-event-item:before {
    content: "";
    position: absolute;
    left: 0;
    top: 18px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #4b6cb7;
}

.rpi-event-time {
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 5px;
}

.rpi-timezone {
    font-size: 12px;
    opacity: 0.8;
}

.rpi-events-header {
    padding: 0 20px 20px;
}

.rpi-event-desc {
    font-weight: 500;
    margin-bottom: 5px;
}

.rpi-event-notes {
    font-size: 13px;
    color: #7f8c8d;
    background: #f8f9fa;
    padding: 8px;
    border-radius: 4px;
    margin-top: 8px;
}

/* No Tracking/Error States */
.rpi-no-tracking {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 20px 0;
}

.rpi-no-tracking-icon {
    font-size: 40px;
    margin-bottom: 15px;
}

.rpi-order-not-found {
    text-align: center;
    padding: 40px 20px;
    background: #fff8f8;
    border: 1px solid #ffdddd;
    border-radius: 8px;
    margin: 20px 0;
}

.rpi-error-icon {
    font-size: 40px;
    color: #e74c3c;
    margin-bottom: 15px;
}

.rpi-tracking-error {
    padding: 15px;
    background: #fff8f8;
    border: 1px solid #ffdddd;
    border-radius: 4px;
    color: #e74c3c;
}

/* Animations */
@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .rpi-order-details {
        padding: 0;
    }
    .rpi-tracking-form {
        flex-direction: column;
    }
    
    .rpi-order-overview {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .rpi-order-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .rpi-tracking-item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .rpi-tracking-grid {
        grid-template-columns: 1fr;
    }
}