/**
 * Similar Devices Section Styles
 * نُقل من menu2.php لتحسين الأداء (تقليل حجم HTML)
 */
.mps-similar-devices-section {
    margin: 18px 0 26px;
    padding: 0;
    background: transparent;
    direction: rtl;
}

.mps-similar-devices-section h3 {
    font-size: 16px;
    font-weight: 800;
    margin: 0 0 12px 0;
    padding: 10px 12px;
    color: #fff;
    background: #374151;
    border-bottom: 3px solid #f59e0b;
    border-radius: 8px;
    text-align: right;
    line-height: 1.2;
}

.mps-similar-devices-list {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    justify-content: flex-start;
    padding: 8px 2px 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.mps-similar-devices-list::-webkit-scrollbar {
    height: 6px;
}

.mps-similar-devices-list::-webkit-scrollbar-track {
    background: transparent;
}

.mps-similar-devices-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
}

.mps-similar-devices-list::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.mps-similar-device-card {
    flex: 0 0 auto;
    width: 168px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 10px;
    text-align: center;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
}

.mps-similar-device-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(16, 24, 40, 0.10);
    border-color: #d1d5db;
}

.mps-sd-image {
    height: 128px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border-radius: 10px;
    padding: 8px;
}

.mps-sd-image a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
}

.mps-sd-image img {
    max-height: 100%;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.mps-sd-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mps-sd-info h4 {
    font-size: 13px;
    margin: 0;
    line-height: 1.35;
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mps-sd-info h4 a {
    color: #000 !important;
    text-decoration: none;
    transition: color 0.15s ease;
}

.mps-sd-info h4 a:hover {
    color: #000 !important;
}

.mps-sd-info h4 a .mps-sd-title-text,
.mps-sd-info h4 a:hover .mps-sd-title-text {
    color: #000 !important;
}

.mps-sd-price {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-weight: 800;
    color: #b45309;
    font-size: 13px;
}

.mps-similar-devices-section .mps-sd-compare-btn {
    width: 100% !important;
    min-height: 38px !important;
    padding: 10px 12px !important;
    border-radius: 12px !important;
    border: 1px solid rgba(13, 110, 253, 0.45) !important;
    background: linear-gradient(359deg, #000000 0%, #ffbd02 100%) !important;
    color: #fff !important;
    font-weight: 800 !important;
    font-size: 13px !important;
    line-height: 1 !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    box-shadow: 0 6px 14px rgba(13, 110, 253, 0.22) !important;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease !important;
    appearance: none !important;
    -webkit-appearance: none !important;
}

.mps-similar-devices-section .mps-sd-compare-btn:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 10px 22px rgba(13, 110, 253, 0.28) !important;
    filter: brightness(1.02) !important;
}

.mps-similar-devices-section .mps-sd-compare-btn:active {
    transform: translateY(0) !important;
    box-shadow: 0 6px 14px rgba(13, 110, 253, 0.22) !important;
}

.mps-similar-devices-section .mps-sd-compare-btn:focus,
.mps-similar-devices-section .mps-sd-compare-btn:focus-visible {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.35), 0 10px 22px rgba(13, 110, 253, 0.28) !important;
}

.mps-similar-devices-section .mps-sd-compare-btn .icon {
    font-size: 16px !important;
    line-height: 1 !important;
    color: inherit !important;
}

.mps-sd-view-btn {
    width: 100%;
    padding: 8px 10px;
    background: #374151;
    border: 1px solid #374151;
    border-radius: 10px;
    color: #fff !important;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background 0.18s ease, transform 0.18s ease, border-color 0.18s ease, color 0.18s ease;
    text-decoration: none !important;
    margin-top: auto;
}

.mps-sd-view-btn.mps-sd-white-text,
.mps-sd-view-btn.mps-sd-white-text:hover {
    color: #fff !important;
}

.mps-sd-view-btn.mps-sd-white-text .mps-sd-view-text,
.mps-sd-view-btn.mps-sd-white-text:hover .mps-sd-view-text,
.mps-sd-view-btn.mps-sd-white-text .icon,
.mps-sd-view-btn.mps-sd-white-text:hover .icon {
    color: #fff !important;
}

/* Related Versions Section Styles */
.mps-related-versions-section {
    margin: 18px 0 26px;
    padding: 0;
    background: transparent;
    direction: rtl;
}

.mps-related-versions-section h3 {
    font-size: 16px;
    font-weight: 800;
    margin: 0 0 12px 0;
    padding: 10px 12px;
    color: #fff;
    background: #374151;
    border-bottom: 3px solid #f59e0b;
    border-radius: 8px;
    text-align: right;
    line-height: 1.2;
}

.mps-related-versions-list {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    justify-content: flex-start;
    padding: 8px 2px 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.mps-related-versions-list::-webkit-scrollbar {
    height: 6px;
}

.mps-related-versions-list::-webkit-scrollbar-track {
    background: transparent;
}

.mps-related-versions-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
}

.mps-related-versions-list::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.mps-related-version-card {
    flex: 0 0 auto;
    width: 168px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 10px;
    text-align: center;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
}

.mps-related-version-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(16, 24, 40, 0.10);
    border-color: #d1d5db;
}

.mps-rv-image {
    height: 128px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border-radius: 10px;
    padding: 8px;
}

.mps-rv-image a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
}

.mps-rv-image img {
    max-height: 100%;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.mps-rv-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mps-rv-info h4 {
    font-size: 13px;
    margin: 0;
    line-height: 1.35;
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mps-rv-info h4 a {
    color: #000 !important;
    text-decoration: none;
    transition: color 0.15s ease;
}

.mps-rv-info h4 a:hover {
    color: #000 !important;
}

.mps-rv-price {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-weight: 800;
    color: #b45309;
    font-size: 13px;
}

.mps-rv-view-btn {
    width: 100%;
    padding: 8px 10px;
    background: #374151;
    border: 1px solid #374151;
    border-radius: 10px;
    color: #fff !important;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background 0.18s ease, transform 0.18s ease, border-color 0.18s ease, color 0.18s ease;
    text-decoration: none !important;
    margin-top: auto;
}

.mps-rv-view-btn.mps-rv-white-text,
.mps-rv-view-btn.mps-rv-white-text:hover {
    color: #fff !important;
}

.mps-rv-view-btn.mps-rv-white-text .mps-rv-view-text,
.mps-rv-view-btn.mps-rv-white-text:hover .mps-rv-view-text,
.mps-rv-view-btn.mps-rv-white-text .icon,
.mps-rv-view-btn.mps-rv-white-text:hover .icon {
    color: #fff !important;
}

.mps-rv-view-btn:hover {
    background: #1f2937;
    border-color: #1f2937;
    transform: translateY(-1px);
}

.mps-rv-view-btn .icon {
    font-size: 13px;
    line-height: 1;
}

@media (max-width: 768px) {
    .mps-related-version-card {
        width: 150px;
    }

    .mps-rv-image {
        height: 116px;
    }

    .mps-rv-info h4 {
        font-size: 12px;
        min-height: 32px;
    }
}
