/* ============================================================
   lettuce wraps storefront
   white / ink #030302 / hero blue #CBDEE8 · Geist + Dotness
   ============================================================ */

@font-face {
  font-family: "Dotness";
  src: url("fonts/dotness.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --color-bg: #ffffff;
  --color-ink: #030302;
  --color-text: rgba(3, 3, 2, 0.76);
  --color-text-soft: rgba(3, 3, 2, 0.55);
  --color-hero-blue: #cbdee8;
  --color-border: #e6e6e6;
  --font-body: "Geist", sans-serif;
  --font-dot: "Dotness", sans-serif;
  --page-margin: 2rem;
  --header-x: clamp(28px, 2.75vw, 56px);
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 0.875rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  /* no fill-mode: a persistently-filled body animation makes Safari
     treat body as the containing block for the fixed cart drawer */
  animation: page-in 0.35s ease;
}

body > main { flex: 1; }

@keyframes page-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

a { color: inherit; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--color-ink);
  outline-offset: 2px;
}

/* ============ header ============ */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  padding: 1rem var(--page-margin);
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-ink);
}

.home-header {
  min-height: clamp(70px, 4.8vw, 98px);
  padding: 0 var(--header-x);
}

.site-nav {
  display: flex;
  gap: 1.7rem;
}

.site-nav a {
  font-size: 1rem;
  text-decoration: none;
  color: var(--color-text-soft);
}

.site-nav a[aria-current="page"],
.site-nav a:hover {
  color: var(--color-ink);
}

.header-utils {
  min-width: 22px;
  display: flex;
  justify-content: flex-end;
}

.cart-button {
  appearance: none;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  color: var(--color-ink);
  background: transparent;
  border: 0;
  cursor: pointer;
}

.cart-count {
  position: absolute;
  right: -5px;
  top: -5px;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--color-ink);
  color: #fff;
  font-size: 0.625rem;
  line-height: 15px;
}

/* ============ hero (blue block + gif) ============ */

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: min(836px, calc(100vh - 235px));
  min-height: 420px;
  border-bottom: 1px solid var(--color-ink);
}

.hero-block {
  background: var(--color-hero-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.hero-block h1 {
  margin: 0;
  font-family: var(--font-dot);
  font-weight: 400;
  font-size: 48px;
  color: #000;
  letter-spacing: 0.02em;
}

.hero-media {
  background: var(--color-bg);
  overflow: hidden;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ============ new arrivals / shop ============ */

.shop { padding: 0 0 2rem; }

.shop h2 {
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--color-ink);
  margin: 2.5rem var(--header-x);
}

/* flush with the page's left edge, like the theme */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

/* collapse the doubled borders where cards meet */
.product-grid .card + .card .card-media { border-left: 0; }

.card {
  text-decoration: none;
  display: block;
}

.card-media {
  aspect-ratio: 4 / 5;
  border: 1px solid var(--color-ink);
  overflow: hidden;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.card:hover .card-media img { transform: scale(1.06); }

.card-title {
  margin: 14px 0 2px;
  padding: 0 28px;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--color-ink);
}

.card-price {
  margin: 0;
  padding: 0 28px;
  font-size: 0.8125rem;
  color: var(--color-text);
}

.shop-fallback { margin: 0 var(--page-margin); }
.shop-fallback a { color: var(--color-ink); }

/* ============ product page ============ */

.header-wordmark {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-ink);
  text-decoration: none;
}

.header-wordmark:hover { text-decoration: underline; text-underline-offset: 3px; }

.site-header { position: relative; }

.cart-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(3, 3, 2, 0.18);
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 21;
  display: flex;
  flex-direction: column;
  width: min(420px, 100vw);
  height: 100vh;
  background: var(--color-bg);
  border-left: 1px solid var(--color-ink);
  transform: translateX(100%);
  transition: transform 0.25s ease;
}

.cart-drawer[aria-hidden="false"] { transform: translateX(0); }

