﻿/* assets/css/modals.css — SareProperty | Phase 2 split */
/* ============================================================
   MOCKUP DROPDOWNS (Location & Profile)
   ============================================================ */

/* Location Dropdown Mockup */
.mockup-location-dropdown {
    position: absolute;
    top: calc(100% + 15px);
    left: 0;
    width: 320px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 0;
    display: none;
    flex-direction: column;
    border: 1px solid #f0f0f0;
}

.mockup-location-dropdown.open {
    display: flex !important;
}

.loc-dd-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    font-weight: 700;
    font-size: 1.1rem;
}

.loc-dd-header i {
    cursor: pointer;
    font-size: 1.4rem;
}

.loc-dd-search {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px 20px;
    padding: 10px 15px;
    background: #f4f6f8;
    border-radius: 8px;
}

.loc-dd-search i {
    color: #888;
    font-size: 1.2rem;
}

.loc-dd-search input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    font-family: inherit;
    font-size: 0.9rem;
}

.loc-dd-current {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px 20px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}

.loc-dd-current:hover {
    background: #fafafa;
}

.loc-target-icon {
    color: #3B82F6;
    font-size: 1.3rem;
    margin-top: 2px;
}

.loc-dd-current-title {
    display: block;
    color: #3B82F6;
    font-weight: 700;
    font-size: 1rem;
}

.loc-dd-current-sub {
    display: block;
    color: #888;
    font-size: 0.8rem;
    margin-top: 3px;
}

.loc-dd-recent-label {
    padding: 15px 20px 5px 20px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #aaa;
    letter-spacing: 0.5px;
}

.loc-dd-recent-list {
    display: flex;
    flex-direction: column;
    padding-bottom: 10px;
}

.loc-dd-recent-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    color: #333;
}

.loc-dd-recent-item:hover {
    background: #fafafa;
}

.loc-dd-recent-item i {
    color: #888;
    font-size: 1.2rem;
}

/* Profile Dropdown Mockup Overrides */
.mockup-profile-dropdown {
    width: 320px !important;
    padding: 0 !important;
    border-radius: 16px !important;
    overflow: hidden;
}

.profile-mockup-header {
    background: var(--bg-dark);
    padding: 18px 20px;
}

.profile-mockup-top-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.profile-mockup-top-actions i {
    font-size: 1.5rem;
    cursor: pointer;
    color: #E5E7EB;
}

.profile-mockup-top-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-help-btn {
    background: rgba(255,255,255,0.12);
    color: #E5E7EB;
    font-weight: 700;
    font-size: 0.72rem;
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    cursor: pointer;
    letter-spacing: 0.04em;
}

.profile-mockup-name {
    font-size: 1.25rem;
    font-weight: 800;
    color: #FFFFFF;
    margin: 0 0 5px 0;
}

.profile-mockup-phone {
    font-size: 0.83rem;
    color: #9CA3AF;
    margin: 0;
    font-weight: 500;
}

.profile-mockup-body {
    background: #fff;
 background: var(--bg-secondary);}

.profile-mockup-list {
    display: flex;
    flex-direction: column;
    padding: 6px 0;
}

.profile-mockup-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    cursor: pointer;
    border-bottom: 1px solid #F3F4F6;
    transition: background 0.15s;
}

.profile-mockup-item:hover {
    background: var(--bg-secondary);
}

.profile-mockup-item:last-child {
    border-bottom: none;
}

.profile-mockup-item-left {
    display: flex;
    align-items: center;
    gap: 14px;
    font-weight: 600;
    font-size: 0.93rem;
    color: var(--text-main);
}

.profile-mockup-item-left i {
    font-size: 1.2rem;
    color: var(--primary);
}

.profile-mockup-item > i {
    color: #D1D5DB;
    font-size: 1.1rem;
}

/* ============================================================
   PROFILE FULLSCREEN PANELS (Saved Properties, Edit, Listings)
   ============================================================ */
