/* Haul & Stash: phone layout and shared accessibility.
   Loaded after each page's own <style>, so these rules win on small screens. */

/* ─── VISIBLE KEYBOARD FOCUS (all sizes) ───────────────────── */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid #C45030 !important;
  outline-offset: 3px !important;
}

/* ─── INLINE SIGNUP (footer and homepage) ──────────────────── */
.signup { margin-top: 8px; max-width: 360px; }
.signup-label {
  display: block; font-family: 'Cormorant Garamond', serif; font-style: italic;
  font-size: 17px; line-height: 1.4; color: rgba(255,255,255,0.75); margin-bottom: 12px;
  text-transform: none; letter-spacing: 0;
}
.signup-row { display: flex; gap: 0; border-bottom: 1px solid rgba(255,255,255,0.3); }
.signup-field {
  flex: 1; min-width: 0; background: none; border: 0; padding: 12px 0; min-height: 44px;
  font-family: 'DM Sans', sans-serif; font-size: 14px; color: #fff;
}
.signup-field::placeholder { color: rgba(255,255,255,0.55); }
.signup-btn {
  background: none; border: 0; cursor: pointer; min-height: 44px; padding: 0 0 0 16px;
  font-family: 'DM Sans', sans-serif; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: #fff;
}
.signup-note { min-height: 1em; margin-top: 8px; font-size: 12px; color: rgba(255,255,255,0.7); text-transform: none; letter-spacing: 0; }
/* on light backgrounds (homepage) */
.signup-light .signup-label { color: #0E1E3A; }
.signup-light .signup-row { border-color: #0E1E3A; }
.signup-light .signup-field { color: #0E1E3A; }
.signup-light .signup-field::placeholder { color: #6F665C; }
.signup-light .signup-btn { color: #0E1E3A; }
.signup-light .signup-note { color: #6F665C; }

/* ─── POPUP (kept for later): always fits the screen ──────── */
.nl-modal { max-height: calc(100vh - 32px); overflow-y: auto; box-sizing: border-box; }
.nl-close { min-width: 44px; min-height: 44px; top: 8px !important; right: 8px !important; }

/* ─── MOBILE MENU parts, hidden on desktop ─────────────────── */
.menu-toggle, .nav-bag-mobile, .mobile-menu { display: none; }

@media (max-width: 767px) {
  /* nav: menu button | & | Bag */
  nav {
    grid-template-columns: 44px 1fr auto !important;
    padding: 14px 16px !important;
    overflow: visible !important;
    gap: 8px;
  }
  nav .nav-left, nav .nav-right { display: none !important; }
  nav .wordmark { justify-self: center; display: inline-flex; align-items: center; min-height: 44px; }
  .menu-toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px; padding: 0 10px; background: none; border: 0; cursor: pointer;
  }
  .menu-toggle span { display: block; height: 1px; background: #0E1E3A; transition: transform .25s, opacity .25s; }
  .menu-open .menu-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
  .menu-open .menu-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .nav-bag-mobile {
    display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px;
    font-family: 'DM Sans', sans-serif; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
    color: #0E1E3A; text-decoration: none; white-space: nowrap;
  }
  .mobile-menu:not([hidden]) {
    display: block; position: fixed; top: 72px; left: 0; right: 0; bottom: 0; z-index: 99;
    background: #F4F0E9; border-top: 1px solid #E5DCCD; overflow-y: auto; padding: 24px 16px 48px;
  }
  .mobile-menu ul { list-style: none; margin: 0; padding: 0; }
  .mobile-menu li { border-bottom: 1px solid #E5DCCD; }
  .mobile-menu a {
    display: flex; align-items: center; min-height: 56px;
    font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 28px; color: #0E1E3A; text-decoration: none;
  }
  .menu-open, .menu-open body { overflow: hidden; }

  /* nothing may be wider than the screen */
  html, body { overflow-x: clip; }   /* clip, not hidden: hidden turns body into a scroll box and breaks page scrolling */
  img { max-width: 100%; }

  /* footer stacked */
  .site-footer { grid-template-columns: 1fr !important; gap: 32px !important; padding: 56px 16px 40px !important; text-align: left; }
  .footer-tagline { text-align: left !important; }
  .site-footer .footer-col a { min-height: 44px; display: flex !important; align-items: center; margin-bottom: 0 !important; }
  .footer-bottom { padding: 16px !important; gap: 12px; flex-wrap: wrap; }

  /* collection pages: two columns */
  .page-header { padding: 96px 16px 12px !important; }
  .type-nav { padding: 16px 16px 0 !important; gap: 4px !important; flex-wrap: wrap; }
  .type-link { min-height: 44px; padding: 0 10px !important; }
  .type-link:first-child { padding-left: 0 !important; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 28px 12px !important; padding: 24px 16px 56px !important; }
  .product-name { font-size: 15px !important; }
  .product-info-top { flex-direction: column; align-items: flex-start !important; gap: 2px; }

  /* product page: photos above, text below */
  .breadcrumb { padding: 88px 16px 0 !important; flex-wrap: wrap; }
  .product-layout { grid-template-columns: 1fr !important; margin-top: 12px !important; }
  .info-col { position: static !important; height: auto !important; overflow: visible !important; padding: 24px 16px 40px !important; }
  .details { grid-template-columns: 1fr 1.6fr !important; }
  .btn-add, .btn-save { min-height: 48px; }
  .more-section { padding: 48px 16px !important; }
  .more-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 20px 12px !important; }

  /* The & and text pages */
  .section { grid-template-columns: 1fr !important; gap: 32px !important; padding: 0 16px 64px !important; direction: ltr !important; }
  .practical { grid-template-columns: 1fr !important; gap: 28px !important; padding: 40px 16px 64px !important; }
  .hero { padding-left: 16px !important; padding-right: 16px !important; }

  /* search, saved, bag rows */
  .bag-layout { grid-template-columns: 1fr !important; gap: 32px !important; padding: 24px 16px 64px !important; }
  .bag-item { grid-template-columns: 64px 1fr auto !important; gap: 12px !important; }
  .bag-item-img { width: 64px !important; }
  .result-item { grid-template-columns: 48px 1fr auto !important; gap: 12px !important; }
  .saved-item { grid-template-columns: 64px 1fr auto !important; gap: 12px !important; }

  /* homepage */
  .section-header { padding-left: 16px !important; padding-right: 16px !important; }
  .brand-moment { padding-left: 16px !important; padding-right: 16px !important; flex-direction: column; align-items: flex-start !important; gap: 20px; }
}