.cart-drawer-header,
.cart-footer {
  padding: 1.25rem;
}

.cart-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--color-border);
}

.cart-drawer-header h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-ink);
}

.cart-close,
.cart-remove {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
}

.cart-close {
  font-size: 1.5rem;
  line-height: 1;
}

.cart-lines {
  flex: 1;
  overflow: auto;
  padding: 1.25rem;
}

.cart-empty {
  margin: 0;
  color: var(--color-text-soft);
}

.cart-line {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.cart-line img {
  width: 76px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 1px solid var(--color-border);
}

.cart-line p {
  margin: 0 0 0.15rem;
  color: var(--color-ink);
}

.cart-line span {
  display: block;
  color: var(--color-text);
  font-size: 0.8125rem;
}

.cart-remove {
  margin-top: 0.45rem;
  padding: 0;
  color: var(--color-text-soft);
  font-size: 0.75rem;
  text-decoration: underline;
}

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

.cart-subtotal {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  color: var(--color-ink);
}

.cart-checkout {
  width: 100%;
  border: 0;
  border-radius: 2px;
  background: var(--color-ink);
  color: #fff;
  cursor: pointer;
  font: inherit;
  padding: 0.95rem 1.25rem;
}

.cart-checkout:disabled {
  opacity: 0.55;
  cursor: default;
}

.product-page { padding: 0 0 5rem; }

.product-layout {
  display: grid;
  grid-template-columns: minmax(0, 64%) minmax(320px, 1fr);
  gap: 1.75rem;
}

.product-media {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-self: start;
}

.product-media .pframe { overflow: hidden; }

.product-media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.product-media .pframe:hover img { transform: scale(1.05); }

.product-info {
  padding: 3.75rem var(--header-x) 0 0;
}

.product-info h1 {
  margin: 0 0 0.75rem;
  font-size: 2rem;
  font-weight: 400;
  color: var(--color-ink);
}

.product-price {
  margin: 0 0 1.5rem;
  font-size: 0.875rem;
  color: var(--color-text);
}

.add-to-cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  font: inherit;
  font-size: 0.875rem;
  background: var(--color-ink);
  color: #fff;
  border: 0;
  border-radius: 2px;
  padding: 16px 24px;
  cursor: pointer;
}

.add-to-cart:disabled { opacity: 0.6; cursor: default; }

.checkout-error {
  margin: 0.75rem 0 0;
  color: #9b1c1c;
  font-size: 0.8125rem;
}

.product-accordions { margin-top: 2.5rem; }

.product-accordions details {
  border-top: 1px solid var(--color-border);
}

.product-accordions details:last-child {
  border-bottom: 1px solid var(--color-border);
}

.product-accordions summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-ink);
}

.product-accordions summary::-webkit-details-marker { display: none; }

.product-accordions summary::after {
  content: "+";
  font-size: 1rem;
  color: var(--color-text-soft);
  transition: transform 0.3s ease;
}

.product-accordions details[open] summary::after { transform: rotate(45deg); }

.accordion-body {
  padding: 0 0 1.25rem;
  font-size: 0.875rem;
  overflow: hidden;
}

.product-accordions details[open] .accordion-body {
  animation: accordion-open 0.35s ease both;
}

@keyframes accordion-open {
  from { opacity: 0; transform: translateY(-10px); max-height: 0; }
  to   { opacity: 1; transform: none; max-height: 24rem; }
}

@media (prefers-reduced-motion: reduce) {
  .product-accordions details[open] .accordion-body { animation: none; }
  .product-accordions summary::after { transition: none; }
}

.accordion-body p { margin: 0 0 0.6rem; }

/* ============ inner pages (about / contact) ============ */

.page {
  max-width: 36rem;
  margin: 0 auto;
  padding: 4rem var(--page-margin) 6rem;
}

.page h1 {
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--color-ink);
  margin: 0 0 1.5rem;
}

