:root {
  --pink: #f04f9b;
  --pink-strong: #d9237a;
  --pink-soft: #fff0f7;
  --pink-line: #f4c0d7;
  --black: #101013;
  --ink: #202026;
  --muted: #6f6670;
  --white: #ffffff;
  --surface: #fffafd;
  --shadow: 0 18px 45px rgba(16, 16, 19, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

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

button,
input,
select {
  font: inherit;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.top-bar {
  display: flex;
  justify-content: center;
  gap: 28px;
  padding: 8px 18px;
  background: var(--black);
  color: var(--white);
  font-size: 0.82rem;
  letter-spacing: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto minmax(260px, 720px) auto;
  align-items: center;
  gap: 18px;
  padding: 16px clamp(16px, 4vw, 64px);
  background: rgba(255, 250, 253, 0.94);
  border-bottom: 1px solid var(--pink-line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 184px;
}

.brand-logo {
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(240, 79, 155, 0.22));
}

.brand strong {
  display: block;
  font-size: 1.1rem;
  letter-spacing: 0;
}

.brand small {
  display: block;
  color: var(--pink-strong);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

.search-shell {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  min-height: 48px;
  background: var(--white);
  border: 2px solid var(--black);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(240, 79, 155, 0.14);
}

.search-shell input {
  min-width: 0;
  height: 100%;
  padding: 0 16px;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
}

.search-shell input::placeholder {
  color: #9a8993;
}

.search-shell button,
.bag-button,
.hero-action,
.product-card button,
.bag-panel button,
.checkout-button,
.clear-order-button,
.contact-button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
  letter-spacing: 0;
}

.search-shell button {
  height: 100%;
  padding: 0 22px;
  background: var(--pink);
  color: var(--black);
}

.bag-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 16px;
  background: var(--black);
  color: var(--white);
}

.bag-button span {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--pink);
  color: var(--black);
}

.hero {
  min-height: 520px;
  display: flex;
  align-items: center;
  padding: 70px clamp(18px, 6vw, 88px);
  background-image:
    linear-gradient(90deg, rgba(16, 16, 19, 0.9) 0%, rgba(16, 16, 19, 0.72) 42%, rgba(16, 16, 19, 0.22) 100%),
    url("assets/hero/luna-blush-hero.jpg");
  background-position: center;
  background-size: cover;
  color: var(--white);
}

.hero-content {
  width: min(620px, 100%);
}

.eyebrow,
.section-kicker {
  margin: 0 0 10px;
  color: var(--pink);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: 5.9rem;
  line-height: 0.92;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 490px;
  margin: 22px 0 30px;
  color: #fff3f8;
  font-size: 1.18rem;
}

.hero-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  background: var(--pink);
  color: var(--black);
  box-shadow: 0 14px 30px rgba(240, 79, 155, 0.3);
}

.market-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--black);
  color: var(--black);
}

.market-strip span {
  min-height: 54px;
  display: grid;
  place-items: center;
  padding: 10px 14px;
  background: var(--pink);
  text-align: center;
  font-size: 0.9rem;
  font-weight: 900;
}

.catalog-section {
  padding: 58px clamp(16px, 4vw, 64px) 70px;
}

.catalog-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.catalog-heading h2,
.contact-section h2 {
  margin: 0;
  color: var(--black);
  font-size: 3.25rem;
  line-height: 1;
  letter-spacing: 0;
}

.result-count {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.category-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.category-tab {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--pink-line);
  border-radius: 8px;
  background: var(--white);
  color: var(--black);
  cursor: pointer;
  font-weight: 800;
}

.category-tab.is-active {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

.sort-control {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
  white-space: nowrap;
}

.sort-control select {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--pink-line);
  border-radius: 8px;
  background: var(--white);
  color: var(--black);
  outline: 0;
}

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

.product-card {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 100%;
  background: var(--white);
  border: 1px solid var(--pink-line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(16, 16, 19, 0.08);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--pink);
  box-shadow: var(--shadow);
}

.card-media {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  padding: 16px;
  background: var(--white);
  border-bottom: 1px solid var(--pink-line);
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 6px;
}

.badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 9px;
  background: var(--black);
  color: var(--white);
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 900;
}

