/* Kafe Cero store pages: the shop, coffee, cart, checkout and account pages that the theme and
   WooCommerce draw. They take the homepage's colours, type and buttons, and the plugin swaps the
   theme's placeholder header and footer for the two below (pages.php). */
@font-face { font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/instrument-serif-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap; src: url("fonts/instrument-serif-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap; src: url("fonts/manrope-latin-wght-normal.woff2") format("woff2-variations"); }

body.kafecero-store-page {
  --kc-terra: #A6533D;
  --kc-terra-deep: #8E4532;
  --kc-sage: #87927A;
  --kc-sage-text: #4F5A45;
  --kc-cream: #E9DCC8;
  --kc-paper: #F3EBDD;
  --kc-ink: #201E1C;
  --kc-muted: #5F554C;
  --kc-line: rgba(32, 30, 28, .18);
  --kc-serif: "Instrument Serif", Georgia, serif;
  --kc-sans: "Manrope", system-ui, sans-serif;
  /* The theme and WooCommerce's blocks draw from these presets, so the page follows the brand without
     a rule for every block. */
  --wp--preset--color--base: var(--kc-paper);
  --wp--preset--color--contrast: var(--kc-ink);
  --wp--preset--color--base-midtone: var(--kc-cream);
  --wp--preset--color--contrast-midtone: #4A433D;
  --wp--preset--color--accent-1: var(--kc-terra);
  --wp--preset--color--accent-2: var(--kc-terra-deep);
  --wp--preset--color--accent-3: var(--kc-sage);
  --wp--preset--color--accent-4: var(--kc-sage-text);
  --wp--preset--color--accent-5: var(--kc-terra);
  --wp--preset--color--accent-6: var(--kc-cream);
  --wp--preset--font-family--roboto-flex: var(--kc-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
body.kafecero-store-page :focus-visible { outline: 2px solid var(--kc-terra-deep); outline-offset: 3px; }

/* ---------- header and footer ---------- */
/* As wide as the theme's content column, so the logo lines up with the page below it. */
.kcs-wrap { box-sizing: content-box; max-width: var(--wp--style--global--content-size, 1200px); margin: 0 auto; padding: 0 var(--wp--style--root--padding-left, 32px); }
.kcs-header { background: var(--kc-paper); color: var(--kc-ink); font-family: var(--kc-sans); }
.kcs-bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 104px; border-bottom: 1px solid var(--kc-line); }
.kcs-logo { display: block; flex: none; }
.kcs-logo img, .kcs-footer-logo img { display: block; width: 128px; height: auto; }
.kcs-nav { display: flex; align-items: center; gap: 32px; font-size: 15px; font-weight: 500; }
.kcs-header a, .kcs-footer a { color: inherit; text-decoration: none; }
.kcs-nav a:not(.kcs-bag):not(.kcs-pill) { padding: 12px 0; }
.kcs-nav a:not(.kcs-bag):not(.kcs-pill):hover, .kcs-footer nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.kcs-pill { display: inline-flex; align-items: center; height: 46px; padding: 0 22px; border: 1px solid currentColor; border-radius: 99px; font-size: 14px; font-weight: 600; }
.kcs-bag { display: inline-grid; place-items: center; width: 46px; height: 46px; border: 1px solid currentColor; border-radius: 50%; }
.kcs-bag svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.kcs-title { margin: 0; padding: 48px 0 0; font-family: var(--kc-serif); font-weight: 400; font-size: 64px; line-height: 1; letter-spacing: -.015em; color: #000; }
.kcs-footer { margin-top: 96px; background: var(--kc-cream); color: var(--kc-ink); font-family: var(--kc-sans); font-size: 14px; }
/* Logo centred above the links, as in the homepage footer. */
.kcs-foot { display: flex; flex-direction: column; align-items: center; gap: 14px; padding-top: 40px; padding-bottom: 40px; text-align: center; }
.kcs-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 28px; }
.kcs-footer nav a { padding: 12px 0; }
.kcs-socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 24px; }
.kcs-socials a { display: inline-flex; align-items: center; gap: 8px; padding: 12px 0; }
.kcs-socials a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- page ---------- */
body.kafecero-store-page .wp-site-blocks > main { margin-block-start: 0; padding-top: 40px; }
/* Checkout carries its title in the header (pages.php), which already spaces it from the form. */
body.kafecero-store-page.woocommerce-checkout .wp-site-blocks > main { padding-top: 0; }
/* Page titles and section headings only; the cart and checkout blocks keep their own small headings. */
body.kafecero-store-page :is(h1, h2, h3).wp-block-post-title, body.kafecero-store-page .wp-block-query-title,
body.kafecero-store-page :is(.woocommerce-Tabs-panel h2, .wp-block-woocommerce-product-collection > h2, .woocommerce-MyAccount-content h2) { font-family: var(--kc-serif); font-weight: 400; letter-spacing: -.01em; color: #000; }
body.kafecero-store-page h1.wp-block-post-title, body.kafecero-store-page .wp-block-query-title { font-size: 64px; line-height: 1; }
body.kafecero-store-page :is(.woocommerce-Tabs-panel h2, .wp-block-woocommerce-product-collection > h2, .woocommerce-MyAccount-content h2) { font-size: 40px; line-height: 1.05; }
/* Account page, signed out: "Login" and "Register" in the same serif, a step smaller as the two share a row. */
body.kafecero-store-page .woocommerce .u-columns h2 { font-family: var(--kc-serif); font-weight: 400; font-size: 32px; line-height: 1.05; letter-spacing: -.01em; color: #000; }
/* The grid's titles carry a preset size class that is !important; the preset itself is changed here. */
body.kafecero-store-page .wc-block-product h3.wp-block-post-title { --wp--preset--font-size--medium: 28px; line-height: 1.05; }
body.kafecero-store-page .wc-block-product h3.wp-block-post-title a { text-decoration: none; }
body.kafecero-store-page .woocommerce-breadcrumb, body.kafecero-store-page .woocommerce-result-count { color: var(--kc-muted); }
/* Every coffee sits in WooCommerce's default "Uncategorized" category; naming it tells shoppers nothing. */
body.kafecero-store-page .wp-block-woocommerce-product-meta { display: none; }

/* ---------- buttons ---------- */
/* Sizes come from custom properties, so a button variant below only has to set them. */
body.kafecero-store-page :is(.wp-element-button, .wp-block-button__link, .wc-block-components-button:not(.is-link)):not(.wc-block-components-notice-banner__dismiss):not(.wc-block-components-chip__remove) {
  display: inline-flex; align-items: center; justify-content: center; min-height: var(--kcs-btn-h, 50px); padding: 0 var(--kcs-btn-pad, 28px); border-radius: 99px;
  background-color: var(--kc-terra); color: #fff; font-family: var(--kc-sans); font-size: var(--kcs-btn-size, 15px); font-weight: 600; line-height: 1.2; text-decoration: none;
}
body.kafecero-store-page :is(.wp-element-button, .wp-block-button__link, .wc-block-components-button:not(.is-link)):not(.wc-block-components-notice-banner__dismiss):not(.wc-block-components-chip__remove):hover { background-color: var(--kc-terra-deep); color: #fff; }
/* The two buttons that move the order forward are as tall as the homepage's. */
body.kafecero-store-page :is(.wc-block-components-checkout-place-order-button, .wc-block-cart__submit-button) { --kcs-btn-h: 56px; --kcs-btn-size: 16px; width: 100%; }

/* ---------- shop and coffee pages ---------- */
body.kafecero-store-page .wc-block-product .wc-block-components-product-image { border-radius: 6px; overflow: hidden; background: var(--kc-sage); }
body.kafecero-store-page .wc-block-product .wc-block-components-product-image img { box-sizing: border-box; padding: 6% 10%; object-fit: contain; }
body.kafecero-store-page .wc-block-product .wp-block-button__link { --kcs-btn-h: 46px; --kcs-btn-pad: 20px; --kcs-btn-size: 14px; white-space: nowrap; }
/* Four coffees fill one row, as they do on the homepage, instead of three and a stray. */
@media (min-width: 1000px) { body.kafecero-store-page main > .wp-block-woocommerce-product-collection ul.wc-block-product-template.columns-3 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* The description tabs keep to the content column instead of running wider than the rest of the page. */
body.kafecero-store-page main > .wp-block-woocommerce-product-details.alignwide { max-width: var(--wp--style--global--content-size, 1200px); }
body.kafecero-store-page .woocommerce-ordering select, body.kafecero-store-page table.variations select, body.kafecero-store-page .quantity .qty {
  box-sizing: border-box; height: 48px; padding: 0 14px; border: 1px solid rgba(32, 30, 28, .45); border-radius: 6px; background-color: transparent; color: var(--kc-ink); font: 500 15px/1.2 var(--kc-sans);
}
body.kafecero-store-page table.variations select { min-width: 220px; padding-right: 36px; }
body.kafecero-store-page table.variations :is(th, td) { padding: 8px 0; vertical-align: middle; }
body.kafecero-store-page table.variations th { padding-right: 20px; text-align: left; font-weight: 600; }
body.kafecero-store-page .woocommerce-product-gallery { border-radius: 8px; overflow: hidden; background: var(--kc-cream); }

/* ---------- cart and checkout ---------- */
body.kafecero-store-page .wc-block-components-sidebar .wc-block-components-panel, body.kafecero-store-page .wc-block-checkout__sidebar,
body.kafecero-store-page .wp-block-woocommerce-checkout-order-summary-block { border-color: var(--kc-line); }
body.kafecero-store-page .wc-block-components-totals-footer-item .wc-block-components-totals-item__label,
body.kafecero-store-page .wc-block-components-totals-footer-item .wc-block-components-totals-item__value { font-weight: 700; }
body.kafecero-store-page .wc-block-components-checkout-step__title, body.kafecero-store-page .wc-block-components-title { font-family: var(--kc-sans); font-weight: 700; letter-spacing: 0; }

@media (max-width: 760px) {
  .kcs-bar { height: 76px; }
  .kcs-logo img { width: 104px; }
  .kcs-nav { gap: 20px; }
  .kcs-hide-sm { display: none; }
  .kcs-title { padding-top: 32px; font-size: 48px; }
  .kcs-footer { margin-top: 64px; }
  body.kafecero-store-page h1.wp-block-post-title, body.kafecero-store-page .wp-block-query-title { font-size: 48px; }
  body.kafecero-store-page :is(.woocommerce-Tabs-panel h2, .wp-block-woocommerce-product-collection > h2, .woocommerce-MyAccount-content h2) { font-size: 32px; }
  body.kafecero-store-page .wp-site-blocks > main { padding-top: 24px; }
  body.kafecero-store-page .wc-block-product h3.wp-block-post-title { --wp--preset--font-size--medium: 22px; }
  body.kafecero-store-page table.variations select { min-width: 0; width: 100%; }
}

/* On a coffee page the header's bag is a button that opens the slide-out bag, with the homepage's count. */
button.kcs-bag { position: relative; padding: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.kcs-bag [data-kc-count] { position: absolute; right: -4px; top: -5px; box-sizing: border-box; min-width: 21px; height: 21px; padding: 0 4px; border-radius: 20px; background: var(--kc-terra); color: #fff; font-size: 11px; line-height: 21px; }
.kcs-bag [data-kc-count][hidden] { display: none; }
/* Phones: the coffee page's 20px margin (styles.css), so the logo lines up with the card below it. */
@media (max-width: 760px) { body.kafecero-coffee-page .kcs-wrap { padding: 0 20px; } }
