:root {
  --ink: #111111;
  --soft-ink: #44413d;
  --muted: #77726b;
  --paper: #f7f4ef;
  --white: #ffffff;
  --line: rgba(17, 17, 17, 0.14);
  --gold: #a38248;
  --mineral: #64706c;
  --violet: #6f5a7c;
  --shadow: 0 22px 70px rgba(17, 17, 17, 0.16);
  font-family: "Times New Roman", Times, "Noto Serif SC", serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

body[data-dialog-open="true"] {
  overflow: hidden;
}

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

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

button,
input,
textarea {
  font: inherit;
}

.site-header,
.admin-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 76px;
  padding: 0 34px;
  color: var(--white);
  transition: background 240ms ease, color 240ms ease, box-shadow 240ms ease;
}

.site-header[data-elevated="true"],
.admin-header {
  color: var(--ink);
  background: rgba(247, 244, 239, 0.92);
  box-shadow: 0 1px 0 var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  font-family: "Times New Roman", Times, serif;
  font-size: 24px;
  letter-spacing: 0;
}

.main-nav {
  display: flex;
  gap: 30px;
  align-items: center;
  font-size: 12px;
  text-transform: uppercase;
}

.main-nav a,
.admin-link,
.language-button {
  opacity: 0.88;
}

.main-nav a:hover,
.admin-link:hover,
.language-button:hover {
  opacity: 1;
}

.header-actions,
.admin-header-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 12px;
  text-transform: uppercase;
}

.header-actions {
  min-height: 24px;
}

.language-menu {
  position: relative;
}

.language-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  text-transform: uppercase;
}

.language-options {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  min-width: 176px;
  padding: 6px;
  border: 1px solid rgba(247, 244, 239, 0.38);
  background: rgba(17, 17, 17, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.site-header[data-elevated="true"] .language-options {
  border-color: var(--line);
  background: rgba(247, 244, 239, 0.96);
}

.language-options button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 0;
  color: inherit;
  background: transparent;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}

.language-options button:hover,
.language-options button[aria-selected="true"] {
  background: rgba(255, 255, 255, 0.13);
}

.site-header[data-elevated="true"] .language-options button:hover,
.site-header[data-elevated="true"] .language-options button[aria-selected="true"] {
  background: rgba(17, 17, 17, 0.06);
}

.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  color: var(--white);
}

.hero-media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.68), rgba(0, 0, 0, 0.22) 48%, rgba(0, 0, 0, 0.08)),
    url("assets/hero-hertz-bracelet.png") center / cover;
  transform: scale(1.01);
}

.hero-copy {
  position: relative;
  width: min(720px, calc(100% - 48px));
  margin: 0 0 9vh 7vw;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: rgba(255, 255, 255, 0.72);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Times New Roman", Times, "Noto Serif SC", serif;
  font-weight: 400;
}

h1 {
  font-size: clamp(72px, 12vw, 170px);
  line-height: 0.86;
}

h2 {
  font-size: clamp(34px, 5vw, 72px);
  line-height: 0.96;
}

h3 {
  font-size: 27px;
  line-height: 1.05;
}

p {
  line-height: 1.7;
}

.hero-line {
  max-width: 520px;
  margin: 28px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 19px;
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  border: 1px solid currentColor;
  border-radius: 0;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease, opacity 180ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  color: var(--paper);
  background: var(--ink);
  border-color: var(--ink);
}

.hero .button-primary,
.contact-section .button-primary {
  color: var(--ink);
  background: var(--paper);
  border-color: var(--paper);
}

.button-quiet {
  background: transparent;
}

.intro-band {
  display: grid;
  place-items: center;
  min-height: 34vh;
  padding: 76px 24px;
  background: var(--ink);
  color: var(--paper);
}

.intro-band p {
  width: min(940px, 100%);
  margin: 0;
  font-family: "Times New Roman", Times, "Noto Serif SC", serif;
  font-size: clamp(28px, 4vw, 54px);
  line-height: 1.08;
  text-align: center;
}

