/* ==========================================================
   HelloProMark - Responsive Design Stylesheet
   Mobile-First & Adaptive Breakpoints: 1400px, 1200px, 992px, 768px, 576px, 420px, 360px
   ========================================================== */

/* Global Mobile Overflow Guard */
html, body {
  overflow-x: hidden !important;
  max-width: 100% !important;
  width: 100% !important;
  position: relative;
}

*, *::before, *::after {
  box-sizing: border-box;
}

.container, .container-fluid {
  max-width: 100%;
  padding-left: 14px;
  padding-right: 14px;
}

/* Large Desktop Adjustments */
@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }
}

/* Large Displays (under 1200px) */
@media (max-width: 1199.98px) {
  .header-metrics-wrap {
    gap: 10px;
  }
  .header-metric-item {
    padding: 0 6px;
  }
  .hero-title-main {
    font-size: 2.1rem;
  }
  .hero-right-script-quote {
    font-size: 1.75rem;
  }
  .why-choose-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

/* Tablet & Medium Screens (< 992px) */
@media (max-width: 991.98px) {
  .top-announcement-bar {
    text-align: center;
    padding: 6px 0;
  }
  .top-announcement-bar .d-flex {
    justify-content: center !important;
  }
  
  .header-metrics-wrap {
    display: none !important;
  }

  /* Header Top Bar Mobile Styles */
  .promark-top-header {
    padding: 6px 0;
  }
  .promark-top-header .brand-logo-img {
    height: 40px !important;
  }
  .promark-top-header .container-fluid {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  .promark-top-header .d-flex.gap-3 {
    gap: 8px !important;
  }
  #header-auth-section .dropdown .btn-outline-promark,
  .header-user-btn {
    padding: 4px 10px !important;
    font-size: 0.78rem !important;
    height: 34px !important;
    white-space: nowrap !important;
  }
  .promark-top-header .btn-post-property-v2,
  .promark-top-header #header-post-property-btn {
    display: none !important;
  }
  .promark-top-header a[href^="tel:"] span {
    display: none;
  }
  @media (min-width: 576px) {
    .promark-top-header a[href^="tel:"] span {
      display: inline !important;
    }
  }

  .hero-promark-v2 {
    padding: 24px 0 40px;
    text-align: center;
    background: linear-gradient(180deg, rgba(5, 20, 48, 0.95) 0%, rgba(5, 20, 48, 0.88) 100%),
                url('../assets/hero-building.jpg') center / cover no-repeat;
  }

  .hero-title-main {
    font-size: 1.95rem;
    line-height: 1.2;
  }

  .hero-desc-v2 {
    margin: 0 auto 14px;
    font-size: 0.88rem;
  }

  .hero-trust-badges-row {
    justify-content: center;
    gap: 6px;
  }

  .hero-trust-pill {
    font-size: 0.74rem;
    padding: 3px 8px;
  }

  .hero-right-col {
    margin-top: 20px;
    text-align: center !important;
  }

  .hero-right-script-quote {
    text-align: center !important;
  }

  .hero-right-tag-pill {
    text-align: center !important;
    margin: 0 auto;
  }

  .budget-grid-v2 {
    grid-template-columns: repeat(4, 1fr) !important;
  }

  .location-grid-v2 {
    grid-template-columns: repeat(4, 1fr) !important;
  }

  /* Sidebar Mobile Drawer */
  .dashboard-sidebar {
    transform: translateX(-100%);
  }

  .dashboard-sidebar.show-sidebar {
    transform: translateX(0);
  }

  .dashboard-main {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .dashboard-topbar {
    padding: 12px 16px !important;
    width: 100% !important;
  }

  .dashboard-content {
    padding: 16px 14px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .contact-pair-wrap {
    grid-template-columns: 1fr;
  }
}

/* Mobile Screens (< 768px) */
@media (max-width: 767.98px) {
  .hero-title-main {
    font-size: 1.65rem;
  }

  .hero-tagline-pills {
    font-size: 0.8rem;
    padding: 3px 10px;
  }

  .promark-navbar {
    padding: 10px 0;
  }

  .navbar-brand {
    font-size: 1.25rem;
  }

  /* Section Headers & Filter Tabs */
  .section-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 18px;
    width: 100%;
    max-width: 100%;
  }

  .section-header-title {
    font-size: 1.4rem !important;
  }

  .section-header-subtitle {
    font-size: 0.84rem;
  }

  .featured-header-actions {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .featured-filter-tabs {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    background: #F1F5F9;
    padding: 5px;
    border-radius: 10px;
  }

  .featured-tab-pill {
    font-size: 0.76rem;
    padding: 6px 10px;
    border-radius: 6px;
    flex: 1 1 auto;
    text-align: center;
    white-space: nowrap;
  }

  /* Mobile Search Card in Hero */
  .mobile-search-card {
    width: 100%;
    max-width: 100%;
    border-radius: 12px;
  }

  .mobile-search-card form {
    padding: 12px !important;
  }

  .mobile-quick-filters-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    max-width: 100%;
    scrollbar-width: none;
  }

  .mobile-quick-filters-scroll::-webkit-scrollbar {
    display: none;
  }

  .mobile-chip-btn {
    font-size: 0.72rem;
    padding: 3px 8px;
    flex-shrink: 0;
  }

  /* Property Cards Mobile Tuning */
  .promark-property-card, .property-card-v2 {
    border-radius: 12px;
  }

  .card-media-wrapper {
    height: 190px;
  }

  .card-info-body {
    padding: 12px 14px;
  }

  .card-prop-title {
    font-size: 0.96rem;
  }

  .card-prop-price {
    font-size: 1.18rem;
  }

  .card-prop-chips-wrap {
    gap: 4px;
  }

  .card-chip-tag {
    font-size: 0.68rem;
    padding: 2px 6px;
  }

  .card-cta-row {
    gap: 6px;
  }

  .btn-card-view, .btn-card-enquire {
    font-size: 0.78rem;
    padding: 7px 10px;
  }

  /* Stat & Promo Cards */
  .stat-card {
    padding: 14px;
  }

  .stat-value {
    font-size: 1.5rem;
  }

  .promo-card-buyer {
    padding: 20px 16px;
  }

  .promo-checklist-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  /* Table Stack */
  .table-responsive-stack td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
  }

  .btn-promark, .btn-gold, .btn-outline-promark, .btn-outline-gold {
    padding: 8px 14px;
    font-size: 0.84rem;
  }

  /* Footer Responsive */
  .footer-stat-ribbon {
    padding: 10px 0 !important;
  }

  .footer-stat-ribbon-inner {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px 12px !important;
    align-items: center !important;
  }

  .footer-stat-ribbon-inner .footer-stat-item:last-child {
    grid-column: 1 / -1 !important;
    justify-self: center !important;
  }

  .footer-stat-item {
    font-size: 0.76rem !important;
    gap: 6px !important;
    white-space: normal !important;
  }

  .footer-stat-item i {
    font-size: 0.95rem !important;
    flex-shrink: 0;
  }

  .footer-dark-standard {
    padding: 32px 0 16px !important;
  }

  .footer-col-heading {
    margin-top: 12px;
    margin-bottom: 8px;
    font-size: 0.92rem;
  }
}

/* Small Mobile Screens (< 576px) */
@media (max-width: 575.98px) {
  .hero-title-main {
    font-size: 1.48rem;
  }

  .budget-grid-v2 {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 6px !important;
  }

  .budget-box-v2 {
    padding: 10px 6px;
  }

  .budget-box-icon {
    font-size: 1.2rem;
    margin-bottom: 3px;
  }

  .budget-box-label {
    font-size: 0.78rem;
  }

  .location-grid-v2 {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 6px !important;
  }

  .location-card-v2 {
    height: 65px;
    padding: 6px;
  }

  .location-card-text {
    font-size: 0.78rem;
  }

  .why-choose-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }

  .why-choose-card-v2 {
    padding: 14px 8px;
  }

  .why-choose-icon-v2 {
    width: 38px;
    height: 38px;
    font-size: 1.15rem;
    margin-bottom: 8px;
  }

  .why-choose-title {
    font-size: 0.84rem;
  }

  .why-choose-desc {
    font-size: 0.74rem;
    line-height: 1.35;
  }

  .footer-sub-bottom {
    text-align: center;
  }
}

