/* =========================================================
   Mobile nav + responsive polish.
   Below 900px the main nav hides and a hamburger opens a
   full-height slide-out. Keeps the existing tokens + palette.
   ========================================================= */

.opn-hamburger {
  display: none;
  background: transparent;
  border: 0;
  padding: 10px;
  cursor: pointer;
  position: relative;
  width: 40px;
  height: 40px;
}

.opn-hamburger span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--ink);
  margin: 4px auto;
  transition: transform var(--dur-1), opacity var(--dur-1);
}

.opn-mobile-scrim,
.opn-mobile-panel {
  display: none;
}

@media (max-width: 900px) {
  .opn-hamburger { display: inline-flex; align-items: center; justify-content: center; }

  .opn-header-inner {
    grid-template-columns: auto 1fr !important;
    padding: 14px 0;
  }

  .opn-header-end {
    justify-self: end;
    gap: 10px;
  }

  .opn-mobile-scrim {
    display: block;
    position: fixed; inset: 0; z-index: 80;
    background: rgba(30, 20, 10, 0.35);
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--dur-2);
  }

  .opn-mobile-panel {
    display: flex;
    flex-direction: column;
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 90;
    width: min(360px, 85vw);
    background: var(--bg);
    padding: 24px 28px 40px;
    transform: translateX(100%);
    transition: transform var(--dur-3) var(--ease);
    box-shadow: var(--shadow-2);
  }

  .opn-header.is-open .opn-mobile-scrim { opacity: 1; pointer-events: auto; }
  .opn-header.is-open .opn-mobile-panel { transform: translateX(0); }

  .opn-mobile-head {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 24px;
  }

  .opn-mobile-nav { display: flex; flex-direction: column; gap: 4px; }

  .opn-mobile-link {
    display: block;
    padding: 16px 0;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: var(--step-2);
    color: var(--ink);
    text-decoration: none;
    border-bottom: 1px solid var(--line);
  }

  .opn-mobile-foot {
    margin-top: auto;
    display: flex; flex-direction: column; gap: 16px;
  }

  /* When the header is open, rotate the hamburger lines into an X */
  .opn-header.is-open .opn-hamburger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .opn-header.is-open .opn-hamburger span:nth-child(2) { opacity: 0; }
  .opn-header.is-open .opn-hamburger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
}

/* Tighter checkout summary column on narrow screens */
@media (max-width: 900px) {
  .page-shop aside { position: static !important; margin-top: 24px; }
  .page-home .hero-ctas .btn, .page-home .hero-ctas a { width: 100%; justify-content: center; }
}

/* Small phones: the cart line-item grid (thumb / info / price) is cramped — the
   .wrap gutter + 80px thumb leave too little for the qty row. Tighten padding,
   shrink the thumb, and narrow the qty value so −/value/+ stay on one line. */
@media (max-width: 480px) {
  .cart-list li { padding: 16px; gap: 12px; grid-template-columns: 56px 1fr auto; }
  .cart-qty .qty-value { min-width: 32px; }
}
