/* Shared redesign shell. Page-area styles live in separate files so the
   legacy page CSS can be retired one route group at a time. */

body.r-redesign {
  min-height: 100%;
}

body.r-redesign #main-container {
  flex: 1 0 auto;
  min-width: 0;
}

.r-nav-shell {
  position: sticky;
  top: 0;
  z-index: 100;
}

.r-nav {
  background: rgba(247, 244, 236, 0.96);
  border-bottom: 1px solid var(--r-line);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
}

.r-nav__inner {
  max-width: 1320px;
  min-height: 72px;
  margin: 0 auto;
  padding: 12px 28px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.r-nav__brand {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  color: var(--r-ink);
  text-decoration: none;
}

.r-nav__brand img {
  display: block;
  width: auto;
  height: 44px;
}

.r-nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 18px;
}

.r-nav__link {
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--r-ink-2);
  font-family: var(--r-body);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background 120ms ease, color 120ms ease;
}

.r-nav__link:hover,
.r-nav__link:focus-visible {
  background: rgba(20, 19, 15, 0.05);
  color: var(--r-ink);
}

.r-nav__link.is-active {
  color: var(--r-green);
}

.r-nav__right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.r-nav__phone {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--r-ink);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.r-nav__phone:hover,
.r-nav__phone:focus-visible {
  color: var(--r-green);
}

.r-nav__menu-button,
.r-nav__cart {
  width: 40px;
  height: 40px;
  border: 1px solid var(--r-line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--r-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease;
}

.r-nav__menu-button {
  display: none;
}

.r-nav__menu-button:hover,
.r-nav__menu-button:focus-visible,
.r-nav__cart:hover,
.r-nav__cart:focus-visible {
  background: var(--r-surface);
  border-color: var(--r-ink);
}

.r-nav__cart {
  position: relative;
  text-decoration: none;
}

.r-nav__cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--r-green);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--r-mono);
  font-size: 10px;
  font-weight: 600;
}

.r-nav__cart-count[hidden] {
  display: none;
}

.r-nav__mobile-links {
  display: none;
}

.r-zip-pill {
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--r-line-strong);
  border-radius: 999px;
  background: var(--r-surface);
  color: var(--r-ink-2);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--r-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease, color 120ms ease;
}

.r-zip-pill:hover,
.r-zip-pill:focus-visible {
  border-color: var(--r-green);
  background: #fff;
  color: var(--r-green);
}

.r-zip-pill__label {
  color: inherit;
  white-space: nowrap;
}