/* Extra Small Mobile (< 440px) */
@media (max-width: 440px) {
  .promark-top-header .brand-logo-img {
    height: 36px !important;
  }
  #header-auth-section .dropdown .btn-outline-promark,
  .header-user-btn {
    padding: 4px 6px !important;
    font-size: 0.74rem !important;
  }
}

/* Very Small Mobile (< 380px) */
@media (max-width: 380px) {
  .hero-title-main {
    font-size: 1.35rem;
  }

  .hero-trust-pill {
    font-size: 0.7rem;
    padding: 2px 6px;
  }

  .why-choose-grid {
    grid-template-columns: 1fr !important;
  }

  .budget-box-label {
    font-size: 0.74rem;
  }
}

/* ==========================================================
   Property Details Page Mobile & Tablet Responsiveness
   ========================================================== */

/* Mobile Bottom Sticky Action Bar */
.detail-mobile-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #FFFFFF;
  border-top: 1px solid #E2E8F0;
  box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.1);
  padding: 8px 12px;
  z-index: 1040;
}

@media (max-width: 991.98px) {
  body[data-page="property-details"] {
    padding-bottom: 64px;
  }

  .property-details-page {
    padding: 16px 0 36px;
  }
  
  .detail-showcase-card {
    padding: 16px;
    border-radius: 14px;
    margin-bottom: 18px;
  }

  .detail-gallery-main {
    height: 320px;
  }

  .sidebar-sticky-wrap {
    position: static !important;
  }

  .sidebar-enquiry-card,
  .sidebar-contact-card,
  .sidebar-similar-card {
    padding: 18px 16px;
    border-radius: 14px;
    margin-bottom: 18px;
  }
}

