@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600&family=IBM+Plex+Sans:wght@400;500;600&display=swap");

:root {
  /* Info-Link Education brand palette */
  --paper: #F8F1EC;        /* Warm Cream */
  --paper-line: #E9DED2;   /* derived - a hair darker than cream, for hairline borders */
  --ink: #2B2833;          /* Charcoal Text */
  --ink-soft: #6B6673;     /* derived - lightened charcoal for secondary text */
  --mustard: #FAD26B;      /* Mustard Yellow - primary CTA */
  --mustard-dark: #E8BE52; /* derived - hover state */
  --teal: #6C9FA5;         /* derived from Soft Teal, darkened for text contrast */
  --teal-bg: #E7F3F4;      /* Soft Teal, tinted for tag backgrounds */
  --rose: #B5757A;         /* derived from Dusty Rose, darkened for text contrast */
  --rose-bg: #F7EBEC;      /* Dusty Rose, tinted for tag backgrounds */
  --plum: #8D4C65;         /* Deep Plum - secondary accent (checkout, wordmark) */
  --plum-dark: #7A3F55;    /* derived - hover state */

  --serif: "Fraunces", Georgia, serif;
  --sans: "IBM Plex Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.margin-rule {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 28px;
  width: 1px;
  background: var(--paper-line);
  z-index: 0;
}

@media (max-width: 640px) {
  .margin-rule { left: 16px; }
}

header {
  position: sticky;
  top: 0;
  background: var(--paper);
  border-bottom: 1px solid var(--paper-line);
  padding: 16px 20px 16px 44px;
  z-index: 10;
}

@media (max-width: 640px) {
  header { padding-left: 32px; }
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 20px;
  max-width: 720px;
  margin: 0 auto;
}

.wordmark {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.wordmark span { color: var(--plum); }

.wordmark-link {
  color: inherit;
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 16px;
  font-size: 13px;
  order: 3;
  width: 100%;
}

@media (min-width: 480px) {
  .site-nav {
    order: 0;
    width: auto;
    margin-left: auto;
    margin-right: 16px;
  }
}

.site-nav a {
  text-decoration: none;
  color: var(--ink-soft);
}

.site-nav a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.cart-button {
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  padding: 7px 14px;
  cursor: pointer;
  position: relative;
}

.cart-button:hover { background: var(--ink); color: var(--paper); }

.cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--mustard);
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 20px 80px 44px;
  position: relative;
}

@media (max-width: 640px) {
  main { padding-left: 32px; }
}

.intro {
  margin-bottom: 28px;
}

.intro h1 {
  font-family: var(--serif);
  font-size: 30px;
  line-height: 1.15;
  font-weight: 600;
  margin: 0 0 8px;
  max-width: 22ch;
}

.intro p {
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.5;
  margin: 0;
  max-width: 52ch;
}

/* Static content pages (About, Contact) */
.content-page {
  max-width: 60ch;
}

.content-page p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  margin: 0 0 16px;
}

.content-page h2 {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  margin: 28px 0 10px;
}

.content-page h2:first-child {
  margin-top: 0;
}

.content-page a {
  color: var(--plum);
  text-decoration: underline;
}

.content-list {
  margin: 0 0 16px;
  padding-left: 20px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink);
}

.delivery-note {
  font-weight: 600;
  font-size: 16px;
}

.contact-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--paper-line);
  margin-bottom: 20px;
}

.contact-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--paper-line);
  text-decoration: none;
  color: var(--ink);
}

.contact-row:last-child { border-bottom: none; }

.contact-row:hover { background: var(--paper-line); }

.contact-label {
  font-size: 13px;
  color: var(--ink-soft);
}

.contact-value {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 15px;
}

.filters {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--paper-line);
}

.filter-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-heading {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
}

.filter-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.chip {
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 13px;
  padding: 5px 12px;
  cursor: pointer;
  white-space: nowrap;
}

.chip.active { background: var(--ink); color: var(--paper); }

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--paper-line);
  border: 1px solid var(--paper-line);
}

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

.card {
  background: var(--paper);
  padding: 16px;
  display: flex;
  flex-direction: column;
}

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

