.zlf-widget-container {
    max-width: 800px;
    margin: 40px auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    font-family: 'IRANSans', 'Vazir', sans-serif;
}

.zlf-widget-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 30px;
    text-align: center;
}

.zlf-widget-header h2 {
    margin: 0 0 10px;
    font-size: 28px;
}

.zlf-widget-header p {
    margin: 0;
    opacity: 0.9;
}

.zlf-widget-body {
    padding: 30px;
}

.zlf-step {
    display: none;
    margin-bottom: 25px;
}

.zlf-step.active {
    display: block;
    animation: fadeIn 0.3s;
}

.zlf-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.zlf-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.zlf-input:focus {
    outline: none;
    border-color: #667eea;
}

.zlf-suggestions {
    margin-top: 5px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    max-height: 200px;
    overflow-y: auto;
}

.zlf-suggestion-item {
    padding: 10px 15px;
    cursor: pointer;
    transition: background 0.2s;
}

.zlf-suggestion-item:hover {
    background: #f5f5f5;
}

.zlf-selected {
    margin-top: 15px;
    padding: 12px;
    background: #e8f5e9;
    border-radius: 6px;
    display: none;
}

.zlf-selected.active {
    display: block;
}

.zlf-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.zlf-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.zlf-option:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.zlf-option input[type="radio"]:checked + span {
    color: #667eea;
    font-weight: 600;
}

.zlf-color-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.zlf-color-option {
    padding: 7px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 12px;
}

.zlf-color-option span {
    font-size: 12px;
    color: #555;
}

.zlf-color-option:hover {
    background: #f8f9ff;
    border-color: #667eea;
}

.zlf-color-option input[type="radio"]:checked + span {
    color: #667eea;
    font-weight: 600;
    font-size: 12px;
}

.zlf-back-btn {
    margin-top: 15px;
    padding: 8px 20px;
    background: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.zlf-back-btn:hover {
    background: #e0e0e0;
}

.zlf-button {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
    box-sizing: border-box;
}

.zlf-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.zlf-notes {
    padding: 20px 30px;
    background: #fff;
    border-top: 2px solid #eee;
    line-height: 1.8;
}

.zlf-results {
    padding: 30px;
    background: #f9f9f9;
    border-top: 2px solid #eee;
}

.zlf-results-header {
    margin-bottom: 25px;
}

.zlf-results-header h3 {
    margin: 0 0 15px;
    color: #333;
    font-size: 20px;
}

.zlf-vehicle-info {
    padding: 10px;
    background: #fff;
    border-radius: 6px;
    border-right: 3px solid #667eea;
}

/* ============ اسکرول افقی محصولات ============ */
.zlf-products-grid {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px 5px 20px;
    scroll-behavior: smooth;
    cursor: grab;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    box-sizing: border-box;
}

.zlf-products-grid.active-drag {
    cursor: grabbing;
    scroll-behavior: auto;
}

.zlf-products-grid.has-scroll {
    position: relative;
}

.zlf-product-card {
    flex: 0 0 280px;
    min-width: 250px;
    max-width: 280px;
    scroll-snap-align: start;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    box-sizing: border-box;
}

.zlf-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.zlf-products-grid::-webkit-scrollbar {
    height: 8px;
}

.zlf-products-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.zlf-products-grid::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

.zlf-products-grid::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}

.zlf-scroll-indicator {
    text-align: center;
    color: #999;
    font-size: 14px;
    margin-top: 5px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(0);
    }
    40% {
        transform: translateX(-10px);
    }
    60% {
        transform: translateX(-5px);
    }
}

.zlf-product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.zlf-product-content {
    padding: 15px;
    box-sizing: border-box;
}

.zlf-product-title {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.zlf-product-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 15px;
}

.zlf-spec-badge {
    padding: 4px 8px;
    background: #f0f0f0;
    border-radius: 4px;
    font-size: 11px;
    color: #666;
}

.zlf-product-price {
    font-size: 16px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 15px;
}

/* ============ تعداد ============ */
.zlf-quantity-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.zlf-quantity-wrapper label {
    font-size: 13px;
    color: #666;
}

.zlf-quantity-input {
    width: 60px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    font-size: 13px;
    box-sizing: border-box;
}

