/* ---- Brand colors & fonts: change these to restyle the whole site ---- */
:root {
  --color-bg: #ffffff;
  --color-alt-bg: #ffffff;
  --color-text: #1c1c1c;
  --color-muted: #6b6560;
  --color-border: #dddddd;
  --color-placeholder: #f2f2f2;
  --font-serif: "Times New Roman", Times, serif;
  --font-sans: "Times New Roman", Times, serif;
  --max-width: 1280px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-serif);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
h1, h2, h3 { font-weight: 400; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Small uppercase labels */
.eyebrow,
.announcement,
nav a,
.button,
.site-footer h4 {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.announcement {
  background: var(--color-text);
  color: #fff;
  text-align: center;
  padding: 9px 16px;
}

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding-top: 20px;
  padding-bottom: 20px;
}
.nav-right { justify-self: end; }

nav a {
  text-decoration: none;
  margin-right: 28px;
}
.nav-right a { margin-right: 0; margin-left: 28px; }
nav a:hover { opacity: 0.6; }

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.35rem;
  letter-spacing: 0.3em;
  text-decoration: none;
}
.logo-moon { width: 16px; height: 16px; fill: currentColor; }
.logo.small { font-size: 1rem; }

/* ---- Hero ---- */
.hero {
  min-height: min(78vh, 720px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px;
  background: #000;
  color: #fff;
}
.hero-title { margin: 0 0 40px; line-height: 0; }
/* The full moon photo */
.hero-moon {
  width: 120px; /* half the photo's size, so it stays crisp on sharp screens */
  height: auto;
  mix-blend-mode: screen; /* lets the photo's black sky melt into the background */
  /* fade out the photo's square edges so only the moon shows */
  -webkit-mask-image: radial-gradient(circle closest-side, #000 76%, transparent 90%);
  mask-image: radial-gradient(circle closest-side, #000 76%, transparent 90%);
}

.button {
  display: inline-block;
  padding: 15px 38px;
  background: var(--color-text);
  color: #fff;
  text-decoration: none;
  transition: opacity 0.2s;
}
.button:hover { opacity: 0.8; }
.button-light {
  background: transparent;
  color: #fff;
  border: 1px solid #fff;
}
.button-light:hover { background: #fff; color: #000; opacity: 1; }

/* ---- Sections ---- */
.section { padding: 96px 0; }
.section.alt { background: var(--color-alt-bg); }
.section h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 8px 0 20px; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 40px;
}
.section-head h2 { margin: 0; }
.section-head .eyebrow { margin: 0 0 0 auto; }

/* ---- Product grid ---- */
.products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px 24px;
}
.product { text-decoration: none; display: block; }

.product-img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--color-placeholder);
  transition: opacity 0.3s;
}
.product:hover .product-img { opacity: 0.85; }

.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
}
.placeholder svg { width: 22%; height: 22%; fill: #d6d1ca; }

.product-info { padding-top: 14px; }
/* Name on the left, price on the right, small with wide spacing */
.product-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.product-row h3,
.product-row .price {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.14em;
}
.product-row .price { flex-shrink: 0; color: var(--color-muted); }
.product-row .price.sold-label { font-size: 0.7rem; }
.price { margin: 0; font-size: 0.95rem; }
.variant {
  margin: 4px 0 0;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  color: var(--color-muted);
  letter-spacing: 0.08em;
}

.shop-note {
  text-align: center;
  margin-top: 64px;
  color: var(--color-muted);
}

/* ---- Photo collage (full width, same height as the moon landing) ---- */
.collage {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.1fr 0.9fr;
  grid-template-rows: 1fr 1fr;
  gap: 6px;
  height: min(78vh, 720px);
  padding-top: 6px;
}
.collage img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  background: #000;
}
.c-tiles { grid-column: 1; grid-row: 1 / 3; }
.c-halo { grid-column: 2; grid-row: 1; }
.c-red-moon { grid-column: 2; grid-row: 2; object-position: 58% 59%; }
.c-wall { grid-column: 3; grid-row: 1 / 3; }
.c-moonlight { grid-column: 4; grid-row: 1 / 3; object-position: 50% 60%; }

/* ---- About ---- */
.about-split {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 56px;
  align-items: stretch;
}
.about-text { display: flex; flex-direction: column; }
.about-note { max-width: 34em; }
.about-note p { margin: 0 0 16px; color: var(--color-muted); font-size: 1rem; }
.about-note .signoff { color: var(--color-text); }
.about-photo { margin: 0; }
.about-photo img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; filter: grayscale(1); }

