/* ============================================================
   1. BASE CONTAINER & PERFORMANCE
   ============================================================ */
#related-listings-ajax-root { width: 100%; min-height: 520px; display: block; clear: both; }
.related_listings .row_container { max-width: 1200px; margin: 0 auto; position: relative; overflow: hidden; padding: 20px 0; }

/* The Slider Track - Hardware Accelerated */
.related_listings .slides { display: flex; gap: 20px; will-change: transform; transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1); transform: translate3d(0, 0, 0); }

/* ============================================================
   2. LISTING CARD DESIGN
   ============================================================ */
.related_listings .listing-item { flex: 0 0 calc(33.333% - 14px); background: #ffffff; border-radius: 12px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); display: flex; flex-direction: column; overflow: hidden; transition: box-shadow 0.3s ease; }
.related_listings .listing-item:hover { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12); }

/* Image Aspect Ratio for CLS */
.related_listings .listing-item img { width: 100%; object-fit: cover; display: block; }
.related_listings .listing-item-wrap { padding: 16px; display: flex; flex-direction: column; flex-grow: 1; }
.related_listings h2 { font-family: "Saudi-Bold",Sans-serif !important; font-size: 35px; font-weight: 700; margin: 0 0 8px 0; line-height: .8; color: #8A3F2D; }
.related_listings .listing_place { font-size: 16px; color: #666; display: flex; align-items: center; gap: 6px; margin-bottom: 12px; }

/* ============================================================
   3. FEATURES GRID (FIXES BATHROOM ICONS)
   ============================================================ */
.related_listings .listing_features { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: auto; }
.related_listings .listing_features .feature-box { display: flex; flex-direction: column; align-items: center; text-align: center; font-size: 14px; color: #000; border-right: 2px solid #c3c3c3; padding: 0 4px; }
.related_listings .listing_features .feature-box:last-child { border-right: none; }
.related_listings .listing_features .feature-box svg, 
.related_listings .listing_features .feature-box img { width: 35px; height: 35px; margin-bottom: 5px; flex-shrink: 0; }

/* ============================================================
   4. PRICE & BUTTON
   ============================================================ */
.related_listings .listing_price { margin: 15px 0; }
.related_listings .listing_price img{ width: 16px; filter: brightness(0); }
.related_listings .price-text { font-size: 16px; color: #000; display: block; }
.related_listings .price-symbol { display: flex; align-items: center; gap: 4px; font-size: 20px; font-weight: 700; color: #000; }
.related_listings .listing-post-btn { display: block; background: #7e3528; color: #fff; text-align: center; padding: 12px; border-radius: 6px; text-decoration: none; font-weight: 600; transition: background 0.3s ease; }
.related_listings .listing-post-btn:hover { background: #5e271d; }

/* ============================================================
   5. NAVIGATION & RTL
   ============================================================ */
.related_listings .arrow { position: absolute; top: 50%; transform: translateY(-50%); color: #fff; background: #8A3F2D; border: none; width: 40px; height: 40px; border-radius: 50%; box-shadow: 0 2px 8px rgba(0,0,0,0.2); cursor: pointer; z-index: 10; font-size: 18px; transition: all 0.3s ease; border: 2px solid #8A3F2D; }
.related_listings .arrow:hover { background: #FFF; color: #8A3F2D; border-color: #8A3F2D; }
.btn-prev { left: 10px; }
.btn-next { right: 10px; }

/* RTL Adjustments */
body.rtl .feature-box { border-right: none; border-left: 1px solid #f0f0f0; }
body.rtl .feature-box:last-child { border-left: none; }
body.rtl .related_listings .arrow { transform: translateY(-50%) rotate(180deg); }

/* ============================================================
   6. RESPONSIVE BREAKPOINTS
   ============================================================ */
@media (max-width: 1024px) { .related_listings .listing-item { flex: 0 0 calc(50% - 10px); } }
@media (max-width: 767px) { .related_listings .listing-item { flex: 0 0 85%; } .related_listings .listing_features { grid-template-columns: repeat(4, 1fr); } }