.profile-fullscreen-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}
.profile-fullscreen-panel.active {
    transform: translateX(0);
}

.profile-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 10;
    min-height: 56px;
}
.profile-panel-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}
.profile-panel-back {
    background: none;
    border: none;
    font-size: 1.4rem;
    color: #1c1c1c;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    transition: background 0.2s;
}
.profile-panel-back:hover {
    background: rgba(0,0,0,0.05);
}

.profile-panel-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
 background: var(--bg-secondary);}

/* â”€â”€ Saved Properties Tabs â”€â”€ */
.saved-props-tabs {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    background: #fff;
    border-bottom: 1px solid #f1f5f9;
}
.saved-props-pill {
    flex: 1;
    padding: 10px 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 25px;
    background: #fff;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-sub);
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: center;
}
.saved-props-pill.active {
    background: linear-gradient(135deg, #1A6FF4, #1558C9);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

/* â”€â”€ Saved Property Card â”€â”€ */
.saved-prop-card {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid #f8f8f8;
    position: relative;
    cursor: pointer;
    transition: background 0.2s;
    overflow: hidden;
}
.saved-prop-card:hover {
    background: #fafbfc;
}
.saved-prop-card:active {
    background: #f1f5f9;
}

.saved-prop-img {
    width: 96px;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}
.saved-prop-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.saved-prop-type {
    position: absolute;
    top: 6px;
    left: 6px;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.saved-prop-type.rent {
    background: rgba(59, 130, 246, 0.9);
    color: #fff;
}
.saved-prop-type.sale {
    background: rgba(239, 68, 68, 0.9);
    color: #fff;
}

.saved-prop-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
}
.saved-prop-price {
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
}
.saved-prop-title {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.saved-prop-specs {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}
.saved-prop-loc {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 2px;
}
.saved-prop-loc i {
    font-size: 12px;
    color: #1A6FF4;
}

.saved-prop-remove {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}
.saved-prop-remove:hover {
    background: rgba(239, 68, 68, 0.15);
    transform: scale(1.1);
}

/* ============================================================
   KEY HIGHLIGHTS - 2x2 Grid Layout
   ============================================================ */
.key-highlights-card {
    padding: 15px;
}

.highlights-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 10px;
}

.hl-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid #e8ecf1;
    border-radius: 10px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.hl-item:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.hl-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e0f2fe;
    border-radius: 8px;
    flex-shrink: 0;
    order: -1;
}

.hl-icon i {
    font-size: 1.2rem;
    color: #3B82F6;
}

.hl-item span {
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
    line-height: 1.3;
}

/* ============================================================
   MOBILE RESPONSIVENESS â€” FULL FIX
   ============================================================ */

/* Ensure nothing overflows horizontally */
*, *::before, *::after {
    max-width: 100%;
}

/* App header â€” responsive padding */
@media (max-width: 480px) {
    .app-header {
        padding: 14px 16px 8px 16px;
    }
    .brand-bold, .brand-light {
        font-size: 1.3rem;
    }
    .profile-icon {
        width: 38px;
        height: 38px;
    }
    /* Home page */
    .categories-section {
        padding: 8px 12px 16px 12px;
    }
    .cat-card {
        height: 120px;
        padding: 14px;
    }
    .cat-text {
        font-size: 0.9rem;
    }
    /* Filter panel mobile fix */
    .filter-bar {
        padding: 8px 12px;
        gap: 8px;
    }
    .filter-btn, .sort-btn {
        padding: 7px 10px;
        font-size: 0.82rem;
     background: #FFFFFF; box-shadow: 0 2px 4px rgba(0,0,0,0.04); border: 1px solid var(--border-strong);}
    /* Property card mobile */
    .prop-image-container {
        height: 180px;
    }
    .prop-header h3 {
        font-size: 1rem;
    }
    /* Bottom sheet mobile */
    .sheet-image-box {
        width: 90%;
    }
    .sheet-title {
        font-size: 1.2rem;
    }
    .sheet-details {
        padding: 8px 16px;
    }
    /* Bottom nav labels smaller on tiny screens */
    .nav-item span {
        font-size: 0.68rem;
    }
    .nav-item i {
        font-size: 1.3rem;
    }
}

/* Tablet: 481px to 768px */
@media (min-width: 481px) and (max-width: 768px) {
    .app-header {
        padding: 16px 20px 10px 20px;
    }
    .prop-image-container {
        height: 200px;
    }
}

/* Filter bottom sheet mobile responsive */
@media (max-width: 640px) {
    .filter-panel-sheet {
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 20px 20px 0 0 !important;
        bottom: 0 !important;
        top: auto !important;
        left: 0 !important;
        transform: none !important;
        max-height: 88vh !important;
    }
    .bottom-sheet {
        max-height: 88vh;
    }
    .sheet-inner {
        max-height: calc(88vh - 60px);
    }
}

/* Desktop: wide screens - header max padding */
@media (min-width: 1200px) {
    .app-header {
        padding: 20px 60px 14px 60px;
    }
    .filter-bar {
        padding: 10px 60px;
    }
}









/* Profile Panel */
.sp-profile-view { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: #F8F9FA; z-index: 210; transform: translateX(100%); transition: transform 0.32s cubic-bezier(0.25,0.8,0.25,1); display: flex; flex-direction: column; overflow: hidden; }
.sp-profile-view.active { transform: translateX(0); }
.sp-profile-header { display: flex; align-items: center; padding: 50px 16px 14px; gap: 14px; background: #F8F9FA; border-bottom: 1px solid #E5E7EB; }
.sp-profile-header h2 { font-size: 18px; font-weight: 800; color: #111827; }
.sp-profile-scroll { flex: 1; overflow-y: auto; padding: 20px 16px 80px; }
.sp-profile-scroll::-webkit-scrollbar { display: none; }
.sp-user-card { display: flex; align-items: center; margin-bottom: 20px; }
.sp-user-avatar { width: 64px; height: 64px; background: #DBEAFE; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 28px; color: #1E6FE8; margin-right: 14px; flex-shrink: 0; }
.sp-user-details { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.sp-name-row { display: flex; justify-content: space-between; align-items: center; width: 100%; cursor: pointer; }
.sp-update-name { font-size: 20px; font-weight: 800; color: #111827; border-bottom: 2px dashed #BFDBFE; padding-bottom: 2px; }
.sp-edit-icon { color: #9CA3AF; font-size: 15px; }
.sp-user-phone { font-size: 13px; color: #6B7280; font-weight: 600; }
.sp-promo-banner { background: linear-gradient(135deg,#EBF5FF,#DBEAFE); border-radius: 14px; padding: 16px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; border: 1px solid #BFDBFE; cursor: pointer; }
.sp-promo-logo { font-size: 15px; font-weight: 900; color: #1E6FE8; line-height: 1.2; }
.sp-promo-logo span { font-weight: 600; font-size: 12px; }
.sp-promo-text { font-size: 13px; font-weight: 700; color: #1558C9; flex: 1; margin-left: 12px; }
.sp-prof-section { margin-bottom: 18px; }
.sp-prof-section-title { font-size: 13px; font-weight: 800; color: #9CA3AF; margin-bottom: 8px; letter-spacing: 0.5px; text-transform: uppercase; }
.sp-action-tile { background: #fff; border: 1px solid #E5E7EB; border-radius: 14px; padding: 16px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 1px 4px rgba(0,0,0,0.03); cursor: pointer; margin-bottom: 8px; transition: box-shadow 0.2s; }
.sp-action-tile:hover { box-shadow: 0 3px 10px rgba(0,0,0,0.07); }
.sp-tile-left { display: flex; align-items: center; gap: 14px; }
.sp-tile-left i { font-size: 18px; color: #6B7280; width: 22px; text-align: center; }
.sp-tile-left span { font-size: 14px; font-weight: 700; color: #111827; }
.sp-action-tile i.ri-arrow-right-s-line { font-size: 18px; color: #9CA3AF; }
.sp-logout-tile .sp-tile-left i, .sp-logout-tile .sp-tile-left span { color: #DC2626; }

/* Edit Profile Sub-Panel */
.sp-edit-profile-view { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: #F8F9FA; z-index: 220; transform: translateX(100%); transition: transform 0.32s cubic-bezier(0.25,0.8,0.25,1); display: flex; flex-direction: column; overflow: hidden; }
.sp-edit-profile-view.active { transform: translateX(0); }
.sp-edit-profile-scroll { flex: 1; overflow-y: auto; padding: 0 16px 120px; }
.sp-edit-profile-scroll::-webkit-scrollbar { display: none; }
.sp-large-avatar-container { display: flex; justify-content: center; margin: 20px 0 24px; position: relative; }
.sp-large-avatar { width: 100px; height: 100px; background: #DBEAFE; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 44px; color: #1E6FE8; }
.sp-avatar-edit-badge { position: absolute; bottom: 0; right: calc(50% - 42px); width: 30px; height: 30px; background: #1E6FE8; color: #fff; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 13px; border: 3px solid #F8F9FA; cursor: pointer; }
.sp-edit-form-card { background: #fff; border: 1px solid #E5E7EB; border-radius: 18px; padding: 18px; margin-bottom: 16px; }
.sp-form-title { font-size: 16px; font-weight: 800; color: #111827; margin-bottom: 16px; border-bottom: 1px solid #E5E7EB; padding-bottom: 12px; }
.sp-form-group { margin-bottom: 16px; }
.sp-form-group:last-child { margin-bottom: 0; }
.sp-form-group label { display: block; font-size: 12px; font-weight: 700; color: #374151; margin-bottom: 6px; }
.sp-form-group input { width: 100%; height: 46px; border: 1px solid #D1D5DB; border-radius: 10px; padding: 0 14px; font-size: 14px; font-weight: 600; color: #111827; outline: none; transition: border-color 0.2s; background: transparent; font-family: 'Manrope',sans-serif; }
.sp-form-group input::placeholder { color: #9CA3AF; font-weight: 500; }
.sp-form-group input:focus { border-color: #1E6FE8; }
.sp-form-group input.sp-readonly { background: #F3F4F6; color: #6B7280; cursor: not-allowed; border-color: #E5E7EB; }
.sp-info-text { display: flex; gap: 6px; font-size: 11px; color: #6B7280; font-weight: 500; margin-top: 6px; line-height: 1.4; }
.sp-info-text i { font-size: 12px; color: #9CA3AF; flex-shrink: 0; }
.sp-sticky-bottom { position: fixed; bottom: 0; left: 0; width: 100%; background: #F8F9FA; padding: 14px 16px 24px; border-top: 1px solid #E5E7EB; z-index: 221; }
.sp-update-profile-btn { width: 100%; height: 50px; border-radius: 14px; border: none; font-size: 15px; font-weight: 700; background: #1E6FE8; color: #fff; cursor: pointer; font-family: 'Manrope',sans-serif; }
.sp-update-profile-btn:hover { opacity: 0.9; }

/* ============================================================
   SP HEADER PANELS — Fixed overlay, drawer style, fade backdrop
   ============================================================ */

/* Dark backdrop fade */
.sp-panel-overlay {
    position: fixed !important;
    top: 0 !important; left: 0 !important;
    width: 100vw !important; height: 100vh !important;
    background: rgba(0,0,0,0.52) !important;
    z-index: 1000 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.35s ease !important;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}
.sp-panel-overlay.active {
    opacity: 1 !important;
    pointer-events: all !important;
}

/* Location panel — slides in from LEFT, max 400px wide */
.sp-location-view {
    position: fixed !important;
    top: 0 !important; left: 0 !important;
    width: 92% !important;
    max-width: 400px !important;
    height: 100vh !important;
    height: 100dvh !important;
    background: #F3F4F6 !important;
    z-index: 1010 !important;
    transform: translateX(-110%) !important;
    transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    box-shadow: 4px 0 24px rgba(0,0,0,0.18);
}
.sp-location-view.active {
    transform: translateX(0) !important;
}

/* Profile panel — slides in from RIGHT, max 400px wide */
.sp-profile-view {
    position: fixed !important;
    top: 0 !important; right: 0 !important; left: auto !important;
    width: 92% !important;
    max-width: 400px !important;
    height: 100vh !important;
    height: 100dvh !important;
    background: #F8F9FA !important;
    z-index: 1010 !important;
    transform: translateX(110%) !important;
    transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    box-shadow: -4px 0 24px rgba(0,0,0,0.18);
}
.sp-profile-view.active {
    transform: translateX(0) !important;
}

/* Edit profile sub-panel — slides in from RIGHT on top of profile */
.sp-edit-profile-view {
    position: fixed !important;
    top: 0 !important; right: 0 !important; left: auto !important;
    width: 92% !important;
    max-width: 400px !important;
    height: 100vh !important;
    height: 100dvh !important;
    background: #F8F9FA !important;
    z-index: 1020 !important;
    transform: translateX(110%) !important;
    transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    box-shadow: -4px 0 24px rgba(0,0,0,0.2);
}
.sp-edit-profile-view.active {
    transform: translateX(0) !important;
.sp-update-profile-btn:hover { opacity: 0.9; }

/* ============================================================
   SP HEADER - REDESIGN FROM SCRATCH
   Mobile-first | Clean | No !important needed
   Mobile: soft green two-row layout
   Desktop: white single-row layout
   ============================================================ */

/* --- CSS tokens --- */
:root {
    --sph-mob-bg: #cee7d6;
    --sph-desk-bg: #ffffff;
    --sph-blue: #1E6FE8;
    --sph-green: #146c52;
    --sph-radius: 12px;
}

/* --- Header shell --- */
.sp-home-header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: var(--sph-mob-bg);
    padding: 14px 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* --- Row 1 --- */
.sp-header-row1 {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
}

/* --- Left block (logo + location stacked on mobile) --- */
.sp-header-left-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

/* --- Logo --- */
.sp-brand-logo {
    display: flex;
    align-items: baseline;
    gap: 0;
    cursor: pointer;
    text-decoration: none;
    flex-shrink: 0;
    line-height: 1;
}
.sp-brand-bold {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.4px;
}
.sp-brand-light {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--sph-blue);
    letter-spacing: -0.4px;
}

/* --- Location trigger --- */
.sp-home-location {
    display: flex;
    flex-direction: column;
    gap: 1px;
    cursor: pointer;
    transition: opacity 0.15s;
}
.sp-home-location:active { opacity: 0.7; }

.sp-loc-title {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 15px;
    font-weight: 800;
    color: #111827;
}
.sp-pin-icon  { font-size: 14px; color: #222; }
.sp-chev-icon { font-size: 13px; color: #555; }

.sp-loc-subtitle {
    font-size: 12px;
    font-weight: 500;
    color: #374151;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 230px;
    padding-left: 2px;
}

/* --- Right actions --- */
.sp-home-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 2px;
    flex-shrink: 0;
}

/* Wallet / Shield (mobile only) */
.sp-wallet-btn {
    width: 38px;
    height: 38px;
    background: #f4e6d3;
    border: 1px solid #ead6be;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7c4d2a;
    font-size: 17px;
    flex-shrink: 0;
    cursor: pointer;
}

/* Profile avatar */
.sp-home-profile-btn {
    width: 42px;
    height: 42px;
    background: #374151;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.15s;
}
.sp-home-profile-btn:active { transform: scale(0.93); }

/* Bookmark (mobile in row2, desktop in row1) */
.sp-home-bookmark-btn {
    width: 48px;
    height: 48px;
    border: 1.5px solid var(--sph-green);
    background: transparent;
    border-radius: var(--sph-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sph-green);
    font-size: 20px;
    flex-shrink: 0;
    cursor: pointer;
    transition: background 0.15s;
}
.sp-home-bookmark-btn:active { background: rgba(20,108,82,0.08); }

/* --- Row 2: search + bookmark (mobile only) --- */
.sp-header-row2 {
    display: flex;
    gap: 10px;
    align-items: center;
    width: 100%;
}

/* --- Search bar --- */
.sp-home-search-bar {
    flex: 1;
    height: 48px;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.09);
    border-radius: var(--sph-radius);
    display: flex;
    align-items: center;
    padding: 0 14px;
    gap: 10px;
    transition: border-color 0.2s;
}
.sp-home-search-bar:focus-within { border-color: var(--sph-blue); }

.sp-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    font-weight: 500;
    color: #111827;
    background: transparent;
    font-family: 'Manrope', sans-serif;
}
.sp-search-input::placeholder { color: #9CA3AF; font-weight: 500; }

.sp-search-tools {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #9CA3AF;
    font-size: 18px;
    flex-shrink: 0;
}
.sp-search-divider {
    width: 1px;
    height: 18px;
    background: #D1D5DB;
}

/* Desktop-only elements: hidden by default (mobile-first) */
.sp-search-desktop  { display: none; }
.sp-bookmark-desktop { display: none; }

/* Mobile-only: wallet visible by default */
.sp-wallet-mobile { display: flex; }

/* ============================================================
   DESKTOP LAYOUT (>= 768px)
   Single horizontal row
   ============================================================ */
@media (min-width: 768px) {
    .sp-home-header {
        background: var(--sph-desk-bg);
        border-bottom: 1px solid #E5E7EB;
        box-shadow: 0 1px 8px rgba(0,0,0,0.07);
        padding: 0 24px;
        flex-direction: row;
        align-items: center;
        gap: 20px;
        height: 64px;
    }

    /* Row 1 is the whole desktop header */
    .sp-header-row1 {
        flex: 1;
        align-items: center;
        justify-content: flex-start;
        gap: 20px;
        height: 100%;
    }

    /* Left block: logo + location side by side */
    .sp-header-left-block {
        flex-direction: row;
        align-items: center;
        gap: 16px;
        flex-shrink: 0;
        flex: 0 0 auto;
    }

    .sp-brand-bold,
    .sp-brand-light { font-size: 1.3rem; }

    /* Location pill */
    .sp-home-location {
        background: #F3F4F6;
        border: 1px solid #E5E7EB;
        border-radius: 10px;
        padding: 7px 12px;
        min-width: 160px;
        max-width: 240px;
    }
    .sp-loc-title   { font-size: 13px; }
    .sp-loc-subtitle { font-size: 11px; max-width: 190px; }

    /* Desktop search: takes remaining space */
    .sp-search-desktop {
        display: flex;
        flex: 1;
        min-width: 0;
        border-color: #E5E7EB;
        background: #F9FAFB;
    }
    .sp-search-desktop:focus-within {
        border-color: var(--sph-blue);
        background: #fff;
    }

    /* Hide mobile elements */
    .sp-wallet-mobile { display: none; }
    .sp-header-row2   { display: none; }

    /* Desktop bookmark button */
    .sp-bookmark-desktop {
        display: flex;
        width: 40px;
        height: 40px;
        border-radius: 10px;
        border: 1.5px solid #E5E7EB;
        color: #374151;
        font-size: 18px;
        background: transparent;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: background 0.15s, border-color 0.15s;
        flex-shrink: 0;
    }
    .sp-bookmark-desktop:hover { background: #F3F4F6; border-color: #D1D5DB; }

    .sp-home-actions { padding-top: 0; gap: 12px; }
    .sp-home-profile-btn { width: 40px; height: 40px; font-size: 14px; }
}

/* ============================================================
   SP LOCATION PANEL — Refined to match target design
   ============================================================ */

/* Panel width: 300px on desktop, 92% on mobile */
.sp-location-view {
    max-width: 300px !important;
    background: #ffffff !important;
    border-radius: 0 16px 16px 0 !important;
}
@media (max-width: 767px) {
    .sp-location-view {
        max-width: 88% !important;
        border-radius: 0 20px 20px 0 !important;
    }
}

/* Panel header: clean white with border bottom */
.sp-loc-panel-header {
    background: #ffffff !important;
    border-bottom: 1px solid #F0F2F1 !important;
    padding: 20px 16px 16px !important;
    gap: 12px !important;
}
.sp-loc-panel-header h2 {
    font-size: 17px !important;
    font-weight: 800 !important;
    color: #111827 !important;
}
.sp-loc-back-btn {
    color: #111827 !important;
    font-size: 18px !important;
}

/* Scroll area white */
.sp-loc-scroll {
    background: #ffffff !important;
    padding: 14px 14px 60px !important;
}

/* Search box */
.sp-loc-search-box {
    background: #F3F4F6 !important;
    border: 1px solid #E5E7EB !important;
    border-radius: 10px !important;
    height: 46px !important;
    margin-bottom: 16px !important;
    padding: 0 12px !important;
}
.sp-loc-search-box input { font-size: 13px !important; }

/* Action cards grid */
.sp-loc-action-grid {
    gap: 8px !important;
    margin-bottom: 20px !important;
}
.sp-loc-action-card {
    background: #ffffff !important;
    border: 1px solid #E5E7EB !important;
    border-radius: 12px !important;
    padding: 12px 8px !important;
    gap: 8px !important;
    align-items: flex-start !important;
}
.sp-loc-action-card i {
    font-size: 18px !important;
}
.sp-loc-action-card span {
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #374151 !important;
    line-height: 1.4 !important;
}

/* Saved section label */
.sp-saved-title {
    font-size: 10px !important;
    font-weight: 800 !important;
    color: #9CA3AF !important;
    letter-spacing: 1px !important;
    margin-bottom: 8px !important;
}

/* Saved cards */
.sp-saved-card {
    background: #ffffff !important;
    border: 1px solid #F0F2F1 !important;
    border-radius: 12px !important;
    padding: 12px !important;
    gap: 10px !important;
    margin-bottom: 8px !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04) !important;
}

/* Saved icon box: navigation arrow style */
.sp-saved-icon-box {
    background: #F3F4F6 !important;
    border: 1px solid #E5E7EB !important;
    border-radius: 10px !important;
    width: 46px !important;
    height: 46px !important;
    color: #374151 !important;
    flex-direction: column !important;
    gap: 2px !important;
}
.sp-saved-icon-box i { font-size: 14px !important; color: #374151 !important; }
.sp-saved-icon-box span { font-size: 9px !important; font-weight: 800 !important; color: #374151 !important; }

/* Card header */
.sp-saved-card-header h3 { font-size: 14px !important; font-weight: 800 !important; }
.sp-selected-badge {
    font-size: 9px !important;
    font-weight: 800 !important;
    background: #DCFCE7 !important;
    color: #16a34a !important;
    padding: 2px 5px !important;
    border-radius: 4px !important;
}
.sp-saved-details p {
    font-size: 11px !important;
    color: #6B7280 !important;
    line-height: 1.5 !important;
}

/* 3-dot menu button */
.sp-saved-menu-btn { font-size: 16px !important; color: #9CA3AF !important; }

/* ============================================================
   SP ADDRESS CARD DROPDOWN — Edit / Delete only
   ============================================================ */
.sp-saved-dropdown {
    position: absolute !important;
    top: 28px !important;
    right: 0 !important;
    background: #1C1D22 !important;
    border-radius: 12px !important;
    padding: 4px 0 !important;
    width: 140px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25) !important;
    display: none !important;
    z-index: 500 !important;
    overflow: hidden !important;
}
.sp-saved-dropdown.active {
    display: block !important;
}

.sp-dropdown-item {
    padding: 12px 16px !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    color: #ffffff !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: background 0.15s !important;
    font-family: 'Manrope', sans-serif !important;
}
.sp-dropdown-item:hover {
    background: #2a2c33 !important;
}
.sp-dropdown-item i {
    font-size: 16px !important;
    color: #D1D5DB !important;
    width: 16px !important;
    flex-shrink: 0 !important;
}

/* Edit item — normal white */
.sp-dd-edit i { color: #D1D5DB !important; }

/* Delete item — red accent */
.sp-dd-delete { color: #FCA5A5 !important; }
.sp-dd-delete i { color: #F87171 !important; }
.sp-dd-delete:hover { background: #2d1515 !important; }

/* Separator between edit and delete */
.sp-dd-edit {
    border-bottom: 1px solid #2a2c33 !important;
}

/* ============================================================
   SP EDIT ADDRESS PANEL — Pin your Location
   ============================================================ */
.sp-edit-address-view {
    position: fixed !important;
    top: 0 !important; left: 0 !important;
    width: 92% !important;
    max-width: 300px !important;
    height: 100vh !important;
    height: 100dvh !important;
    background: #ffffff !important;
    z-index: 1015 !important;
    transform: translateX(-110%) !important;
    transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    box-shadow: 4px 0 24px rgba(0,0,0,0.18) !important;
    border-radius: 0 16px 16px 0 !important;
}
.sp-edit-address-view.active {
    transform: translateX(0) !important;
}

/* Header */
.sp-ea-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 16px 14px;
    background: #ffffff;
    border-bottom: 1px solid #F0F2F1;
    flex-shrink: 0;
}
.sp-ea-header h2 {
    font-size: 17px;
    font-weight: 800;
    color: #111827;
}

/* Scroll area */
.sp-ea-scroll {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 80px;
}
.sp-ea-scroll::-webkit-scrollbar { display: none; }

/* Map thumbnail */
.sp-map-placeholder {
    width: 100%;
    height: 160px;
    background: #e8ebe8;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}
#sp-small-map {
    width: 100%;
    height: 100%;
    z-index: 1;
}
.sp-map-move-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 500;
    background: #fff;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
    color: #1E6FE8;
    box-shadow: 0 2px 10px rgba(0,0,0,0.18);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    border: 1px solid rgba(0,0,0,0.06);
    font-family: 'Manrope', sans-serif;
}
.sp-map-move-btn i { font-size: 11px; }

/* Form */
.sp-addr-form {
    padding: 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sp-float-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.sp-float-group label {
    font-size: 11px;
    font-weight: 700;
    color: #9CA3AF;
    letter-spacing: 0.3px;
}
.sp-float-group input {
    width: 100%;
    height: 44px;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    outline: none;
    transition: border-color 0.2s;
    background: #fff;
    font-family: 'Manrope', sans-serif;
}
.sp-float-group input::placeholder { color: #9CA3AF; font-weight: 500; }
.sp-float-group input:focus { border-color: #ff5200; }

/* Area/locality row */
.sp-area-inner {
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    padding: 8px 8px 8px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
}
.sp-area-text {
    flex: 1;
    font-size: 11px;
    font-weight: 500;
    color: #6B7280;
    line-height: 1.4;
}
.sp-area-change-btn {
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    color: #ff5200;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s;
}
.sp-area-change-btn:hover { background: #FFF4EE; }
.sp-area-change-btn i { font-size: 14px; }
.sp-area-change-btn span { font-size: 10px; font-weight: 800; }

/* Confirm bottom bar */
.sp-addr-confirm-bar {
    position: sticky;
    bottom: 0;
    background: #fff;
    padding: 12px 14px 20px;
    border-top: 1px solid #F0F2F1;
    flex-shrink: 0;
}
.sp-confirm-btn {
    width: 100%;
    height: 50px;
    background: #ff5200;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s;
    font-family: 'Manrope', sans-serif;
}
.sp-confirm-btn:hover { opacity: 0.9; }
.sp-confirm-btn:active { opacity: 0.8; }
/* =================================================================