:root {
  --ink: #26231f;
  --ink-soft: #59544c;
  --line: rgba(102, 85, 61, 0.16);
  --accent: #7f6d56;
  --paper: #f6f2eb;
  --mist: #e8e1d6;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 84% -12%, rgba(255, 255, 255, 0.8), transparent 40%),
    radial-gradient(circle at 12% 80%, rgba(222, 202, 173, 0.17), transparent 54%),
    linear-gradient(160deg, var(--paper), var(--mist));
}

[hidden] {
  display: none !important;
}

.container {
  width: min(1240px, calc(100% - 2.4rem));
  margin: 0 auto;
}

.global-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(246, 241, 233, 0.9);
  backdrop-filter: blur(10px);
}

.nav-grid {
  min-height: 68px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
}

.logo {
  text-decoration: none;
  color: #15120e;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.nav-center,
.main-nav {
  display: flex;
  align-items: center;
  gap: 1.12rem;
}

.main-nav {
  justify-self: end;
}

.nav-center a,
.main-nav a {
  text-decoration: none;
  color: #16293d;
  font-size: 0.74rem;
  letter-spacing: 0.02em;
  font-weight: 650;
  padding: 0.37rem 0.62rem;
  border-radius: 8px;
}

.nav-center a:hover,
.main-nav a:hover,
.main-nav a.active {
  background: #0f243a;
  color: #f7f1e9;
}

.main-nav .cart-count {
  margin-left: 0.26rem;
  font-size: 0.62rem;
}

.cart-main {
  padding: 1.7rem 0 2.8rem;
}

.cart-head {
  border: 1px solid rgba(108, 91, 66, 0.14);
  border-radius: 28px;
  padding: clamp(1.2rem, 2.7vw, 2rem);
  background:
    radial-gradient(circle at 86% 14%, rgba(255, 255, 255, 0.66), transparent 38%),
    linear-gradient(145deg, rgba(250, 247, 240, 0.88), rgba(240, 233, 223, 0.8));
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.66rem;
  color: #7a7167;
  font-weight: 700;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
}

.cart-head h1 {
  margin-top: 0.52rem;
  font-size: clamp(2.2rem, 3.7vw, 3.55rem);
  line-height: 0.95;
}

.cart-head p:last-child {
  margin: 0.7rem 0 0;
  max-width: 60ch;
  color: var(--ink-soft);
  line-height: 1.6;
}

.cart-layout {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 1rem;
  align-items: start;
}

.cart-list-panel,
.cart-summary {
  border: 1px solid rgba(108, 91, 66, 0.14);
  border-radius: 24px;
  background:
    linear-gradient(148deg, rgba(251, 247, 241, 0.92), rgba(242, 235, 226, 0.82)),
    #f5efe5;
  box-shadow: 0 18px 34px rgba(52, 41, 30, 0.08);
}

.cart-list-panel {
  padding: 0.9rem;
}

.cart-empty {
  padding: 1.3rem 1rem;
}

.cart-empty h2 {
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  line-height: 0.95;
}

.cart-empty p {
  margin: 0.62rem 0 1rem;
  color: #5b544c;
  line-height: 1.6;
}

.cart-list {
  display: grid;
  gap: 0.72rem;
}

.cart-item {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr) auto;
  gap: 0.8rem;
  align-items: center;
  border: 1px solid rgba(120, 103, 77, 0.17);
  border-radius: 18px;
  background: rgba(255, 251, 245, 0.86);
  padding: 0.62rem;
}

.cart-item-media {
  border-radius: 14px;
  overflow: hidden;
  display: block;
  background: linear-gradient(155deg, rgba(244, 237, 228, 0.9), rgba(227, 216, 203, 0.76));
}

.cart-item-media img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  display: block;
}

.cart-item-kicker {
  margin: 0;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7d6f5f;
  font-weight: 700;
}

.cart-item h3 {
  margin-top: 0.2rem;
  font-size: 1.6rem;
  line-height: 0.9;
}

.cart-item-meta {
  margin: 0.34rem 0 0;
  color: #59534c;
  font-size: 0.82rem;
}

.cart-item-actions {
  margin-top: 0.56rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.qty-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(127, 109, 84, 0.24);
  border-radius: 999px;
  background: rgba(255, 252, 248, 0.9);
  overflow: hidden;
}

.qty-control button {
  border: 0;
  background: transparent;
  width: 30px;
  height: 30px;
  font-size: 1rem;
  color: #23374d;
  cursor: pointer;
}

.qty-control span {
  min-width: 30px;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: #3a3128;
}

.remove-btn {
  border: 0;
  background: transparent;
  color: #7b6550;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  cursor: pointer;
}

.cart-item-total {
  margin: 0;
  align-self: start;
  color: #3b3126;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.cart-summary {
  padding: 1rem;
  position: sticky;
  top: 88px;
}

.cart-summary h2 {
  font-size: clamp(1.42rem, 2.2vw, 1.9rem);
  line-height: 0.95;
}

.summary-row {
  margin-top: 0.7rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  color: #4f4a43;
  font-size: 0.84rem;
}

.summary-row.total {
  margin-top: 0.82rem;
  padding-top: 0.72rem;
  border-top: 1px solid rgba(122, 106, 82, 0.18);
  color: #221d18;
}

.summary-row strong {
  font-size: 0.88rem;
  letter-spacing: 0.04em;
}

.btn {
  width: 100%;
  margin-top: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  font-family: "Manrope", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 0.72rem 1rem;
  cursor: pointer;
}

.btn-primary {
  background: #12283f;
  border-color: rgba(18, 40, 63, 0.88);
  color: #f7f2ea;
}

.btn-primary:hover {
  background: #0f2236;
}

.btn-secondary {
  background: rgba(255, 252, 248, 0.74);
  border-color: rgba(123, 106, 81, 0.26);
  color: #695542;
}

.continue-link {
  margin-top: 0.82rem;
  display: inline-block;
  text-decoration: none;
  color: #7a6144;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
}

.continue-link::after {
  content: " →";
}

@media (max-width: 980px) {
  .cart-layout {
    grid-template-columns: 1fr;
  }

  .cart-summary {
    position: static;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(1240px, calc(100% - 1.1rem));
  }

  .global-header {
    position: static;
  }

  .nav-center {
    display: none;
  }

  .nav-grid {
    grid-template-columns: 1fr auto;
    min-height: 62px;
  }

  .logo {
    font-size: 1.34rem;
  }

  .main-nav {
    gap: 0.44rem;
  }

  .main-nav a {
    font-size: 0.68rem;
    padding: 0.32rem 0.48rem;
  }

  .cart-item {
    grid-template-columns: 86px minmax(0, 1fr);
  }

  .cart-item-total {
    grid-column: 2;
    justify-self: end;
    margin-top: -0.25rem;
  }
}
