/* الصفحة الرئيسية – أحدث الموبايلات → الأكثر شهرة → مركات بالأسفل */

.site-main--home {
    padding-bottom: 2.5rem;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 28%, #ffffff 100%);
    direction: rtl;
    overflow-x: hidden;
}

.site-main--home .container {
    max-width: 1060px;
}

/* فلاتر الصفحة الرئيسية — دقة، حواف ملونة، لمسات عصرية */
.home-filters-bar {
    margin-bottom: 1.5rem;
    padding: 0.8rem 1.25rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-inline-start: 4px solid #6366f1;
    border-radius: 16px;
    box-shadow: 
        0 4px 20px rgba(99, 102, 241, 0.05),
        0 1px 2px rgba(0, 0, 0, 0.02);
    direction: rtl;
}

.home-filters-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
}

.home-filters-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 800;
    color: #475569;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

.home-filters-label svg {
    color: #6366f1;
    filter: drop-shadow(0 2px 4px rgba(99, 102, 241, 0.3));
}

.home-filters-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
}

.home-filter-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 1rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: #6366f1;
    background: #ffffff;
    border: 2px solid #eef2ff;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.home-filter-chip:hover {
    color: #4f46e5;
    background: #f5f7ff;
    border-color: #c7d2fe;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.12);
}

.home-filter-chip.is-active {
    color: #ffffff;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border-color: #6366f1;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
}

.home-filter-chip--preset.is-active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: #10b981;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
}

.home-filter-clear {
    font-size: 0.75rem;
    font-weight: 700;
    color: #94a3b8;
    text-decoration: none;
    padding: 0.45rem 0.75rem;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.home-filter-clear:hover {
    color: #dc2626;
    background: #fff1f2;
    border-color: #fecaca;
}

.home-filter-clear.is-hidden {
    display: none !important;
}

.mtp-home-loading .home-posts-grid {
    opacity: 0.6;
    pointer-events: none;
}

.home-posts-grid .home-no-posts,
.home-posts-grid .no-posts {
    grid-column: 1 / -1;
}

@media (max-width: 768px) {
    .home-filters-bar {
        padding: 0.55rem 0.85rem;
        margin-bottom: 1rem;
    }
    .home-filters-chips {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 0.15rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .home-filters-chips::-webkit-scrollbar { display: none; }
    .home-filter-chip {
        flex-shrink: 0;
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }
}

/* مركات – شعار + اسم بشكل مميز، حواف، ألوان واضحة */
.home-brands-wrap {
    margin-top: 2rem;
    padding: 2rem 1rem 2rem;
    margin-left: -1rem;
    margin-right: -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
    position: relative;
    overflow: hidden;
    border-radius: 24px 24px 0 0;
    background: linear-gradient(180deg, #ffffff 0%, #fafbfd 35%, #f5f7fb 100%);
    border: 2px solid #e8ecf2;
    border-bottom: 0;
    box-shadow:
        0 -6px 28px rgba(0, 0, 0, 0.05),
        0 0 0 1px rgba(15, 23, 42, 0.02),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.home-brands-wrap::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #60a5fa 0%, #3b82f6 50%, #2563eb 100%);
    border-radius: 24px 24px 0 0;
    box-shadow: 0 0 18px rgba(59, 130, 246, 0.4);
}

.home-brands-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 1.25rem;
    padding-bottom: 0.6rem;
    position: relative;
    display: inline-block;
    letter-spacing: -0.03em;
}

.home-brands-title::before {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    width: 64px;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6 0%, #60a5fa 100%);
    border-radius: 3px;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.35);
}

.home-brands-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.home-brand-card {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    min-height: 50px;
    padding: 0 1rem;
    background: #fff;
    border-radius: 14px;
    border: 2px solid #e2e8f0;
    border-inline-start: 4px solid var(--brand-color, #6366f1);
    text-decoration: none;
    color: #0f172a;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: -0.02em;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
    position: relative;
    overflow: hidden;
}

.home-brand-card::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 70px;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(99, 102, 241, 0.06) 100%);
    pointer-events: none;
}

.home-brand-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    border-inline-start-width: 5px;
    box-shadow:
        0 4px 20px rgba(99, 102, 241, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.home-brand-inner {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    position: relative;
    z-index: 1;
}

.home-brand-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: linear-gradient(165deg, #fff 0%, #f8fafc 100%);
    border: 2px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.98);
}

