* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--color-space-black);
  background: var(--color-mist);
  font-family: var(--font-sf-pro-text);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  letter-spacing: -0.016em;
}

body.cart-open,
body.dialog-open {
  overflow: hidden;
}

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

button,
input,
select {
  font: inherit;
}

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

.global-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 52px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--color-silver);
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(100% - 32px, var(--page-max-width));
  min-height: 52px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand,
.nav-links,
.profile-actions,
.toolbar,
.benefit-grid,
.contact-actions {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-size: var(--text-caption);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}

.nav-links {
  gap: 24px;
  font-size: var(--text-caption);
}

.nav-links a:hover,
.text-link:hover,
.developer-credit:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 1px;
  margin: 5px auto;
  background: var(--color-space-black);
}

.icon-button,
.bag-button {
  min-width: 32px;
  min-height: 32px;
  border: 0;
  color: var(--color-space-black);
  background: transparent;
  cursor: pointer;
}

.bag-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0;
  font-size: var(--text-caption);
}

.bag-button strong {
  min-width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-buttons);
  color: var(--color-pure-white);
  background: var(--color-brand);
  font-size: 10px;
}

.store-profile {
  width: min(100% - 32px, 900px);
  margin: 0 auto;
  padding: 72px 0 46px;
  display: grid;
  grid-template-columns: 120px 1fr;
  align-items: center;
  gap: 34px;
}

.profile-logo img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: var(--shadow-subtle);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--color-brand);
  font-size: var(--text-body-sm);
  font-weight: var(--font-weight-semibold);
}

.eyebrow.dark {
  color: var(--color-fog);
}

.store-profile h1,
.section-heading h2,
.content-card h2,
.contact-section h2,
.product-detail h2 {
  margin: 0;
  font-family: var(--font-sf-pro-display);
  font-weight: var(--font-weight-semibold);
  letter-spacing: -0.015em;
}

.store-profile h1 {
  max-width: 760px;
  font-size: clamp(36px, 6vw, 62px);
  line-height: 1.02;
}

.store-profile p:not(.eyebrow),
.section-heading p,
.content-card p,
.contact-section p {
  max-width: 720px;
  margin: 16px 0 0;
  color: var(--color-fog);
  font-size: var(--text-body);
}

.profile-actions,
.contact-actions {
  gap: 18px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.pill-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-brand);
  border-radius: var(--radius-buttons);
  padding: 10px 20px;
  color: var(--color-pure-white);
  background: var(--color-brand);
  font-size: var(--text-body-sm);
  font-weight: var(--font-weight-semibold);
  line-height: 1.18;
  cursor: pointer;
}

.pill-button.small {
  padding: 8px 15px;
  font-size: var(--text-caption);
}

.pill-button.muted {
  color: var(--color-brand);
  background: var(--color-pure-white);
}

.pill-button.disabled {
  pointer-events: none;
  opacity: 0.45;
}

.text-link,
.ghost-button {
  color: var(--color-brand);
}

.store-section,
.info-section,
.contact-section {
  width: min(100% - 32px, var(--page-max-width));
  margin: 0 auto;
  padding: var(--section-gap) 0;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 28px;
}

.section-heading.compact {
  text-align: center;
  margin: 0 auto;
}

.section-heading h2,
.content-card h2,
.contact-section h2 {
  font-size: clamp(34px, 5vw, 48px);
  line-height: 1.08;
}

.toolbar {
  align-items: stretch;
  gap: 10px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.search-field,
.select-field {
  display: grid;
  gap: 8px;
  color: var(--color-fog);
  font-size: var(--text-caption);
}

.search-field {
  flex: 1 1 340px;
}

.select-field {
  flex: 1 1 190px;
}

.search-field input,
.select-field select {
  width: 100%;
  border: 1px solid var(--color-silver);
  border-radius: var(--radius-inputs);
  padding: 13px 14px;
  color: var(--color-space-black);
  background: var(--color-pure-white);
  outline: 0;
}

.search-field input:focus,
.select-field select:focus {
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px rgba(70, 72, 79, 0.14);
}

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

.product-card {
  min-height: 392px;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-cards);
  background: var(--color-pure-white);
  overflow: hidden;
  box-shadow: var(--shadow-subtle);
}

.product-media {
  position: relative;
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  aspect-ratio: 1;
  background: #f1f1f1;
  cursor: pointer;
}

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

.save-dot {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--color-brand);
  background: rgba(255, 255, 255, 0.86);
  font-size: 14px;
}

.product-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 14px;
}

.product-card h3 {
  min-height: 42px;
  margin: 0;
  font-size: var(--text-body);
  line-height: 1.22;
  letter-spacing: -0.01em;
}

.product-card p {
  margin: 7px 0 0;
  color: var(--color-fog);
  font-size: var(--text-caption);
  line-height: var(--leading-caption);
}

.product-price {
  display: block;
  margin-top: 14px;
  font-size: var(--text-body);
  font-weight: var(--font-weight-semibold);
}

.product-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
  flex-wrap: wrap;
}