.collection-section,
.shipping-section {
  padding: 104px 5vw;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(170px, 0.34fr) minmax(0, 0.66fr);
  gap: 36px;
  align-items: end;
  margin-bottom: 52px;
}

.section-heading h2 {
  max-width: 860px;
}

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

.product-card {
  background: var(--white);
  border: 1px solid rgba(17, 17, 17, 0.08);
}

.product-image-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1 / 1.08;
  padding: 0;
  border: 0;
  background: var(--white);
  cursor: pointer;
  overflow: hidden;
}

.sold-out-badge {
  position: absolute;
  right: 16px;
  bottom: 16px;
  padding: 9px 12px;
  border: 1px solid rgba(247, 244, 239, 0.72);
  background: rgba(17, 17, 17, 0.52);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.product-card.is-sold-out {
  background: #ece9e3;
}

.product-card.is-sold-out img {
  filter: grayscale(0.8) brightness(0.86);
}

.product-card.is-sold-out .product-card-copy {
  color: rgba(17, 17, 17, 0.62);
}

.product-card.is-sold-out .product-card-footer button {
  color: rgba(17, 17, 17, 0.52);
}

.product-image-button img {
  width: 100%;
  height: 100%;
  padding: 0;
  object-fit: cover;
  transition: transform 700ms ease;
}

.product-image-button:hover img {
  transform: scale(1.035);
}

.product-card-copy {
  padding: 28px;
}

.product-card-copy p:not(.eyebrow) {
  margin: 14px 0 0;
  color: var(--soft-ink);
  font-size: 15px;
  line-height: 1.55;
}

.product-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.product-card-footer span {
  font-family: "Times New Roman", Times, serif;
  font-size: 23px;
}

.product-card-footer button {
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
}

.craft-section {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 0.8fr);
  min-height: 740px;
  background: #f1ede5;
}

.craft-image {
  background:
    linear-gradient(rgba(17, 17, 17, 0.02), rgba(17, 17, 17, 0.02)),
    url("assets/craft-hertz-bracelet.jpg") 34% 47% / cover;
}

.craft-copy {
  align-self: center;
  padding: 7vw 6vw;
}

.craft-copy p:not(.eyebrow) {
  color: var(--soft-ink);
  font-size: 17px;
}

.detail-list {
  margin: 34px 0 0;
}

.detail-list div,
.product-specs div {
  padding: 18px 0;
  border-top: 1px solid rgba(17, 17, 17, 0.16);
}