.home-brand-card:hover .home-brand-icon {
    border-color: rgba(99, 102, 241, 0.35);
    box-shadow: 0 2px 12px rgba(99, 102, 241, 0.15);
}

.home-brand-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.home-brand-emoji {
    font-size: 1.25rem;
}

.home-brand-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(165deg, var(--brand-color, #6366f1) 0%, color-mix(in srgb, var(--brand-color, #6366f1) 85%, #000) 100%);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 800;
}

.home-brand-name {
    flex: 1;
    min-width: 0;
    text-align: right;
    line-height: 1.2;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: -0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* أحدث الموبايلات / الأكثر شهرة – إطار وحواف وباك جراوند ولمسات بصرية */
.home-posts-section-wrapper {
    margin-top: 0;
    margin-bottom: 2.5rem;
    padding: 0;
    position: relative;
    border-radius: 32px;
    border: 1px solid rgba(99, 102, 241, 0.15);
    background: #ffffff;
    box-shadow:
        0 4px 30px rgba(0, 0, 0, 0.03),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    overflow: hidden;
}

/* قسم أحدث الموبايلات — حواف إنديغو ناعمة */
.home-posts-section-wrapper.home-latest {
    background: linear-gradient(180deg, #f8faff 0%, #ffffff 100%);
}

.home-posts-section-wrapper::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    z-index: 1;
}

.home-posts-section-wrapper.home-latest::before {
    background: linear-gradient(90deg, #818cf8 0%, #6366f1 50%, #4f46e5 100%);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}

.home-posts-section-wrapper.home-popular::before {
    background: linear-gradient(90deg, #fb923c 0%, #f97316 50%, #ea580c 100%);
    box-shadow: 0 0 20px rgba(249, 115, 22, 0.4);
}

.home-posts-section-wrapper::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    pointer-events: none;
    background:
        radial-gradient(ellipse 65% 30% at 95% 0%, rgba(13, 148, 136, 0.06) 0%, transparent 55%),
        radial-gradient(ellipse 45% 20% at 5% 8%, rgba(45, 212, 191, 0.04) 0%, transparent 50%);
}

.home-posts-section-wrapper.home-popular::after {
    background:
        radial-gradient(ellipse 70% 35% at 90% 0%, rgba(249, 115, 22, 0.04) 0%, transparent 55%),
        radial-gradient(ellipse 50% 25% at 10% 5%, rgba(234, 88, 12, 0.03) 0%, transparent 50%);
}

.home-posts-section-wrapper.home-latest {
    margin-top: 0;
}

.home-posts-section-wrapper.home-popular {
    margin-top: 0;
}

.home-posts-section-wrapper:first-child {
    margin-top: 0;
}

.home-posts-section-wrapper.popular-section {
    margin-bottom: 0;
}

.home-posts-section {
    position: relative;
    padding: 1.5rem 1.25rem 1.5rem;
    z-index: 1;
}

/* عناوين الأقسام – بسيط واحترافي */
.home-section-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    padding: 0.5rem 0 0.5rem 0;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    direction: rtl;
    letter-spacing: -0.02em;
    position: relative;
    color: #0f172a;
}

.home-section-title::before {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    width: 48px;
    height: 3px;
    border-radius: 3px;
}

/* خط بترولي تحت عنوان أحدث الموبايلات */
.home-section-title.latest-title::before {
    background: linear-gradient(90deg, #2dd4bf, #0d9488);
    box-shadow: 0 0 10px rgba(13, 148, 136, 0.4);
}

.home-section-title.popular-title::before {
    background: #f97316;
}

.home-section-title .title-icon {
    font-size: 1rem;
    opacity: 0.85;
}

.home-section-title .title-text {
    letter-spacing: -0.01em;
}

.home-posts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    direction: rtl;
}

/* بطاقة الموبايل — تصميم مودرن بألوان الإنديغو */
.home-post-item {
    position: relative;
    border-radius: 24px;
    cursor: pointer;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(99, 102, 241, 0.12);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.03),
        0 1px 2px rgba(99, 102, 241, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.home-post-item:hover {
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 
        0 12px 30px rgba(99, 102, 241, 0.1),
        0 4px 6px rgba(0, 0, 0, 0.02);
    transform: translateY(-4px);
}

.home-post-item::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px solid transparent;
    transition: border-color 0.3s ease;
    pointer-events: none;
    z-index: 3;
}

.home-post-item:hover::after {
    border-color: rgba(99, 102, 241, 0.2);
}

.home-post-thumbnail {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #f8fafc;
}

.home-post-thumbnail-inner {
    position: relative;
    width: 100%;
    padding-top: 100%; /* Square aspect ratio for phones */
    overflow: hidden;
}

.home-post-thumbnail-inner::after {
    content: "";
    position: absolute;
    inset: 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
    pointer-events: none;
}

.home-post-thumbnail-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    z-index: 1;
}

.home-post-thumbnail-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.home-post-date-overlay {
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.8) 100%);
    padding: 0.6rem 0.75rem;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    z-index: 2;
    pointer-events: none;
}

