/* ===== Fonts ===== */
@font-face {
  font-family: "Ethereal Demo";
  src: url("fonts/ethereal/EtherealDemo-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Ethereal Demo";
  src: url("fonts/ethereal/EtherealDemo-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Karla";
  src: url("fonts/karla/Karla-VariableFont_wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Karla";
  src: url("fonts/karla/Karla-Italic-VariableFont_wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

/* ===== Palette ===== */
:root {
  --olive:      #273811;
  --sage:       #D7DDBE;
  --cream:      #F4F1EA;
  --terracotta: #E4855B;
  --ink:        #181B0B;

  --font-body:    Karla, sans-serif;
  --font-display: "Ethereal Demo", Karla, sans-serif;

  --radius: 4px;
  --border: 1px solid rgba(39, 56, 17, 0.18);
  --shadow: 0 2px 6px rgba(24, 27, 11, 0.06);
}

/* ===== Reset / base ===== */
* { box-sizing: border-box; }

html {
  overflow-x: hidden;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
}

body {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ===== Typography ===== */
h1, h2, h3, .brand {
  font-family: var(--font-display);
  color: var(--olive);
  font-weight: 400;
  letter-spacing: 0.01em;
  margin: 0.4em 0 0.5em;
}
h1 { font-size: 2.4rem; }
h2 { font-size: 1.6rem; }


/* ===== Filters / buttons / inputs ===== */
#filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 20px;
}
button, .btn {
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 8px 16px;
  background: var(--olive);
  color: var(--cream);
  border: 1px solid var(--olive);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
}
button:hover, .btn:hover {
  background: var(--terracotta);
  border-color: var(--terracotta);
}
select, input[type="date"] {
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 7px 10px;
  background: #fff;
  color: var(--ink);
  border: 1px solid rgba(39, 56, 17, 0.3);
  border-radius: var(--radius);
}
label { font-size: 0.95rem; color: var(--olive); }

/* ===== Collapsible category / date cards ===== */
.card {
  margin-bottom: 12px;
  border: var(--border);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.card > summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 16px;
  background: var(--sage);
  color: var(--olive);
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.card > summary::-webkit-details-marker { display: none; }
.card > summary::after {
  content: "▸";
  transition: transform 0.2s;
  font-size: 0.85em;
  color: var(--olive);
}
.card[open] > summary::after { transform: rotate(90deg); }

/* Nested card (a sale inside a date group) */
.card .card {
  margin: 8px 12px;
  box-shadow: none;
}
.card .card > summary {
  background: var(--cream);
  font-weight: 400;
  font-size: 0.95em;
}

/* ===== Tables ===== */
.inv-table {
  width: 100%;
  border-collapse: collapse;
}
.inv-table th,
.inv-table td {
  padding: 10px 16px;
  border-bottom: 1px solid rgba(39, 56, 17, 0.08);
  text-align: left;
}
.inv-table th {
  background: transparent;
  color: var(--olive);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.inv-table tbody tr:last-child td { border-bottom: none; }

/* Chart wrapper */
.chart-wrap {
  width: 100%;
  max-width: 800px;
  margin: 0 auto 24px;
  padding: 16px;
  background: #fff;
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Stat cards row */
.stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin: 20px 0 24px;
}
.stat {
  background: var(--sage);
  border-radius: var(--radius);
  padding: 14px 12px;
  text-align: center;
}
.stat-label {
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--olive);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
  opacity: 0.8;
}
.stat-value {
  font-family: var(--font-body);
  font-size: 1.6rem;
  font-style: italic;
  color: var(--olive);
  font-weight: 700;
  line-height: 1.1;
}

/* Grand total */
#total {
  margin-top: 24px;
  padding: 14px 18px;
  background: var(--sage);
  border: 2px solid var(--terracotta);
  border-radius: var(--radius);
  color: var(--olive);
  font-weight: 700;
  font-size: 1.15rem;
  text-align: right;
}
#total:empty { display: none; }

/* ===== Mobile ===== */
@media (max-width: 640px) {
  body { padding: 0 14px; }
  h1 { font-size: 2rem; }

.inv-table thead { display: none; }
  .inv-table, .inv-table tbody { display: block; }
  .inv-table tr {
    display: block;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(39, 56, 17, 0.1);
  }
  .inv-table td {
    display: inline-block;
    border: none;
    padding: 0;
  }
  .inv-table td:first-child {
    display: block;
    font-weight: 700;
    color: var(--olive);
    font-size: 1rem;
    margin-bottom: 4px;
  }
  .inv-table td:not(:first-child) {
    margin-right: 14px;
    font-size: 0.9rem;
    color: rgba(24, 27, 11, 0.75);
  }
  .inv-table td[data-label]::before {
    content: attr(data-label) ": ";
    font-weight: 700;
    color: var(--olive);
  }

  .card > summary { padding: 12px; gap: 8px; }

  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat-value { font-size: 1.25rem; }
}

/* ===== Storefront ===== */
body { max-width: 1280px; }

.shop-header {
  text-align: center;
  padding: 32px 0 24px;
}
.shop-header .brand {
  font-size: 3rem;
  margin: 0;
}
.shop-tagline {
  font-family: var(--font-body);
  font-style: italic;
  color: var(--olive);
  opacity: 0.7;
  margin: 4px 0 0;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 8px 0 28px;
}
.chip {
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 6px 16px;
  background: transparent;
  color: var(--olive);
  border: 1px solid rgba(39, 56, 17, 0.3);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.chip:hover {
  background: var(--sage);
  border-color: var(--sage);
}
.chip.active {
  background: var(--olive);
  color: var(--cream);
  border-color: var(--olive);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.product-card {
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
}

.product-image {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
  background: var(--sage);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-card__hover {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  opacity: 0;
  transition: opacity .75s ease;
}
.product-card:hover .product-card__hover {
  opacity: 1;
}
.product-add-btn {
  width: 100%;
  padding: 10px 0;
  background: transparent;
  color: #fff;
  border: 1.5px solid #fff;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  transition: background 0.1s, border-color 0.1s;
}
.product-add-btn:hover {
  background: var(--terracotta);
  border-color: var(--terracotta);
}
.product-add-btn:disabled {
  opacity: 0.6;
  cursor: default;
}
.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.product-image-placeholder {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--olive);
  opacity: 0.55;
}

.product-info {
  padding: 14px 3px 18px;
  display: flex;
  flex-direction: column;
  gap: 0px;
}
.product-name {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}
.product-variation {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: rgba(24, 27, 11, 0.65);
  margin: 0;
}
.product-price {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-style: italic;
  font-weight: 700;
  color: var(--olive);
  margin-top: 6px;
}

.shop-status {
  text-align: center;
  color: var(--olive);
  opacity: 0.7;
  margin: 24px 0;
}
.shop-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  color: var(--olive);
  opacity: 0.7;
  font-style: italic;
}

/* Skeleton loading */
@keyframes skeleton-shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position:  400px 0; }
}
.skeleton-block {
  background: linear-gradient(90deg, var(--sage) 25%, #e8edce 50%, var(--sage) 75%);
  background-size: 800px 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: 4px;
}
.product-card-skeleton .product-image {
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
}
.product-card-skeleton .product-info {
  padding: 14px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.skeleton-text--name  { height: 16px; width: 70%; }
.skeleton-text--price { height: 14px; width: 40%; margin-top: 4px; }

/* Shop search */
.shop-search {
  display: flex;
  justify-content: center;
  margin: 0 0 16px;
}
.shop-search-input {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 8px 20px;
  border: 1px solid rgba(39, 56, 17, 0.3);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  width: 100%;
  max-width: 400px;
  outline: none;
  transition: border-color 0.15s;
}
.shop-search-input:focus {
  border-color: var(--olive);
}

@media (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 700px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .shop-header .brand { font-size: 2.4rem; }
}
@media (max-width: 380px) {
  .product-grid { grid-template-columns: 1fr; }
}

/* ===== Product Detail ===== */
.product-detail-back {
  display: inline-block;
  margin: 0 0 16px;
  color: var(--olive);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 0.95rem;
}
.product-detail-back:hover { color: var(--terracotta); }

.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  padding: 8px 0 32px;
}

.product-detail-images {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.product-detail-main-image {
  aspect-ratio: 1 / 1;
  background: var(--sage);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-detail-main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-detail-thumbnails {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.product-detail-thumb {
  width: 80px;
  height: 80px;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  background: var(--sage);
  padding: 0;
}
.product-detail-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.product-detail-thumb.active { border-color: var(--olive); }

.product-detail-info {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.product-detail-name {
  font-family: var(--font-display);
  font-size: 2.4rem;
  color: var(--olive);
  margin: 0;
  line-height: 1.2;
}
.product-detail-variation {
  font-family: var(--font-body);
  font-size: 1rem;
  color: rgba(24, 27, 11, 0.65);
  margin: -8px 0 0;
}
.product-detail-price {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--olive);
}
.product-detail-stock {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--olive);
  opacity: 0.7;
  margin: -8px 0 0;
}
.product-detail-description {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink);
  white-space: pre-line;
}

.add-to-cart-btn {
  margin-top: 16px;
  padding: 12px 24px;
  background: var(--olive);
  color: var(--cream);
  border: 1px solid var(--olive);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  cursor: pointer;
  align-self: flex-start;
  transition: background 0.15s, border-color 0.15s;
}
.add-to-cart-btn:hover {
  background: var(--terracotta);
  border-color: var(--terracotta);
}
.add-to-cart-btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}
.add-to-cart-btn[disabled]:hover {
  background: var(--olive);
  border-color: var(--olive);
}

@media (max-width: 700px) {
  .product-detail { grid-template-columns: 1fr; gap: 24px; }
  .product-detail-name { font-size: 2rem; }
  .product-detail-price { font-size: 1.4rem; }
}

/* ===== Home page ===== */
html.home-page {
  background-color: var(--cream);
}
body.home-body {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
  background: transparent;
  overflow-x: hidden;
}

.home-hero {
  overflow: hidden;
  max-height: 940px;
  display: flex;
  align-items: center;
}

html.home-page main {
  width: 100%;
  box-sizing: border-box;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 20px;
}

.home-intro {
  text-align: center;
  padding: 48px 20px 0;
}
.home-hero-blurb {
  max-width: 640px;
  margin: 0 auto 24px;
  font-size: 1.05rem;
  line-height: 1.7;
}
.home-hero-cta {
  display: inline-block;
  text-decoration: none;
}

.home-section {
  margin: 48px 0;
}
#s-markets {
  margin-top: 48px;
}
.home-section h2 {
  text-align: center;
  margin-bottom: 20px;
}

/* Markets */
.home-markets {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 1000px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.home-markets-empty {
  max-width: 1000px;
  margin: 0 auto;
  color: var(--olive);
  opacity: 0.7;
  font-style: italic;
}
.home-market {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px 18px;
  background: #fff;
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.home-market--multi { align-items: flex-start; }
.home-market-date {
  font-family: var(--font-display);
  color: var(--terracotta);
  font-size: 1.05rem;
  line-height: 1.35;
}
.home-market-time {
  font-family: inherit;
  font-size: 0.82rem;
  color: var(--olive);
  opacity: 0.8;
}
.home-market-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.home-market-name { font-weight: 700; color: var(--ink); }
.home-market-place {
  color: var(--olive);
  opacity: 0.75;
  font-style: italic;
  font-size: 0.9rem;
}
.home-market-days {
  list-style: none;
  padding: 0;
  margin: 5px 0 0;
  font-size: 0.82rem;
  color: var(--olive);
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.home-market-action { display: flex; align-items: center; }
.home-market-btn {
  font-size: 0.8rem;
  padding: 5px 10px;
  white-space: nowrap;
}

/* Gallery */
.home-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.home-gallery-item {
  aspect-ratio: 1 / 1;
  background: var(--sage);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.home-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.home-gallery-placeholder {
  font-family: var(--font-body);
  color: var(--olive);
  opacity: 0.55;
  font-size: 0.9rem;
}

/* Newsletter */
.home-newsletter {
  text-align: center;
  background: var(--sage);
  border-radius: var(--radius);
  padding: 32px 20px;
}
.home-newsletter-form {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 16px;
}
.home-newsletter-form input[type="email"], .home-newsletter-form input[type="text"] {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 10px 14px;
  border: 1px solid rgba(39, 56, 17, 0.3);
  border-radius: var(--radius);
  background: #fff;
  min-width: 260px;
}
.home-newsletter-status {
  width: 100%;
  margin: 8px 0 0;
  color: var(--olive);
  font-style: italic;
  min-height: 1.2em;
}
.home-newsletter-status--error   { color: #c0392b; font-style: normal; font-weight: 600; }
.home-newsletter-status--success { color: var(--olive); font-style: normal; font-weight: 600; }

/* About / Contact shared page header */
.page-header {
  text-align: center;
  padding: 32px 0 16px;
}
.page-content {
  max-width: 720px;
  margin: 0 auto;
}

/* Contact list */
.contact-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.contact-list a {
  color: var(--olive);
  text-decoration: underline;
}
.contact-list a:hover { color: var(--terracotta); }

@media (max-width: 700px) {
  .home-hero-title { font-size: 2.6rem; }
  .home-gallery { grid-template-columns: repeat(2, 1fr); }
  .home-market {
    grid-template-columns: auto 1fr;
    grid-template-areas: "date info" "action action";
    gap: 10px 12px;
  }
  .home-market-date { grid-area: date; }
  .home-market-info { grid-area: info; }
  .home-market-action { grid-area: action; justify-content: flex-start; }
  .home-newsletter-form input[type="email"] { min-width: 0; flex: 1; }
}


/* ===== Cart page ===== */
.cart-page {
  max-width: 800px;
  margin: 0 auto;
}

.cart-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--olive);
}
.cart-empty p {
  font-style: italic;
  margin: 0 0 16px;
}
.cart-empty .btn {
  display: inline-block;
  text-decoration: none;
}

.cart-items {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cart-item {
  display: grid;
  grid-template-columns: 100px 1fr auto auto auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  background: #fff;
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.cart-item-image {
  width: 100px;
  height: 100px;
  background: var(--sage);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cart-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.cart-item-name {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}
.cart-item-variation {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: rgba(24, 27, 11, 0.65);
  margin: 0;
}
.cart-item-price {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--olive);
  margin: 4px 0 0;
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cart-qty-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 6px;
  background: var(--sage);
  color: var(--olive);
  border: 1px solid rgba(39, 56, 17, 0.18);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}
.cart-qty-btn:hover {
  background: var(--olive);
  color: var(--cream);
  border-color: var(--olive);
}
.cart-qty-btn[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}
.cart-qty-btn[disabled]:hover {
  background: var(--sage);
  color: var(--olive);
  border-color: rgba(39, 56, 17, 0.18);
}
.cart-qty-value {
  min-width: 24px;
  text-align: center;
  font-family: var(--font-body);
  font-weight: 700;
  color: var(--ink);
}

.cart-item-line-total {
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 700;
  color: var(--olive);
  font-size: 1.05rem;
  white-space: nowrap;
}

.cart-remove-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  background: transparent;
  border: none;
  color: rgba(24, 27, 11, 0.45);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 6px;
}
.cart-remove-btn:hover {
  background: rgba(228, 133, 91, 0.12);
  color: var(--terracotta);
}
.mug-left, .mug-right {
  transition: transform 0.2s ease;
  transform-box: fill-box;
}
.mug-left  { transform-origin: right bottom; }
.mug-right { transform-origin: left bottom; }
.cart-remove-btn:hover .mug-left  { transform: rotate(-25deg); }
.cart-remove-btn:hover .mug-right { transform: rotate(25deg); }

.cart-summary {
  margin-top: 24px;
  padding: 20px;
  background: var(--sage);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cart-subtotal {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--font-body);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--olive);
}
.cart-tax-note {
  margin: 0;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--olive);
  opacity: 0.7;
}
.checkout-shipping-row {
  border-top: 1px solid rgba(39, 56, 17, 0.12);
  padding-top: 6px;
  margin-top: 4px;
  font-size: 0.9rem;
}
.checkout-grand-total {
  border-top: 2px solid rgba(39, 56, 17, 0.25);
  padding-top: 8px;
  margin-top: 4px;
  font-size: 1.05rem;
}
.checkout-rates-status {
  font-size: 0.9rem;
  color: var(--olive);
  opacity: 0.75;
  margin: 8px 0 0;
}
.checkout-rates-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.checkout-rate-option {
  border: 1px solid rgba(39, 56, 17, 0.2);
  border-radius: var(--radius);
  background: #fff;
  transition: border-color 0.15s;
}
.checkout-rate-option:has(input:checked) {
  border-color: var(--olive);
  background: var(--sage);
}
.checkout-rate-label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  width: 100%;
}
.checkout-rate-label input[type="radio"] {
  flex-shrink: 0;
  accent-color: var(--olive);
  width: 16px;
  height: 16px;
}
.checkout-rate-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}
.checkout-rate-name {
  font-size: 0.95rem;
  color: var(--ink);
}
.checkout-rate-days {
  font-size: 0.8rem;
  color: var(--olive);
  opacity: 0.75;
}
.checkout-rate-price {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--olive);
  white-space: nowrap;
}
.cart-checkout-btn {
  margin-top: 8px;
  align-self: flex-end;
}

/* ===== Checkout page ===== */
.checkout-page {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 40px;
  align-items: start;
  padding: 8px 0 40px;
}

.checkout-section {
  margin-bottom: 28px;
}
.checkout-section h2 {
  margin: 0 0 16px;
  font-size: 1.3rem;
  border-bottom: 1px solid rgba(39, 56, 17, 0.12);
  padding-bottom: 8px;
}

.checkout-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.checkout-field input[type="text"],
.checkout-field input[type="email"] {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 10px 14px;
  border: 1px solid rgba(39, 56, 17, 0.3);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  width: 100%;
}
.checkout-field input:focus {
  outline: 2px solid var(--olive);
  outline-offset: 1px;
}

.checkout-field select {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 10px 14px;
  border: 1px solid rgba(39, 56, 17, 0.3);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  width: 100%;
  cursor: pointer;
}
.checkout-field select:focus {
  outline: 2px solid var(--olive);
  outline-offset: 1px;
}

.checkout-field-row {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}
.checkout-field-row .checkout-field {
  flex: 1;
  margin-bottom: 0;
}
.checkout-field--province {
  flex: 0 0 auto;
  width: 160px;
}
.checkout-field--postal {
  max-width: 160px;
}

.checkout-fulfillment {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.fulfillment-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(39, 56, 17, 0.2);
  border-radius: var(--radius);
  cursor: pointer;
  background: #fff;
  transition: border-color 0.15s, background 0.15s;
}
.fulfillment-option:has(input:checked) {
  border-color: var(--olive);
  background: var(--sage);
}
.fulfillment-option input[type="radio"] {
  margin-top: 3px;
  accent-color: var(--olive);
  flex-shrink: 0;
}
.fulfillment-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink);
}
.fulfillment-label strong {
  font-size: 1rem;
}
.fulfillment-label span {
  color: rgba(24, 27, 11, 0.65);
  font-size: 0.88rem;
}

#card-container {
  min-height: 90px;
}

