.shop-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(16px);
}

.shop-header-inner {
  width: min(100% - 48px, 1280px);
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.shop-brand {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
}

.shop-brand img {
  width: auto;
  height: 40px;
  object-fit: contain;
}

.shop-nav,
.shop-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.shop-nav a,
.shop-signin {
  padding: 9px 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.shop-nav a:hover,
.shop-nav a.is-current,
.shop-signin:hover {
  background: var(--surface-2);
}

.shop-header-actions {
  gap: 8px;
}

.shop-project,
.shop-signin {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.shop-project {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--bg);
}

.shop-menu-button,
.shop-mobile-nav {
  display: none;
}

.shop-main {
  min-height: calc(100vh - 72px);
}

.shop-section {
  width: min(100% - 48px, 1280px);
  margin: 0 auto;
  padding: clamp(36px, 6vw, 72px) 0 80px;
}

.shop-intro {
  margin-bottom: 34px;
}

.shop-eyebrow,
.product-category {
  color: #96969d;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.shop-intro h1 {
  margin: 12px 0;
  font-size: clamp(34px, 5vw, 54px);
  letter-spacing: -0.045em;
}

.shop-intro > p:last-child {
  color: var(--ink-2);
  font-size: 16px;
}

.shop-message {
  margin-bottom: 18px;
  color: var(--ink-2);
}

.shop-message:empty {
  display: none;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.product-card {
  min-width: 0;
  overflow: hidden;
  border-radius: 20px;
  background: #f5f5f7;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgb(18 19 20 / 9%);
}

.product-card-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.product-card-image,
.product-card-placeholder {
  display: grid;
  width: 100%;
  aspect-ratio: 1 / 0.92;
  place-items: center;
  overflow: hidden;
  background: #e7e7e9;
}

.product-card-image {
  object-fit: cover;
  transition: transform 250ms ease;
}

.product-card:hover .product-card-image {
  transform: scale(1.025);
}

.product-card-placeholder {
  color: #777980;
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: 56px;
  font-weight: 600;
}

.product-card-body {
  padding: 17px 17px 0;
}

.product-card-body .product-category {
  margin-bottom: 7px;
}

.product-card-title {
  overflow: hidden;
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  padding: 0 17px 16px;
}

.product-card-price {
  font-size: 17px;
  font-weight: 700;
  white-space: nowrap;
}

.product-add-button {
  display: inline-flex;
  min-height: 36px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: #1d1d1f;
  color: white;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.product-add-button:hover,
.detail-add-button:hover {
  background: #38383b;
}

.product-dialog,
.order-dialog {
  width: min(1160px, calc(100% - 36px));
  max-width: none;
  max-height: min(90vh, 760px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 22px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 80px rgb(0 0 0 / 24%);
}

.product-dialog::backdrop,
.order-dialog::backdrop {
  background: rgb(15 16 18 / 48%);
  backdrop-filter: blur(4px);
}

.dialog-close {
  position: absolute;
  z-index: 1;
  top: 14px;
  right: 14px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  font-size: 24px;
  cursor: pointer;
}

.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 60px);
  padding: clamp(22px, 5vw, 52px);
}

.product-detail-image-wrap {
  display: grid;
  min-height: 380px;
  aspect-ratio: 1 / 1;
  place-items: center;
  overflow: hidden;
  border-radius: 18px;
  background: #e7e7e9;
}

.product-detail-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-detail-placeholder {
  color: #777980;
  font-size: 84px;
  font-weight: 600;
}

.product-detail-info {
  align-self: center;
}

.product-detail-info h2 {
  margin-top: 16px;
  font-size: clamp(30px, 4vw, 42px);
}

.product-detail-price {
  margin-top: 18px;
  font-size: 28px;
  font-weight: 700;
}

.product-detail-description {
  min-height: 48px;
  margin-top: 20px;
  color: var(--ink-2);
  line-height: 1.7;
  white-space: pre-line;
}

.quantity-control {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 18px;
  margin-top: 22px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
}

.quantity-control button {
  width: 24px;
  height: 34px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 18px;
  cursor: pointer;
}

.quantity-control output {
  min-width: 16px;
  text-align: center;
}

.detail-add-button {
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 20px;
  border: 0;
  border-radius: 999px;
  background: #1d1d1f;
  color: white;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.product-detail-note {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  color: var(--ink-2);
  font-size: 14px;
}

.product-detail-note a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.order-dialog {
  width: min(460px, calc(100% - 32px));
  padding: 24px;
}

.order-form {
  display: grid;
  gap: 14px;
}

.order-form h2 {
  font-size: 26px;
}

@media (max-width: 1020px) {
  .shop-header-inner {
    width: min(100% - 36px, 1280px);
    gap: 14px;
  }

  .shop-nav {
    gap: 0;
  }

  .shop-nav a {
    padding: 8px;
    font-size: 13px;
  }

  .shop-project {
    display: none;
  }

  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
}

@media (max-width: 720px) {
  .shop-header-inner {
    min-height: 64px;
  }

  .shop-brand img {
    height: 34px;
  }

  .shop-nav,
  .shop-project {
    display: none;
  }

  .shop-menu-button {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--surface);
    color: var(--ink);
    cursor: pointer;
  }

  .shop-mobile-nav:not([hidden]) {
    display: grid;
    gap: 4px;
    padding: 8px 18px 16px;
    border-top: 1px solid var(--border);
    background: var(--bg);
  }

  .shop-mobile-nav a {
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 15px;
  }

  .shop-mobile-nav a:hover,
  .shop-mobile-nav a[aria-current="page"] {
    background: var(--surface-2);
  }

  .shop-section {
    width: min(100% - 32px, 1280px);
    padding-top: 36px;
  }

  .shop-intro {
    margin-bottom: 24px;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .product-card {
    border-radius: 16px;
  }

  .product-card-body {
    padding: 13px 12px;
  }

  .product-card-footer {
    margin-top: 10px;
    padding: 0 12px 13px;
  }

  .product-card-title {
    font-size: 14px;
  }

  .product-card-price {
    font-size: 14px;
  }

  .product-add-button {
    min-height: 34px;
    padding: 0 10px;
    font-size: 12px;
  }

  .product-detail {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 18px;
  }

  .product-detail-image-wrap {
    min-height: 0;
    max-height: 42vh;
  }

  .product-detail-info h2 {
    margin-top: 8px;
  }

  .product-detail-price {
    margin-top: 10px;
  }

  .product-detail-description {
    min-height: 0;
    margin-top: 10px;
  }
}

@media (min-width: 721px) and (max-width: 900px) {
  .shop-header-inner {
    flex-wrap: wrap;
    padding: 10px 0;
  }

  .shop-nav {
    order: 3;
    width: 100%;
    justify-content: center;
  }

  .shop-nav a {
    padding: 7px 10px;
  }
}

@media (max-width: 360px) {
  .shop-header-inner {
    width: calc(100% - 24px);
  }

  .product-grid {
    gap: 9px;
  }

  .product-card-body {
    padding: 11px 9px 0;
  }

  .product-card-footer {
    padding: 0 9px 11px;
  }

  .product-card-price {
    font-size: 11px;
  }

  .product-add-button {
    width: 34px;
    min-width: 34px;
    padding: 0;
  }

  .product-add-button span {
    display: none;
  }
}

@media (min-width: 361px) and (max-width: 420px) {
  .product-card-footer {
    gap: 4px;
  }

  .product-card-price {
    font-size: 12px;
  }

  .product-add-button {
    gap: 5px;
    padding: 0 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .product-card,
  .product-card-image {
    transition: none;
  }
}