.home-post-specs-btn {
    position: absolute !important;
    top: 10px !important;
    left: 10px !important;
    width: 28px !important;
    height: 28px !important;
    background: rgba(255, 255, 255, 0.98) !important;
    border: 1.5px solid rgba(37, 99, 235, 0.2) !important;
    border-radius: 8px !important;
    color: #2563eb !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2), 0 0 0 0.5px rgba(255, 255, 255, 0.9) inset !important;
    z-index: 100 !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent !important;
}

.home-post-specs-btn span {
    font-size: 1rem !important;
    font-weight: 800 !important;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8) !important;
    pointer-events: none !important;
}

.home-post-specs-btn:hover {
    background: rgba(37, 99, 235, 0.1) !important;
    border-color: rgba(37, 99, 235, 0.3) !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.85) inset !important;
    transform: scale(1.1) !important;
}

.home-post-specs-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 24px;
    border: 2px solid #e2e8f0;
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.05);
    z-index: 10000;
    max-width: 520px;
    width: 92%;
    max-height: 88vh;
    overflow-y: auto;
    padding: 0;
    direction: rtl;
    display: none;
}

.home-post-specs-popup.active {
    display: block;
}

.home-specs-popup-header {
    position: sticky;
    top: 0;
    background: linear-gradient(135deg, #1e293b 0%, #334155 50%, #475569 100%);
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    padding: 1.75rem 1.5rem;
    z-index: 1;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.home-post-specs-close {
    position: absolute;
    top: 18px;
    left: 18px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.15);
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.home-post-specs-close:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
}

.home-specs-popup-header h3 {
    margin: 0;
    padding-right: 3rem;
    font-size: 1.375rem;
    font-weight: 800;
    color: #ffffff;
    text-align: center;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.02em;
}

.home-specs-popup-content {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    padding: 1.75rem 1.5rem;
    border-radius: 0 0 24px 24px;
    display: grid;
    gap: 0.875rem;
}

.home-spec-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.125rem 1.25rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 14px;
    border: 2px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transition: all 0.2s ease;
}

.home-spec-row:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.home-spec-label {
    font-weight: 700;
    font-size: 0.9375rem;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.home-spec-label::before {
    content: '';
    width: 4px;
    height: 4px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 50%;
    display: inline-block;
}

.home-spec-value {
    font-weight: 600;
    font-size: 1rem;
    color: #1e293b;
}

.home-spec-price-row {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%) !important;
    border-color: #bae6fd !important;
}

.home-spec-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.375rem;
}

.home-spec-price .price-item {
    font-weight: 700;
    font-size: 1.0625rem;
    color: #0369a1;
    padding: 0.25rem 0.5rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 6px;
    border: 1px solid rgba(14, 165, 233, 0.2);
}

.home-post-specs-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: none;
}

.home-post-specs-overlay.active {
    display: block;
}

.home-post-item {
    position: relative;
}

.home-post-specs-popup {
    display: none !important;
}

.home-post-specs-popup.active {
    display: block !important;
    filter: none !important;
    pointer-events: auto !important;
}

.home-post-content {
    padding: 1rem 1.15rem 1.25rem;
    background: #ffffff;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.home-post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    min-height: 2em;
    padding: 0.25rem 0;
}

.home-post-meta--empty {
    display: none;
}

.home-post-brand:empty,
.home-post-price:empty {
    display: none;
}

.home-post-brand {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    background: transparent;
    border: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    flex-shrink: 0;
    opacity: 0.85;
}

a.home-post-brand {
    color: #475569;
}

a.home-post-brand:hover {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.08);
    text-decoration: none;
    opacity: 1;
}