@media (max-width: 767.98px) {
  .property-details-page {
    padding: 12px 0 28px;
  }

  .property-details-page .breadcrumb {
    font-size: 0.76rem;
    overflow-x: auto;
    white-space: nowrap;
    flex-wrap: nowrap;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    margin-bottom: 10px !important;
  }
  .property-details-page .breadcrumb::-webkit-scrollbar {
    display: none;
  }

  .detail-showcase-card {
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 14px;
  }

  /* Main Gallery Image */
  .detail-gallery-main {
    height: 240px;
    border-radius: 10px;
    margin-bottom: 8px;
  }

  .gallery-badge-verified {
    top: 8px;
    left: 8px;
    font-size: 0.65rem;
    padding: 3px 8px;
  }

  .gallery-counter-badge {
    bottom: 8px;
    left: 8px;
    font-size: 0.68rem;
    padding: 2px 7px;
  }

  .gallery-arrow-btn {
    width: 32px;
    height: 32px;
    font-size: 0.95rem;
  }
  .gallery-arrow-btn.prev-btn { left: 8px; }
  .gallery-arrow-btn.next-btn { right: 8px; }

  /* Thumbnails */
  .detail-thumbnails-row {
    gap: 4px;
  }
  .detail-thumb-box {
    height: 48px;
    border-radius: 6px;
  }
  .thumb-more-overlay {
    font-size: 0.65rem;
    padding: 1px;
  }
  .thumb-more-overlay .fw-bold {
    font-size: 0.72rem;
  }

  /* Hero Content */
  .detail-hero-title {
    font-size: 1.22rem;
    margin-top: 6px;
    margin-bottom: 4px;
    line-height: 1.25;
  }

  .detail-hero-loc {
    font-size: 0.8rem;
    margin-bottom: 8px;
  }

  .detail-hero-price {
    font-size: 1.45rem;
    margin-bottom: 2px;
  }

  .detail-hero-price-sub {
    font-size: 0.78rem;
    margin-bottom: 10px;
  }

  .detail-pills-row {
    gap: 5px;
    margin-bottom: 10px;
  }

  .detail-pill-chip {
    font-size: 0.72rem;
    padding: 3px 8px;
    border-radius: 6px;
  }

  .detail-highlights-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    margin-bottom: 10px;
  }

  .detail-highlight-tile {
    padding: 6px 8px;
    border-radius: 6px;
  }
  .detail-highlight-tile .hl-lbl {
    font-size: 0.68rem;
  }
  .detail-highlight-tile .hl-val {
    font-size: 0.8rem;
  }

  .detail-trust-callout {
    padding: 6px 10px;
    margin-bottom: 10px;
    border-radius: 6px;
  }

  .detail-actions-row {
    gap: 8px;
    justify-content: space-between;
    padding-top: 8px;
    margin-bottom: 12px;
  }
  .detail-action-link {
    font-size: 0.76rem;
    gap: 4px;
  }

  /* Section Cards */
  .detail-card-section {
    padding: 14px 12px;
    border-radius: 12px;
    margin-bottom: 14px;
  }

  .detail-section-heading {
    font-size: 1rem;
    margin-bottom: 12px;
    gap: 6px;
  }

  /* Specifications Table Stack */
  .overview-row {
    grid-template-columns: 1fr;
    border-bottom: none;
  }
  .overview-cell {
    grid-template-columns: 130px 1fr;
    padding: 8px 10px;
    font-size: 0.8rem;
    border-right: none;
    border-bottom: 1px solid #E2E8F0;
  }
  .overview-cell:last-child {
    border-bottom: 1px solid #E2E8F0;
  }
  .overview-row:last-child .overview-cell:last-child {
    border-bottom: none;
  }

  /* Amenities Grid */
  .amenities-grid-boxes {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }
  .amenity-box-item {
    padding: 10px 4px;
    min-height: 74px;
    border-radius: 8px;
  }
  .amenity-box-icon {
    font-size: 1.3rem;
    margin-bottom: 3px;
  }
  .amenity-box-title {
    font-size: 0.7rem;
    line-height: 1.15;
  }

  /* Builder Box */
  .builder-profile-box {
    flex-direction: column;
    align-items: flex-start !important;
    text-align: left !important;
    gap: 12px;
    padding: 12px 14px;
  }
  .builder-profile-box > div:last-child {
    align-items: flex-start !important;
    text-align: left !important;
    width: 100%;
  }
  .builder-profile-box .btn {
    width: 100%;
    text-align: center;
  }

  /* Bottom Skyline Banner */
  .detail-skyline-banner {
    padding: 22px 14px 18px;
  }
  .detail-skyline-banner-text {
    font-size: 1.15rem;
    text-align: center;
  }
}

@media (max-width: 575.98px) {
  .detail-gallery-main {
    height: 220px;
  }

  .detail-thumb-box {
    height: 44px;
  }

  .overview-cell {
    grid-template-columns: 115px 1fr;
    padding: 7px 8px;
    font-size: 0.76rem;
  }

  .amenities-grid-boxes {
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
  }

  .amenity-box-item {
    min-height: 70px;
  }

  .amenity-box-icon {
    font-size: 1.2rem;
  }

  .amenity-box-title {
    font-size: 0.68rem;
  }
}

@media (max-width: 440px) {
  .detail-gallery-main {
    height: 195px;
  }

  .detail-thumb-box {
    height: 38px;
  }

  .detail-hero-title {
    font-size: 1.12rem;
  }

  .detail-hero-price {
    font-size: 1.3rem;
  }

  .overview-cell {
    grid-template-columns: 105px 1fr;
    padding: 6px 6px;
    font-size: 0.74rem;
  }

  .amenities-grid-boxes {
    grid-template-columns: repeat(2, 1fr);
  }

  .key-features-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .key-feature-card {
    padding: 8px 12px;
  }
}
