/* «هتل‌های مشابه» / «اقامتگاه‌های مشابه»: the cards at the bottom of the hotel page and the stay page (inc/similar_places.php). Self-contained: it works on the
   bootstrap hotel page and on the tailwind stay page, every class starts with sp-. */
.sp-section { direction: rtl; margin: 40px 0 32px; font-family: inherit; }
.sp-container { padding-right: 12px; padding-left: 12px; }
.sp-title { font-size: clamp(18px, 3vw, 24px); font-weight: 800; color: var(--ds-text, #101828); margin: 0 0 16px; }
.sp-divider-title { margin: 0; font-size: clamp(16px, 3vw, 25px); }
.sp-wrap { position: relative; margin-top: 16px; }
/* two rows that fill column by column and scroll sideways; a page is what fits the width: 4 columns (8 cards) on a desktop, 2 on a tablet, a bit under 2 on a phone */
.sp-grid { display: grid; grid-template-rows: repeat(2, auto); grid-auto-flow: column; grid-auto-columns: calc((100% - 48px) / 4); gap: 16px; overflow-x: auto;
    padding: 4px 2px 12px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.sp-grid.sp-one-row { grid-template-rows: auto; }
.sp-grid { cursor: grab; }
.sp-grid.sp-drag { cursor: grabbing; user-select: none; -webkit-user-select: none; }
.sp-grid img { -webkit-user-drag: none; user-select: none; }
.sp-nav { direction: ltr; position: absolute; top: 50%; z-index: 2; width: 38px; height: 38px; margin-top: -19px; border: 0; border-radius: 50%; background: #fff; color: var(--ds-text, #101828);
    font-size: 26px; line-height: 36px; text-align: center; padding: 0; cursor: pointer; box-shadow: 0 2px 10px rgba(0, 0, 0, .25); }
.sp-nav:hover { background: var(--ds-primary, #00ab6c); color: #fff; }
.sp-nav[hidden] { display: none; }
.sp-dots { display: flex; justify-content: center; gap: 8px; margin-top: 4px; }
.sp-dots[hidden] { display: none; }
.sp-dots button { width: 9px; height: 9px; border: 0; border-radius: 50%; background: var(--ds-border, #e1e7ef); padding: 0; cursor: pointer; }
.sp-dots button.on { background: var(--ds-primary, #00ab6c); width: 22px; border-radius: 6px; }
.sp-prev { right: -8px; }
.sp-next { left: -8px; }
.sp-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--ds-border, #e1e7ef); border-radius: 16px; overflow: hidden; color: inherit;
    text-decoration: none; box-shadow: 0 1px 3px rgba(0, 0, 0, .06); transition: box-shadow .25s ease, transform .25s ease, border-color .25s ease; }
.sp-card:hover { box-shadow: 0 10px 24px rgba(0, 0, 0, .12); transform: translateY(-2px); border-color: var(--ds-primary, #00ab6c); color: inherit; text-decoration: none; }
.sp-photo { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--ds-surface-2, #eef2f7); overflow: hidden; }
.sp-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.sp-card:hover .sp-photo img { transform: scale(1.04); }
.sp-badge { position: absolute; top: 10px; right: 10px; background: rgba(255, 255, 255, .95); color: var(--ds-accent-text, #b43a19); border-radius: 999px; padding: 2px 10px;
    font-size: 12px; font-weight: 700; line-height: 1.6; direction: ltr; }
.sp-off { position: absolute; top: 10px; left: 10px; background: #dc2626; color: #fff; border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 700; line-height: 1.6; }
.sp-body { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 14px; flex: 1; text-align: right; }
.sp-name { font-weight: 800; font-size: 15px; line-height: 1.7; color: var(--ds-text, #101828); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sp-where, .sp-tag { font-size: 12px; color: var(--ds-muted, #596579); line-height: 1.7; }
.sp-price { margin-top: auto; padding-top: 6px; font-size: 12px; color: var(--ds-muted, #596579); }
.sp-price b { font-size: 17px; color: var(--ds-accent-text, #b43a19); font-weight: 800; }
.sp-price s { color: #9ca3af; }
.sp-price small { font-size: 11px; }
@media (max-width: 991.98px) { .sp-grid { grid-auto-columns: calc((100% - 16px) / 2); } }
@media (max-width: 575.98px) {
    .sp-grid { gap: 10px; grid-auto-columns: 46%; }
    .sp-dots { display: none !important; }
    .sp-nav { display: none !important; }
    .sp-body { padding: 10px; }
    .sp-name { font-size: 13px; }
    .sp-price b { font-size: 15px; }
}