.ghost-button {
  border: 0;
  padding: 8px 4px;
  background: transparent;
  font-size: var(--text-caption);
  cursor: pointer;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 56px 20px;
  text-align: center;
  border-radius: var(--radius-cards);
  background: var(--color-pure-white);
}

.content-card {
  border-radius: var(--radius-cards);
  padding: var(--card-padding);
  background: var(--color-pure-white);
  box-shadow: var(--shadow-subtle);
}

.benefit-grid {
  align-items: stretch;
  gap: 12px;
  margin-top: 28px;
}

.benefit-grid article {
  flex: 1 1 0;
  padding: 20px;
  border-radius: var(--radius-cards);
  background: var(--color-mist);
}

.benefit-grid strong,
.benefit-grid span {
  display: block;
}

.benefit-grid span {
  margin-top: 8px;
  color: var(--color-fog);
  font-size: var(--text-body-sm);
}

.cart-panel {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  visibility: hidden;
}

.cart-panel.open {
  pointer-events: auto;
  visibility: visible;
}

.cart-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.24);
  opacity: 0;
  transition: opacity 180ms ease;
}

.cart-panel.open .cart-overlay {
  opacity: 1;
}

.cart-drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: min(390px, 100%);
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 24px;
  background: var(--color-pure-white);
  transform: translateX(100%);
  transition: transform 220ms ease;
}

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

.cart-drawer header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-drawer h2 {
  margin: 0;
  font-family: var(--font-sf-pro-display);
  font-size: var(--text-heading);
  line-height: var(--leading-heading);
  letter-spacing: -0.015em;
}

.bag-note {
  margin: 10px 0 0;
  color: var(--color-fog);
  font-size: var(--text-body-sm);
}

.cart-items {
  flex: 1;
  overflow: auto;
  padding: 18px 0;
}

.cart-item {
  display: grid;
  grid-template-columns: 54px 1fr 22px;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-silver);
}

.cart-item img {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border-radius: 6px;
}

.cart-item h3 {
  margin: 0;
  font-size: var(--text-body-sm);
  line-height: 1.2;
}

.cart-item p {
  margin: 2px 0 6px;
  color: var(--color-fog);
  font-size: var(--text-caption);
}

.cart-item a {
  color: var(--color-brand);
  font-size: var(--text-caption);
  font-weight: var(--font-weight-semibold);
}

.remove-x {
  width: 22px;
  height: 22px;
  border: 0;
  color: var(--color-fog);
  background: transparent;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.cart-footer {
  padding-top: 18px;
  border-top: 1px solid var(--color-silver);
}

.cart-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  font-size: var(--text-body-lg);
  font-weight: var(--font-weight-semibold);
}

.cart-purchase {
  width: 100%;
}

dialog {
  width: min(760px, calc(100% - 32px));
  border: 0;
  border-radius: var(--radius-cards);
  padding: 0;
  color: var(--color-space-black);
  background: var(--color-pure-white);
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(6px);
}

.dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 28px;
}

.product-detail {
  display: grid;
  grid-template-columns: 0.9fr 1fr;
  gap: 30px;
  padding: 38px;
}

.product-detail img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-cards);
}

.gallery {
  display: grid;
  gap: 12px;
}

.gallery-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--color-fog);
  font-size: var(--text-body-sm);
}

.gallery-controls button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--color-silver);
  border-radius: 50%;
  color: var(--color-brand);
  background: var(--color-pure-white);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.product-detail h2 {
  font-size: var(--text-heading-lg);
  line-height: var(--leading-heading-lg);
}

.product-detail p {
  color: var(--color-fog);
}

.spec-list {
  margin: 20px 0;
  padding: 0;
  list-style: none;
}

.spec-list li {
  padding: 9px 0;
  border-bottom: 1px solid var(--color-silver);
  color: var(--color-fog);
  font-size: var(--text-body-sm);
}

.site-footer {
  padding: 36px 20px;
  color: var(--color-fog);
  background: var(--color-pure-white);
  font-size: var(--text-caption);
  line-height: var(--leading-caption);
}

.site-footer div {
  width: min(100%, var(--page-max-width));
  margin: 0 auto;
}

.site-footer p {
  margin: 10px 0 14px;
}

.developer-credit {
  color: #8b3dff;
  font-weight: var(--font-weight-semibold);
}

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

@media (max-width: 760px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 52px;
    left: 0;
    right: 0;
    display: none;
    padding: 20px;
    flex-direction: column;
    align-items: stretch;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--color-silver);
  }

  .nav-links.open {
    display: flex;
  }

  .store-profile,
  .product-detail {
    grid-template-columns: 1fr;
  }

  .profile-logo img {
    width: 92px;
    height: 92px;
  }

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

  .benefit-grid {
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .store-profile,
  .store-section,
  .info-section,
  .contact-section {
    width: min(100% - 20px, var(--page-max-width));
  }

  .product-grid {
    gap: 10px;
  }

  .product-copy {
    padding: 11px;
  }

  .product-card h3 {
    font-size: var(--text-body-sm);
  }

  .pill-button.small {
    width: 100%;
  }
}
