/*
 * Dutta Guinea Mansion — layout fixes on top of styles.css (loaded after it by inc/router.php).
 * Header brand: on phones and tablets the shop name was forced onto one line and cut off
 * ("DUTTA GUINEA M…"). It now wraps cleanly onto two lines next to the logo.
 */

/* Phones and small tablets (same breakpoint as styles.css mobile header) */
@media (max-width: 768px) {
  .brand-logo-area {
    gap: 8px;
    min-width: 0;
  }

  .brand-text-block {
    overflow: visible;
    min-width: 0;
  }

  .brand-title {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: normal;
    word-break: keep-all;
    font-size: clamp(0.8rem, 3.7vw, 1.05rem);
    line-height: 1.12;
    letter-spacing: 0.3px;
  }

  .brand-tagline {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    font-size: clamp(0.5rem, 2.2vw, 0.6rem);
    line-height: 1.25;
    margin-top: 2px;
    max-width: 22ch;
  }
}

/* Very narrow phones (e.g. 320–360px): slightly smaller logo so the name gets room */
@media (max-width: 380px) {
  .brand-main-logo {
    height: 32px;
    max-width: 60px;
  }

  .brand-logo-area {
    gap: 6px;
  }

  .header-actions {
    gap: 0;
  }

  /* Keep the header compact: the small tagline would wrap to 3 lines here */
  .brand-tagline {
    display: none;
  }
}

/*
 * Tablets / small laptops (769–1320px). The desktop header needs ~1360px, so on these
 * widths the menu ran off the right edge. Tighten it step by step instead.
 */
@media (min-width: 769px) and (max-width: 1400px) {
  .header-actions .btn-consult {
    display: none !important; /* WhatsApp concierge button stays on every page */
  }

  #navMenu.nav-menu {
    gap: 16px;
  }

  #navMenu .nav-link {
    font-size: 0.8rem;
    letter-spacing: 0.5px;
  }

  .brand-title {
    font-size: 1rem;
    line-height: 1.12;
    max-width: 9.5em;
    white-space: normal;
  }

  .brand-tagline {
    max-width: 18em;
    white-space: normal;
  }
}

@media (min-width: 769px) and (max-width: 1100px) {
  #navMenu.nav-menu {
    gap: 12px;
  }

  #navMenu .nav-link {
    font-size: 0.74rem;
    letter-spacing: 0.3px;
  }

  .brand-main-logo {
    height: 46px;
    width: auto;
  }

  .brand-title {
    font-size: 0.9rem;
  }

  .brand-tagline {
    display: none;
  }

  /* Wide search box -> search icon that opens the full-width search bar (as on phones) */
  .header-actions .desktop-search-wrap {
    display: none !important;
  }

  .header-actions .mobile-search-toggle {
    display: flex !important;
  }

  .mobile-search-bar-wrap.open {
    display: flex !important;
    width: 100%;
    background: #ffffff;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    border-bottom: 2px solid var(--color-border-gold);
    padding: 8px 24px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    z-index: 1001;
  }

  .mobile-search-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    background: #fdfbf7;
    border: 1.5px solid var(--color-border-gold);
    border-radius: var(--radius-full);
    padding: 4px 10px;
  }

  .mobile-search-icon {
    color: var(--color-accent-gold);
  }

  .mobile-search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 1rem;
    font-family: var(--font-sans);
    outline: none;
    padding: 6px 4px;
  }

  .mobile-search-clear {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
  }
}

/* Large desktops: the original header was ~11px wider than its 1360px container,
   which squeezed the name into three lines. Slightly tighter menu spacing fixes it. */
@media (min-width: 1401px) {
  #navMenu.nav-menu {
    gap: 20px;
  }

  .brand-title {
    max-width: 9.5em;
    line-height: 1.12;
  }
}

/* Narrow tablets in portrait (769–880px) */
@media (min-width: 769px) and (max-width: 880px) {
  #navMenu.nav-menu {
    gap: 8px;
  }

  #navMenu .nav-link {
    font-size: 0.68rem;
    letter-spacing: 0.2px;
  }

  .brand-main-logo {
    height: 40px;
  }

  .brand-title {
    font-size: 0.82rem;
  }

  .header-actions {
    gap: 2px;
  }
}