.zlf-product-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ============ دکمه افزودن ============ */
.zlf-add-to-cart-btn {
    flex: 1;
    min-width: 120px;
    padding: 10px;
    background: #667eea;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

.zlf-add-to-cart-btn:hover {
    background: #764ba2;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.zlf-add-to-cart-btn:active {
    transform: scale(0.95);
}

.zlf-add-to-cart-btn.adding {
    background: #999;
    cursor: wait;
    animation: pulse 1s infinite;
}

.zlf-add-to-cart-btn.added {
    background: #4caf50;
    animation: successPop 0.3s ease;
}

.zlf-view-details {
    flex: 1;
    min-width: 120px;
    padding: 10px;
    background: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 13px;
    box-sizing: border-box;
}

.zlf-view-details:hover {
    background: #e0e0e0;
}

.zlf-restart-btn {
    margin-top: 20px;
    padding: 12px 25px;
    background: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
}

.zlf-restart-btn:hover {
    background: #e0e0e0;
}

/* ============ پاپ آپ مشخصات فنی ============ */
.zlf-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    overflow-y: auto;
    animation: modalFadeIn 0.3s;
    box-sizing: border-box;
}

.zlf-modal-content {
    background-color: #fff;
    margin: 50px auto;
    padding: 20px;
    border-radius: 8px;
    max-width: 550px;
    width: 90%;
    position: relative;
    animation: modalSlideIn 0.3s;
    box-sizing: border-box;
}

.zlf-modal-close {
    position: absolute;
    left: 15px;
    top: 10px;
    font-size: 28px;
    cursor: pointer;
    color: #666;
}

.zlf-modal-close:hover {
    color: #333;
}

.zlf-modal-content h3 {
    margin: 0 0 15px;
    padding-left: 30px;
    font-size: 17px;
}

#zlf-modal-body {
    line-height: 1.8;
    color: #555;
    font-size: 14px;
}

/* ============ پاپ آپ موفقیت سبد خرید ============ */
.zlf-cart-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    overflow: hidden;
    animation: modalFadeIn 0.3s;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    box-sizing: border-box;
}

.zlf-cart-modal-content {
    background: #fff;
    margin: 0;
    padding: 0;
    border-radius: 16px;
    max-width: 380px;
    width: 92%;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: cartModalPop 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    box-sizing: border-box;
}

.zlf-cart-modal-header {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: #fff;
    padding: 20px 15px;
    text-align: center;
}

.zlf-cart-modal-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: #fff;
    color: #4caf50;
    border-radius: 50%;
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 10px;
    animation: iconBounce 0.6s 0.2s both;
}

.zlf-cart-modal-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
}

.zlf-cart-modal-body {
    padding: 18px 15px;
    text-align: center;
}

.zlf-cart-modal-body p {
    margin: 0;
    font-size: 13px;
    line-height: 1.7;
    color: #333;
}

.zlf-cart-modal-actions {
    display: flex;
    gap: 8px;
    padding: 0 15px 15px;
    flex-wrap: wrap;
}

.zlf-cart-modal-checkout {
    flex: 1;
    min-width: 130px;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    box-sizing: border-box;
}

.zlf-cart-modal-checkout:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    color: #fff;
}

.zlf-cart-modal-close-btn {
    flex: 1;
    min-width: 130px;
    padding: 12px;
    background: #f5f5f5;
    color: #333;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-sizing: border-box;
}

.zlf-cart-modal-close-btn:hover {
    background: #e0e0e0;
    border-color: #ccc;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
    100% {
        opacity: 1;
    }
}

