:root {
  --bg: #f5f1ea;
  --surface: #fffdf8;
  --surface-2: #f0e9df;
  --panel: #1f2933;
  --panel-soft: #2f3d4a;
  --text: #1b1815;
  --text-soft: #6b6257;
  --line: #ddd2c4;
  --brand: #8a3b2f;
  --brand-deep: #5d241b;
  --brand-soft: #f1ddd6;
  --accent: #c89a4b;
  --success: #2b8a57;
  --danger: #bf3f3f;
  --shadow: 0 20px 50px rgba(53, 37, 24, 0.12);
  --radius: 22px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(200, 154, 75, 0.12), transparent 30%),
    linear-gradient(180deg, #fbf8f3 0%, var(--bg) 100%);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.shell {
  min-height: 100vh;
}

.container {
  width: min(var(--container), calc(100% - 2rem));
  margin: 0 auto;
}

.topbar {
  background: var(--panel);
  color: #f7efe7;
  font-size: 0.82rem;
  padding: 0.8rem 0;
}

.topbar__row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: rgba(251, 248, 243, 0.86);
  border-bottom: 1px solid rgba(138, 59, 47, 0.08);
}

.site-header__row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.5rem;
  align-items: center;
  min-height: 82px;
}

.brand {
  font-family: "Playfair Display", serif;
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--brand-deep);
}

.brand span {
  color: var(--accent);
}

.nav {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.nav a {
  font-size: 0.92rem;
  color: var(--text-soft);
  padding: 0.4rem 0;
  border-bottom: 2px solid transparent;
}

.nav a.active,
.nav a:hover {
  color: var(--brand);
  border-color: var(--brand);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.search {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
}

.search input {
  border: 0;
  background: transparent;
  outline: none;
  min-width: 180px;
}

.icon-btn {
  position: relative;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.icon-btn__count {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 18px;
  height: 18px;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: var(--brand);
  color: white;
  font-size: 0.72rem;
  display: grid;
  place-items: center;
}

.hero {
  padding: 4.5rem 0 2rem;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  align-items: stretch;
}

.hero__copy,
.hero__card {
  border-radius: 34px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hero__copy {
  padding: 3.8rem;
  background:
    linear-gradient(135deg, rgba(93, 36, 27, 0.96), rgba(31, 41, 51, 0.94)),
    #2c1b18;
  color: #fff7ef;
  position: relative;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: 800;
  color: #f7cf93;
}

.eyebrow::before {
  content: "";
  width: 38px;
  height: 1px;
  background: currentColor;
}

.hero h1,
.section-title,
.feature-card h3,
.product-card h3,
.promo-panel h2,
.auth-panel h1,
.account-hero h1,
.checkout-layout h1,
.story-card h3,
.highlight-card h3,
.cart-panel__header h2,
.drawer-card h3 {
  font-family: "Playfair Display", serif;
}

.hero h1 {
  font-size: clamp(2.8rem, 6vw, 4.8rem);
  line-height: 1;
  margin: 1rem 0;
}

.hero p {
  max-width: 540px;
  color: rgba(255, 247, 239, 0.8);
  line-height: 1.8;
  font-size: 1rem;
}

.hero__actions,
.stack-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.btn,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 50px;
  padding: 0 1.3rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn {
  background: var(--accent);
  color: #21190f;
  font-weight: 800;
}

.btn-secondary {
  background: var(--brand);
  color: white;
  font-weight: 700;
}

.btn-ghost {
  background: transparent;
  color: inherit;
  border-color: currentColor;
}

.btn:hover,
.btn-secondary:hover,
.btn-ghost:hover {
  transform: translateY(-1px);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2.3rem;
}

.stats strong {
  display: block;
  font-size: 1.8rem;
}

.hero__card {
  position: relative;
  min-height: 560px;
}

.hero__card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__card .floating-note {
  position: absolute;
  right: 1.4rem;
  bottom: 1.4rem;
  background: rgba(255, 252, 246, 0.94);
  color: var(--text);
  padding: 1rem 1.1rem;
  border-radius: 20px;
  width: min(260px, calc(100% - 2.8rem));
}

.section {
  padding: 4.5rem 0;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 2rem;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  margin: 0.4rem 0 0;
}

.muted {
  color: var(--text-soft);
}

.feature-grid,
.product-grid,
.story-grid,
.highlight-grid,
.benefit-grid,
.account-grid,
.checkout-grid,
.summary-grid {
  display: grid;
  gap: 1.4rem;
}

.feature-grid {
  grid-template-columns: repeat(3, 1fr);
}

.product-grid {
  grid-template-columns: repeat(4, 1fr);
}

.story-grid {
  grid-template-columns: repeat(2, 1fr);
}

.highlight-grid {
  grid-template-columns: repeat(4, 1fr);
}

.benefit-grid {
  grid-template-columns: repeat(4, 1fr);
}

.feature-card,
.story-card,
.highlight-card,
.benefit-card,
.product-card,
.panel,
.auth-card,
.account-card,
.summary-card,
.drawer-card {
  background: var(--surface);
  border: 1px solid rgba(138, 59, 47, 0.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.feature-card,
.highlight-card,
.benefit-card,
.story-card {
  padding: 1.5rem;
}

.feature-card__icon,
.benefit-card__icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--brand-soft);
  color: var(--brand);
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.product-card {
  overflow: hidden;
}

.product-card__image {
  position: relative;
  aspect-ratio: 0.82;
  background: var(--surface-2);
}

.product-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.badge-row {
  position: absolute;
  top: 1rem;
  left: 1rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.badge {
  background: rgba(31, 41, 51, 0.8);
  color: white;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
}

.badge.sale {
  background: var(--brand);
}

.badge.new {
  background: var(--accent);
  color: #24170d;
}

.wish-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  cursor: pointer;
}

.wish-btn.active {
  color: var(--brand);
}

.product-card__body {
  padding: 1.2rem;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: start;
}

.product-card h3 {
  margin: 0.2rem 0 0.45rem;
  font-size: 1.2rem;
}

.price-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin: 0.7rem 0 1rem;
}

.price {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--brand-deep);
}

.strike {
  text-decoration: line-through;
  color: var(--text-soft);
}

.product-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.8rem;
}

.tag-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.65rem 1rem;
  background: white;
  cursor: pointer;
}

.chip.active {
  background: var(--brand);
  color: white;
  border-color: var(--brand);
}

.promo-panel {
  background:
    linear-gradient(135deg, rgba(200, 154, 75, 0.15), rgba(138, 59, 47, 0.1)),
    var(--surface);
  padding: 2rem;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.4rem;
  align-items: center;
}

.promo-panel img,
.story-card img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  border-radius: 20px;
}

