:root {
  --ink: #2f2924;
  --forest: #8a9a7b;
  --brass: #c28a4a;
  --clay: #b96f55;
  --cream: #fff8ef;
  --mist: #f3eee7;
  --paper: #fbf7f1;
  --line: #e2d7ca;
  --text: #514840;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 1180px;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--paper);
  line-height: 1.65;
}

a {
  color: inherit;
}

.container {
  width: 1120px;
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 248, 239, 0.97);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  width: 1160px;
  height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.logo-image {
  width: 236px;
  height: auto;
  max-height: 54px;
  display: block;
  object-fit: contain;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 13px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.nav-item:hover,
.nav-item.is-active,
.has-dropdown:hover > a {
  background: #9f6b4b;
  color: var(--white);
}

.has-dropdown > a {
  text-decoration: none;
}

.dropdown-arrow {
  margin-left: 6px;
  font-size: 12px;
}

.dropdown-menu {
  position: absolute;
  top: 46px;
  left: 0;
  width: 246px;
  padding: 8px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(94, 66, 45, 0.14);
  display: none;
}

.has-dropdown:hover .dropdown-menu {
  display: grid;
}

.dropdown-menu a {
  padding: 10px 12px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 14px;
}

.dropdown-menu a:hover {
  background: #f7eadc;
  color: #8e563a;
}

.account-menu {
  position: relative;
}

.avatar-button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: var(--clay);
  color: var(--white);
  font-weight: 800;
  cursor: pointer;
}

.avatar-menu {
  position: absolute;
  top: 52px;
  right: 0;
  width: 240px;
  padding: 10px;
  display: none;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(94, 66, 45, 0.14);
}

.avatar-menu.is-open {
  display: grid;
  gap: 6px;
}

