:root {
  --cream: #f7f1e6;
  --cream-deep: #efe4d0;
  --paper: #fffaf3;
  --ink: #1b2430;
  --muted: #5c6570;
  --blue: #1d6cb3;
  --blue-deep: #154e86;
  --green: #2c7a34;
  --line: rgba(27, 36, 48, 0.12);
  --shadow: 0 18px 40px rgba(27, 50, 80, 0.1);
  --serif: "Fraunces", "Iowan Old Style", Palatino, Georgia, serif;
  --sans: "Outfit", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.6;
}

img { max-width: 100%; }

a { color: var(--blue-deep); }

h1, h2, h3, .serif { font-family: var(--serif); font-weight: 560; letter-spacing: -0.02em; }

h1 { font-size: clamp(2.6rem, 5vw, 4.6rem); line-height: 1.02; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  background: white;
  padding: 0.5rem 0.8rem;
  z-index: 20;
}

.skip-link:focus { top: 0.5rem; }

.utility-bar {
  background: var(--blue);
  color: #f7f1e6;
  padding: 0.45rem 1rem;
}

.utility-line {
  margin: 0;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.site-header {
  background: rgba(247, 241, 230, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.navbar-brand img { height: 64px; width: auto; }

.nav-link {
  color: var(--ink);
  font-weight: 600;
  padding: 0.4rem 0.85rem !important;
}

.nav-link.active, .nav-link:hover { color: var(--blue); }

.navbar-toggler { border-color: var(--line); }

@media (min-width: 992px) {
  .site-header .navbar > .container { position: relative; }

  .site-header .navbar-collapse {
    position: absolute;
    left: 50%;
    right: calc(var(--bs-gutter-x) * 0.5);
    top: 0;
    height: 100%;
    display: flex !important;
    align-items: center;
  }

  .site-header .navbar-nav {
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.kicker {
  color: var(--green);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.78rem;
  margin-bottom: 0.8rem;
}

.lead-copy { font-size: 1.15rem; color: var(--muted); max-width: 38rem; }

.hero { padding: 3.5rem 0 3rem; }

.hero-frame {
  background: var(--paper);
  padding: 0.7rem;
  border-radius: 1.2rem 1.2rem 4.5rem 1.2rem;
  box-shadow: var(--shadow);
  max-width: 520px;
  margin-left: auto;
  position: relative;
}

.hero-frame img {
  width: 100%;
  border-radius: inherit;
  display: block;
  object-fit: cover;
  aspect-ratio: 4 / 4.4;
}

.hero-frame::after {
  content: "";
  position: absolute;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: #3c9a45;
  right: -16px;
  bottom: -16px;
  z-index: -1;
}

.btn-brand, .btn-brand-outline {
  border-radius: 999px;
  padding: 0.75rem 1.35rem;
  font-weight: 600;
}

.btn-brand { background: var(--blue); color: white; border: 0; }
.btn-brand:hover { background: var(--blue-deep); color: white; }

.btn-brand-outline {
  background: transparent;
  color: var(--green);
  border: 1.5px solid var(--green);
}

.btn-brand-outline:hover { background: var(--green); color: white; }

.brand-border {
  height: 36px;
  background: url("/images/border.jpg") center / auto 100% repeat-x;
}

.section { padding: 4.2rem 0; }

.section-head { max-width: 40rem; margin-bottom: 2rem; }

.pillar {
  background: var(--paper);
  border-radius: 1.1rem;
  padding: 1.4rem 1.3rem 1.2rem;
  height: 100%;
  border-top: 4px solid var(--green);
  box-shadow: 0 8px 24px rgba(27, 36, 48, 0.04);
}

.pillar h3 { font-size: 1.45rem; margin-bottom: 0.5rem; }

.quote-band {
  padding: 3.5rem 0;
  text-align: center;
}

.quote-band blockquote {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  line-height: 1.25;
  color: var(--blue-deep);
  max-width: 46rem;
  margin: 0 auto;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.3rem;
}

.product-card {
  background: var(--paper);
  border-radius: 1.1rem;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  color: inherit;
}

.product-visual {
  background: #f3eadc;
  aspect-ratio: 4 / 5;
  display: grid;
  place-items: center;
}

.product-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.rail {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.7rem;
}

.rail-viewport { overflow: hidden; min-width: 0; }

.rail-track {
  display: flex;
  gap: 1rem;
  transition: transform 0.35s ease;
}

.rail-track .product-card { flex: 0 0 calc((100% - 3rem) / 4); }

.rail-btn {
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 50%;
  border: none;
  background: var(--blue);
  color: #f7f1e6;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  padding: 0;
}

.rail-btn:hover { background: var(--blue-deep); }

.rail-btn:disabled { opacity: 0.35; }

@media (max-width: 991px) {
  .rail-track .product-card { flex-basis: calc((100% - 1rem) / 2); }
}

@media (max-width: 575px) {
  .rail-track .product-card { flex-basis: 100%; }
}

.product-meta { padding: 1rem 1rem 1.15rem; }

.product-meta h3 { font-size: 1.35rem; margin: 0.15rem 0; }

.price { font-weight: 600; margin: 0; }

.eyebrow { color: var(--green); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; margin: 0; font-weight: 600; }

.filter-panel {
  background: var(--paper);
  border-radius: 1rem;
  padding: 1rem;
  margin-bottom: 1.4rem;
}

.filter-panel label { font-size: 0.85rem; font-weight: 600; display: block; }

.filter-panel .form-control, .filter-panel .form-select, .admin-card .form-control, .admin-card .form-select {
  background: white;
  border-color: var(--line);
}

.journal-card {
  background: var(--paper);
  border-radius: 1.1rem;
  padding: 1.4rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.journal-card:hover { color: inherit; box-shadow: var(--shadow); }

.journal-card h3 { font-size: 1.6rem; }

.prose { max-width: 42rem; }

.prose p { margin-bottom: 1rem; }

.detail-visual {
  position: relative;
  background: var(--paper);
  border-radius: 1.2rem;
}

.detail-visual img { width: 100%; aspect-ratio: 4 / 5; object-fit: contain; background: #f3eadc; border-radius: inherit; }

.thumb-row { display: flex; gap: 0.5rem; margin-top: 0.7rem; }

.thumb-row button {
  width: 72px;
  height: 88px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 0.6rem;
  background: #f3eadc;
  overflow: hidden;
}

.thumb-row button[aria-current="true"] { border-color: var(--blue); }

.thumb-row img { width: 100%; height: 100%; object-fit: cover; }

.site-footer { background: #17324d; color: #f7f1e6; padding: 2.6rem 0 1.4rem; }

.site-footer a { color: #f7f1e6; text-decoration: none; }

.site-footer a:hover { text-decoration: underline; }

.footer-logo { height: 58px; background: var(--cream); border-radius: 0.7rem; padding: 0.35rem 0.5rem; }

.footer-title { font-size: 1rem; letter-spacing: 0.08em; text-transform: uppercase; font-family: var(--sans); font-weight: 600; }

.footer-links { list-style: none; padding: 0; margin: 0; }

.footer-links li { margin: 0.25rem 0; }

.footer-note { margin-top: 2rem; color: rgba(247, 241, 230, 0.72); font-size: 0.9rem; }

.about-photo {
  border-radius: 1.2rem;
  width: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 4.5;
}

.status-note { min-height: 1.5rem; }

.hp {
  position: absolute;
  left: -9999px;
  height: 0;
  overflow: hidden;
}

.bag-count {
  display: inline-grid;
  place-items: center;
  min-width: 1.25rem;
  height: 1.25rem;
  margin-left: 0.35rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: var(--blue);
  color: white;
  font-size: 0.72rem;
  line-height: 1;
}

.bag-count[hidden] { display: none; }

.steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.8rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1.4rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.steps li[aria-current="step"] { color: var(--blue-deep); }

.buy-box, .checkout-card, .pay-card, .receipt-sheet {
  background: var(--paper);
  border-radius: 1.1rem;
  padding: 1.2rem;
}

.buy-box { margin-top: 1.2rem; }

.buy-box label, .checkout-card label { font-size: 0.85rem; font-weight: 600; display: block; }

.line-row {
  display: grid;
  grid-template-columns: 84px 1fr auto;
  gap: 0.9rem;
  align-items: center;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}

.line-row img {
  width: 84px;
  height: 104px;
  object-fit: contain;
  background: #f3eadc;
  border-radius: 0.7rem;
}

.line-actions { display: flex; gap: 0.6rem; align-items: center; margin-top: 0.45rem; }

.line-actions input { width: 4.5rem; }

.qr-frame {
  background: white;
  border-radius: 1rem;
  padding: 0.8rem;
  max-width: 320px;
}

.qr-frame img { width: 100%; height: auto; display: block; }

.pay-amount { font-family: var(--serif); font-size: 2rem; margin: 0.2rem 0 0.6rem; }

.receipt-sheet { max-width: 720px; }

.receipt-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.receipt-logo { height: 54px; }

.receipt-table { width: 100%; border-collapse: collapse; }

.receipt-table th, .receipt-table td {
  text-align: left;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.receipt-table .num, .receipt-total { text-align: right; }

.receipt-total { font-size: 1.25rem; font-weight: 600; margin-top: 0.8rem; }

.paid-mark {
  display: inline-block;
  border: 2px solid var(--green);
  color: var(--green);
  border-radius: 999px;
  padding: 0.15rem 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.pager .page-link { color: var(--blue-deep); border-radius: 999px; margin: 0 0.15rem; border-color: var(--line); }
.pager .page-link.active { background: var(--blue); color: white; border-color: var(--blue); }

.admin-body { background: var(--cream); }
.admin-wrap { max-width: 1080px; margin: 0 auto; padding: 2rem 1rem 4rem; }
.admin-card { background: var(--paper); border-radius: 1rem; padding: 1.2rem; }
.admin-table { background: white; }
.admin-logo { height: 52px; }

:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }

@media (max-width: 991px) {
  .hero-frame { margin: 0 auto; }
  .navbar-brand img { height: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

@media print {
  .utility-bar, .site-header, .site-footer, .brand-border, .no-print { display: none !important; }
  body { background: white; }
  .section { padding: 0; }
  .receipt-sheet { box-shadow: none; }
}

@media (max-width: 640px) {
  .line-row { grid-template-columns: 72px 1fr; }
  .line-row .line-price { grid-column: 2; }
}