.card-body {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--pink-strong);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.product-card h3 {
  min-height: 50px;
  margin: 0;
  color: var(--black);
  font-size: 1.05rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.shade {
  min-height: 42px;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.card-footer {
  display: grid;
  gap: 12px;
  align-self: end;
}

.shipping {
  color: #11844b;
  font-size: 0.78rem;
  font-weight: 900;
}

.product-card button {
  min-height: 44px;
  width: 100%;
  background: var(--black);
  color: var(--white);
}

.product-card button:hover,
.bag-button:hover,
.bag-panel button:hover {
  background: #2a2a31;
}

.search-shell button:hover,
.hero-action:hover,
.checkout-button:hover,
.contact-button:hover {
  background: #ff76b3;
}

.empty-state {
  margin: 34px auto 0;
  max-width: 520px;
  padding: 22px;
  border: 2px dashed var(--pink);
  border-radius: 8px;
  color: var(--black);
  background: var(--white);
  text-align: center;
  font-weight: 800;
}

.bag-panel {
  position: fixed;
  top: 86px;
  right: 18px;
  z-index: 80;
  width: min(380px, calc(100vw - 36px));
  max-height: calc(100vh - 106px);
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  background: var(--white);
  border: 2px solid var(--black);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.bag-panel[hidden] {
  display: none;
}

.bag-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--black);
  color: var(--white);
}

.bag-panel-header button {
  min-height: 34px;
  padding: 0 12px;
  background: var(--pink);
  color: var(--black);
}

.bag-items {
  overflow: auto;
  padding: 12px;
}

.bag-item {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #f3d5e2;
}

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

.bag-item strong {
  display: block;
  color: var(--black);
  font-size: 0.9rem;
}

.bag-item span {
  color: var(--muted);
  font-size: 0.82rem;
}

.checkout-button {
  display: grid;
  place-items: center;
  min-height: 48px;
  margin: 0 16px 16px;
  background: var(--pink);
  color: var(--black);
}

.clear-order-button {
  min-height: 44px;
  margin: 12px 16px 10px;
  background: var(--white);
  color: var(--black);
  border: 2px solid var(--black);
}

.clear-order-button:hover {
  border-color: var(--pink);
  background: var(--pink-soft);
}

.clear-order-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.contact-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 54px clamp(16px, 4vw, 64px);
  background: var(--black);
  color: var(--white);
}

.contact-section h2 {
  color: var(--white);
}

.contact-section p:last-child {
  max-width: 560px;
  margin: 16px 0 0;
  color: #ffe6f1;
}

.contact-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  background: var(--pink);
  color: var(--black);
  white-space: nowrap;
}

.credit-footer {
  padding: 18px clamp(16px, 4vw, 64px);
  background: var(--white);
  color: var(--black);
  border-top: 1px solid var(--pink-line);
  text-align: center;
  font-weight: 900;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 100;
  min-width: min(340px, calc(100vw - 32px));
  padding: 13px 16px;
  background: var(--black);
  color: var(--white);
  border: 2px solid var(--pink);
  border-radius: 8px;
  box-shadow: var(--shadow);
  text-align: center;
  font-weight: 800;
  transform: translate(-50%, 120px);
  opacity: 0;
  transition: transform 180ms ease, opacity 180ms ease;
}

.toast.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

@media (max-width: 860px) {
  .top-bar {
    flex-wrap: wrap;
    gap: 8px 18px;
  }

  .site-header {
    grid-template-columns: 1fr auto;
  }

  .search-shell {
    grid-column: 1 / -1;
    order: 3;
  }

  .brand {
    min-width: 0;
  }

  .market-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .catalog-heading,
  .controls,
  .contact-section {
    align-items: stretch;
    flex-direction: column;
  }

  .sort-control {
    justify-content: space-between;
  }

  .sort-control select {
    flex: 1;
  }

  .hero h1 {
    font-size: 4.4rem;
  }

  .catalog-heading h2,
  .contact-section h2 {
    font-size: 2.5rem;
  }

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

@media (max-width: 560px) {
  .site-header {
    padding: 12px;
    gap: 12px;
  }

  .brand strong {
    font-size: 1rem;
  }

  .brand small {
    font-size: 0.7rem;
  }

  .bag-button {
    padding: 0 12px;
  }

  .hero {
    min-height: 440px;
    padding: 54px 18px;
    background-image:
      linear-gradient(90deg, rgba(16, 16, 19, 0.94), rgba(16, 16, 19, 0.74)),
      url("assets/hero/luna-blush-hero.jpg");
  }

  .hero h1 {
    font-size: 3.2rem;
  }

  .catalog-heading h2,
  .contact-section h2 {
    font-size: 2rem;
  }

  .hero-copy {
    font-size: 1rem;
  }

  .market-strip {
    grid-template-columns: 1fr;
  }

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

  .card-body {
    padding: 12px;
  }

  .product-card h3 {
    min-height: 58px;
    font-size: 0.93rem;
  }

  .shade {
    min-height: 54px;
    font-size: 0.82rem;
  }

  .product-card button {
    min-height: 40px;
    font-size: 0.86rem;
  }

  .bag-panel {
    top: 122px;
    right: 12px;
    width: calc(100vw - 24px);
    max-height: calc(100vh - 142px);
  }
}