.home-post-price {
    display: inline-flex;
    align-items: baseline;
    gap: 0.15rem;
    color: #4f46e5;
    font-weight: 800;
    font-size: 1.125rem;
}

.home-post-price-symbol {
    font-size: 0.75rem;
    font-weight: 700;
    color: #818cf8;
}

.home-post-price-amount {
    letter-spacing: -0.01em;
}

.home-post-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.45;
    color: #1e293b;
    text-align: right;
    direction: rtl;
}

.home-post-title a {
    color: inherit;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2; /* Standard property */
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.home-post-item:hover .home-post-title {
    color: #4f46e5;
}

.home-pagination {
    margin-top: 3rem;
    padding: 2rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    direction: rtl;
}

.no-posts {
    text-align: center;
    padding: 3rem 1.5rem;
    background: var(--mtp-card-bg);
    border-radius: var(--mtp-card-radius);
    border: 1px solid var(--mtp-card-border);
    box-shadow: var(--mtp-card-shadow);
}

.no-posts-icon {
    font-size: 3rem;
    margin-bottom: 0.75rem;
    opacity: 0.7;
}

.no-posts h2 {
    font-size: var(--mtp-section-title-size);
    font-weight: var(--mtp-section-title-weight);
    color: var(--mtp-heading);
    margin: 0 0 0.5rem;
}

.no-posts p {
    color: var(--mtp-heading-muted);
    font-size: 1rem;
    margin: 0;
}

/* ==================================================
   الاستجابة (Responsive)
   ================================================== */

/* تحسينات الشاشات الكبيرة */
@media (min-width: 1024px) {
    .home-brands-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* تحسينات الأجهزة اللوحية والموبايل الكبير */
@media (min-width: 769px) {
    .home-brands-wrap {
        margin-left: -1.5rem;
        margin-right: -1.5rem;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
        padding-top: 2rem;
        padding-bottom: 2rem;
        border-radius: 32px 32px 0 0;
    }
    .home-brands-wrap::before {
        border-radius: 32px 32px 0 0;
    }
    .home-brands-title {
        font-size: 1.35rem;
        margin-bottom: 1.5rem;
    }
    .home-brands-title::before {
        width: 80px;
    }
    .home-brands-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.25rem;
    }
    .home-posts-section {
        padding: 1.5rem 1.25rem;
    }
    .home-section-title {
        font-size: 1.25rem;
    }
    .home-section-title::before {
        width: 64px;
    }
}

/* شاشات الموبايل (768px وأقل) */
@media (max-width: 768px) {
    .home-posts-section-wrapper {
        border-radius: 24px;
        margin-bottom: 1.75rem;
    }
    .home-posts-section-wrapper::before {
        border-radius: 24px 24px 0 0;
    }
    .home-posts-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.85rem;
    }
    .home-post-item {
        border-radius: 20px;
    }
    .home-post-content {
        padding: 0.85rem 0.9rem 1.15rem;
    }
    .home-post-title {
        font-size: 0.9rem;
    }
    .home-post-price {
        font-size: 1rem;
    }
    .home-section-title {
        font-size: 1.1rem;
        margin-bottom: 1.25rem;
    }
    .home-section-title::before {
        width: 48px;
    }
    .home-brands-wrap {
        margin-left: -1rem;
        margin-right: -1rem;
        padding: 1.5rem 1rem;
        border-radius: 24px 24px 0 0;
    }
    .home-brands-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}

/* شاشات الموبايل الصغيرة (480px وأقل) */
@media (max-width: 480px) {
    .home-posts-grid {
        gap: 0.6rem;
    }
    .home-post-content {
        padding: 0.75rem 0.75rem 1rem;
    }
    .home-post-title {
        font-size: 0.85rem;
    }
    .home-post-price {
        font-size: 0.9375rem;
    }
}

/* ==================================================
   الوضع الليلي (Dark Mode)
   ================================================== */
