/* ========================================
   CUSTOM OVERRIDES & SPECIAL CASES
   ======================================== */

  #popup-bg-preview {
    object-fit: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
  }
  @media only screen and (max-width: 991px) {
    nav[aria-label="Filter Collection"] {
        position: static;
    }
  }


/* ========================================
    กล่องสถิติใน About us section
======================================== */
  

@media (max-width: 1200px) {
  .features-section__container {
    max-width: 1000px;
  }
}
   
@media (max-width: 991px) {
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .multiverse-builder-palette {
    min-height: 340px;
  }
  
  .multiverse-palette-img {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: auto;
  }
  
  .aboutus-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  /* Show horizontal border between row 1-2 and 3-4 only in 2-col layout */
  .aboutus-stats-grid > .aboutus-stat-row:nth-child(1),
  .aboutus-stats-grid > .aboutus-stat-row:nth-child(2) {
    border-bottom: 1px solid #E5E7EB;
  }
  .aboutus-stats-grid > .aboutus-stat-row:nth-child(3),
  .aboutus-stats-grid > .aboutus-stat-row:nth-child(4) {
    border-bottom: none;
  }

  .aboutus-stats-grid div:nth-child(3) {
    border-left: 0;
  }
}
   
@media (max-width: 767px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .multiverse-builder-palette {
    min-height: 280px;
  }
  
  .multiverse-palette-img {
    position: static;
    margin-top: auto;
    margin-bottom: 0;
    width: 100%;
    display: block;
  }
}

@media (max-width: 600px) {
  .search-popup__content {
    min-width: 0;
    width: 95vw;
    padding: 1.25rem 0.75rem 1rem 1rem;
  }
  
  .search-popup__input {
    font-size: 1rem;
  }
  
  .search-popup__button {
    width: 38px;
    height: 38px;
  }
}

@media (max-width: 479px) {
  .search-popup__content {
    padding: 1rem 0.5rem 0.75rem 0.75rem;
  }
  
  .search-popup__input {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
  }
  
  .search-popup__button {
    width: 32px;
    height: 32px;
  }
  
  .features-section__container {
    padding: 2rem 0.5rem;
  }
  
  .aboutus-stats-grid {
    grid-template-columns: 1fr;
  }
  .aboutus-stats-grid > .aboutus-stat-row {
    border-bottom: 1px solid #E5E7EB !important;
  }
  .aboutus-stats-grid > .aboutus-stat-row:last-child {
    border-bottom: none !important;
  }
  .aboutus-stat-inner {
    width: 220px;
    display: flex;
    justify-content: flex-start;
    margin: auto;
  }
  .aboutus-stat-inner > div,
  .aboutus-stat-number,
  .aboutus-stat-label {
    text-align: left !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
  }
  .aboutus-stat-inner > div {
    width: 100px !important;
  }

  .aboutus-stats-grid div:nth-child(even) {
    border-left: 0;
  }
}

@media (min-width: 992px), (max-width: 480px) {
/* Remove all horizontal borders in 4-col and 1-col layouts */
.aboutus-stats-grid > .aboutus-stat-row {
  border-bottom: none;
}
}

@media only screen and (max-width: 1279px) and (min-width: 1200px) {
.multiverse-builder-palette {
  min-height: 0 !important;
}
}

/* ========================================
  Navbar
======================================== */
@media (max-width: 1200px) and (min-width: 992px) {
    .navbar__menu ul {
        gap: 1.2rem;
    }
    .navbar__menu-link {
      font-size: 15px;
    }
    .navbar__logo-img {
      height: 2.3rem;
  }
}


/* ========================================
  Footer
======================================== */
@media (max-width: 420px) {
  .footer-bfm__social {
    position: unset;
    flex-direction: row;
    min-width: auto !important;
    order: 0;
  }
  .footer-bfm__copyright-links {
    order: 1;
    text-align: left !important;
    display: inline-block !important;
  }
  span.footer-bfm__copyright.text-sm {
    text-align: left !important;
  }
  .footer-bfm__footerlink {
    margin-right: 7px;
  }
}


/* ยกเลิก background-attachment: fixed เฉพาะบน iOS devices */
@supports (-webkit-touch-callout: none) {
  .parallax-bg {
    background-attachment: scroll !important;
  }
}
@media (min-width: 768px) and (max-width: 1024px) {
  .parallax-bg {
    background-attachment: scroll !important;
    background-position: center center !important; /* จัดให้อยู่กึ่งกลางเสมอเมื่อยกเลิก parallax */
  }
}