.checkout-address-note {
  margin: -8px 0 16px;
  font-size: 0.88rem;
  color: var(--olive);
  opacity: 0.75;
  font-style: italic;
}


.checkout-field input[readonly] {
  background: var(--sage);
  opacity: 0.75;
  cursor: default;
}
.checkout-field input[readonly]:focus {
  outline: none;
}

.thankyou-subtotal-row {
  font-weight: normal;
  font-size: 0.95rem;
  padding-top: 12px;
}
.thankyou-shipping-row {
  font-size: 0.9rem;
  padding-top: 6px;
  border-top: none;
}
.thankyou-grand-total {
  border-top: 2px solid rgba(39, 56, 17, 0.2);
  margin-top: 6px;
  padding-top: 10px;
}

.checkout-error {
  color: #c0392b;
  font-family: var(--font-body);
  font-size: 0.9rem;
  margin: 10px 0 0;
  min-height: 1.2em;
}

.checkout-summary {
  position: sticky;
  top: 24px;
  background: var(--sage);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.checkout-summary h2 {
  margin: 0 0 4px;
  font-size: 1.3rem;
}

.checkout-item-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.checkout-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-family: var(--font-body);
  font-size: 0.95rem;
}
.checkout-item-name {
  color: var(--ink);
  flex: 1;
}
.checkout-item-variation {
  color: rgba(24, 27, 11, 0.65);
}
.checkout-item-qty {
  color: rgba(24, 27, 11, 0.65);
  font-size: 0.88rem;
}
.checkout-item-price {
  font-weight: 700;
  color: var(--olive);
  white-space: nowrap;
}