dt {
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

dd {
  margin: 0;
  color: var(--soft-ink);
  line-height: 1.55;
}

.shipping-section {
  background: var(--paper);
}

.shipping-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.shipping-grid article {
  min-height: 250px;
  padding: 34px;
  background: var(--paper);
}

.shipping-grid p {
  color: var(--soft-ink);
}

.contact-section {
  padding: 112px 5vw;
  color: var(--paper);
  background: linear-gradient(135deg, #141414, #28302d 68%, #5c4c66);
}

.contact-section h2 {
  max-width: 780px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 5vw;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.site-footer span:first-child {
  color: var(--ink);
  font-family: "Times New Roman", Times, serif;
  font-size: 18px;
}

.product-dialog {
  position: fixed;
  z-index: 40;
  inset: 0;
  display: none;
}

.product-dialog[aria-hidden="false"] {
  display: block;
}

.dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.58);
}

.dialog-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.8fr);
  width: min(1060px, calc(100vw - 34px));
  max-height: calc(100vh - 34px);
  overflow: auto;
  transform: translate(-50%, -50%);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.dialog-close {
  position: absolute;
  z-index: 2;
  top: 14px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: 0;
  background: rgba(247, 244, 239, 0.86);
  color: var(--ink);
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.dialog-image-wrap {
  position: relative;
  background: #e2ded6;
  overflow: hidden;
}

.dialog-gallery {
  height: 100%;
  max-height: calc(100vh - 34px);
}

.dialog-gallery img {
  width: 100%;
  height: 100%;
  min-height: 560px;
  object-fit: cover;
}

.gallery-button {
  position: absolute;
  z-index: 3;
  top: 50%;
  display: grid;
  place-items: center;
  width: 44px;
  height: 54px;
  border: 1px solid rgba(247, 244, 239, 0.68);
  background: rgba(17, 17, 17, 0.32);
  color: var(--white);
  font-family: "Times New Roman", Times, serif;
  font-size: 42px;
  line-height: 1;
  transform: translateY(-50%);
  cursor: pointer;
}

.gallery-button:hover {
  background: rgba(17, 17, 17, 0.52);
}

.gallery-prev {
  left: 16px;
}

.gallery-next {
  right: 16px;
}

.gallery-count {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 18px;
  padding: 7px 11px;
  background: rgba(17, 17, 17, 0.4);
  color: var(--white);
  font-size: 12px;
  transform: translateX(-50%);
}

.dialog-content {
  padding: 58px 48px 42px;
}

.dialog-content .price {
  margin: 18px 0;
  font-family: "Times New Roman", Times, serif;
  font-size: 28px;
}

.product-specs {
  margin: 30px 0;
}

.purchase-button[aria-disabled="true"] {
  pointer-events: none;
  opacity: 0.44;
}

.fine-print {
  color: var(--muted);
  font-size: 12px;
}

.admin-body {
  background: var(--paper);
}

.admin-header {
  position: sticky;
}

.admin-shell {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: 54px 0 96px;
}

.admin-intro {
  max-width: 720px;
  margin-bottom: 34px;
}

.admin-intro h1 {
  font-size: clamp(42px, 8vw, 92px);
}

.admin-panel {
  margin-top: 22px;
  padding: 30px;
  border: 1px solid var(--line);
  background: var(--white);
}

.admin-panel h2 {
  margin-bottom: 20px;
  font-size: 28px;
}

.admin-form,
.product-form {
  display: grid;
  gap: 18px;
}

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

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--soft-ink);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

input,
textarea {
  width: 100%;
  border: 1px solid rgba(17, 17, 17, 0.18);
  border-radius: 0;
  background: #fbfaf7;
  color: var(--ink);
  padding: 13px 14px;
  outline: none;
}

input:focus,
textarea:focus {
  border-color: var(--ink);
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
}

.form-message {
  min-height: 24px;
  margin: 0;
  color: var(--mineral);
}

.admin-products {
  display: grid;
  gap: 12px;
}

.admin-product-row {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
}

.admin-row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.admin-row-actions button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(17, 17, 17, 0.18);
  background: #fbfaf7;
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
}

.admin-row-actions button:hover {
  border-color: var(--ink);
}

.admin-product-row img {
  width: 88px;
  height: 88px;
  object-fit: cover;
  background: #e9e5dd;
}

.admin-product-row h3 {
  font-size: 21px;
}

.admin-product-row p {
  margin: 6px 0 0;
  color: var(--muted);
}

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

@media (max-width: 860px) {
  .site-header,
  .admin-header {
    grid-template-columns: 1fr auto;
    min-height: 66px;
    padding: 0 18px;
  }

  .main-nav {
    display: none;
  }

  .hero {
    min-height: 88vh;
  }

  .hero-copy {
    width: calc(100% - 48px);
    margin: 0 0 7vh 24px;
  }

  .hero-line {
    max-width: 300px;
    font-size: 18px;
  }

  .section-heading,
  .craft-section,
  .dialog-panel,
  .shipping-grid,
  .form-grid,
  .product-grid {
    grid-template-columns: 1fr;
  }

  .collection-section,
  .shipping-section,
  .contact-section {
    padding: 72px 22px;
  }

  .craft-section {
    min-height: auto;
  }

  .craft-image {
    min-height: 420px;
  }

  .craft-copy {
    padding: 58px 24px;
  }

  .dialog-panel {
    width: calc(100vw - 20px);
  }

  .dialog-gallery img {
    height: auto;
    min-height: 340px;
    max-height: 46vh;
  }

  .gallery-button {
    width: 38px;
    height: 48px;
  }

  .dialog-content {
    padding: 38px 24px 30px;
  }

  .site-footer {
    flex-direction: column;
  }

  .admin-product-row {
    grid-template-columns: 74px 1fr;
  }

  .admin-row-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}
