/* ============================================================
   SR2.css — Mobile Overrides & Bottom Sheet Filter Panel
   TAJELINE luxury marketplace
   Breakpoint target: 375px (iPhone SE) and up to 768px
   ============================================================ */

/* ── Existing slideshow / dots (keep) ─────────────────────── */
.slideshow-container .prev:hover,
.slideshow-container .next:hover {
    background-color: black;
    color: white;
}

.listing-item {
    display: block;
}

.dot {
    width: 5px;
    height: 5px;
    background-color: #ccc;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.dots-container {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    background-color: transparent;
    gap: 8px;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.dot-active {
    background-color: darkgoldenrod;
    transform: scale(1.5);
}

/* ── Pagination (dark luxury override) ────────────────────── */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 24px 0;
    flex-wrap: wrap;
}

.pagination a {
    padding: 10px 18px;
    font-size: 14px;
    color: #c9a84c;
    text-decoration: none;
    background-color: #111111;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    transition: all 0.25s ease;
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 0.03em;
}

.pagination a:hover {
    background-color: rgba(201,168,76,0.12);
    border-color: #8a6f30;
    color: #f0c040;
}

.pagination a.active {
    background: linear-gradient(135deg, #c9a84c, #f0c040);
    border-color: transparent;
    color: #000;
    font-weight: 700;
}

.pagination .prev-page,
.pagination .next-page {
    background-color: #111111;
}

/* ── 375px — Single-column card layout ────────────────────── */
@media (max-width: 480px) {

    /* Force full-width cards */
    .sr-grid,
    .grid,
    [class*="grid-cols"] {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    /* Card price — prevent overflow */
    .sr-card-price,
    [class*="price"],
    .text-price {
        font-size: 1rem !important;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    /* CTA buttons — full width */
    .sr-card-cta,
    .btn-cta,
    [class*="contact-btn"],
    [class*="book-btn"] {
        width: 100% !important;
        justify-content: center !important;
        padding: 12px 16px !important;
        font-size: 0.9rem !important;
    }

    /* Pagination — compact */
    .pagination a {
        padding: 8px 12px;
        font-size: 12px;
    }

    .pagination {
        gap: 5px;
    }

    /* Ensure nav hamburger accessible */
    .navbar .menu-icon,
    .navbar [class*="hamburger"],
    .mobile-menu-toggle {
        display: flex !important;
        min-width: 44px;
        min-height: 44px;
        align-items: center;
        justify-content: center;
    }
}

/* ── 375px touch-friendly filters ────────────────────────── */
@media (max-width: 768px) {
    /* Filter labels and checkboxes — larger touch targets */
    .sr-filter-option {
        padding: 10px 0;
        min-height: 44px;
    }

    .sr-filter-option input[type="checkbox"] {
        width: 20px;
        height: 20px;
    }

    /* Sort select — full width */
    .sr-sort-select {
        width: 100% !important;
    }
}

/* ══════════════════════════════════════════════════════════
   BOTTOM SHEET FILTER PANEL (mobile)
   Activated by .sr-sheet-open class on body
   ══════════════════════════════════════════════════════════ */

/* Overlay backdrop */
.sr-sheet-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.72);
    z-index: 1000;
    backdrop-filter: blur(4px);
    animation: sr-overlay-in 0.25s ease;
}

@keyframes sr-overlay-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.sr-sheet-overlay.visible {
    display: block;
}

/* Bottom sheet container */
.sr-bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #111111;
    border-top: 1px solid #2a2a2a;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    z-index: 1001;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
    will-change: transform;
}

.sr-bottom-sheet.open {
    transform: translateY(0);
}

/* Drag handle */
.sr-sheet-handle {
    width: 36px;
    height: 4px;
    background: #333;
    border-radius: 2px;
    margin: 12px auto 0;
    flex-shrink: 0;
    cursor: grab;
}

/* Sheet header */
.sr-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 12px;
    border-bottom: 1px solid #1e1e1e;
    flex-shrink: 0;
}

.sr-sheet-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.05rem;
    font-weight: 400;
    color: #f0ebe0;
    letter-spacing: 0.05em;
}

