:root {
  --bg: #f9f8f4;
  --ink: #1a1a1a;
  --muted: #5c5c5c;
  --line: #d4d0c8;
  --accent: #c41e3a;
  --white: #ffffff;
  --radius: 6px;
  --font-serif: "Playfair Display", "Times New Roman", Times, serif;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-nav: "Varela Round", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.5;
}

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

a:hover {
  text-decoration: underline;
}

.wrap {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

.site-header {
  padding: 1.25rem 0 0.5rem;
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  letter-spacing: 0.04em;
}

.brand-mark img {
  height: 40px;
  width: auto;
  object-fit: contain;
}

.brand-mark .fallback-letters {
  width: 40px;
  height: 40px;
  border: 1px solid var(--ink);
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  border-radius: 4px;
}

.nav-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
  font-family: var(--font-nav);
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.nav-main a {
  white-space: nowrap;
}

.nav-cart {
  position: relative;
}

.badge {
  position: absolute;
  top: -0.45rem;
  right: -0.65rem;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.25rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--white);
  font-size: 0.65rem;
  font-family: var(--font-nav);
  font-weight: 600;
  display: grid;
  place-items: center;
}

.currency-form {
  display: inline;
  margin: 0;
}

.currency-form select {
  font-family: var(--font-nav);
  font-size: 0.95rem;
  border: none;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  padding: 0.15rem 0;
}

.hero {
  text-align: center;
  padding: 1.25rem 0 0.25rem;
}

.hero--brand-image {
  padding: 1.75rem 0.75rem 1.25rem;
}

/* Logo + built-in title/tagline (no full-width hero image) */
.hero--with-tagline {
  padding: 1rem 0.5rem 0;
}

.hero--with-tagline .hero-logo {
  margin-bottom: 0;
  line-height: 0;
}

.hero--with-tagline .hero-logo img {
  margin-bottom: 0;
}

.hero.hero--with-tagline h1 {
  margin: 0.45rem 0 0.2rem;
}

.hero.hero--with-tagline .tagline-lines {
  margin: 0 0 0.15rem;
}

.hero-logo img {
  max-width: min(260px, 62vw);
  height: auto;
}

.hero-logo--centerpiece {
  margin-bottom: 0;
  line-height: 0;
  padding: 0.85rem 0 1.15rem;
}

.hero-logo--centerpiece .hero-brand-img {
  max-width: min(420px, 88vw);
  width: min(420px, 88vw);
  height: auto;
  display: block;
  margin: 0 auto;
}

.hero-logo .fallback-letters.large {
  width: min(220px, 52vw);
  height: min(220px, 52vw);
  margin: 0 auto;
  font-size: 2.85rem;
  border-width: 2px;
}

.hero h1 {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: 0.18em;
  font-size: clamp(2rem, 5vw, 2.85rem);
  margin: 0.65rem 0 0.25rem;
}

.tagline-lines {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  font-family: var(--font-serif);
  letter-spacing: 0.28em;
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
}

.tagline-lines::before,
.tagline-lines::after {
  content: "";
  height: 1px;
  width: min(5rem, 12vw);
  background: var(--line);
}

.grid-products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  padding: 0.35rem 0 3rem;
}

/* Home: pull gallery up under hero (full hero image) */
.hero--brand-image + .wrap .grid-products {
  padding-top: 0;
  margin-top: 0;
}

/* Home: pull gallery up under logo + title + tagline */
.hero--with-tagline + .wrap .grid-products {
  padding-top: 0;
  margin-top: 0;
}

