/* ==========================================================================
   استایل‌های بومی و ریسپانسیو افزونه مولتی وندور (نسخه خط نئونی و سرچ زنده)
   ========================================================================== */

.mvp-products-wrapper {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem 1rem;
    box-sizing: border-box;
}

/* باکس نوار جستجوی مدرن */
.mvp-search-container {
    width: 100%;
    max-width: 650px;
    margin: 0 auto 1.5rem auto;
}

.mvp-search-form {
    display: flex;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    padding: 0.35rem;
    border-radius: 1.25rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
}

.mvp-search-form:focus-within {
    border-color: #6366f1;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.12);
}

.mvp-search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    flex-grow: 1;
}

.mvp-search-icon {
    position: absolute;
    right: 1rem;
    color: #9ca3af;
    font-size: 1rem;
    pointer-events: none;
}

.mvp-search-form input[type="text"] {
    width: 100%;
    border: none;
    outline: none;
    padding: 0.75rem 2.7rem 0.75rem 2.5rem;
    font-size: 0.9rem;
    color: #1f2937;
    background: transparent;
    font-family: inherit;
}

.mvp-clear-search {
    position: absolute;
    left: 0.75rem;
    color: #9ca3af;
    font-size: 0.95rem;
    transition: color 0.2s;
    padding: 0.25rem;
    z-index: 5;
}
.mvp-clear-search:hover { color: #ef4444; }

.mvp-search-submit {
    background-color: #4f46e5;
    color: #ffffff;
    border: none;
    outline: none;
    padding: 0 1.5rem;
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
    font-family: inherit;
}
.mvp-search-submit:hover { background-color: #4338ca; }

/* باکس بازشوی پیشنهادات زنده جستجو */
.mvp-suggestions-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    left: -6px;
    right: -40px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    z-index: 99;
    display: none;
    overflow: hidden;
}

.mvp-suggestion-item {
    display: block;
    padding: 0.75rem 1rem;
    color: #374151;
    text-decoration: none;
    font-size: 0.85rem;
    border-bottom: 1px solid #f3f4f6;
    transition: all 0.2s ease;
    text-align: right;
}
.mvp-suggestion-item:last-child { border-bottom: none; }
.mvp-suggestion-item:hover {
    background-color: #f0f2ff;
    color: #4f46e5;
    padding-right: 1.25rem;
}

/* --- خط نورانی تمام عرض شیک دکوراتیو پایین هدر جستجو --- */
.mvp-glow-line {
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, rgba(224, 97, 250, 0.288) 0%, rgb(82, 85, 243) 50%, rgba(223, 31, 31, 0) 100%);
    box-shadow: 0 5px 8px rgba(58, 29, 221, 0.7);
    margin-bottom: 2rem;
    border-radius: 2px;
    opacity: 0.8;
    direction: ltr;
}

/* ساختار شبکه پایه کارتها */
.mvp-products-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.mvp-no-products {
    text-align: center;
    padding: 3rem 0;
    color: #6b7280;
    font-size: 0.95rem;
}

.mvp-card {
    background-color: #ffffff;
    border: 1px solid #f3f4f6;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(34, 47, 230, 0.1);
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all 0.3s ease;
}
.mvp-card:hover {
    box-shadow: 0 10px 25px rgba(7, 57, 163, 0.25);
    transform: translateY(-2px);
}

.mvp-card-hero {
    position: relative;
    width: 100%;
    padding-top: 100%;
    background-color: #f9fafb;
    overflow: hidden;
}
.mvp-hero-link { position: absolute; top:0; left:0; right:0; bottom:0; display:block; }
.mvp-product-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.mvp-card:hover .mvp-product-img { transform: scale(1.04); }

.mvp-badge-discount {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background-color: #ef4444;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    z-index: 2;
}

.mvp-out-of-stock-overlay {
    position: absolute;
    top:0; left:0; right:0; bottom:0;
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center; z-index: 2;
}
.mvp-out-of-stock-text {
    background-color: #1f2937; color: #ffffff; padding: 0.4rem 1rem;
    border-radius: 0.5rem; font-size: 0.8rem; font-weight: 700;
}

.mvp-card-body { padding: 0.75rem; flex: 1 1 auto; display: flex; flex-direction: column; }
.mvp-store-info { display: flex; align-items: center; gap: 0.25rem; font-size: 0.7rem; color: #9ca3af; margin-bottom: 0.3rem; }
.mvp-store-info i { color: #6366f1; }
.mvp-store-link { color: #9ca3af; text-decoration: none; font-weight: 500; }
.mvp-store-link:hover { color: #4f46e5; }

.mvp-product-title { font-size: 0.8rem; font-weight: 700; color: #1f2937; margin: 0 0 0.5rem 0; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mvp-product-title a { color: #1f2937; text-decoration: none; }
.mvp-product-title a:hover { color: #4f46e5; }

.mvp-rating-stars { display: flex; align-items: center; gap: 0.25rem; margin-bottom: 0.5rem; font-size: 0.7rem; }
.mvp-stars-group { display: flex; color: #f59e0b; }
.mvp-rating-count { color: #9ca3af; }

.mvp-price-box { display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; margin-top: auto; padding-top: 0.25rem; }
.mvp-price-regular { font-size: 0.7rem; color: #9ca3af; text-decoration: line-through; margin-bottom: 0.1rem; }
.mvp-price-sale { font-size: 0.95rem; font-weight: 900; color: #ef4444; }
.mvp-price-final { font-size: 0.95rem; font-weight: 900; color: #111827; }
.mvp-price-box span { font-size: 0.7rem; font-weight: 400; color: #4b5563; margin-right: 0.15rem; }

.mvp-card-footer { padding: 0 0.75rem 0.75rem 0.75rem; }
.mvp-btn-action { display: flex; align-items: center; justify-content: center; gap: 0.4rem; width: 100%; background-color: #f9fafb; color: #374151; text-decoration: none; font-size: 0.75rem; font-weight: 700; padding: 0.6rem; border-radius: 0.75rem; border: 1px solid #f3f4f6; transition: all 0.2s ease; }
.mvp-card:hover .mvp-btn-action { background-color: #4f46e5; color: #ffffff; border-color: #4f46e5; }

@media (max-width: 480px) {
    .mvp-search-form { padding: 0.25rem; }
    .mvp-search-form input[type="text"] { padding: 0.6rem 2.4rem 0.6rem 2rem; font-size: 0.8rem; }
    .mvp-search-submit { padding: 0 1rem; font-size: 0.8rem; }
    .mvp-search-icon { right: 0.75rem; }
    .mvp-suggestions-dropdown { left: -6px; right: 1px;  background-color: #c1cfa9;}
}

@media (min-width: 640px) {
    .mvp-products-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
    .mvp-card-body { padding: 1rem; }
    .mvp-card-footer { padding: 0 1rem 1rem 1rem; }
    .mvp-product-title { font-size: 0.875rem; }
    .mvp-price-sale, .mvp-price-final { font-size: 1.1rem; }
    .mvp-btn-action { font-size: 0.8rem; padding: 0.7rem; }
}

@media (min-width: 1024px) {
    .mvp-products-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; }
}