.checkout-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--font-body);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--olive);
  border-top: 1px solid rgba(39, 56, 17, 0.2);
  padding-top: 10px;
  margin-top: 4px;
}

.checkout-submit-btn {
  margin-top: 4px;
  width: 100%;
}

@media (max-width: 800px) {
  .checkout-page {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .checkout-summary-col {
    order: -1;
  }
  .checkout-summary {
    position: static;
  }
}

/* ===== Thank you page ===== */
.thankyou-page {
  text-align: center;
  padding: 64px 20px;
}
.thankyou-page h1 {
  font-size: 3rem;
  margin: 0 0 16px;
}
.thankyou-message {
  font-size: 1.15rem;
  color: var(--olive);
  margin: 0 0 12px;
}
.thankyou-note {
  font-style: italic;
  color: var(--olive);
  opacity: 0.75;
  max-width: 520px;
  margin: 0 auto 28px;
}
.thankyou-btn {
  display: inline-block;
  text-decoration: none;
}
.thankyou-order {
  background: white;
  border: 1px solid var(--sage);
  border-radius: 10px;
  padding: 24px 28px;
  max-width: 480px;
  margin: 0 auto 28px;
  text-align: left;
}
.thankyou-ref {
  font-size: 0.85rem;
  color: var(--olive);
  opacity: 0.7;
  margin: 0 0 4px;
}
.thankyou-fulfillment {
  font-size: 0.95rem;
  color: var(--olive);
  margin: 0 0 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--sage);
}
.thankyou-item-list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.thankyou-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.95rem;
}
.thankyou-item-name { color: var(--olive); }
.thankyou-item-variation {
  font-size: 0.8em;
  opacity: 0.7;
}
.thankyou-item-qty { opacity: 0.6; }
.thankyou-item-price { white-space: nowrap; font-weight: 600; }
.thankyou-total {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  padding-top: 14px;
  border-top: 1px solid var(--sage);
}

