:root {
  --ink: #211816;
  --muted: #6f625d;
  --paper: #fbf7f1;
  --cream: #efe3d4;
  --card: #fffdf9;
  --line: #dfd0c0;
  --coffee: #4a261a;
  --rust: #a04724;
  --green: #2d5b4a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

button,
.button {
  border: 0;
  border-radius: 6px;
  background: var(--coffee);
  color: white;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  min-height: 44px;
  padding: 0 18px;
}

button.secondary {
  background: var(--cream);
  color: var(--ink);
}

button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

input,
select,
textarea {
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  width: 100%;
}

input,
select {
  min-height: 42px;
}

textarea {
  font: inherit;
  line-height: 1.5;
  min-height: 150px;
  padding: 12px;
  resize: vertical;
}

label {
  color: var(--muted);
  display: grid;
  font-size: 13px;
  font-weight: 700;
  gap: 6px;
}

.site-header {
  align-items: center;
  background: rgba(251, 247, 241, .92);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 clamp(18px, 4vw, 56px);
  position: sticky;
  top: 0;
  z-index: 5;
}

.brand {
  color: var(--coffee);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 800;
}

nav {
  align-items: center;
  display: flex;
  gap: clamp(12px, 2vw, 28px);
  font-size: 14px;
  font-weight: 800;
}

.cart-link span {
  background: var(--rust);
  border-radius: 999px;
  color: white;
  display: inline-grid;
  font-size: 12px;
  height: 22px;
  margin-left: 4px;
  place-items: center;
  width: 22px;
}

main {
  padding-bottom: 56px;
}

.hero {
  background:
    linear-gradient(90deg, rgba(33, 24, 22, .92), rgba(33, 24, 22, .42)),
    url("../images/hero-coffee.jpg") center/cover;
  color: white;
  display: flex;
  min-height: min(620px, calc(100vh - 72px));
  padding: clamp(42px, 7vw, 86px) clamp(18px, 5vw, 72px);
}

.hero > div {
  align-self: end;
  max-width: 680px;
}

.hero h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(54px, 9vw, 112px);
  line-height: .92;
  margin: 0 0 18px;
}

.hero p {
  font-size: clamp(16px, 2vw, 22px);
  line-height: 1.5;
  max-width: 620px;
}

.eyebrow,
.tag {
  color: var(--rust);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  margin: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #f4c46a;
}

.hero .button {
  background: white;
  color: var(--coffee);
  margin-top: 10px;
}

.toolbar,
.grid,
.account-layout,
.cart-page,
.center-page {
  margin: 0 auto;
  max-width: 1240px;
  padding: 36px clamp(18px, 4vw, 40px) 0;
}

.toolbar {
  align-items: end;
  display: flex;
  justify-content: space-between;
  gap: 22px;
}

.toolbar h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(32px, 4vw, 54px);
  margin: 6px 0 0;
}

.shop-tools {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(220px, 1.25fr) minmax(160px, .8fr) minmax(160px, .8fr);
}

.feature-strip {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 auto;
  max-width: 1240px;
  padding: 24px clamp(18px, 4vw, 40px) 0;
}

.feature-strip div {
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  display: grid;
  gap: 4px;
  padding: 16px 0;
}

.feature-strip span,
.mini-line span {
  color: var(--muted);
  font-size: 13px;
}

.grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.load-more-wrap {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: center;
  margin: 24px auto 0;
  max-width: 1240px;
  padding: 0 clamp(18px, 4vw, 40px);
}

