:root {
  --bg: #ffffff;
  --text: #111111;
  --muted: #6f6f6f;
  --line: #e9e9e9;
  --soft: #f7f7f7;
  --accent: #111111;
  --shadow: 0 16px 36px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.4;
}

button,
input,
textarea {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 72px;
  padding: 0 44px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--text);
  border-radius: 50%;
}

.top-nav {
  display: flex;
  justify-content: center;
  gap: 34px;
  color: var(--muted);
  font-size: 14px;
}

.top-nav a:hover {
  color: var(--text);
}

.cart-button,
.checkout-button,
.secondary-button,
.add-button {
  cursor: pointer;
  border: 1px solid var(--text);
  background: var(--text);
  color: #ffffff;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.cart-button {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 14px;
}

.cart-button:hover,
.checkout-button:hover,
.add-button:hover {
  transform: translateY(-1px);
  background: #2a2a2a;
}

.cart-count {
  display: grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 999px;
  background: #ffffff;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

main {
  padding: 0 44px 80px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 34px 44px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.site-footer > div {
  display: grid;
  gap: 4px;
}

.site-footer strong {
  color: var(--text);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 18px;
}

.site-footer a,
.checkout-fields a,
.legal-document a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.intro {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  max-width: 1480px;
  margin: 0 auto;
  padding: 58px 0 42px;
}

.legal-page {
  max-width: 920px;
  margin: 0 auto;
  padding-top: 58px;
}

.legal-document h1 {
  margin-bottom: 20px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 0.98;
}

.legal-lead {
  max-width: 760px;
  margin-bottom: 42px;
  color: var(--muted);
  font-size: 20px;
}

.legal-document h2 {
  margin: 34px 0 10px;
  font-size: 24px;
}

.legal-document p {
  color: var(--muted);
  font-size: 17px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 14px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(42px, 7vw, 110px);
  line-height: 0.92;
  letter-spacing: 0;
}

.intro-copy {
  align-self: end;
  max-width: 360px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 18px;
}

.catalog-section {
  max-width: 1480px;
  margin: 0 auto;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 32px;
}

.section-head h2 {
  margin-bottom: 0;
  font-size: 32px;
  letter-spacing: 0;
}

.section-head span {
  color: var(--muted);
  font-size: 14px;
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 34px;
}

.category-tabs button {
  min-height: 38px;
  padding: 0 14px;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  font-size: 14px;
}

.category-tabs button:hover,
.category-tabs button.is-active {
  border-color: var(--text);
  background: var(--text);
  color: #ffffff;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 72px 56px;
}

.product-card {
  min-width: 0;
}

.cover-button {
  display: block;
  width: 100%;
  padding: 0;
  overflow: visible;
  cursor: pointer;
  border: 0;
  background: transparent;
}

.cover-frame {
  display: grid;
  min-height: 410px;
  place-items: end center;
  padding: 0 14px;
}

.cover-frame .cover-image {
  width: min(100%, 292px);
  aspect-ratio: 0.72;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 14px 18px 20px rgba(0, 0, 0, 0.14);
  transform-origin: center bottom;
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.product-card:hover .cover-image,
.cover-button:focus-visible .cover-image {
  transform: scale(1.045);
  box-shadow: 20px 26px 28px rgba(0, 0, 0, 0.18);
}

.bundle-cover-frame {
  position: relative;
  place-items: center;
  padding: 0 8px 26px;
}

.bundle-cover-stack {
  position: relative;
  width: min(100%, 330px);
  height: 330px;
}

.bundle-cover {
  position: absolute;
  width: 43%;
  aspect-ratio: 0.72;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 10px 15px 18px rgba(0, 0, 0, 0.14);
  transform-origin: center bottom;
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.bundle-cover-1 {
  left: 28%;
  top: 5%;
  z-index: 6;
}

.bundle-cover-2 {
  left: 6%;
  top: 18%;
  z-index: 5;
  transform: rotate(-8deg);
}

.bundle-cover-3 {
  right: 6%;
  top: 18%;
  z-index: 4;
  transform: rotate(8deg);
}

.bundle-cover-4 {
  left: 18%;
  top: 34%;
  z-index: 3;
  transform: rotate(-3deg);
}

.bundle-cover-5 {
  right: 18%;
  top: 36%;
  z-index: 2;
  transform: rotate(4deg);
}

.bundle-cover-6 {
  left: 31%;
  top: 44%;
  z-index: 1;
  transform: rotate(1deg);
}

.product-card:hover .bundle-cover,
.cover-button:focus-visible .bundle-cover {
  box-shadow: 14px 20px 24px rgba(0, 0, 0, 0.18);
}

.product-card:hover .bundle-cover-1,
.cover-button:focus-visible .bundle-cover-1 {
  transform: translateY(-8px) scale(1.03);
}

.product-card:hover .bundle-cover-2,
.cover-button:focus-visible .bundle-cover-2 {
  transform: translate(-8px, -2px) rotate(-10deg) scale(1.02);
}

.product-card:hover .bundle-cover-3,
.cover-button:focus-visible .bundle-cover-3 {
  transform: translate(8px, -2px) rotate(10deg) scale(1.02);
}

.bundle-count-pill {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 8;
  min-height: 34px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #111111;
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.16);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  transform: translateX(-50%);
  white-space: nowrap;
}

.product-info {
  padding-top: 24px;
  text-align: center;
}

.badge {
  display: block;
  min-height: 20px;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.product-info h3 {
  min-height: 56px;
  margin-bottom: 2px;
  font-size: 20px;
  line-height: 1.22;
  letter-spacing: 0;
}

.product-info p {
  min-height: 45px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.28;
}

.product-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.price {
  font-size: 18px;
  font-weight: 700;
}

.price-stack {
  display: inline-grid;
  gap: 2px;
  justify-items: start;
  line-height: 1.05;
}

.old-price {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
}

.add-button,
.secondary-button {
  min-height: 40px;
  padding: 0 18px;
  border-radius: 4px;
  font-size: 14px;
}

.secondary-button {
  background: #ffffff;
  color: var(--text);
}

.secondary-button:hover {
  background: var(--soft);
}

.cart-drawer,
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  background: rgba(0, 0, 0, 0.22);
}

.cart-drawer.is-open,
.modal.is-open {
  display: block;
}

.cart-panel {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  width: min(460px, 100%);
  height: 100%;
  flex-direction: column;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
}

.cart-head h2 {
  margin-bottom: 0;
  font-size: 24px;
}

.icon-button {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #ffffff;
  color: var(--text);
  font-size: 18px;
  line-height: 1;
}

.cart-items {
  flex: 1;
  overflow: auto;
  padding: 10px 24px;
}

.cart-line {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.cart-line img {
  width: 68px;
  height: 94px;
  object-fit: cover;
  border-radius: 2px;
}

.cart-line h3 {
  margin: 0 0 3px;
  font-size: 15px;
}

.cart-line p {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
}

.qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.qty-controls {
  display: inline-grid;
  grid-template-columns: 30px 34px 30px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.qty-controls button {
  height: 30px;
  cursor: pointer;
  border: 0;
  background: transparent;
}

.qty-controls span {
  text-align: center;
  font-size: 13px;
}

.cart-empty {
  display: none;
  padding: 34px 24px;
  color: var(--muted);
}

.cart-empty.is-visible {
  display: block;
}

.cart-footer {
  padding: 22px 24px 26px;
  border-top: 1px solid var(--line);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
  font-size: 17px;
}

.checkout-fields {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.checkout-fields label {
  display: grid;
  gap: 6px;
}

.checkout-fields span {
  color: var(--muted);
  font-size: 13px;
}

.checkout-fields input {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #ffffff;
  color: var(--text);
}

.checkout-fields input:focus {
  border-color: var(--text);
  outline: none;
}

.checkout-fields p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.checkout-button {
  width: 100%;
  min-height: 48px;
  border-radius: 4px;
}

.checkout-button:disabled {
  cursor: not-allowed;
  border-color: var(--line);
  background: var(--line);
  color: var(--muted);
  transform: none;
}

.modal {
  place-items: center;
  padding: 24px;
}

.modal.is-open {
  display: grid;
}

.modal-card {
  position: relative;
  width: min(880px, 100%);
  max-height: min(760px, 92vh);
  overflow: auto;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
}

.product-modal-layout {
  display: grid;
  grid-template-columns: minmax(220px, 360px) 1fr;
  gap: 42px;
  padding: 42px;
}

.product-modal-layout .modal-cover > .cover-frame {
  min-height: 0;
  padding: 0;
}

.product-modal-layout .cover-image {
  width: 100%;
  max-width: 360px;
  border-radius: 3px;
  box-shadow: 14px 18px 20px rgba(0, 0, 0, 0.14);
}

.product-modal-layout .bundle-cover-frame {
  min-height: 360px;
}

.modal-copy {
  align-self: center;
}

.modal-copy h2 {
  margin-bottom: 8px;
  font-size: 34px;
  line-height: 1.08;
}

.modal-copy p {
  color: var(--muted);
  font-size: 18px;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.checkout-summary {
  padding: 42px;
}

.checkout-summary h2 {
  margin-bottom: 12px;
  font-size: 32px;
}

.checkout-summary p,
.checkout-list {
  color: var(--muted);
}

.checkout-list {
  margin: 24px 0;
  padding: 0;
  list-style: none;
}

.checkout-list li {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.order-note {
  font-size: 14px;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 70;
  max-width: 320px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #ffffff;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1180px) {
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 62px 38px;
  }

  .cover-frame {
    min-height: 370px;
  }

  .bundle-cover-stack {
    height: 300px;
  }
}

@media (max-width: 820px) {
  .site-header {
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 0 18px;
  }

  .top-nav {
    display: none;
  }

  main {
    padding: 0 18px 58px;
  }

  .site-footer {
    display: grid;
    padding: 28px 18px;
  }

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

  .intro {
    display: block;
    padding: 38px 0 30px;
  }

  .legal-page {
    padding-top: 38px;
  }

  .intro-copy {
    margin-top: 18px;
    font-size: 16px;
  }

  .section-head {
    margin-bottom: 24px;
  }

  .category-tabs {
    flex-wrap: nowrap;
    margin-bottom: 26px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .category-tabs button {
    flex: 0 0 auto;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 46px 18px;
  }

  .cover-frame {
    min-height: 260px;
    padding: 0 6px;
  }

  .bundle-cover-frame {
    padding-bottom: 22px;
  }

  .bundle-cover-stack {
    height: 220px;
  }

  .bundle-count-pill {
    bottom: 8px;
    min-height: 30px;
    padding: 7px 11px;
    font-size: 12px;
  }

  .product-info {
    padding-top: 18px;
  }

  .product-info h3 {
    min-height: 44px;
    font-size: 16px;
  }

  .product-info p {
    min-height: 40px;
    margin-bottom: 16px;
    font-size: 14px;
  }

  .product-bottom {
    display: grid;
    gap: 12px;
  }

  .product-modal-layout {
    grid-template-columns: 1fr;
    gap: 26px;
    padding: 28px;
  }

  .modal-copy h2 {
    font-size: 28px;
  }
}

@media (max-width: 480px) {
  .brand span:last-child {
    display: none;
  }

  .cart-button span:first-child {
    display: none;
  }

  h1 {
    font-size: 44px;
  }

  .section-head h2 {
    font-size: 26px;
  }

  .cover-frame {
    min-height: 220px;
  }

  .bundle-cover-stack {
    height: 190px;
  }

  .add-button {
    width: 100%;
  }
}