.page p { margin: 0 0 1rem; }

.page:not(.checkout-result) p {
  font-size: 1rem;
  line-height: 1.55;
}

.about-page {
  max-width: 78rem;
  padding-top: 5rem;
}

.about-page h1 {
  font-size: 2.5rem;
  font-weight: 400;
  color: var(--color-text);
  margin-bottom: 2rem;
}

.about-page .about-copy p {
  font-size: 1.5rem;
  line-height: 1.45;
  font-weight: 400;
  color: var(--color-text);
  margin-bottom: 0.55rem;
}

.about-page .about-copy .about-signoff {
  margin-top: 6.25rem;
  font-size: 1.125rem;
}

.eyebrow {
  color: var(--color-text-soft);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.checkout-result .text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.75rem;
  background: var(--color-ink);
  color: #fff;
  border-radius: 4px;
  padding: 0.8rem 1.4rem;
  text-decoration: none;
}

/* contact form, in the theme's plain style */
.contact-page {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 4.5rem 28px 6rem;
}

.contact-page h1 {
  margin: 0 0 2rem;
  text-align: center;
  font-size: 2.25rem;
  line-height: 1.2;
  font-weight: 400;
  color: var(--color-text);
}

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

.contact-form {
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
}

.contact-form__form {
  display: grid;
  gap: 14px;
}

.contact-form__form-row {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-form__input {
  width: 100%;
  min-height: 52px;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid #d3cec5;
  border-radius: 8px;
  background: rgba(211, 206, 197, 0.09);
  color: var(--color-text);
  font: inherit;
  font-size: 1rem;
  line-height: 1.4;
  padding: 14px 18px;
  -webkit-font-smoothing: antialiased;
}

.contact-form__input--textarea {
  height: 220px;
  min-height: 220px;
  resize: vertical;
}

.contact-form button {
  justify-self: start;
  min-height: 52px;
  background: var(--color-ink);
  color: #fff;
  border: 0;
  border-radius: 0;
  font: inherit;
  font-size: 1rem;
  padding: 14px 24px;
  cursor: pointer;
}

/* ============ footer ============ */

.site-footer {
  padding: 1.5rem var(--page-margin) 2rem;
  font-size: 0.75rem;
  color: var(--color-text-soft);
}

.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { color: var(--color-ink); }

/* ============ small screens ============ */

@media (max-width: 768px) {
  :root {
    --page-margin: clamp(20px, 4.7vw, 28px);
    --header-x: clamp(20px, 4.7vw, 28px);
  }

  .site-header,
  .home-header {
    min-height: 64px;
    padding: 0 var(--page-margin);
  }

  .site-nav {
    gap: 1rem;
  }

  .site-nav a { font-size: 0.875rem; }

  .header-utils {
    gap: 0.9rem;
  }

  .hero {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 0;
  }

  .hero-block { min-height: 320px; }
  .hero-block h1 { font-size: 34px; }
  .hero-media { padding: 2rem 0; }
  .shop h2 {
    font-size: 1.5rem;
    margin: 2rem var(--page-margin);
  }

  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .card-title,
  .card-price { padding: 0 0.75rem; }
  .about-page {
    width: min(25rem, calc(100% - 56px));
    margin-left: 27vw;
    margin-right: auto;
    padding-left: 0;
    padding-right: 0;
  }
  .about-page h1 { font-size: 2rem; }
  .about-page .about-copy p { font-size: 1.5rem; }
  .about-page .about-copy .about-signoff {
    margin-top: 3rem;
    font-size: 1rem;
  }
  .product-layout { grid-template-columns: 1fr; }
  .product-media { grid-column: auto; }
  .product-page { padding: 1.25rem var(--page-margin) 5rem; }
  .product-info { padding: 0; }
  .header-wordmark { display: none; }
}

@media (min-width: 750px) {
  .contact-form__form-row {
    flex-direction: row;
    align-items: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  body { animation: none; }
}