.load-more-wrap p {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

.product,
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.product {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.product img {
  aspect-ratio: 1 / 1;
  background: var(--cream);
  object-fit: cover;
  width: 100%;
}

.product[hidden] {
  display: none;
}

.page-shell {
  margin: 0 auto;
  max-width: 1240px;
  padding: 44px clamp(18px, 4vw, 40px) 56px;
}

.woocommerce-shell .woocommerce,
.woocommerce-page .woocommerce {
  width: 100%;
}

.woocommerce ul.products {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.woocommerce ul.products li.product {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  width: auto;
}

.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
  background: var(--coffee);
  border-radius: 6px;
  color: white;
  font-weight: 800;
}

.product-body {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.product-options,
.form-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.product h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  line-height: 1.05;
  margin: 0;
}

.description {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  margin: 0;
  min-height: 60px;
}

.row,
.summary-row {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.rating {
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  margin: 0;
}

.price {
  color: var(--coffee);
  font-size: 18px;
}

.button-pair,
.inline-field {
  align-items: center;
  display: flex;
  gap: 8px;
}

.button-pair button {
  min-height: 38px;
  padding: 0 12px;
}

.text-button {
  background: transparent;
  color: var(--coffee);
  justify-content: flex-start;
  min-height: auto;
  padding: 0;
  text-decoration: underline;
}

.account-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cart-page {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 360px;
}

.center-page {
  display: grid;
  min-height: calc(100vh - 120px);
  place-items: center;
}

.support-page {
  margin: 0 auto;
  max-width: 1240px;
  padding: 44px clamp(18px, 4vw, 40px) 56px;
}

.support-hero {
  max-width: 760px;
}

.support-hero h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(48px, 8vw, 88px);
  line-height: .95;
  margin: 8px 0 16px;
}

.support-hero p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.support-layout {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 360px;
  margin-top: 28px;
}

.support-form {
  display: grid;
  gap: 14px;
}

.contact-card {
  position: sticky;
  top: 92px;
}

.contact-card h2 {
  font-family: Georgia, "Times New Roman", serif;
  margin: 8px 0 14px;
}

.contact-list {
  display: grid;
  gap: 12px;
  margin: 0 0 18px;
}

.contact-list div {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 4px;
  padding-top: 12px;
}

.contact-list dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.contact-list dd {
  margin: 0;
}

.panel {
  padding: 22px;
}

.panel.wide {
  grid-column: 1 / -1;
}

.panel h1,
.panel h2 {
  font-family: Georgia, "Times New Roman", serif;
  margin-top: 0;
}

form {
  display: grid;
  gap: 14px;
}

.summary form {
  margin: 16px 0;
}

.notice {
  background: #f8ead8;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--coffee);
  margin: 0 0 16px;
  padding: 12px;
}

.notice-success {
  background: #e8f4ee;
  border-color: #9ec9b1;
  color: var(--green);
}

.notice-error {
  background: #fae7df;
  border-color: #d6a18b;
  color: #7b2918;
}

.cart-line,
.order-line {
  align-items: center;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 14px;
  grid-template-columns: 80px minmax(0, 1fr) auto;
  padding: 16px 0;
}

.cart-line:first-child,
.order-line:first-child {
  border-top: 0;
}

.cart-line img {
  aspect-ratio: 1;
  border-radius: 6px;
  object-fit: cover;
  width: 80px;
}

.cart-line h3,
.order-line h3 {
  margin: 0 0 4px;
}

.cart-controls {
  align-items: center;
  display: flex;
  gap: 8px;
}

.cart-controls button {
  height: 34px;
  min-height: 34px;
  padding: 0;
  width: 34px;
}

.summary {
  position: sticky;
  top: 92px;
}

.summary-row {
  border-top: 1px solid var(--line);
  font-size: 20px;
  padding: 18px 0;
}

.summary-lines {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  padding: 16px 0;
}

.summary-lines div {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.mini-line {
  align-items: center;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: 56px minmax(0, 1fr);
  padding: 12px 0;
}

.mini-line:first-child {
  border-top: 0;
}

.mini-line img {
  aspect-ratio: 1;
  border-radius: 6px;
  object-fit: cover;
  width: 56px;
}

.mini-line div {
  display: grid;
  gap: 2px;
}

.order-card {
  border-top: 1px solid var(--line);
  padding: 16px 0;
}

.order-card:first-child {
  border-top: 0;
}

.order-card ul {
  color: var(--muted);
  margin: 10px 0;
  padding-left: 20px;
}

#product-dialog {
  border: 0;
  border-radius: 8px;
  max-width: min(920px, calc(100vw - 28px));
  padding: 0;
}

#product-dialog::backdrop {
  background: rgba(33, 24, 22, .48);
}

.dialog-card {
  background: var(--card);
  padding: 18px;
}

.dialog-close {
  float: right;
}

.detail-layout {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(260px, .9fr) minmax(280px, 1fr);
  padding-top: 42px;
}

.detail-layout img {
  aspect-ratio: 1;
  border-radius: 8px;
  object-fit: cover;
  width: 100%;
}

.detail-layout h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1;
  margin: 8px 0 12px;
}