@media (max-width: 900px) {
  .grid-products {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .grid-products {
    grid-template-columns: 1fr;
  }
  .nav-main {
    gap: 0.75rem;
    font-size: 0.85rem;
  }
}

.card-product {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

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

.card-product img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  display: block;
}

.page-title {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  margin: 2rem 0 1rem;
}

.prose {
  max-width: 38rem;
  margin: 0 auto 3rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.story-page {
  padding: 2.75rem 0 4rem;
}

.story-article {
  width: min(42rem, 100%);
  margin: 0 auto;
}

.story-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(2.15rem, 5vw, 3.15rem);
  line-height: 1.1;
  margin: 0 0 1.5rem;
  color: var(--ink);
  text-align: left;
}

.story-portrait {
  margin: 2.5rem 0 0;
  padding: 0;
}

.story-portrait img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: calc(var(--radius) + 2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.story-portrait-caption {
  margin: 0.85rem 0 0;
  max-width: 100%;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--muted);
  font-style: italic;
  text-align: left;
}

@media (max-width: 720px) {
  .story-page {
    padding: 1.75rem 0 3rem;
  }

  .story-portrait {
    margin-top: 2rem;
  }
}

.story-body {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
  max-width: 100%;
  text-align: left;
}

.story-body p {
  margin: 0;
}

.story-body p + p {
  margin-top: 1.1rem;
}

.story-lead {
  color: var(--ink);
  font-size: 1.12rem;
  font-weight: 500;
  line-height: 1.55;
  margin-bottom: 1.25rem !important;
}

.story-body a {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  padding: 2rem 0 3rem;
  align-items: start;
}

@media (max-width: 800px) {
  .product-detail {
    grid-template-columns: 1fr;
  }
}

.product-detail img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.product-detail h1 {
  font-family: var(--font-serif);
  font-size: 2rem;
  margin: 0 0 0.5rem;
}

.btn {
  display: inline-block;
  font-family: var(--font-serif);
  padding: 0.65rem 1.35rem;
  border-radius: var(--radius);
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--white);
  cursor: pointer;
  font-size: 0.95rem;
}

.btn:hover {
  opacity: 0.92;
  text-decoration: none;
}

.btn.secondary {
  background: transparent;
  color: var(--ink);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1.25rem;
}

input[type="number"] {
  width: 4rem;
  padding: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.cart-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 2rem;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

.cart-table th,
.cart-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.cart-table th {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 0.9rem;
}

.cart-total {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.checkout-paypal {
  margin: 1.75rem 0 2.5rem;
  max-width: 22rem;
}

.checkout-paypal-lead {
  margin-bottom: 0.75rem !important;
  font-size: 0.98rem !important;
}

.flash-messages {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}

.flash-messages li {
  padding: 0.65rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 0.35rem;
}

.flash-success {
  background: #e8f5e9;
  color: #1b5e20;
}

.flash-error {
  background: #ffebee;
  color: #b71c1c;
}

.flash-info {
  background: #e3f2fd;
  color: #0d47a1;
}

.admin-layout {
  max-width: 720px;
  margin: 2rem auto;
  padding: 0 1rem 3rem;
}

.admin-layout--wide {
  max-width: 40rem;
}

.admin-layout h1 {
  font-family: var(--font-serif);
}

.admin-form-section-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 2rem 0 0.35rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--line);
}

.admin-form-section-title:first-of-type {
  margin-top: 0.5rem;
}

.admin-form-hint {
  margin: 0.35rem 0 0.75rem !important;
  font-size: 0.95rem !important;
}

.admin-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0.75rem 0;
  font-weight: normal;
  max-width: 36rem;
  line-height: 1.45;
}

.admin-checkbox input {
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.paypal-help-list {
  margin: 0.5rem 0 1rem;
  padding-left: 1.25rem;
  max-width: 40rem;
}

.paypal-help-list li {
  margin-bottom: 0.35rem;
}

.admin-security-note {
  margin: 0 0 1.5rem !important;
  padding: 0.75rem 1rem;
  max-width: 40rem;
  background: #fff8e6;
  border: 1px solid #e6d4a8;
  border-radius: var(--radius);
  font-size: 0.92rem !important;
}

.paypal-code {
  font-size: 0.85rem;
  word-break: break-all;
  background: var(--white);
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  border: 1px solid var(--line);
}

.admin-dev-tools {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  max-width: 40rem;
}

.admin-dev-tools code {
  font-size: 0.85em;
}

.admin-preview-thumb {
  max-width: 12rem;
  margin-top: 0.35rem;
  border-radius: 4px;
  border: 1px solid var(--line);
}

.admin-preview-hero {
  max-width: 100%;
  margin-top: 0.35rem;
  border-radius: 6px;
  border: 1px solid var(--line);
}

.admin-preview-portrait {
  max-width: 14rem;
  width: 100%;
  margin-top: 0.35rem;
  border-radius: 6px;
  border: 1px solid var(--line);
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1rem 0 2rem;
}

.admin-form label {
  display: block;
  margin: 0.75rem 0 0.25rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.admin-form input[type="text"],
.admin-form input[type="password"],
.admin-form input[type="number"],
.admin-form textarea,
.admin-form select {
  width: 100%;
  max-width: 32rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  font: inherit;
}

.admin-form textarea {
  min-height: 6rem;
  resize: vertical;
}

.admin-form .actions {
  margin-top: 1.25rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}