.card-link:hover h3 { text-decoration: underline; }

.card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #FFFFFF;
  border: 1px solid var(--paper-line);
  margin-bottom: 12px;
}

.card-tags {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

.tag {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  letter-spacing: 0.01em;
}

.tag.af { background: var(--teal-bg); color: var(--teal); }
.tag.en { background: var(--rose-bg); color: var(--rose); }

.card h3 {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 6px;
  line-height: 1.25;
}

.card .grade-label {
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 12px;
}

.card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.price {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
}

select.variant-select {
  width: 100%;
  border: 1px solid var(--paper-line);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 13px;
  padding: 6px 8px;
  margin-bottom: 10px;
}

.add-button {
  background: var(--mustard);
  border: none;
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 13px;
  padding: 8px 14px;
  cursor: pointer;
  width: 100%;
}

.add-button:hover { background: var(--mustard-dark); }
.add-button:disabled { background: var(--paper-line); color: var(--ink-soft); cursor: not-allowed; }

.notify-strip {
  margin-top: 40px;
  border-top: 1px solid var(--paper-line);
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.notify-strip p {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0;
  max-width: 40ch;
}

.notify-button {
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  cursor: pointer;
  white-space: nowrap;
}

.notify-button.enabled { background: var(--teal); border-color: var(--teal); color: white; cursor: default; }

/* Cart drawer */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(43, 40, 51, 0.35);
  z-index: 20;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.cart-overlay.open { opacity: 1; pointer-events: auto; }

.cart-drawer {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: min(380px, 100%);
  background: var(--paper);
  border-left: 1px solid var(--paper-line);
  z-index: 21;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.25s ease;
}

.cart-drawer.open { transform: translateX(0); }

.cart-header {
  padding: 20px;
  border-bottom: 1px solid var(--paper-line);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.cart-header h2 {
  font-family: var(--serif);
  font-size: 20px;
  margin: 0;
}

.cart-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--ink);
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 12px 20px;
}

.cart-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--paper-line);
  font-size: 14px;
}

.cart-line .line-title { font-weight: 500; }
.cart-line .line-variant { color: var(--ink-soft); font-size: 13px; }
.cart-line .remove { background: none; border: none; color: var(--ink-soft); text-decoration: underline; cursor: pointer; font-size: 12px; padding: 0; margin-top: 4px; }

.cart-empty {
  color: var(--ink-soft);
  font-size: 14px;
  padding: 20px 0;
}

.cart-footer {
  padding: 20px;
  border-top: 1px solid var(--paper-line);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 14px;
}

.checkout-button {
  width: 100%;
  background: var(--plum);
  color: var(--paper);
  border: none;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 15px;
  padding: 13px;
  cursor: pointer;
}

.checkout-button:hover { background: var(--plum-dark); }
.checkout-button:disabled { background: var(--paper-line); color: var(--ink-soft); cursor: not-allowed; }

.empty-state {
  padding: 40px 0;
  color: var(--ink-soft);
  font-size: 14px;
}

.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: var(--paper);
  font-size: 13px;
  padding: 10px 18px;
  z-index: 30;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Install banner */
.install-banner {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  max-width: 480px;
  margin: 0 auto;
  background: var(--paper);
  border: 1px solid var(--ink);
  box-shadow: 0 4px 16px rgba(43, 40, 51, 0.18);
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 40;
  transform: translateY(120%);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.install-banner.show {
  transform: translateY(0);
  opacity: 1;
}

.install-banner-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  object-fit: cover;
}

.install-banner-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.install-banner-text strong {
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 600;
}

.install-banner-text span {
  font-size: 12px;
  color: var(--ink-soft);
}

.install-banner-action {
  background: var(--mustard);
  border: none;
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 13px;
  padding: 8px 14px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.install-banner-action:hover { background: var(--mustard-dark); }

.install-banner-close {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 0 2px;
  flex-shrink: 0;
}

@media (max-width: 420px) {
  .install-banner-text strong { font-size: 13px; }
  .install-banner-text span { font-size: 11px; }
}