.site-footer {
  background: var(--panel);
  color: #f8efe7;
  margin-top: 4rem;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 1.5rem;
  padding: 3.5rem 0;
}

.site-footer h4 {
  margin-bottom: 1rem;
}

.site-footer a,
.site-footer p {
  color: rgba(248, 239, 231, 0.72);
}

.site-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1rem 0 1.5rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.filters {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.filters__group {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.filters select,
.field,
.textarea {
  border: 1px solid var(--line);
  background: white;
  border-radius: 16px;
  padding: 0.95rem 1rem;
  width: 100%;
  outline: none;
}

.catalog-hero,
.auth-shell,
.account-hero,
.checkout-layout,
.product-layout {
  padding-top: 2.5rem;
}

.catalog-hero .panel,
.account-hero .panel,
.checkout-layout .panel,
.product-layout .panel {
  padding: 2rem;
}

.product-layout__grid {
  display: grid;
  grid-template-columns: 1fr 0.95fr;
  gap: 1.5rem;
}

.product-gallery {
  border-radius: 30px;
  overflow: hidden;
  min-height: 580px;
}

.product-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-details {
  padding: 2rem;
}

.rating {
  color: var(--accent);
  font-weight: 700;
}

.size-row,
.mini-list,
.account-tabs,
.wishlist-grid,
.cart-list {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.size-btn {
  border: 1px solid var(--line);
  background: white;
  border-radius: 14px;
  min-width: 60px;
  min-height: 44px;
  cursor: pointer;
}

.size-btn.active {
  background: var(--brand);
  color: white;
  border-color: var(--brand);
}

.detail-points {
  display: grid;
  gap: 0.85rem;
  margin-top: 1.4rem;
}

.detail-points div {
  padding: 0.9rem 1rem;
  border-radius: 16px;
  background: var(--surface-2);
}

.auth-shell {
  min-height: calc(100vh - 160px);
  display: grid;
  place-items: center;
}

.auth-card {
  overflow: hidden;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  width: min(1000px, 100%);
}

.auth-panel {
  padding: 2.4rem;
  background:
    linear-gradient(180deg, rgba(93, 36, 27, 0.96), rgba(31, 41, 51, 0.96)),
    #2c1b18;
  color: #fff7ef;
}

.auth-form {
  padding: 2.4rem;
}

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

.form-row {
  margin-bottom: 1rem;
}

.form-row label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.9rem;
  font-weight: 700;
}

.error-box,
.success-box {
  padding: 0.95rem 1rem;
  border-radius: 14px;
  margin-bottom: 1rem;
  display: none;
}

.error-box.show {
  display: block;
  background: rgba(191, 63, 63, 0.12);
  color: var(--danger);
}

.success-box.show {
  display: block;
  background: rgba(43, 138, 87, 0.12);
  color: var(--success);
}

.account-grid {
  grid-template-columns: 300px 1fr;
  align-items: start;
}

.account-card,
.summary-card {
  padding: 1.5rem;
}

.account-tabs {
  margin-top: 1rem;
}

.tab-btn {
  border: 1px solid var(--line);
  background: white;
  border-radius: 999px;
  padding: 0.8rem 1rem;
  cursor: pointer;
}

.tab-btn.active {
  background: var(--brand);
  color: white;
  border-color: var(--brand);
}

.order-card,
.cart-item {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1rem;
  background: white;
}

.order-card + .order-card,
.cart-item + .cart-item {
  margin-top: 1rem;
}

.order-card__head,
.cart-item__grid {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
  flex-wrap: wrap;
}

.checkout-grid {
  grid-template-columns: 1.1fr 0.9fr;
  align-items: start;
}

.checkout-form,
.summary-card {
  padding: 1.6rem;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}

.summary-line.total {
  font-weight: 800;
  color: var(--brand-deep);
  border-bottom: 0;
  padding-bottom: 0;
}

.drawer {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.drawer.open {
  pointer-events: auto;
}

.drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 14, 12, 0.45);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.drawer.open .drawer__backdrop {
  opacity: 1;
}

.drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(460px, 100%);
  height: 100%;
  background: #fffaf4;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.drawer.open .drawer__panel {
  transform: translateX(0);
}

.cart-panel__header,
.cart-panel__footer {
  padding: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.cart-panel__footer {
  border-top: 1px solid var(--line);
  border-bottom: 0;
  background: white;
}

.cart-panel__body {
  overflow: auto;
  padding: 1rem 1.25rem;
}

.empty-state {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-soft);
}

.qty-group {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.qty-group button {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  background: white;
  border-radius: 10px;
  cursor: pointer;
}

.toast-wrap {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  display: grid;
  gap: 0.75rem;
  z-index: 70;
}

.toast {
  background: var(--panel);
  color: white;
  padding: 0.95rem 1rem;
  border-radius: 18px;
  box-shadow: var(--shadow);
  min-width: 240px;
}

.kicker {
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--brand);
}

.inline-link {
  color: var(--brand);
  font-weight: 700;
}

@media (max-width: 1024px) {
  .hero__grid,
  .promo-panel,
  .product-layout__grid,
  .checkout-grid,
  .account-grid,
  .auth-card {
    grid-template-columns: 1fr;
  }

  .feature-grid,
  .highlight-grid,
  .benefit-grid,
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .site-footer__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .site-header__row {
    grid-template-columns: 1fr;
    padding: 1rem 0;
  }

  .nav {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .feature-grid,
  .highlight-grid,
  .benefit-grid,
  .product-grid,
  .story-grid,
  .site-footer__grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .search input {
    min-width: 0;
    width: 100%;
  }

  .header-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .hero__copy,
  .product-details,
  .auth-panel,
  .auth-form {
    padding: 1.5rem;
  }
}
