/* AshAra Phase 3 shared shell. Loads after tokens.css + base.css + components.css. */

.shell-scroll-lock { overflow: hidden; }

/* ---------- Preview banner ---------- */
.shell-preview-banner {
  background: var(--ash-charcoal); color: var(--color-text-inverse);
  text-align: center; font-size: var(--fs-sm); padding: var(--space-2) var(--space-4);
}

/* ---------- Header ---------- */
.shell-header { position: sticky; top: 0; z-index: var(--z-header, 100); background: var(--color-surface); border-bottom: var(--border-width) solid var(--color-border); }
.shell-header__inner { display: flex; align-items: center; gap: var(--space-4); min-height: 4rem; }
.shell-brand { display: inline-flex; align-items: center; gap: var(--space-2); text-decoration: none; color: var(--color-text); font-family: var(--font-serif); }
.shell-brand__mark { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: var(--radius-pill); background: var(--ash-brass-deep); color: #fff; font-weight: 700; }
.shell-brand__word { font-size: var(--fs-lg); letter-spacing: var(--tracking-wide); }

.shell-nav--desktop { margin-inline-start: var(--space-4); }
.shell-nav__list { list-style: none; display: flex; gap: var(--space-4); padding: 0; margin: 0; }
.shell-nav__link { color: var(--color-text); text-decoration: none; font-size: var(--fs-sm); padding: var(--space-2) 0; display: inline-block; min-height: var(--touch-min); line-height: 2rem; }
.shell-nav__link:hover { text-decoration: underline; }
.shell-nav__link[aria-current='page'] { font-weight: 700; box-shadow: inset 0 -2px 0 var(--ash-brass-deep); }

.shell-actions { margin-inline-start: auto; display: flex; align-items: center; gap: var(--space-2); }
.shell-account { display: flex; align-items: center; gap: var(--space-2); min-width: 6rem; justify-content: flex-end; }
.shell-account__hello { font-size: var(--fs-sm); color: var(--color-text-muted); }
.shell-account__skeleton { display: inline-block; width: 6rem; height: 1.5rem; border-radius: var(--radius-sm); }
.shell-cart { position: relative; }
.shell-cart__count { position: absolute; top: -0.25rem; inset-inline-end: -0.25rem; background: var(--ash-brass-deep); color: #fff; min-width: 1.1rem; text-align: center; }
.shell-mobile-toggle { display: none; }
.shell-backend-notice { margin: var(--space-2) var(--space-4) 0; }

/* ---------- Mobile nav ---------- */
.shell-mobile-backdrop { position: fixed; inset: 0; background: rgba(35, 32, 28, 0.5); z-index: var(--z-drawer); }
.shell-mobile-nav { position: fixed; inset-block: 0; inset-inline-start: 0; width: min(86vw, 20rem); background: var(--color-surface); box-shadow: var(--shadow-lg); z-index: var(--z-drawer); padding: var(--space-5); overflow: auto; }
.shell-mobile-nav .shell-nav__list { flex-direction: column; gap: var(--space-1); }
.shell-mobile-close { position: absolute; top: var(--space-3); inset-inline-end: var(--space-3); }
.shell-account--mobile { display: none; flex-direction: column; align-items: stretch; gap: var(--space-2); margin-top: var(--space-5); padding-top: var(--space-4); border-top: var(--border-width) solid var(--color-border); }
.shell-account--mobile .btn { justify-content: center; }

/* ---------- Search dialog ---------- */
.shell-search-backdrop { position: fixed; inset: 0; background: rgba(35, 32, 28, 0.5); z-index: var(--z-dialog); }
.shell-search { position: fixed; inset-block-start: 12vh; inset-inline: 50%; transform: translateX(-50%); width: min(92vw, 34rem); background: var(--color-surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); z-index: var(--z-dialog); padding: var(--space-5); }
.shell-search__form { display: flex; gap: var(--space-2); }
.shell-search__form .input { flex: 1; }

/* ---------- Footer ---------- */
.shell-footer { background: var(--ash-charcoal); color: var(--color-text-inverse); margin-top: var(--space-8); padding-block: var(--space-7); }
.shell-footer__inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: var(--space-5); }
.shell-footer__h { color: var(--color-text-inverse); font-size: var(--fs-md); margin-bottom: var(--space-3); }
.shell-footer__links { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-2); }
.shell-footer__links a { color: var(--ash-cream); text-decoration: none; font-size: var(--fs-sm); }
.shell-footer__links a:hover { text-decoration: underline; }
.shell-footer__legal { grid-column: 1 / -1; color: var(--ash-cream); font-size: var(--fs-xs); opacity: 0.85; }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .shell-nav--desktop { display: none; }
  .shell-mobile-toggle { display: inline-flex; }
  /* Account actions move into the drawer on mobile so the header bar never overflows. */
  .shell-header .shell-account { display: none; }
  .shell-account--mobile { display: flex; }
}