[data-theme="dark"] .home-posts-section-wrapper {
    background: #0f172a;
    border-color: rgba(99, 102, 241, 0.2);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .home-post-item {
    background: #1e293b;
    border-color: rgba(99, 102, 241, 0.15);
}

[data-theme="dark"] .home-post-item:hover {
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .home-post-content {
    background: #1e293b;
}

[data-theme="dark"] .home-post-thumbnail {
    background: #0f172a;
}

[data-theme="dark"] .home-post-title,
[data-theme="dark"] .home-post-title a {
    color: #f1f5f9;
}

[data-theme="dark"] .home-post-item:hover .home-post-title {
    color: #818cf8;
}

[data-theme="dark"] .home-post-price {
    color: #818cf8;
}

[data-theme="dark"] .home-post-price-symbol {
    color: #6366f1;
}

[data-theme="dark"] .home-post-price-amount {
    color: #ffffff;
}

[data-theme="dark"] .home-section-title {
    color: #ffffff;
}

[data-theme="dark"] .home-brands-wrap {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .home-brand-card {
    background: #0f172a;
    border-color: #334155;
    color: #f1f5f9;
}

[data-theme="dark"] .home-brand-card:hover {
    border-color: #6366f1;
    background: #1e293b;
}

[data-theme="dark"] .home-filters-bar {
    background: rgba(30, 41, 59, 0.7);
    border-color: rgba(99, 102, 241, 0.25);
}

[data-theme="dark"] .home-filter-chip {
    background: #1e293b;
    border-color: #334155;
    color: #94a3b8;
}

[data-theme="dark"] .home-filter-chip:hover,
[data-theme="dark"] .home-filter-chip.is-active {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #fff;
    border-color: #6366f1;
}

/* ==================================================
   الوضع الذي تم فقدانه: قسم أحدث الأخبار
   ================================================== */

.home-news-section {
    margin-bottom: 3.5rem;
    position: relative;
}

.home-news-section .mtp-news-latest-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

.home-news-section .mtp-news-latest-card.style-premium {
    border-radius: 16px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all 0.3s ease;
}

.home-news-section .mtp-news-latest-card.style-premium:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
    border-color: rgba(99, 102, 241, 0.2);
}

.home-news-section .mtp-news-latest-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.home-news-section .mtp-news-latest-card-thumb {
    position: relative;
    padding-top: 60%;
    overflow: hidden;
    background: #f8fafc;
}

.home-news-section .mtp-news-latest-card-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-news-section .mtp-news-latest-card-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 0.75rem;
}

.home-news-section .mtp-news-latest-card-headline {
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.5;
    color: #1e293b;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    direction: rtl;
    text-align: right;
}

.home-news-section .mtp-news-latest-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.75rem;
    border-top: 1px solid #f1f5f9;
    margin-top: auto;
}

.home-news-section .mtp-news-latest-card-cat {
    font-size: 0.7rem;
    font-weight: 700;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.08);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
}

.home-news-section .mtp-news-latest-card-date {
    font-size: 0.7rem;
    color: #64748b;
}

/* RESPONSIVE NEWS */
@media (max-width: 968px) {
    .home-news-section .mtp-news-latest-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .home-news-section .mtp-news-latest-grid {
        display: flex;
        flex-direction: column;
        gap: 0;
    }
    .home-news-section .mtp-news-latest-card.style-premium {
        border-radius: 0;
        border: none;
        border-bottom: 1px solid #f1f5f9;
        box-shadow: none;
        background: transparent;
    }
    .home-news-section .mtp-news-latest-card-link {
        flex-direction: row;
        padding: 1rem 0;
        gap: 1rem;
    }
    .home-news-section .mtp-news-latest-card-thumb {
        width: 70px;
        height: 70px;
        padding-top: 0;
        border-radius: 12px;
        border: 1px solid #e2e8f0;
    }
    .home-news-section .mtp-news-latest-card-content {
        padding: 0;
        justify-content: center;
        gap: 0.5rem;
    }
    .home-news-section .mtp-news-latest-card-footer {
        padding-top: 0;
        border-top: none;
        justify-content: flex-start;
        gap: 0.75rem;
    }
}

/* DARK MODE FINAL FIXES */
[data-theme="dark"] .home-news-section .mtp-news-latest-card.style-premium {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .home-news-section .mtp-news-latest-card-headline {
    color: #f1f5f9;
}

[data-theme="dark"] .home-news-section .mtp-news-latest-card-footer {
    border-top-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .home-news-section .mtp-news-latest-card-thumb {
    background: #0f172a;
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .mtp-news-latest-more {
    color: #f87171;
}

/* Header fix for news section */
.mtp-news-latest-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.mtp-news-latest-more {
    font-size: 0.9rem;
    font-weight: 700;
    color: #ef4444;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