.sr-sheet-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 50%;
    color: #a09880;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    transition: all 0.15s ease;
}

.sr-sheet-close:hover {
    background: rgba(201,168,76,0.1);
    color: #c9a84c;
    border-color: #8a6f30;
}

/* Sheet scrollable body */
.sr-sheet-body {
    overflow-y: auto;
    flex: 1;
    padding: 16px 20px;
    scrollbar-width: thin;
    scrollbar-color: #2a2a2a transparent;
}

.sr-sheet-body::-webkit-scrollbar { width: 4px; }
.sr-sheet-body::-webkit-scrollbar-thumb {
    background: #2a2a2a;
    border-radius: 2px;
}

/* Sheet footer — sticky apply/reset buttons */
.sr-sheet-footer {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid #1e1e1e;
    background: #111111;
    flex-shrink: 0;
    /* Safe area for iPhone home indicator */
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
}

.sr-sheet-reset {
    padding: 13px;
    background: transparent;
    border: 1px solid #2a2a2a;
    color: #a09880;
    border-radius: 10px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.sr-sheet-reset:hover {
    border-color: #c9a84c;
    color: #c9a84c;
}

.sr-sheet-apply {
    padding: 13px;
    background: linear-gradient(135deg, #c9a84c, #f0c040);
    border: none;
    color: #000;
    border-radius: 10px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.sr-sheet-apply:active {
    opacity: 0.85;
}

/* ── Price range slider inside sheet ─────────────────────── */
.sr-sheet-price-range {
    margin: 8px 0 16px;
}

.sr-sheet-price-track {
    position: relative;
    height: 4px;
    background: #2a2a2a;
    border-radius: 2px;
    margin: 20px 0 8px;
}

.sr-sheet-price-fill {
    position: absolute;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, #c9a84c, #f0c040);
    border-radius: 2px;
    pointer-events: none;
}

input[type="range"].sr-sheet-range {
    appearance: none;
    width: 100%;
    height: 4px;
    background: transparent;
    outline: none;
    cursor: pointer;
    position: absolute;
    top: 0;
    pointer-events: none;
}

input[type="range"].sr-sheet-range::-webkit-slider-thumb {
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #c9a84c;
    border: 3px solid #111;
    pointer-events: all;
    cursor: grab;
    box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

input[type="range"].sr-sheet-range::-webkit-slider-thumb:active {
    cursor: grabbing;
    transform: scale(1.15);
}

.sr-sheet-price-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    color: #a09880;
    margin-top: 4px;
}

.sr-sheet-price-value {
    color: #c9a84c;
    font-weight: 600;
}

/* ── Sheet filter group (mirrors sidebar) ─────────────────── */
.sr-sheet-group {
    margin-bottom: 20px;
    border-bottom: 1px solid #1a1a1a;
    padding-bottom: 20px;
}

.sr-sheet-group:last-child {
    border-bottom: none;
}

.sr-sheet-group-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #5a5448;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
}

.sr-sheet-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    min-height: 44px;
    cursor: pointer;
}

.sr-sheet-option input[type="checkbox"] {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 1px solid #2a2a2a;
    border-radius: 5px;
    background: transparent;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.sr-sheet-option input[type="checkbox"]:checked {
    background: #c9a84c;
    border-color: #c9a84c;
}

.sr-sheet-option input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 5px; top: 2px;
    width: 7px; height: 11px;
    border: 2.5px solid #000;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}

.sr-sheet-option-label {
    font-size: 0.9rem;
    color: #a09880;
    flex: 1;
}

.sr-sheet-option-count {
    font-size: 0.72rem;
    color: #5a5448;
    background: #1a1a1a;
    padding: 2px 7px;
    border-radius: 20px;
}

/* ── Prevent body scroll when sheet open ─────────────────── */
body.sr-sheet-open {
    overflow: hidden;
    touch-action: none;
}

/* Only show bottom sheet on mobile */
@media (min-width: 769px) {
    .sr-bottom-sheet,
    .sr-sheet-overlay {
        display: none !important;
    }
}