/* ---- Contact ---- */
.contact {
  max-width: 620px;
  text-align: center;
}
.contact p:not(.eyebrow) { color: var(--color-muted); font-size: 1.08rem; }
.contact a { color: var(--color-text); }
.about-moon { width: 28px; height: 28px; fill: var(--color-text); }

/* ---- Order page ---- */
.checkout { max-width: 1100px; }
.order-head, .order-success { text-align: center; margin-bottom: 56px; }
.order-intro, .order-success p { color: var(--color-muted); font-size: 1.08rem; }

.order-form fieldset {
  border: 0;
  border-top: 1px solid var(--color-border);
  margin: 0 0 40px;
  padding: 28px 0 0;
}
.order-form legend {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  padding-right: 16px;
}

.field { display: block; margin-bottom: 22px; }
.field > span {
  display: block;
  margin-bottom: 8px;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-muted);
}
.field em { font-style: normal; text-transform: none; letter-spacing: 0; }

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 13px 14px;
  font: inherit;
  font-size: 1rem;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 0;
  appearance: none;
  -webkit-appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6'><path d='M0 0l5 6 5-6z' fill='%231c1c1c'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.field textarea { resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--color-text);
}
.submitted .field :invalid { border-color: #a4413a; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.field-row.three { grid-template-columns: 2fr 1.5fr 1fr; }

.choice-row { display: flex; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.choice { cursor: pointer; }
.choice input { position: absolute; opacity: 0; }
.choice span {
  display: inline-block;
  padding: 12px 22px;
  border: 1px solid var(--color-border);
  font-family: var(--font-sans);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}
.choice input:checked + span { border-color: var(--color-text); background: var(--color-text); color: #fff; }
.choice input:focus-visible + span { outline: 2px solid var(--color-text); outline-offset: 2px; }

.honey { position: absolute; left: -9999px; }

.form-error { color: #a4413a; margin: 0 0 20px; }
.order-form .button { width: 100%; }
.order-form .button:disabled { opacity: 0.5; cursor: wait; }

/* ---- Buttons without a box ---- */
button.button { border: 0; cursor: pointer; font-size: 0.72rem; }
.link-btn {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
  color: var(--color-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.link-btn:hover { color: var(--color-text); }
nav a.cart-link { color: var(--color-text); }

/* ---- Shop grid: photo, name, price and a small "add to cart" link ---- */
.product-view {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.product-view:hover .product-img { opacity: 0.85; }
/* "+" that appears in the bottom-right corner of the photo on hover */
.product-media { position: relative; }
.quick-add {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--color-bg);
  color: var(--color-text);
  font: inherit;
  font-size: 1.3rem;
  line-height: 34px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
}
.product:hover .quick-add,
.quick-add:focus-visible { opacity: 1; }
.quick-add:hover { background: var(--color-text); color: var(--color-bg); }
/* Phones and tablets have no hover, so the "+" is always shown there */
@media (hover: none) { .quick-add { opacity: 1; } }
.product-name {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
  text-align: left;
  cursor: pointer;
}
.product-name:hover { opacity: 0.6; }
.is-sold .product-img { opacity: 0.55; }
.sold-label {
  margin: 10px 0 0;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--color-muted);
}
.price.sold-label { margin: 0; }

/* ---- Bag details pop-up ---- */
.bag-dialog {
  width: min(920px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  padding: 0;
  border: 0;
  color: var(--color-text);
  background: var(--color-bg);
}
/* The pop-up stays put and only its contents scroll, so the close button is always visible */
.bag-dialog[open] { overflow: hidden; }
.bag-dialog .bag-detail { max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; }
.bag-dialog::backdrop { background: rgba(28, 28, 28, 0.35); }
.bag-dialog .dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  width: 36px;
  height: 36px;
  background: var(--color-bg);
}
.bag-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.bag-detail-img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: var(--color-placeholder);
}
.bag-detail-img.placeholder { display: flex; }
.bag-thumbs { display: flex; gap: 8px; padding: 8px; }
.bag-thumb {
  width: 56px;
  padding: 0;
  border: 1px solid transparent;
  background: none;
  cursor: pointer;
  opacity: 0.6;
}
.bag-thumb img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.bag-thumb.active, .bag-thumb:hover { opacity: 1; }
.bag-thumb.active { border-color: var(--color-text); }
.bag-detail-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 40px;
}
.bag-detail-info .eyebrow { margin: 0; color: var(--color-muted); }
.bag-detail-info h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 8px 0 6px; }
.bag-description { color: var(--color-muted); margin: 20px 0 28px; }
.bag-detail-info .add-btn { width: 100%; padding: 15px 20px; text-align: center; }
.bag-note { margin: 16px 0 0; font-size: 0.85rem; color: var(--color-muted); }

/* ---- Cart drawer ---- */
.drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(28, 28, 28, 0.35);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}
.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 51;
  width: min(420px, 100%);
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.35s ease, visibility 0.35s;
}
.cart-open { overflow: hidden; }
.cart-open .drawer-overlay { opacity: 1; visibility: visible; }
.cart-open .cart-drawer { transform: none; visibility: visible; }

