body.cart-open {
  overflow: hidden;
}

.shop-surface .site-header {
  gap: 16px;
}

.shop-surface .site-nav a[aria-current="page"],
.shop-surface .site-nav a.is-active {
  border-color: var(--surface);
}

.cart-button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(247, 242, 231, 0.42);
  border-radius: 4px;
  color: var(--surface);
  background: transparent;
}

.cart-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.cart-button span {
  min-width: 1ch;
  font-size: 12px;
  font-weight: 900;
}

.shop-surface #app {
  min-height: calc(100vh - 76px);
  min-height: calc(100dvh - 76px);
}

.shop-surface #app:focus {
  outline: none;
}

.shop-surface:has(#app:empty) .site-footer {
  display: none;
}

.shop-page {
  width: min(100% - 36px, var(--max));
  margin: 0 auto;
  padding: clamp(36px, 6vw, 72px) 0 clamp(72px, 10vw, 120px);
}

.shop-copy h1,
.product-info h1 {
  margin: 0;
  color: var(--navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(36px, 5vw, 66px);
  font-style: normal;
  line-height: 0.98;
}

.shop-copy p,
.product-info p {
  margin: 0;
  color: var(--ink-soft);
  font-size: clamp(17px, 2vw, 21px);
}

.shop-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
}

.shop-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}

.shop-filters button {
  padding: 8px 0;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.shop-filters button.is-active,
.shop-filters button:hover,
.shop-filters button:focus-visible {
  color: var(--navy);
  border-color: var(--navy);
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 48px) clamp(20px, 3vw, 36px);
}

.shop-item {
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
}

.shop-item a {
  display: block;
  overflow: hidden;
  background: var(--surface);
}

.shop-item img {
  width: 100%;
  aspect-ratio: 0.92 / 1;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.shop-item a:hover img,
.shop-item a:focus-visible img {
  transform: scale(1.03);
}

.shop-item-meta {
  display: grid;
  gap: 8px;
}

.shop-item-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.shop-item h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  line-height: 1.1;
}

.shop-item .price,
.product-info .price {
  color: var(--red);
  font-weight: 900;
}

.shop-item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.add-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--red);
  border-radius: 4px;
  color: var(--white);
  background: var(--red);
}

.icon-button {
  color: var(--navy);
  background: transparent;
  border-color: var(--line);
}

.add-button svg,
.icon-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.product-detail {
  display: grid;
  grid-template-columns: minmax(280px, 0.54fr) minmax(0, 0.46fr);
  gap: clamp(28px, 5vw, 62px);
  align-items: start;
}

.product-gallery {
  margin: 0;
  background: var(--surface);
}

.product-gallery img {
  width: 100%;
  aspect-ratio: 0.98 / 1;
  object-fit: cover;
}

.product-info {
  display: grid;
  align-content: start;
  gap: 16px;
}

.product-info .price {
  font-size: 20px;
}

.option-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.option-button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--navy);
  background: transparent;
  font-size: 12px;
  font-weight: 900;
}

.option-button.is-active {
  color: var(--white);
  border-color: var(--red);
  background: var(--red);
}

.detail-list {
  display: grid;
  gap: 10px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.detail-list li {
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.shop-copy {
  display: grid;
  gap: 18px;
  max-width: 720px;
}

.shop-copy .hero-actions {
  margin-top: 8px;
}

.access-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.access-steps span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.access-steps strong {
  display: block;
  margin-top: 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
}

.access-steps p {
  margin-top: 8px;
  color: var(--muted);
}

.cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  justify-content: flex-end;
  background: rgba(7, 26, 53, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.cart-drawer.is-open {
  opacity: 1;
  pointer-events: auto;
}

.cart-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  width: min(100%, 430px);
  height: 100%;
  background: var(--bg);
  transform: translateX(24px);
  transition: transform 0.35s ease;
}

.cart-drawer.is-open .cart-panel {
  transform: translateX(0);
}

.cart-head,
.cart-foot {
  padding: 22px;
  border-bottom: 1px solid var(--line);
}

.cart-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
}

.cart-head h2 {
  margin: 0;
  color: var(--navy);
  font-size: 34px;
}

.cart-state {
  padding: 12px 22px 0;
  color: var(--muted);
  font-size: 14px;
}

.cart-lines {
  overflow: auto;
  padding: 18px 22px;
}

.cart-line {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.cart-line img {
  width: 74px;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--surface);
}

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

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

.cart-line-controls {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-top: 10px;
}

.qty-controls {
  display: inline-flex;
  border: 1px solid var(--line);
}

.qty-controls button {
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  font-weight: 900;
}

.qty-controls span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
  font-weight: 900;
}

.cart-foot {
  display: grid;
  gap: 14px;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 17px;
}

.cart-foot p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.toast-region {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  display: grid;
  gap: 10px;
}

.toast {
  max-width: 320px;
  padding: 13px 15px;
  color: var(--surface);
  background: var(--navy);
  font-size: 14px;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

@media (max-width: 1040px) {
  .shop-grid,
  .product-detail,
  .access-steps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .shop-surface .site-header {
    flex-wrap: wrap;
  }

  .shop-surface .site-nav {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    overflow: visible;
    flex-wrap: wrap;
  }

  .shop-surface .cart-button {
    margin-left: auto;
  }

  .shop-page {
    width: min(100% - 28px, var(--max));
  }

  .shop-grid {
    grid-template-columns: 1fr;
  }

  .cart-button {
    min-height: 36px;
    padding: 0 8px;
  }

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

  .cart-line img {
    width: 62px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .shop-item img,
  .cart-drawer,
  .cart-panel {
    transition: none;
  }

  .shop-item a:hover img,
  .shop-item a:focus-visible img {
    transform: none;
  }
}