.spec-list {
  display: grid;
  gap: 10px;
  margin: 20px 0;
}

.spec-list div {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
  grid-template-columns: 120px minmax(0, 1fr);
  padding-top: 10px;
}

.spec-list dt {
  color: var(--muted);
  font-weight: 800;
}

.spec-list dd {
  margin: 0;
}

.empty {
  color: var(--muted);
  padding: 24px 0;
}

.site-footer {
  align-items: center;
  background: var(--coffee);
  color: white;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  padding: 24px clamp(18px, 4vw, 56px);
}

.site-footer div {
  display: grid;
  gap: 5px;
}

.site-footer span,
.site-footer a {
  color: #f7e8d3;
}

.policy-links {
  border-top: 1px solid rgba(255, 255, 255, .18);
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  grid-column: 1 / -1;
  padding-top: 14px;
}

.policy-page {
  margin: 0 auto;
  max-width: 980px;
  padding: 44px clamp(18px, 4vw, 40px) 64px;
}

.policy-content {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(22px, 4vw, 44px);
}

.policy-content h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(42px, 7vw, 72px);
  line-height: .98;
  margin: 8px 0 28px;
}

.policy-content h2 {
  font-family: Georgia, "Times New Roman", serif;
  margin-top: 30px;
}

.policy-content p,
.policy-content li {
  color: var(--muted);
  line-height: 1.65;
}

.jbrooks-checkout-policies {
  background: #f8ead8;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0 0 18px;
  padding: 14px;
}

.jbrooks-checkout-policies p {
  margin: 6px 0 0;
}

.cookie-banner {
  align-items: center;
  background: var(--ink);
  border-top: 1px solid rgba(255, 255, 255, .16);
  bottom: 0;
  color: white;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) auto;
  left: 0;
  padding: 16px clamp(18px, 4vw, 56px);
  position: fixed;
  right: 0;
  z-index: 20;
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-banner p {
  margin: 0;
}

.cookie-banner div {
  align-items: center;
  display: flex;
  gap: 12px;
}

.cookie-banner a {
  color: #f7e8d3;
  font-weight: 800;
}

.cookie-banner button {
  background: white;
  color: var(--coffee);
}

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

  .shop-tools {
    grid-template-columns: 1fr;
  }

  .feature-strip {
    grid-template-columns: 1fr;
  }

  .cart-page {
    grid-template-columns: 1fr;
  }

  .support-layout,
  .site-footer,
  .cookie-banner {
    grid-template-columns: 1fr;
  }

  .summary {
    position: static;
  }

  .contact-card {
    position: static;
  }
}

@media (max-width: 640px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 14px;
    padding-top: 14px;
  }

  nav {
    flex-wrap: wrap;
  }

  .hero {
    min-height: 560px;
  }

  .toolbar,
  .account-layout {
    display: grid;
    grid-template-columns: 1fr;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .cart-line {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .cart-line img {
    width: 64px;
  }

  .cart-controls {
    grid-column: 2;
  }

  .product-options,
  .form-grid,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .button-pair {
    flex-wrap: wrap;
  }
}