.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--color-border);
}
.drawer-head .eyebrow { margin: 0; }
.drawer-close {
  background: none;
  border: 0;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  color: var(--color-text);
}
.drawer-body { flex: 1; overflow-y: auto; padding: 0 24px; }
.drawer-foot { padding: 24px; border-top: 1px solid var(--color-border); }
.drawer-foot .button { display: block; text-align: center; }
.drawer-note { color: var(--color-muted); font-size: 0.85rem; margin: 6px 0 20px; }

.subtotal {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 1.1rem;
}

.cart-line {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--color-border);
}
.cart-thumb {
  display: block;
  width: 80px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--color-placeholder);
}
.cart-thumb.placeholder { display: flex; }
.cart-thumb.placeholder svg { width: 30%; height: 30%; fill: #d6d1ca; }
.cart-line p { margin: 0; }
.cart-line-name { font-size: 1rem; }
.cart-line-end { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; }

.qty {
  display: inline-flex;
  align-items: center;
  margin-top: 10px;
  border: 1px solid var(--color-border);
}
.qty button {
  width: 30px;
  height: 30px;
  background: none;
  border: 0;
  cursor: pointer;
  font-size: 1rem;
  color: var(--color-text);
}
.qty button:disabled { color: var(--color-border); cursor: default; }
.qty span { min-width: 24px; text-align: center; font-size: 0.9rem; }
.cart-line-info .variant { margin-top: 6px; }


.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 80px 0;
  color: var(--color-muted);
}
.cart-empty svg { width: 28px; height: 28px; fill: #d6d1ca; }
.cart-empty.page .button { margin-top: 16px; }

/* ---- Checkout ---- */
.checkout-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 64px;
  align-items: start;
}
.order-summary {
  position: sticky;
  top: 110px;
  background: var(--color-alt-bg);
  border: 1px solid var(--color-border);
  padding: 28px;
}
.order-summary > .eyebrow { margin: 0 0 8px; }
.order-summary .subtotal { padding-top: 20px; }
.summary-line {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--color-border);
}
.summary-line p { margin: 0; }
.summary-thumb { position: relative; }
.summary-thumb .cart-thumb { width: 64px; }
.badge {
  position: absolute;
  top: -8px;
  right: -8px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: var(--color-text);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  line-height: 20px;
  text-align: center;
}

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 64px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
}
.site-footer h4 { margin: 0 0 16px; font-weight: 400; }
.site-footer a:not(.logo) {
  display: block;
  text-decoration: none;
  color: var(--color-muted);
  margin-bottom: 8px;
}
.site-footer a:hover { color: var(--color-text); }
.footer-text { color: var(--color-muted); margin-top: 12px; }
.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
  font-size: 0.85rem;
  color: var(--color-muted);
}

/* ---- Mobile ---- */
@media (max-width: 800px) {
  .products { grid-template-columns: repeat(2, 1fr); gap: 36px 16px; }
  .product-row h3, .product-row .price { font-size: 0.74rem; letter-spacing: 0.08em; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .checkout-grid { grid-template-columns: 1fr; gap: 40px; }
  .order-summary { position: static; order: -1; }
  .collage { grid-template-columns: 1fr 1fr; grid-template-rows: repeat(3, 1fr); height: 150vw; max-height: 900px; }
  .c-tiles { grid-column: 1; grid-row: 1 / 3; }
  .c-halo { grid-column: 2; grid-row: 1; }
  .c-red-moon { grid-column: 2; grid-row: 2; }
  .c-wall { grid-column: 1; grid-row: 3; }
  .c-moonlight { grid-column: 2; grid-row: 3; }
  .about-split { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 600px) {
  .nav { grid-template-columns: 1fr; justify-items: center; gap: 14px; }
  .logo { order: -1; }
  .nav-right { justify-self: center; }
  nav a { margin: 0 12px; }
  .nav-right a { margin: 0 12px; }
  .section { padding: 64px 0; }
  .section-head { flex-direction: column; gap: 4px; }
  .field-row, .field-row.three { grid-template-columns: 1fr; }
  .bag-detail { grid-template-columns: 1fr; }
  .bag-detail-info { padding: 28px 24px 32px; }
}