@media (max-width: 640px) {
  .cart-item {
    grid-template-columns: 80px 1fr auto;
    grid-template-areas:
      "image info  remove"
      "image qty   total";
    gap: 8px 12px;
  }
  .cart-item-image { width: 80px; height: 80px; grid-area: image; }
  .cart-item-info { grid-area: info; }
  .cart-item-qty { grid-area: qty; align-self: end; }
  .cart-item-line-total { grid-area: total; text-align: right; align-self: end; }
  .cart-remove-btn { grid-area: remove; align-self: start; justify-self: end; }
  .cart-checkout-btn { align-self: stretch; }
}

/* ===== Orders page ===== */
.orders-page {
  padding: 40px 20px 60px;
}
.orders-intro {
  color: var(--olive);
  margin: 0 0 24px;
  font-size: 1.05rem;
}
.orders-signin-form {
  max-width: 480px;
}
.orders-signin-form .btn {
  margin-top: 4px;
}
.orders-success {
  margin-top: 20px;
  color: var(--olive);
  font-style: italic;
}
.orders-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 4px;
}
.orders-greeting {
  font-size: 0.9rem;
  color: var(--olive);
  opacity: 0.7;
  margin: 0 0 24px;
  font-style: italic;
}
.orders-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.orders-empty {
  font-style: italic;
  color: var(--olive);
  opacity: 0.7;
}
.orders-card {
  background: #fff;
  border: var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow);
}
.orders-card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--sage);
}
.orders-card-ref {
  font-family: var(--font-body);
  font-weight: 700;
  color: var(--olive);
  font-size: 0.95rem;
}
.orders-card-date {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--olive);
  opacity: 0.65;
  white-space: nowrap;
}
.orders-card-state {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 400;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 8px;
  vertical-align: middle;
}
.orders-card-state--open {
  background: var(--sage);
  color: var(--olive);
}
.orders-card-state--canceled {
  background: rgba(228, 133, 91, 0.15);
  color: var(--terracotta);
}

.btn--ghost {
  background: transparent;
  color: var(--olive);
  border-color: rgba(39, 56, 17, 0.35);
  font-size: 0.95rem;
  padding: 8px 16px;
}
.btn--ghost:hover {
  background: var(--sage);
  border-color: var(--olive);
  color: var(--olive);
}

.thankyou-history-note {
  margin-top: 16px;
  font-size: 0.9rem;
}
.thankyou-history-note a {
  color: var(--olive);
  opacity: 0.75;
}
.thankyou-history-note a:hover {
  color: var(--terracotta);
  opacity: 1;
}

/* ===== Site footer ===== */
.site-footer {
  margin-top: auto;
  width: 100vw;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  background: var(--olive);
  padding: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-inner {
  max-width: 1000px;
  width: 100%;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 0;
  justify-content: center;
}

.footer-links a {
  color: #fff;
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  transition: color 0.15s;
}

.footer-links a:hover {
  color: var(--terracotta);
}

.footer-links a:not(:first-child)::before {
  content: '•';
  color: var(--cream);
  margin: 0 20px;
}