.avatar-menu span,
.avatar-menu a,
.logout-form button {
  padding: 9px 10px;
  border-radius: 6px;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.logout-form {
  margin: 0;
}

.logout-form button {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.avatar-menu a:hover,
.logout-form button:hover {
  background: var(--mist);
}

.site-footer {
  background: #3c3028;
  color: var(--white);
  margin-top: 80px;
}

.footer-inner {
  width: 1120px;
  margin: 0 auto;
  padding: 42px 0;
  display: flex;
  justify-content: space-between;
  gap: 80px;
}

.footer-inner p {
  margin: 8px 0 0;
  color: #efe2d5;
}

.footer-links {
  display: grid;
  gap: 8px;
  min-width: 210px;
}

.footer-links a {
  color: #fff4e7;
  text-decoration: none;
}

.footer-links a:hover {
  color: #efbd7c;
}

.page-hero {
  padding: 86px 0 72px;
  background: linear-gradient(90deg, rgba(58, 43, 34, 0.82), rgba(137, 95, 65, 0.52)), var(--hero-image, none);
  background-size: cover;
  background-position: center;
  color: var(--white);
}

.home-hero {
  min-height: 520px;
  display: flex;
  align-items: center;
  --hero-image: url('/assets/images/hero-mattress-showroom.png');
  background: linear-gradient(90deg, rgba(255, 246, 235, 0.24) 0%, rgba(255, 246, 235, 0.14) 48%, rgba(255, 246, 235, 0.06) 100%), var(--hero-image, none);
  text-shadow: 0 4px 22px rgba(45, 31, 23, 0.72);
}

.page-hero h1 {
  max-width: 780px;
  margin: 0;
  color: var(--white);
  font-size: 58px;
  line-height: 1.05;
  letter-spacing: 0;
}

.page-hero p {
  max-width: 760px;
  margin: 20px 0 0;
  color: #fff3e7;
  font-size: 18px;
}

.eyebrow {
  color: #ffd39a !important;
  font-size: 13px !important;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 6px;
  border: 1px solid transparent;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.button.primary {
  margin-top: 28px;
  background: #d39a57;
  color: var(--white);
  box-shadow: 0 12px 26px rgba(132, 83, 42, 0.22);
}

.button.primary:hover {
  background: #bd7e3d;
}

.button.secondary {
  background: #fff7ec;
  color: #7d4b33;
  border-color: #fff7ec;
}

.section-title {
  margin: 0 0 24px;
  font-size: 34px;
  color: var(--ink);
  letter-spacing: 0;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  padding: 72px 0;
}

.category-card {
  min-height: 520px;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  background: linear-gradient(145deg, #fffaf3, #f1e2d3);
  border: 1px solid #e4d1bd;
  box-shadow: 0 16px 36px rgba(94, 66, 45, 0.1);
  overflow: hidden;
}

.category-card:hover {
  transform: translateY(-3px);
  background: linear-gradient(145deg, #f6ddc2, #d8a36e);
  box-shadow: 0 20px 42px rgba(128, 82, 48, 0.18);
}

.category-card h2 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 24px;
}

.category-image {
  display: block;
  height: 330px;
  overflow: hidden;
  background: #efe3d6;
}

.category-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.category-image img.crop-center {
  object-position: center center;
}

.category-image img.crop-right {
  object-position: right center;
}

.category-copy {
  min-height: 190px;
  padding: 28px 30px 30px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.category-title {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.2;
  font-weight: 800;
}

.category-summary {
  color: #67584d;
  font-size: 15px;
  line-height: 1.55;
}

.content-section {
  padding: 78px 0;
}

.contact-band {
  padding: 70px 0;
  background: var(--mist);
}

.contact-form {
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

label {
  display: grid;
  gap: 7px;
  font-weight: 800;
  color: var(--ink);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #d9cbbb;
  border-radius: 6px;
  padding: 12px 13px;
  font: inherit;
  color: var(--ink);
  background: var(--white);
}

textarea {
  resize: vertical;
}

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

.flash {
  width: 1120px;
  margin: 22px auto 0;
  padding: 14px 18px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.flash.success {
  background: #edf3e6;
  color: #526238;
}

.flash.error {
  background: #fae9e3;
  color: #7e281d;
}

.flash button {
  border: 0;
  background: transparent;
  cursor: pointer;
  font-weight: 800;
}

.media-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 64px;
}

.image-panel {
  height: 290px;
  margin: 0;
  border-radius: 8px;
  overflow: hidden;
  background: var(--mist);
}

.image-panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.image-panel img.crop-left {
  object-position: left center;
}

.image-panel img.crop-center {
  object-position: center center;
}

.image-panel img.crop-right {
  object-position: right center;
}

.two-column {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 56px;
  padding-top: 58px;
}

.feature-panel {
  align-self: start;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffbf6;
}

.feature-panel h2,
.rich-copy h2,
.policy-copy h2 {
  margin: 0 0 14px;
  color: var(--ink);
}

.feature-panel ul {
  margin: 0;
  padding-left: 20px;
}

.feature-panel li + li {
  margin-top: 10px;
}

.rich-copy p,
.policy-copy p {
  margin: 0 0 20px;
  font-size: 17px;
}

.cta-band {
  margin-top: 70px;
  padding: 48px 0;
  background: linear-gradient(90deg, #8f5d3e, #b87951);
  color: var(--white);
}

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
}

.cta-inner h2,
.cta-inner p {
  margin: 0;
  color: var(--white);
}

.process-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin: 34px 0;
}

.process-step {
  min-height: 96px;
  padding: 16px;
  display: grid;
  place-items: center;
  text-align: center;
  border-radius: 8px;
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--ink);
  font-weight: 800;
}

.auth-shell {
  width: 560px;
  margin: 70px auto;
}

.auth-shell .contact-form {
  padding: 30px;
}

.profile-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 36px;
  margin-top: 42px;
}

.info-card,
.history-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.history-item {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.history-item:last-child {
  border-bottom: 0;
}

.policy-copy {
  padding: 64px 0 20px;
}

.policy-copy article {
  padding-bottom: 10px;
}

.policy-contact {
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-weight: 800;
}