.r-zip-pill__zip {
  color: var(--r-ink);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.r-zip-pill__zip:empty {
  display: none;
}

.r-zip-pill svg {
  flex-shrink: 0;
  color: var(--r-muted);
}

.r-zip-pill__error {
  margin-top: 10px;
  color: var(--r-alert);
  font-size: 13px;
}

.r-zip-pill__status {
  margin-top: 10px;
  color: var(--r-ink-2);
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
}

.r-zip-pill__status[hidden] {
  display: none;
}

.r-zip-pill__status.is-valid {
  color: var(--r-green);
}

.r-zip-pill__status-icon {
  display: inline-flex;
  flex-shrink: 0;
}

.r-zip-pill__status-icon[hidden] {
  display: none;
}

.r-zip-pill__status-icon svg {
  width: 17px;
  height: 17px;
  stroke-width: 2.4;
}

.r-modal-bg {
  position: fixed;
  inset: 0;
  z-index: 1000;
  padding: 20px;
  background: rgba(20, 19, 15, 0.58);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: r-fade 180ms ease;
}

.r-modal-bg[hidden] {
  display: none;
}

.r-modal {
  position: relative;
  width: min(440px, 92vw);
  max-height: 90vh;
  padding: 28px;
  overflow-y: auto;
  border-radius: var(--r-radius-xl);
  background: var(--r-bg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: r-pop 220ms cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

.r-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--r-line);
  border-radius: 999px;
  background: var(--r-surface);
  color: var(--r-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.r-modal__close:hover,
.r-modal__close:focus-visible {
  border-color: var(--r-ink);
}

@keyframes r-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes r-pop {
  from { opacity: 0; transform: translateY(8px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.r-field {
  margin-top: 18px;
}

.r-field__label {
  display: block;
  margin-bottom: 8px;
  color: var(--r-ink-2);
  font-size: var(--r-fs-eyebrow);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.r-seg {
  padding: 4px;
  border: 1px solid var(--r-line);
  border-radius: var(--r-radius);
  background: var(--r-surface-2);
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
}

.r-seg__opt {
  appearance: none;
  padding: 9px 8px;
  border: 0;
  border-radius: var(--r-radius-sm);
  background: transparent;
  color: var(--r-ink-2);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.r-seg__opt:hover,
.r-seg__opt:focus-visible {
  color: var(--r-ink);
}

.r-seg__opt[aria-pressed="true"] {
  background: var(--r-bg);
  color: var(--r-ink);
  box-shadow: var(--r-shadow-sm);
}

.r-section-wrap {
  max-width: 1320px;
  margin: 0 auto;
  padding: 64px 28px;
}

.r-sechead {
  margin-bottom: 32px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.r-sechead__title {
  margin: 8px 0 0;
  font-family: var(--r-display);
  font-size: var(--r-fs-section);
  font-weight: 650;
  line-height: 1.05;
}

.r-sechead__sub {
  max-width: 520px;
  color: var(--r-ink-2);
  font-size: 15px;
  line-height: 1.6;
}

.r-footer {
  z-index: auto;
  width: 100%;
  margin-top: 80px;
  padding: 60px 28px 28px;
  background: #14130f;
  color: #fff;
  display: block;
  align-items: initial;
  justify-content: initial;
  font-size: 14px;
}

.r-footer__inner {
  max-width: 1320px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
}

.r-footer__col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.r-footer__col a {
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: normal;
  text-decoration: none;
}

.r-footer__col a:hover,
.r-footer__col a:focus-visible {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.r-footer__brand {
  gap: 0;
}

.r-footer__logo {
  display: block;
  width: min(260px, 100%);
  height: auto;
  filter: brightness(0) invert(1);
  opacity: 0.96;
}

.r-footer__tagline {
  margin-top: 14px;
  color: #fff;
  font-family: var(--r-display);
  font-size: 21px;
  font-weight: 600;
}

.r-footer__social {
  display: flex;
  gap: 14px;
  margin-top: 18px;
}

.r-footer__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.85);
  transition: border-color 120ms ease, color 120ms ease;
}

.r-footer__social a:hover,
.r-footer__social a:focus-visible {
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
}

.r-footer__social svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.r-footer__rule {
  max-width: 1320px;
  margin: 50px auto 0;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.r-footer__bottom {
  max-width: 1320px;
  margin: 0 auto;
  padding-top: 22px;
  color: rgba(255, 255, 255, 0.55);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 13px;
}

.r-footer__legal {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.r-footer__legal a {
  color: rgba(255, 255, 255, 0.65);
  font-weight: 400;
  letter-spacing: normal;
}

.r-error {
  flex: 1;
  padding: clamp(48px, 8vw, 96px) 24px;
  display: flex;
  align-items: center;
}

.r-error__inner {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.78fr);
  align-items: center;
  gap: clamp(32px, 6vw, 72px);
}

.r-error__copy {
  max-width: 620px;
}

.r-error__title {
  margin: 8px 0 16px;
  color: var(--r-ink);
  font-family: var(--r-display);
  font-size: clamp(42px, 7vw, 74px);
  font-weight: 650;
  line-height: 0.95;
}

.r-error__body {
  max-width: 560px;
  margin: 0;
  color: var(--r-ink-2);
  font-size: 18px;
  line-height: 1.55;
}

.r-error__actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.r-error__support {
  margin-top: 22px;
  color: var(--r-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  font-size: 14px;
}

.r-error__support a {
  color: var(--r-green);
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.r-error__aside {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  border-radius: var(--r-radius-lg);
  background: var(--r-green);
}

.r-error__aside img {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
  opacity: 0.86;
}

.r-error__note {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: var(--r-radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--r-shadow-lg);
}

.r-error__note p {
  margin: 6px 0 0;
  color: var(--r-ink-2);
  font-size: 14px;
  line-height: 1.45;
}

.r-error__details {
  max-height: 220px;
  margin-top: 24px;
  padding: 16px;
  overflow: auto;
  border: 1px solid var(--r-line);
  border-radius: var(--r-radius);
  background: var(--r-surface);
  color: var(--r-alert);
  font-family: var(--r-mono);
  font-size: 12px;
  white-space: pre-wrap;
}

@media (max-width: 1120px) {
  .r-nav__phone {
    display: none;
  }

  .r-error__inner {
    grid-template-columns: 1fr;
  }

  .r-error__aside,
  .r-error__aside img {
    min-height: 320px;
  }
}

@media (max-width: 900px) {
  .r-nav__inner {
    min-height: 64px;
    padding: 10px 18px;
    gap: 10px;
  }

  .r-nav__brand img {
    height: 38px;
  }

  .r-nav__links {
    display: none;
  }

  .r-nav__menu-button {
    display: inline-flex;
  }

  .r-nav__mobile-links {
    padding: 6px 18px 18px;
    border-top: 1px solid var(--r-line);
    background: var(--r-bg);
    flex-direction: column;
    gap: 2px;
  }

  .r-nav__mobile-links.is-open {
    display: flex;
  }

  .r-nav__mobile-links .r-nav__link {
    padding: 11px 8px;
  }

  .r-footer__inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .r-nav__inner {
    padding-right: 12px;
    padding-left: 12px;
  }

  .r-nav__brand img {
    height: 33px;
  }

  .r-nav__right {
    gap: 7px;
  }

  .r-zip-pill {
    width: 40px;
    padding: 0;
    justify-content: center;
  }

  .r-zip-pill__label,
  .r-zip-pill__zip {
    display: none;
  }

  .r-modal {
    padding: 26px 20px 22px;
  }

  .r-seg {
    grid-auto-flow: row;
    grid-auto-columns: auto;
  }

  .r-sechead {
    align-items: flex-start;
    flex-direction: column;
  }

  .r-footer {
    margin-top: 56px;
    padding: 44px 18px 24px;
  }

  .r-footer__inner {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .r-footer__rule {
    margin-top: 36px;
  }

  .r-footer__bottom {
    flex-direction: column;
  }

  .r-error {
    padding: 36px 16px 64px;
  }

  .r-error__body {
    font-size: 16px;
  }

  .r-error__actions .r-btn {
    width: 100%;
  }

  .r-error__aside,
  .r-error__aside img {
    min-height: 260px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .r-modal-bg,
  .r-modal {
    animation: none;
  }
}
