/* =====================================================
   STAYZIO — Mobile Responsive & UI Fixes
   Covers: Home, Listing, Detail, Room Cards, User Dashboard
   ===================================================== */

/* ── Couple Friendly badge color ── */
.img-badge.pink {
  background: rgba(236, 72, 153, 0.92);
  color: #fff;
}

/* ── Duration tabs — clearer pricing display ── */
.duration-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.dtab {
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  flex: 1;
  min-width: 64px;
  transition: border-color .15s, background .15s;
}
.dtab.active, .dtab:hover {
  border-color: var(--red, #e31e24);
  background: rgba(227,30,36,.04);
}
.dtab-label {
  font-size: 10px;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: .04em;
  line-height: 1;
}
.dtab-price {
  font-size: 14px;
  font-weight: 800;
  color: #111827;
  line-height: 1.3;
  margin-top: 2px;
}
.dtab.active .dtab-price { color: var(--red, #e31e24); }
.dtab-sub {
  font-size: 9px;
  color: #9ca3af;
  margin-top: 1px;
}

/* ── Hotel card image height fix on mobile ── */
.hotel-card .card-img-wrap img.hotel-card-main-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 12px 12px 0 0;
}

/* =====================================================
   BASE MOBILE: 768px and below
   ===================================================== */
@media (max-width: 768px) {

  /* ── Navbar / Header ── */
  .navbar, header nav, .header-area {
    padding: 8px 16px !important;
  }
  .navbar-brand img, .logo img {
    max-height: 32px;
  }
  
  /* ── HERO SECTION ── */
  .hero-section {
    min-height: auto !important;
    padding: 60px 0 32px !important;
  }
  .hero-content h1 {
    font-size: 1.8rem !important;
    line-height: 1.2 !important;
    margin-bottom: 8px !important;
  }
  .hero-content p {
    font-size: 0.9rem !important;
  }
  
  /* ── SEARCH BOX ── */
  .search-box {
    flex-direction: column !important;
    gap: 0 !important;
    border-radius: 14px !important;
    padding: 12px !important;
  }
  .search-item1, .search-item2, .search-item3 {
    width: 100% !important;
    border-right: none !important;
    border-bottom: 1px solid #e5e7eb !important;
    padding: 10px 12px !important;
  }
  .divider1, .divider2 {
    display: none !important;
  }
  .search-box .search-btn, .search-box button[type="submit"] {
    width: 100% !important;
    margin-top: 8px !important;
    border-radius: 10px !important;
  }
  
  /* ── CITY SECTION ── */
  .city-section .row, .city-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
  
  /* ── FEATURED / POPULAR SECTIONS ── */
  .featured-section .col-lg-4,
  .featured-section .col-md-6 {
    width: 100% !important;
    padding: 0 !important;
    margin-bottom: 16px !important;
  }
  
  /* ── LISTING PAGE LAYOUT ── */
  .main-layout {
    flex-direction: column !important;
    gap: 0 !important;
  }
  
  /* Sidebar — mobile: slide-in drawer */
  .sidebar {
    position: fixed !important;
    top: 0 !important;
    left: -100% !important;
    width: 85vw !important;
    max-width: 320px !important;
    height: 100vh !important;
    z-index: 9999 !important;
    overflow-y: auto !important;
    transition: left .28s ease !important;
    box-shadow: 4px 0 24px rgba(0,0,0,.15) !important;
    padding-top: 56px !important;
  }
  .sidebar.open {
    left: 0 !important;
  }
  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 9998;
  }
  .sidebar-backdrop.show { display: block; }
  
  /* Mobile filter toggle button */
  .mobile-filter-btn {
    display: flex !important;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 14px;
  }
  
  /* Results panel takes full width */
  .results-panel {
    width: 100% !important;
    padding: 0 12px !important;
  }
  
  /* ── HOTEL/ROOM CARDS ── */
  .hotels-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
  }
  .hotel-card {
    border-radius: 12px !important;
    overflow: hidden !important;
  }
  .hotel-card .card-img-wrap img.hotel-card-main-img {
    height: 180px !important;
  }
  .card-body {
    padding: 12px !important;
  }
  .card-name a {
    font-size: 15px !important;
  }
  .duration-tabs {
    flex-wrap: wrap !important;
    gap: 5px !important;
  }
  .dtab {
    min-width: 58px !important;
    padding: 5px 8px !important;
  }
  .dtab-price { font-size: 13px !important; }
  .book-actions {
    flex-direction: column !important;
    gap: 8px !important;
  }
  .btn-book, .btn-view-more {
    width: 100% !important;
    text-align: center !important;
    padding: 10px 0 !important;
  }
  
  /* ── SORT BAR ── */
  .sort-bar {
    flex-direction: column !important;
    gap: 8px !important;
    padding: 10px 12px !important;
  }
  .sort-left {
    flex-wrap: wrap !important;
    gap: 6px !important;
  }
  
  /* ── DETAIL PAGE ── */
  .page-body {
    flex-direction: column !important;
    gap: 0 !important;
  }
  .page-body .left,
  .page-body > div:first-child {
    width: 100% !important;
    padding: 0 12px !important;
  }
  
  /* Booking widget — bottom drawer on mobile */
  .right-col {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 999 !important;
    background: #fff !important;
    border-radius: 20px 20px 0 0 !important;
    box-shadow: 0 -8px 40px rgba(0,0,0,.15) !important;
    max-height: 88vh !important;
    overflow-y: auto !important;
    padding: 0 !important;
    width: 100% !important;
  }
  .bwidget {
    border-radius: 0 !important;
    border: none !important;
    padding-bottom: 24px !important;
  }
  .bwidget.mobile-collapsed .bw-form,
  .bwidget.mobile-collapsed .bw-cta-wrap,
  .bwidget.mobile-collapsed .bw-summary,
  .bwidget.mobile-collapsed .bw-addons {
    display: none !important;
  }
  .bwidget.mobile-collapsed .bw-dtabs,
  .bwidget.mobile-collapsed > div > div {
    /* Show on expand */
  }
  /* Drag handle for mobile bottom drawer */
  .right-col::before {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    margin: 10px auto 0;
  }
  
  /* Mobile CTA tab nav */
  .tab-nav {
    top: 0 !important;
    z-index: 100 !important;
  }
  .tab-nav-inner {
    padding: 8px 12px !important;
    gap: 8px !important;
  }
  .tab-list {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    gap: 4px !important;
    scrollbar-width: none;
  }
  .tab-list::-webkit-scrollbar { display: none; }
  .tab-item {
    white-space: nowrap !important;
    padding: 6px 10px !important;
    font-size: 11px !important;
  }
  .tab-book-cta {
    flex-shrink: 0 !important;
    padding: 8px 14px !important;
    font-size: 13px !important;
  }
  
  /* Gallery grid mobile */
  .gallery-grid {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto !important;
    height: auto !important;
  }
  .gallery-main, .gallery-thumb {
    grid-column: 1 !important;
    grid-row: auto !important;
    height: 220px !important;
  }
  .gallery-thumb:nth-child(n+3) {
    display: none !important;
  }
  
  /* Section cards */
  .scard {
    margin: 0 0 12px !important;
    border-radius: 10px !important;
  }
  
  /* Amenity grid */
  .am-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
  
  /* Similar rooms */
  .sim-row {
    display: flex !important;
    overflow-x: auto !important;
    gap: 12px !important;
    padding-bottom: 8px !important;
    scrollbar-width: none;
  }
  .sim-row::-webkit-scrollbar { display: none; }
  .sim-card {
    min-width: 180px !important;
    flex-shrink: 0 !important;
  }
  
  /* Restrictions grid */
  .rest-grid {
    grid-template-columns: 1fr !important;
  }
  
  /* Map height */
  .map-canvas {
    height: 250px !important;
  }
  
  /* ── USER DASHBOARD ── */
  .hero-banner .hero-inner {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
    padding: 20px 16px !important;
  }
  .profile-card-wrap {
    padding: 0 12px 80px !important;
  }
  .pc-layout {
    flex-direction: column !important;
  }
  .pc-sidebar {
    position: fixed !important;
    top: 0 !important;
    left: -100% !important;
    width: 80vw !important;
    height: 100vh !important;
    z-index: 9999 !important;
    transition: left .25s ease !important;
    overflow-y: auto !important;
  }
  .pc-sidebar.open { left: 0 !important; }
  .menu-btn { display: flex !important; }
  .pf-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .pf-grid-2, .pf-grid-3 {
    grid-template-columns: 1fr !important;
  }
  
  /* Booking cards in dashboard */
  .pf-section > div > div[style*="border:1.5px solid"] {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
  }
  .pf-section > div > div > div[style*="text-align:right"] {
    text-align: left !important;
    width: 100% !important;
  }
  
  /* ── CHECKOUT PAGE ── */
  .shopping-area .row {
    flex-direction: column !important;
  }
  .shopping-area .col-lg-8,
  .shopping-area .col-lg-4 {
    width: 100% !important;
    padding: 0 !important;
  }
  
  /* ── GENERAL ── */
  .container {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  .col-lg-4, .col-lg-6, .col-lg-8, .col-lg-3 {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
  }
  .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  
  /* Typography scale-down */
  h1 { font-size: 1.75rem !important; }
  h2 { font-size: 1.4rem !important; }
  h3 { font-size: 1.15rem !important; }
  h4 { font-size: 1rem !important; }
}

/* =====================================================
   TABLET: 769px — 1024px
   ===================================================== */
@media (min-width: 769px) and (max-width: 1024px) {
  
  .search-box {
    flex-wrap: wrap !important;
    gap: 8px !important;
    padding: 12px !important;
  }
  .search-item1, .search-item2 {
    flex: 1 1 calc(50% - 4px) !important;
  }
  .search-item3 {
    flex: 1 1 auto !important;
  }
  
  .main-layout {
    gap: 16px !important;
  }
  .sidebar {
    width: 240px !important;
    min-width: 240px !important;
  }
  
  .hotel-card .card-img-wrap img.hotel-card-main-img {
    height: 180px !important;
  }
  
  .page-body {
    gap: 16px !important;
  }
  .right-col {
    width: 300px !important;
    min-width: 300px !important;
  }
  
  .gallery-thumb:nth-child(n+5) {
    display: none !important;
  }
  
  .kpi-grid.g4 {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* =====================================================
   MOBILE FILTER BUTTON — hidden on desktop
   ===================================================== */
.mobile-filter-btn {
  display: none;
}

/* =====================================================
   BOTTOM BOOKING BAR — mobile fixed
   ===================================================== */
.mobile-booking-bar {
  display: none;
}
@media (max-width: 768px) {
  .mobile-booking-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #fff;
    border-top: 1.5px solid #e5e7eb;
    padding: 10px 16px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-shadow: 0 -4px 20px rgba(0,0,0,.1);
  }
  .mobile-booking-bar .mb-price {
    font-family: 'Syne', sans-serif;
    font-size: 1.1rem;
    font-weight: 800;
    color: #111;
  }
  .mobile-booking-bar .mb-price small {
    font-size: .72rem;
    color: #6b7280;
    font-weight: 400;
  }
  .mobile-booking-bar .mb-cta {
    background: #e31e24;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 12px 24px;
    font-size: .9rem;
    font-weight: 800;
    cursor: pointer;
    flex-shrink: 0;
  }
  /* Push page content above fixed bar */
  body { padding-bottom: 72px !important; }
}

/* =====================================================
   EXPANDED BOOKING WIDGET on mobile
   ===================================================== */
@media (max-width: 768px) {
  .bwidget-expand-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px;
    cursor: pointer;
    border-bottom: 1.5px solid #f3f4f6;
    font-size: 13px;
    font-weight: 700;
    color: #374151;
  }
  .bwidget-expand-btn i { color: #e31e24; }
}
.bwidget-expand-btn { display: none; }

/* =====================================================
   STAYZIO CUSTOM SCROLLBAR
   ===================================================== */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* =====================================================
   IMG BADGES  
   ===================================================== */
.img-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  z-index: 2;
}
.img-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 10.5px;
  font-weight: 700;
  backdrop-filter: blur(4px);
}
.img-badge.red { background: rgba(227,30,36,.88); color: #fff; }
.img-badge.green { background: rgba(16,185,129,.9); color: #fff; }
.img-badge.pink { background: rgba(236,72,153,.9); color: #fff; }

/* =====================================================
   CARD TAG  
   ===================================================== */
.ctag.highlight { background: #dcfce7; color: #15803d; font-weight: 700; }
.ctag { background: #f3f4f6; color: #374151; padding: 3px 8px; border-radius: 5px; font-size: 11px; }