@keyframes successPop {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes cartModalPop {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0;
    }
    70% {
        transform: translate(-50%, -50%) scale(1.05);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

@keyframes iconBounce {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.3);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

/* ============ نسخه موبایل ============ */
@media (max-width: 600px) {
    .zlf-widget-container {
        margin: 20px 10px;
        border-radius: 10px;
    }
    
    .zlf-widget-header {
        padding: 20px 15px;
    }
    
    .zlf-widget-header h2 {
        font-size: 20px;
    }
    
    .zlf-widget-header p {
        font-size: 13px;
    }
    
    .zlf-widget-body,
    .zlf-results,
    .zlf-notes {
        padding: 15px;
    }
    
    .zlf-options {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .zlf-option {
        padding: 12px;
    }
    
    .zlf-color-options {
        gap: 6px;
    }
    
    .zlf-color-option {
        padding: 5px 10px;
        border-radius: 14px;
    }
    
    .zlf-color-option span {
        font-size: 11px;
    }
    
    .zlf-product-card {
        flex: 0 0 85%;
        min-width: 200px;
        max-width: 260px;
    }
    
    .zlf-product-actions {
        flex-direction: column;
    }
    
    .zlf-add-to-cart-btn,
    .zlf-view-details {
        width: 100%;
        min-width: 100%;
    }
    
    .zlf-results-header h3 {
        font-size: 16px;
    }
    
    /* پاپ‌آپ مشخصات فنی موبایل */
    .zlf-modal {
        background-color: rgba(0, 0, 0, 0.7);
        overflow: hidden;
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
    }
    
    .zlf-modal-content {
        background: #fff;
        margin: 0;
        padding: 0;
        border-radius: 20px 20px 0 0;
        max-width: 100%;
        width: 100%;
        position: fixed;
        bottom: 0;
        left: 0;
        max-height: 85vh;
        overflow-y: auto;
        animation: slideUpMobile 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.3);
    }
    
    .zlf-modal-content::before {
        content: '';
        display: block;
        width: 40px;
        height: 4px;
        background: #ddd;
        border-radius: 2px;
        margin: 10px auto 0;
    }
    
    .zlf-modal-content h3 {
        margin: 0;
        padding: 12px 20px;
        font-size: 16px;
        font-weight: 700;
        color: #333;
        border-bottom: 1px solid #eee;
        background: #f8f9ff;
        position: sticky;
        top: 0;
        z-index: 10;
    }
    
    .zlf-modal-close {
        position: fixed;
        left: 50%;
        transform: translateX(-50%);
        bottom: calc(85vh - 40px);
        top: auto;
        width: 45px;
        height: 45px;
        background: #fff;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 26px;
        color: #333;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
        cursor: pointer;
        transition: all 0.3s;
        z-index: 100000;
        border: 3px solid #667eea;
        animation: bounceIn 0.5s 0.3s both;
    }
    
    .zlf-modal-close:hover {
        background: #667eea;
        color: #fff;
        transform: translateX(-50%) scale(1.1);
    }
    
    #zlf-modal-body {
        padding: 15px;
        padding-bottom: 30px;
        font-size: 13px;
    }
    
    /* پاپ‌آپ سبد خرید موبایل */
    .zlf-cart-modal-content {
        max-width: 330px;
        width: 94%;
    }
    
    .zlf-cart-modal-header {
        padding: 15px 12px;
    }
    
    .zlf-cart-modal-icon {
        width: 40px;
        height: 40px;
        font-size: 22px;
        margin-bottom: 8px;
    }
    
    .zlf-cart-modal-header h3 {
        font-size: 15px;
    }
    
    .zlf-cart-modal-body {
        padding: 14px 12px;
    }
    
    .zlf-cart-modal-body p {
        font-size: 12px;
        line-height: 1.6;
    }
    
    .zlf-cart-modal-actions {
        flex-direction: column;
        padding: 0 12px 12px;
        gap: 6px;
    }
    
    .zlf-cart-modal-checkout,
    .zlf-cart-modal-close-btn {
        width: 100%;
        min-width: 100%;
        padding: 10px;
        font-size: 13px;
    }
}

/* برای تبلت‌های کوچک */
@media (min-width: 601px) and (max-width: 768px) {
    .zlf-widget-container {
        margin: 30px 20px;
    }
    
    .zlf-modal-content {
        margin: 30px auto;
        max-width: 85%;
    }
    
    .zlf-modal-close {
        position: absolute;
        left: 15px;
        top: 15px;
        width: 40px;
        height: 40px;
        background: #fff;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 24px;
        color: #333;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
        cursor: pointer;
        transition: all 0.3s;
        border: 2px solid #667eea;
    }
    
    .zlf-modal-close:hover {
        background: #667eea;
        color: #fff;
        transform: scale(1.1);
    }
}

@keyframes slideUpMobile {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes bounceIn {
    0% {
        transform: translateX(-50%) scale(0);
        opacity: 0;
    }
    50% {
        transform: translateX(-50%) scale(1.2);
        opacity: 1;
    }
    70% {
        transform: translateX(-50%) scale(0.9);
    }
    100% {
        transform: translateX(-50%) scale(1);
        opacity: 1;
    }
}
/* استایل بلوک variation */
.zlf-variation-block {
    background: #f8f9ff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 10px;
    margin-top: 10px;
}

.zlf-variation-socket {
    font-size: 13px;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 8px;
}

.zlf-variation-block .zlf-product-price {
    margin-bottom: 8px;
}
/* دکمه‌های اسکرول افقی */
.zlf-scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 35px;
    height: 35px;
    background: #667eea;
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: all 0.3s;
}

.zlf-scroll-btn:hover {
    background: #764ba2;
    transform: translateY(-50%) scale(1.1);
}

.zlf-scroll-btn-left {
    right: 5px;
}

.zlf-scroll-btn-right {
    left: 5px;
}

/* اطمینان از اینکه touch-action درست است */
.zlf-products-grid {
    touch-action: pan-x pan-y;
}

.zlf-products-grid.active-drag {
    touch-action: pan-x;
}