/* ===== BASE ===== */
body {
    margin: 0;
    background-color: #f5f0f0;
    color: #312f2f;
    overflow-x: hidden;
    background-image: url("images/texture.jpg");
    background-repeat: repeat;
    background-size: auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  }
  
  /* ===== HEADER ===== */
  .header {
    top: 0;
    z-index: 1000;      
    min-height: 100px;
    padding: 12px 24px;
    background-color: #312f2f;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    z-index: 20;
  }
  
  /* LOGO */
  .logo {
    font-size: 3em;
    font-weight: bold;
    white-space: nowrap;
    font-family: Montserrat;
  }
  
  .logo a {
    text-decoration: none;
    color: #edecec;
  }
  
  /* CONTACT TEXT */
  .header-contact {
    flex: 1 1 420px;
    max-width: 700px;
    text-align: center;
    font-size: 1.1em;
    color: white;
    line-height: 1.4;
  }

  .header a {
    cursor: pointer;
    transition: opacity 0.2s ease, text-shadow 0.2s ease;
  }

  .header-contact a {
    cursor: pointer;
    transition: opacity 0.2s ease, text-shadow 0.2s ease;
    color: white;
    text-decoration: none;
  }

  .header-contact a:hover {
    opacity: 0.6;
    text-decoration: underline;
    text-shadow: 0 0 0 currentColor;
  }
  
  .header a:hover {
    opacity: 0.6;
    text-shadow: 0 0 0 currentColor;
  }
  
  /* NAV LINKS */
  .nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    justify-content: center;
    align-items: center;
  }

  .nav-bold {
    font-size: 1.4em;
    font-weight: 1000;
    text-decoration: underline;
  }
  
  .nav-links a {
    text-decoration: none;
    color: #e2d7d7;
    font-size: 1.3em;
    white-space: nowrap;
    padding: 15px;
  }



  /* ===== GALLERY ===== */
  .gallery {
    padding: 100px;
    column-count: 4;
    width: 100vw;
    box-sizing: border-box;
    gap: 100px;
    position: relative;
    z-index: 1;
  }
  
  .art-card {
    break-inside: avoid;
  }
  
  .gallery img {
    width: 100%;
    height: auto;
    display: block;
    box-shadow:
      0 8px 18px rgba(0, 0, 0, 0.3),
      0 2px 4px rgba(0, 0, 0, 0.2),
      inset 0 -1px 0 rgba(255, 255, 255, 0.1);
    border-radius: 3px;
  }

  .status {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .status-dot.available {
    color: #2ecc70d0;
    display: flex;
    align-items: center;
  }
  
  .status-dot.unavailable {
    color: #e74d3cc4;
    display: flex;
    align-items: center;
  }


  .no-shadow {
    box-shadow: none !important;
  }
  
  .art-meta {
    margin-top: 20px;
    font-size: 1.2em;
    opacity: 0.9;
    width: 70%;
    color: rgb(35, 33, 33);
    background-color: rgba(242, 238, 238, 0.82);
    margin-bottom: 100px;
    padding: 20px;
    box-shadow:
      0 8px 18px rgba(0, 0, 0, 0.3),
      0 2px 4px rgba(0, 0, 0, 0.2),
      inset 0 -1px 0 rgba(255, 255, 255, 0.1);
  }
  
  .art-meta span {
    display: block;
    padding: 6px 8px;
  }
  
  .art-meta span:not(:last-child) {
    border-bottom: 1px dotted rgba(76, 73, 73, 0.8);
  }

  /* ===== LOADER OVERLAY ===== */

/* ===== PAGE STRUCTURE ===== */
.page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
  }
  
  /* ===== HEADER ===== */
  .header {
    position: relative;
    z-index: 20;
  }
  
  /* ===== GALLERY WRAPPER ===== */
  /* This is the critical positioning context */
  .gallery-wrapper {
    position: relative;
    flex: 1;               /* fills remaining space below header */
  }
  
  /* ===== GALLERY ===== */
  .gallery {
    position: relative;
    z-index: 1;            /* stays below loader */
    padding: 100px;
    column-count: 4;
    width: 100vw;
    box-sizing: border-box;
    gap: 100px;
  }
  
/* ===== PAGE STRUCTURE ===== */
.page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
  }
  
  /* ===== HEADER ===== */
  .header {
    position: relative;
    z-index: 20;
  }
  
  /* ===== GALLERY WRAPPER ===== */
  /* This is the critical positioning context */
  .gallery-wrapper {
    position: relative;
    flex: 1;               /* fills remaining space below header */
  }
  
  /* ===== GALLERY ===== */
  .gallery {
    position: relative;
    z-index: 1;            /* stays below loader */
    padding: 100px;
    column-count: 4;
    width: 100vw;
    box-sizing: border-box;
    gap: 100px;
  }
  

  
  #gallery-loader.hidden {
    opacity: 0;
  }

  /* ===== LOADER OVERLAY ===== */
  #gallery-loader {
    opacity: 1;
    transition: opacity 0.6s ease;
    position: absolute;
    inset: 0;
    z-index: 5;
  
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;  
  
    padding-bottom: 60px;    
  

    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1.3rem;
  
    pointer-events: none;
    transition: opacity 0.6s ease;
  }
  
  
  /* Hide loader without layout shift */
  #gallery-loader.is-hidden {
    opacity: 0;
  }
  
  /* ===== SPINNER ===== */
  .spinner {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(0,0,0,0.2);
    border-top-color: rgba(0,0,0,0.6);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 16px;
  }
  
  @keyframes spin {
    to { transform: rotate(360deg); }
  }
  /* Hide loader without layout shift */
  #gallery-loader.is-hidden {
    opacity: 0;
  }
  
  /* ===== SPINNER ===== */
  .spinner {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(0,0,0,0.2);
    border-top-color: rgba(0,0,0,0.6);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 16px;
  }
  
  @keyframes spin {
    to { transform: rotate(360deg); }
  }

/* Fade-in card */
.art-card {
    opacity: 0;
    transform: translateY(12px);
    transition:
      opacity 0.8s ease,
      transform 0.8s ease;
  }
  
  /* When revealed */
  .art-card.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
  

  /* ===== RESPONSIVE BREAKPOINTS ===== */
  
  /* Large tablets / small desktops */
  @media (max-width: 1400px) {
    .gallery {
      column-count: 3;
      padding: 70px;
      gap: 70px;
    }
  }
  
  /* Tablets */
  @media (max-width: 1100px) {
    .header {
      justify-content: center;
    }
  
    .logo {
      order: 1;
    }
  
    .nav-links {
      order: 2;
    }
  
    .header-contact {
      order: 3;
      flex: 1 1 100%;
      margin-top: 6px;
    }
  
    .gallery {
      column-count: 2;
      padding: 50px;
      gap: 50px;
    }
  }


  /* Mobile */
  @media (max-width: 750px) {
    .header {
      flex-direction: column;
      align-items: center;
      text-align: center;
    }
  
    .nav-links {
      flex-direction: column;
      gap: 10px;
    }
  
    .header-contact {
      font-size: 1em;
    }
  
    .gallery {
      column-count: 1;
      padding: 30px;
      gap: 30px;
    }
  }
  