/* ==========================================================================
       1. Global Styles & Variables
       ========================================================================== */
    :root {
      --primary-color: #0d3b66;     /* Deep navy blue */
      --secondary-color: #f4a261;   /* Warm sunlit gold */
      --accent-color: #2a9d8f;      /* Serene lake teal */
      --text-dark: #1d2d44;
      --text-muted: #6c757d;
      --bg-light: #f8f9fa;
      --white: #ffffff;
      --shadow-sm: 0 4px 6px rgba(0,0,0,0.05);
      --shadow-lg: 0 12px 24px rgba(0,0,0,0.12);
      --transition: all 0.3s ease-in-out;
      --radius: 12px;
    }

    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
      font-family: 'Plus Jakarta Sans', sans-serif;
    }

    html, body {
      width: 100%;
      overflow-x: hidden;
    }

    body {
      color: var(--text-dark);
      background-color: var(--bg-light);
      line-height: 1.6;
    }

    a {
      text-decoration: none;
      color: inherit;
    }

    img {
      max-width: 100%;
      height: auto;
      display: block;
    }

    /* Header & Navigation */
    header {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      background: rgba(255, 255, 255, 0.95);
      backdrop-filter: blur(10px);
      box-shadow: var(--shadow-sm);
      z-index: 1000;
    }

    .nav-container {
      max-width: 1200px;
      margin: 0 auto;
      padding: 1rem 2rem;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .logo {
      font-size: 1.5rem;
      font-weight: 700;
      color: var(--primary-color);
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }

    .logo i {
      color: var(--secondary-color);
    }

    /* Hamburger / Menu Toggle Button at the Right */
    .menu-toggle-btn {
      background: transparent;
      border: none;
      color: var(--primary-color);
      font-size: 1.75rem;
      cursor: pointer;
      padding: 0.5rem;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: var(--transition);
      z-index: 2001;
    }

    .menu-toggle-btn:hover {
      color: var(--secondary-color);
    }

    /* Top Sliding Navigation Overlay (Falls down from topmost pixel) */
    .top-nav-overlay {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      background: rgba(13, 59, 102, 0.97);
      backdrop-filter: blur(15px);
      z-index: 2000;
      transform: translateY(-100%);
      transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
      padding: 5rem 2rem 3rem;
      display: flex;
      flex-direction: column;
      align-items: center;
    }

    .top-nav-overlay.active {
      transform: translateY(0);
    }

    .top-nav-links {
      list-style: none;
      display: flex;
      flex-direction: column;
      gap: 1.8rem;
      text-align: center;
      width: 100%;
      max-width: 400px;
    }

    .top-nav-links a {
      color: var(--white);
      font-size: 1.4rem;
      font-weight: 600;
      transition: var(--transition);
      display: block;
      padding: 0.6rem;
      border-radius: 8px;
    }

    .top-nav-links a:hover {
      color: var(--secondary-color);
      background: rgba(255, 255, 255, 0.08);
      transform: translateY(-2px);
    }

    .close-nav-btn {
      position: absolute;
      top: 1.2rem;
      right: 2rem;
      background: transparent;
      border: none;
      color: var(--white);
      font-size: 2.2rem;
      cursor: pointer;
      transition: var(--transition);
    }

    .close-nav-btn:hover {
      color: var(--secondary-color);
    }

    .btn-primary {
      background: var(--primary-color);
      color: var(--white);
      padding: 0.6rem 1.4rem;
      border-radius: 30px;
      font-weight: 600;
      transition: var(--transition);
      border: none;
      cursor: pointer;
    }

    .btn-primary:hover {
      background: var(--accent-color);
    }

    /* Breadcrumbs */
    .breadcrumb-nav {
      max-width: 1200px;
      margin: 90px auto 1rem;
      padding: 0 2rem;
      font-size: 0.9rem;
      color: var(--text-muted);
    }

    .breadcrumb-nav a {
      color: var(--primary-color);
      font-weight: 500;
    }

    /* Main Details Layout */
    .container {
      max-width: 1200px;
      margin: 0 auto;
      padding: 0 2rem 5rem;
    }

    .apartment-header {
      display: flex;
      justify-content: space-between;
      align-items: flex-end;
      margin-bottom: 2rem;
      flex-wrap: wrap;
      gap: 1rem;
    }

    .apartment-header h1 {
      font-size: 2.2rem;
      color: var(--primary-color);
    }

    .apartment-header .location-tag {
      color: var(--text-muted);
      font-size: 1rem;
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }

    .price-tag {
      text-align: right;
    }

    .price-tag .amount {
      font-size: 2rem;
      font-weight: 700;
      color: var(--accent-color);
    }

    /* Gallery Grid Section */
    .gallery-grid {
      display: grid;
      grid-template-columns: 2fr 1fr 1fr;
      grid-template-rows: repeat(2, 200px);
      gap: 1rem;
      margin-bottom: 3rem;
      border-radius: var(--radius);
      overflow: hidden;
    }

    .gallery-item {
      position: relative;
      cursor: pointer;
      overflow: hidden;
      min-height: 150px;
    }

    .gallery-item img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: var(--transition);
    }

    .gallery-item:hover img {
      transform: scale(1.05);
    }

    .gallery-item.main {
      grid-column: 1 / 2;
      grid-row: 1 / 3;
    }

    .more-overlay {
      position: absolute;
      inset: 0;
      background: rgba(13, 59, 102, 0.7);
      color: var(--white);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.2rem;
      font-weight: 700;
    }

    /* Content & Sidebar Layout */
    .details-layout {
      display: grid;
      grid-template-columns: 2fr 1fr;
      gap: 3rem;
    }

    .section-box {
      background: var(--white);
      padding: 2rem;
      border-radius: var(--radius);
      box-shadow: var(--shadow-sm);
      margin-bottom: 2rem;
    }

    .section-box h3 {
      font-size: 1.4rem;
      color: var(--primary-color);
      margin-bottom: 1rem;
      border-bottom: 2px solid var(--bg-light);
      padding-bottom: 0.5rem;
    }

    .specs-strip {
      display: flex;
      flex-wrap: wrap;
      gap: 1.5rem 2rem;
      margin-bottom: 1.5rem;
      background: var(--bg-light);
      padding: 1rem 1.5rem;
      border-radius: var(--radius);
    }

    .spec-item {
      display: flex;
      align-items: center;
      gap: 0.6rem;
      font-weight: 600;
      color: var(--primary-color);
    }

    .spec-item i {
      color: var(--secondary-color);
      font-size: 1.2rem;
    }

    /* Amenities Grid */
    .amenities-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
      gap: 1.2rem;
    }

    .amenity-card {
      display: flex;
      align-items: center;
      gap: 0.8rem;
      color: var(--text-dark);
      font-size: 0.95rem;
    }

    .amenity-card i {
      color: var(--accent-color);
      font-size: 1.1rem;
    }

    /* Booking Sidebar Form */
    .booking-card {
      background: var(--white);
      padding: 2rem;
      border-radius: var(--radius);
      box-shadow: var(--shadow-lg);
      position: sticky;
      top: 100px;
    }

    .booking-card h3 {
      color: var(--primary-color);
      margin-bottom: 1.5rem;
    }

    .form-group {
      margin-bottom: 1.2rem;
    }

    .form-group label {
      display: block;
      font-size: 0.85rem;
      font-weight: 600;
      margin-bottom: 0.4rem;
    }

    .form-group input, .form-group textarea {
      width: 100%;
      padding: 0.7rem;
      border: 1px solid #ccc;
      border-radius: 6px;
      font-size: 0.95rem;
    }

    /* ==========================================================================
       Interactive Custom Image Lightbox Gallery
       ========================================================================== */
    .lightbox-modal {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.9);
      z-index: 3000;
      flex-direction: column;
      justify-content: space-between;
      align-items: center;
      padding: 1.5rem 1rem;
    }

    .lightbox-header {
      width: 100%;
      display: flex;
      justify-content: space-between;
      align-items: center;
      color: white;
      max-width: 1000px;
    }

    .lightbox-tools {
      display: flex;
      gap: 0.8rem;
      align-items: center;
    }

    .tool-btn {
      background: rgba(255, 255, 255, 0.2);
      border: none;
      color: white;
      width: 40px;
      height: 40px;
      border-radius: 50%;
      font-size: 1.2rem;
      cursor: pointer;
      transition: var(--transition);
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .tool-btn:hover {
      background: var(--secondary-color);
    }

    .close-lightbox {
      font-size: 2.2rem;
      cursor: pointer;
      color: white;
      margin-left: 0.5rem;
    }

    .lightbox-viewport {
      position: relative;
      width: 100%;
      max-width: 900px;
      height: 60vh;
      display: flex;
      align-items: center;
      justify-content: center;
      overflow: hidden;
    }

    .lightbox-viewport img {
      max-width: 100%;
      max-height: 100%;
      object-fit: contain;
      transition: transform 0.2s ease-out;
      border-radius: 8px;
    }

    .nav-arrow {
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      background: rgba(0, 0, 0, 0.5);
      color: white;
      border: none;
      font-size: 1.5rem;
      padding: 1rem 0.8rem;
      cursor: pointer;
      border-radius: 8px;
      transition: var(--transition);
      z-index: 10;
    }

    .nav-arrow:hover {
      background: var(--accent-color);
    }

    .nav-arrow.prev { left: 10px; }
    .nav-arrow.next { right: 10px; }

    /* Thumbnails Bottom Bar */
    .thumbnail-bar {
      display: flex;
      gap: 10px;
      overflow-x: auto;
      max-width: 900px;
      width: 100%;
      padding: 0.5rem;
      justify-content: flex-start;
    }

    .thumb {
      width: 70px;
      height: 50px;
      flex-shrink: 0;
      object-fit: cover;
      border-radius: 6px;
      cursor: pointer;
      opacity: 0.5;
      transition: var(--transition);
      border: 2px solid transparent;
    }

    .thumb.active, .thumb:hover {
      opacity: 1;
      border-color: var(--secondary-color);
    }

    /* Footer */
    footer {
      background: var(--primary-color);
      color: var(--white);
      padding: 2rem;
      text-align: center;
    }

    /* Optional Bottom Banner Image */
    .extra-image-wrap {
      max-width: 1200px;
      margin: 0 auto 3rem;
      padding: 0 2rem;
    }

    .extra-image-wrap img {
      width: 100%;
      max-height: 450px;
      object-fit: cover;
      border-radius: var(--radius);
      box-shadow: var(--shadow-sm);
    }

    /* ==========================================================================
       Responsive Media Queries
       ========================================================================== */
    @media (max-width: 992px) {
      .details-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
      }

      .booking-card {
        position: static;
      }
    }

    @media (max-width: 768px) {
      .nav-container {
        padding: 0.8rem 1rem;
      }

      .breadcrumb-nav {
        margin-top: 90px;
        padding: 0 1rem;
      }

      .container {
        padding: 0 1rem 3rem;
      }

      .apartment-header {
        flex-direction: column;
        align-items: flex-start;
      }

      .apartment-header h1 {
        font-size: 1.75rem;
      }

      .price-tag {
        text-align: left;
      }

      .price-tag .amount {
        font-size: 1.6rem;
      }

      .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
      }

      .gallery-item {
        height: 160px;
      }

      .gallery-item.main {
        grid-column: 1 / -1;
        grid-row: auto;
        height: 240px;
      }

      .specs-strip {
        gap: 1rem;
        padding: 1rem;
      }

      .spec-item {
        font-size: 0.9rem;
      }

      .amenities-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
      }

      .section-box {
        padding: 1.25rem;
      }

      .booking-card {
        padding: 1.25rem;
      }

      .lightbox-modal {
        padding: 1rem 0.5rem;
      }

      .lightbox-viewport {
        height: 50vh;
      }

      .nav-arrow {
        padding: 0.6rem 0.5rem;
        font-size: 1.2rem;
      }

      .extra-image-wrap {
        padding: 0 1rem;
        margin-bottom: 2rem;
      }
    }

    @media (max-width: 480px) {
      .gallery-grid {
        grid-template-columns: 1fr;
      }

      .gallery-item.main {
        height: 200px;
      }

      .gallery-item {
        height: 180px;
      }

      .tool-btn {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
      }

      .close-lightbox {
        font-size: 1.8rem;
      }
    }