:root {
  --ink: #213d38;
  --accent: #00aeef;
  --paper: #f8f7f2;
  --muted: #6f7974;
  --line: #e3e7df;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font:
    15px system-ui,
    sans-serif;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  outline-offset: 4px;
}
button {
  cursor: pointer;
  border: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
header {
  background: var(--accent);
  padding: 20px max(5%, calc((100vw - 1240px) / 2));
  display: flex;
  align-items: center;
  gap: 26px;
  flex-wrap: wrap;
}
.identity {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 270px;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.15;
}
header .identity {
  color: #fff;
  font-weight: 900;
  -webkit-text-stroke: 0.6px var(--ink);
  paint-order: stroke fill;
}
.identity img {
  width: 64px;
  height: 52px;
  object-fit: contain;
}
.search {
  flex: 1;
  display: flex;
  min-width: 220px;
}
.search input {
  width: 100%;
  border: 0;
  background: #f5fcff;
  border-radius: 8px 0 0 8px;
  padding: 14px;
}
.search button {
  background: #f5fcff;
  border-radius: 0 8px 8px 0;
  padding: 10px 18px;
}
.social {
  display: flex;
  gap: 14px;
  font-size: 13px;
}
.cart-button {
  background: #fff;
  color: var(--ink);
  border-radius: 8px;
  padding: 13px 18px;
}
.navline {
  background: #f5fcff;
  border-bottom: 1px solid var(--line);
  padding: 12px 5%;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
main {
  max-width: 1240px;
  margin: auto;
  padding: 32px 24px 70px;
}
.hero {
  background: #e6eee4;
  border-radius: 20px;
  min-height: 310px;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 38px 48px;
  gap: 30px;
  position: relative;
}
.hero > div {
  flex: 1;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 2px;
  font-weight: 800;
  text-transform: uppercase;
}
.hero h1 {
  font-size: clamp(32px, 4vw, 54px);
  line-height: 1.08;
  letter-spacing: -2px;
  max-width: 600px;
  margin: 0 0 16px;
}
.hero p {
  color: #52645c;
  line-height: 1.7;
  max-width: 420px;
}
.hero img {
  width: 40%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(10px 20px 0 #203c3810);
}
.primary,
.secondary {
  display: inline-block;
  padding: 12px 19px;
  border-radius: 8px;
  font-weight: 650;
}
.primary {
  background: var(--ink);
  color: white;
}
.secondary {
  background: #ecefe8;
  color: var(--ink);
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 34px 0 18px;
}
.section-head h2 {
  font-size: 23px;
  letter-spacing: -0.6px;
  margin: 0;
}
.arrows button {
  border: 1px solid var(--line);
  background: white;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  margin-left: 7px;
}
.rail {
  display: flex;
  overflow: auto;
  gap: 18px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  padding-bottom: 12px;
}
.brand {
  flex: 0 0 126px;
  min-height: 80px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 16px;
  font-weight: 800;
  padding: 16px;
}
.brand.active {
  border: 2px solid var(--ink);
  background: #e6eee4;
}
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  flex: 0 0 232px;
  scroll-snap-align: start;
}
.card-photo {
  height: 210px;
  background: #f1f1eb;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.placeholder {
  font-size: 50px;
  color: #a8b4a6;
}
.card-body {
  padding: 17px;
}
.card h3 {
  font-size: 15px;
  font-weight: 500;
  min-height: 40px;
  margin: 8px 0;
}
.price {
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.8px;
}
.old {
  color: var(--muted);
  font-size: 12px;
  text-decoration: line-through;
}
.discount {
  font-size: 12px;
  color: #2e8059;
  margin-left: 8px;
}
.tag {
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: #dff4fc;
  border-radius: 4px;
  padding: 4px 6px;
  display: inline-block;
  margin: 3px;
}
.card button {
  width: 100%;
  margin-top: 15px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}
.empty {
  padding: 40px 24px;
  background: white;
  border: 1px dashed #cbd5c7;
  border-radius: 12px;
  text-align: center;
  color: var(--muted);
  width: 100%;
  line-height: 1.8;
}
.benefits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  background: white;
  border-radius: 12px;
  margin-top: 35px;
  padding: 24px;
  gap: 20px;
}
.benefits strong {
  display: block;
  margin-bottom: 6px;
}
.benefits small {
  color: var(--muted);
}
footer {
  border-top: 1px solid var(--line);
  padding: 30px 5%;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}
.detail {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 40px;
  background: white;
  padding: 32px;
  border-radius: 18px;
  margin-top: 24px;
}
.main-photo {
  width: 100%;
  height: 430px;
  object-fit: contain;
  background: #f8f8f3;
}
.thumbs {
  display: flex;
  gap: 8px;
  overflow: auto;
  margin-top: 12px;
}
.thumbs img {
  width: 65px;
  height: 65px;
  object-fit: contain;
}
.detail h1 {
  font-size: 32px;
}
.detail p {
  white-space: pre-wrap;
  line-height: 1.8;
}
.quantity {
  width: 80px;
}
input,
select,
textarea {
  border: 1px solid #cbd3c8;
  border-radius: 7px;
  padding: 10px;
  background: white;
  color: var(--ink);
}
label {
  display: grid;
  gap: 7px;
  margin: 15px 0;
  font-size: 13px;
}
textarea {
  min-height: 95px;
}
dialog {
  border: 0;
  border-radius: 16px;
  padding: 28px;
  width: min(650px, 94vw);
  color: var(--ink);
}
dialog::backdrop {
  background: #172c2677;
}
.cart-row {
  display: flex;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}
.cart-row > div {
  flex: 1;
}
.cart-row input {
  width: 70px;
}
#notice {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: white;
  border-radius: 8px;
  padding: 14px 22px;
  z-index: 5;
  display: none;
  max-width: 90vw;
}
.studio-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 25px 0;
}
.studio-nav button {
  padding: 12px 20px;
  border-radius: 6px;
}
.studio-layout {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 30px;
}
.editor {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
}
.list-row {
  padding: 16px;
  background: white;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.login {
  max-width: 420px;
  margin: 40px auto;
}
.photo-choice {
  display: inline-flex;
  align-items: center;
  margin: 4px;
  gap: 5px;
}
.photo-choice img {
  width: 60px;
  height: 60px;
  object-fit: contain;
}
.danger {
  color: #a33428;
  background: #fae7e0;
  padding: 9px;
  border-radius: 6px;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
.back {
  font-size: 13px;
  color: var(--muted);
}
@media (max-width: 700px) {
  header {
    gap: 14px;
    padding: 14px 18px;
  }
  .identity {
    font-size: 15px;
    flex: 1;
  }
  .social {
    display: none;
  }
  .search {
    order: 3;
    flex-basis: 100%;
  }
  .navline span:last-child {
    display: none;
  }
  main {
    padding: 20px 16px 45px;
  }
  .hero {
    padding: 28px 24px;
    min-height: 300px;
    flex-direction: column;
    align-items: flex-start;
  }
  .hero img {
    width: 100%;
    max-width: 350px;
    align-self: center;
  }
  .hero h1 {
    letter-spacing: -1px;
  }
  .hero > div {
    z-index: 1;
  }
  .benefits {
    grid-template-columns: 1fr;
  }
  .detail {
    grid-template-columns: 1fr;
    padding: 18px;
    gap: 15px;
  }
  .main-photo {
    height: 300px;
  }
  .studio-layout {
    grid-template-columns: 1fr;
  }
  .card {
    flex-basis: 210px;
  }
  footer {
    gap: 18px;
  }
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  }
  .grid .card-photo {
    height: 160px;
  }
}

.studio-products {
  display: block;
}
.product-dialog {
  width: min(700px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 20px;
  overscroll-behavior: contain;
}
.product-dialog .editor {
  border: 0;
  padding: 0;
}
.dialog-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}
.product-dialog #product-feedback {
  white-space: pre-wrap;
}
body:has(.product-dialog[open]) {
  overflow: hidden;
}
