/*
Theme Name: The Protein Cheese Child
Theme URI: https://theproteincheese.com
Author: The Protein Cheese
Author URI: https://theproteincheese.com
Description: A warm, premium child theme for The Protein Cheese high-protein cottage cheese recipes, built on Astra. All custom code lives in this child theme.
Template: astra
Version: 1.0.7
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: theproteincheese-child
*/

:root {
  --pc-cream: #FFF7E6;
  --pc-cream-dark: #F5EAD0;
  --pc-forest: #1E2A38;
  --pc-forest-dark: #16202E;
  --pc-terracotta: #F0A500;
  --pc-terracotta-dark: #C98A00;
  --pc-ink: #241F1A;
  --pc-muted: #6B5E4F;
  --pc-white: #FFFFFF;
  --pc-border: #E8DCC0;
  --pc-radius: 16px;
  --pc-shadow: 0 10px 30px rgba(43, 38, 32, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--pc-cream);
  color: var(--pc-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
}

h1, h2, h3, h4 {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--pc-forest-dark);
  line-height: 1.25;
  margin-top: 0;
}

h1 { font-size: 2.6rem; }
h2 { font-size: 2rem; margin-bottom: 0.75rem; }
h3 { font-size: 1.35rem; margin-bottom: 0.5rem; }

a { color: var(--pc-forest); }
a:hover { color: var(--pc-terracotta); }

img { max-width: 100%; height: auto; display: block; }

.pc-container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.pc-page { min-height: 100vh; display: flex; flex-direction: column; }
.pc-main { flex: 1; }

/* Header */
.pc-site-header {
  background: var(--pc-white);
  border-bottom: 1px solid var(--pc-border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.pc-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 16px;
  padding-bottom: 16px;
}

.pc-brand-text {
  text-decoration: none;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--pc-forest-dark);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.pc-brand-mark { color: var(--pc-terracotta); }

.pc-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}

.pc-nav-list a {
  text-decoration: none;
  color: var(--pc-ink);
  font-weight: 600;
  font-size: 0.98rem;
}

.pc-nav-list a:hover { color: var(--pc-terracotta); }

.pc-header-cta { display: flex; align-items: center; gap: 16px; }

.pc-nav-toggle {
  display: none;
  background: var(--pc-forest);
  color: var(--pc-white);
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 1rem;
  cursor: pointer;
}

/* Buttons */
.pc-btn {
  display: inline-block;
  background: var(--pc-terracotta);
  color: var(--pc-white);
  text-decoration: none;
  font-weight: 700;
  padding: 13px 26px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
}

.pc-btn:hover { background: var(--pc-terracotta-dark); color: var(--pc-white); }

.pc-btn-outline {
  background: transparent;
  color: var(--pc-forest);
  border: 2px solid var(--pc-forest);
}

.pc-btn-outline:hover { background: var(--pc-forest); color: var(--pc-white); }

.pc-btn-small { padding: 9px 18px; font-size: 0.92rem; }

/* Hero */
.pc-hero {
  background: var(--pc-forest-dark);
  color: var(--pc-white);
  padding: 72px 0;
}

.pc-hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}

.pc-hero h1 { color: var(--pc-white); font-size: 3rem; margin-bottom: 16px; }
.pc-hero p { color: #E8E2D2; font-size: 1.15rem; }
.pc-hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 28px; }
.pc-hero-actions .pc-btn-outline { color: var(--pc-white); border-color: var(--pc-white); }
.pc-hero-actions .pc-btn-outline:hover { background: var(--pc-white); color: var(--pc-forest-dark); }

.pc-hero-img {
  border-radius: var(--pc-radius);
  overflow: hidden;
  box-shadow: var(--pc-shadow);
}

.pc-hero-img img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }

/* Sections */
.pc-section { padding: 72px 0; }
.pc-section-alt { background: var(--pc-cream-dark); }
.pc-section-head { max-width: 720px; margin-bottom: 36px; }
.pc-section-head p { color: var(--pc-muted); }

.pc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.pc-grid-2 { grid-template-columns: repeat(2, 1fr); }

.pc-card {
  background: var(--pc-white);
  border: 1px solid var(--pc-border);
  border-radius: var(--pc-radius);
  overflow: hidden;
  box-shadow: var(--pc-shadow);
  display: flex;
  flex-direction: column;
}

.pc-card-img img { width: 100%; height: 220px; object-fit: cover; }
.pc-card-body { padding: 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.pc-card-body p { color: var(--pc-muted); margin: 0; }
.pc-card-body h3 { margin: 0; }
.pc-card-body h3 a { text-decoration: none; color: var(--pc-forest-dark); }
.pc-card-body h3 a:hover { color: var(--pc-terracotta); }
.pc-card-link { margin-top: auto; font-weight: 700; text-decoration: none; }

.pc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 0.9rem;
  color: var(--pc-muted);
}

.pc-meta span {
  background: var(--pc-cream-dark);
  border: 1px solid var(--pc-border);
  border-radius: 999px;
  padding: 4px 12px;
}

/* CTA band */
.pc-cta {
  background: var(--pc-terracotta);
  color: var(--pc-white);
  border-radius: var(--pc-radius);
  padding: 48px;
  text-align: center;
}

.pc-cta h2 { color: var(--pc-white); }
.pc-cta p { color: #FBEADF; }
.pc-cta .pc-btn { background: var(--pc-white); color: var(--pc-terracotta-dark); }

/* Single recipe */
.pc-recipe-meta {
  background: var(--pc-white);
  border: 1px solid var(--pc-border);
  border-radius: var(--pc-radius);
  padding: 24px;
  margin: 28px 0;
}

.pc-recipe-meta table { width: 100%; border-collapse: collapse; }
.pc-recipe-meta th { text-align: left; padding: 8px 16px 8px 0; color: var(--pc-muted); font-weight: 600; width: 180px; }
.pc-recipe-meta td { padding: 8px 0; }

.pc-recipe-img { border-radius: var(--pc-radius); overflow: hidden; margin: 24px 0; }
.pc-recipe-img img { width: 100%; height: 420px; object-fit: cover; }

.pc-content { max-width: 760px; }
.pc-content ul, .pc-content ol { padding-left: 24px; }
.pc-content li { margin-bottom: 8px; }

.pc-article { padding: 56px 0; }
.pc-article-head { max-width: 760px; }

/* Forms */
.pc-form { max-width: 640px; }
.pc-field { margin-bottom: 20px; }
.pc-field label { display: block; font-weight: 700; margin-bottom: 6px; }
.pc-field input[type="text"],
.pc-field input[type="email"],
.pc-field textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--pc-border);
  border-radius: 10px;
  background: var(--pc-white);
  font: inherit;
}

.pc-honeypot { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.pc-notice { border-radius: 10px; padding: 16px 20px; margin-bottom: 24px; }
.pc-notice-success { background: #EAF3EC; border: 1px solid #B9D6C0; color: #234534; }
.pc-notice-error { background: #FBEDE8; border: 1px solid #E8B4A0; color: #7A2E1A; }

/* Footer */
.pc-footer {
  background: var(--pc-forest-dark);
  color: #E8E2D2;
  padding: 56px 0 28px;
  margin-top: 0;
}

.pc-footer a { color: #E8E2D2; text-decoration: none; }
.pc-footer a:hover { color: var(--pc-white); }
.pc-footer h4 { color: var(--pc-white); margin-bottom: 14px; }

.pc-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 36px;
}

.pc-footer-menu { list-style: none; margin: 0; padding: 0; }
.pc-footer-menu li { margin-bottom: 10px; }
.pc-footer-brand-name { font-family: Georgia, "Times New Roman", serif; font-size: 1.4rem; color: var(--pc-white); }

.pc-footer-contact { margin-top: 20px; font-size: 0.95rem; }
.pc-footer-contact p { margin: 4px 0; }

.pc-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  margin-top: 40px;
  padding-top: 20px;
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* Shop */
.woocommerce ul.products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.woocommerce ul.products li.product { background: var(--pc-white); border: 1px solid var(--pc-border); border-radius: var(--pc-radius); padding: 20px; text-align: left; }
.woocommerce ul.products li.product img { border-radius: 10px; }
.woocommerce ul.products li.product .price { color: var(--pc-terracotta-dark); font-weight: 700; }
.woocommerce a.button, .woocommerce button.button { background: var(--pc-terracotta); color: var(--pc-white); border-radius: 999px; }
.woocommerce a.button:hover, .woocommerce button.button:hover { background: var(--pc-terracotta-dark); color: var(--pc-white); }

/* WooCommerce container — patch v1.0.1.
   WooCommerce templates do not use this theme's .pc-container, so the
   WooCommerce wrappers themselves are contained to the same 1120px
   centred width as the rest of the site. Header and footer already use
   .pc-container and are not touched by these rules. */
body.woocommerce .ast-container,
body.woocommerce-page .ast-container,
body.woocommerce .site-content > .ast-container,
body.woocommerce-page .site-content > .ast-container,
body.woocommerce div.ast-container,
body.woocommerce-page div.ast-container,
body.woocommerce .woocommerce,
body.woocommerce-page .woocommerce,
body.woocommerce .woocommerce-notices-wrapper,
body.woocommerce-page .woocommerce-notices-wrapper {
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
  box-sizing: border-box;
}

/* WooCommerce container — patch v1.0.2, root-cause fix.
   Why v1.0.1 did not show: v1.0.1 targeted .ast-container and a
   descendant .woocommerce element. Neither exists in this child theme:
   header.php bypasses Astra's wrapper and outputs <main class="pc-main">
   directly, and WooCommerce templates output straight into that <main>,
   with no .pc-container and no .ast-container around them. That is why
   Shop and single product pages ran edge-to-edge while header/footer
   (which do use .pc-container) looked contained.
   Fix: contain <main> itself, but only on WooCommerce pages, so normal
   pages (which already wrap their content in .pc-container) are untouched. */
body.woocommerce .pc-main,
body.woocommerce-page .pc-main {
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
  padding: 48px 24px;
  box-sizing: border-box;
  width: 100%;
}

/* Belt-and-braces: if WooCommerce/Astra do output a wrapper on some
   pages, keep it inside the same container instead of full width. */
body.woocommerce .pc-main > .woocommerce,
body.woocommerce-page .pc-main > .woocommerce,
body.woocommerce .pc-main > div.product,
body.woocommerce-page .pc-main > div.product,
body.woocommerce .pc-main > .woocommerce-products-header,
body.woocommerce-page .pc-main > .woocommerce-products-header {
  width: 100%;
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

/* Single product: keep the two-column layout inside the container. */
.woocommerce div.product div.images {
  float: left;
  width: 48%;
}
.woocommerce div.product div.summary {
  float: right;
  width: 48%;
}
.woocommerce div.product .woocommerce-tabs,
.woocommerce div.product .related,
.woocommerce div.product .upsells {
  clear: both;
  padding-top: 32px;
}
.woocommerce .woocommerce-breadcrumb {
  margin-bottom: 24px;
}

/* WooCommerce product grids: 3 columns on desktop, overriding the
   columns-3 / columns-4 widths WooCommerce and Astra would otherwise apply. */
body.woocommerce ul.products,
body.woocommerce-page ul.products,
.woocommerce ul.products.columns-3,
.woocommerce ul.products.columns-4,
.woocommerce .related ul.products,
.woocommerce .upsells ul.products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
body.woocommerce ul.products li.product,
body.woocommerce-page ul.products li.product,
.woocommerce ul.products.columns-3 li.product,
.woocommerce ul.products.columns-4 li.product,
.woocommerce .related ul.products li.product,
.woocommerce .upsells ul.products li.product {
  width: auto;
  float: none;
  margin: 0;
}

/* Pagination — patch v1.0.1: WooCommerce, WordPress blog/archives,
   and recipe archives share these classes. WordPress templates already
   output the_posts_pagination(); WooCommerce archives output
   woocommerce_pagination(); no custom paginator is used. */
.navigation.pagination,
.woocommerce-pagination {
  text-align: center;
  margin: 48px 0 0;
  clear: both;
}
.nav-links,
.woocommerce-pagination ul.page-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  border: 0;
}
.woocommerce-pagination ul.page-numbers li {
  border: 0;
  margin: 0;
  padding: 0;
}
.nav-links a,
.nav-links span,
.woocommerce-pagination ul.page-numbers li a,
.woocommerce-pagination ul.page-numbers li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--pc-border);
  border-radius: 999px;
  background: var(--pc-white);
  color: var(--pc-forest);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  box-sizing: border-box;
}
.nav-links a:hover,
.woocommerce-pagination ul.page-numbers li a:hover {
  background: var(--pc-cream-dark);
  border-color: var(--pc-forest);
  color: var(--pc-forest-dark);
}
.nav-links span.current,
.nav-links span.page-numbers.current,
.woocommerce-pagination ul.page-numbers li span.current,
.woocommerce-pagination ul.page-numbers li span.page-numbers.current {
  background: var(--pc-forest);
  border-color: var(--pc-forest);
  color: var(--pc-white);
}
.nav-links span.dots,
.woocommerce-pagination ul.page-numbers li span.dots {
  border-color: transparent;
  background: transparent;
  min-width: auto;
  padding: 0 4px;
}

/* Contact details block — patch v1.0.1: dedicated styling, shown only
   when at least one Customizer contact value is filled. */
.pc-contact-details {
  background: var(--pc-white);
  border: 1px solid var(--pc-border);
  border-radius: var(--pc-radius);
  padding: 28px;
  margin: 28px 0;
}
.pc-contact-details h2 {
  margin-bottom: 16px;
}
.pc-contact-row {
  margin: 10px 0;
}
.pc-contact-label {
  display: inline-block;
  min-width: 90px;
  font-weight: 700;
  color: var(--pc-forest);
}

/* Header icons and search bar — patch v1.0.3. */
.pc-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--pc-border);
  border-radius: 50%;
  background: var(--pc-white);
  color: var(--pc-forest-dark);
  cursor: pointer;
  text-decoration: none;
  position: relative;
  flex-shrink: 0;
}

.pc-icon-btn:hover { border-color: var(--pc-forest); color: var(--pc-terracotta); }

/* Patch v1.0.0: header icons must look identical whether they are a link
   or a button. Theme button styles were overriding the search <button>
   (terracotta pill, icon invisible), while the cart <a> rendered correctly
   as a white circle. These stronger rules force both icons to the same
   white circle, with no button padding, background, or shadow. */
.pc-header-cta .pc-icon-btn,
.pc-header-cta a.pc-icon-btn,
.pc-header-cta button.pc-icon-btn {
  background: var(--pc-white);
  color: var(--pc-forest-dark);
  border: 1px solid var(--pc-border);
  border-radius: 50%;
  padding: 0;
  width: 44px;
  height: 44px;
  box-shadow: none;
  text-decoration: none;
}

.pc-header-cta .pc-icon-btn:hover,
.pc-header-cta a.pc-icon-btn:hover,
.pc-header-cta button.pc-icon-btn:hover {
  background: var(--pc-white);
  color: var(--pc-terracotta);
  border-color: var(--pc-forest);
}

.pc-header-cta .pc-icon-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
}


.pc-icon-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pc-cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--pc-terracotta);
  color: var(--pc-white);
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  box-sizing: border-box;
}

.pc-search-bar {
  display: none;
  background: var(--pc-white);
  border-top: 1px solid var(--pc-border);
  padding: 16px 0;
}

.pc-search-bar.pc-search-open { display: block; }

.pc-search-bar form { display: flex; gap: 12px; flex-wrap: wrap; }

.pc-search-bar input[type="search"] {
  flex: 1 1 220px;
  padding: 12px 16px;
  border: 1px solid var(--pc-border);
  border-radius: 10px;
  background: var(--pc-white);
  font: inherit;
}


/* Responsive */
@media (max-width: 900px) {
  .pc-grid { grid-template-columns: repeat(2, 1fr); }
  .pc-hero-grid { grid-template-columns: 1fr; }
  .pc-footer-grid { grid-template-columns: 1fr 1fr; }
  h1 { font-size: 2.1rem; }
  .pc-hero h1 { font-size: 2.3rem; }
  .woocommerce ul.products,
  body.woocommerce ul.products,
  body.woocommerce-page ul.products,
  .woocommerce ul.products.columns-3,
  .woocommerce ul.products.columns-4,
  .woocommerce .related ul.products,
  .woocommerce .upsells ul.products { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .pc-grid, .pc-grid-2 { grid-template-columns: 1fr; }
  .pc-footer-grid { grid-template-columns: 1fr; }
  .pc-section { padding: 48px 0; }
  .pc-hero { padding: 48px 0; }
  .pc-cta { padding: 32px 20px; }
  .pc-recipe-img img { height: 260px; }
  .woocommerce ul.products,
  body.woocommerce ul.products,
  body.woocommerce-page ul.products,
  .woocommerce ul.products.columns-3,
  .woocommerce ul.products.columns-4,
  .woocommerce .related ul.products,
  .woocommerce .upsells ul.products { grid-template-columns: 1fr; }
  .woocommerce div.product div.images,
  .woocommerce div.product div.summary {
    float: none;
    width: 100%;
  }
  body.woocommerce .ast-container,
  body.woocommerce-page .ast-container,
  body.woocommerce .woocommerce,
  body.woocommerce-page .woocommerce,
  body.woocommerce .woocommerce-notices-wrapper,
  body.woocommerce-page .woocommerce-notices-wrapper {
    padding-left: 16px;
    padding-right: 16px;
  }
  body.woocommerce .pc-main,
  body.woocommerce-page .pc-main {
    padding: 32px 16px;
  }

  .pc-nav-toggle { display: inline-block; }
  .pc-main-nav { display: none; width: 100%; }
  .pc-main-nav.pc-nav-open { display: block; }
  .pc-header-inner { flex-wrap: wrap; }
  .pc-nav-list { flex-direction: column; gap: 12px; padding: 16px 0 4px; }
}

/* ============ Patch 02a (2026-12-02): Cart + Checkout width, toast, cart count ============ */
/* What Patch 02 got wrong (measured from the live screenshots):
   - The checkout CSS grid collapsed the billing column to ~186px: when
     the form container is narrower than 380px + gap, minmax(0,1fr)
     collapses to min-content. Grid removed; WooCommerce's own float
     layout is restored and re-asserted instead.
   - .cart-collaterals { max-width: 480px } made the totals box narrow,
     because WooCommerce's inner .cart_totals is 48% of it (48% of 480
     = ~230px) — that is why "Proceed to checkout" wrapped to 2 lines.
   - The toast used display:flex, which overrode its [hidden] attribute,
     so an empty black pill showed on every page (Shop screenshot).
   - The disabled "Update cart" button stayed pale because WooCommerce's
     own stylesheet loads after the theme's, so equal-specificity rules
     lost. Now fixed with !important.
   Width root cause (measured): WooCommerce content rendered at ~70% of
   the 1120px header width with an empty column on the right — Astra's
   sidebar layout. Fixed three ways: Astra no-sidebar filter in
   functions.php, sidebar elements hidden here, and every WooCommerce
   container forced to the full 1120px with !important. */
body.woocommerce-page #primary,
body.woocommerce-page .content-area,
body.woocommerce-page .site-content,
body.woocommerce-page .ast-container,
body.woocommerce-page .site-content > .ast-container {
  width: 100% !important;
  max-width: 1120px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  float: none !important;
}
body.woocommerce-page .pc-main,
body.woocommerce-cart .pc-main,
body.woocommerce-checkout .pc-main {
  max-width: 1120px !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding: 48px 24px !important;
  box-sizing: border-box !important;
  float: none !important;
}
body.woocommerce-page .pc-main > article > .pc-container,
body.woocommerce-page .pc-main .pc-container,
body.woocommerce-page .pc-main > .woocommerce,
body.woocommerce-page .pc-main .woocommerce,
body.woocommerce-page .pc-main .woocommerce-notices-wrapper {
  max-width: 100% !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  box-sizing: border-box !important;
  float: none !important;
}
/* Hide Astra's sidebar area on WooCommerce pages — it was the empty
   right-hand column in the screenshots. */
/* Patch 04: the last selector above (.ast-woocommerce-container
   .ast-article-single) is REMOVED. It was my Patch-02a mistake: Astra
   puts the class "ast-article-single" ON the product itself (the single
   product <div> and every related-product <li> carry it), so this rule
   hid the whole single product page with display:none !important — the
   page loaded (header/footer fine) but the product area was blank.
   Sidebars are still hidden below; the product is never a sidebar. */
body.woocommerce-page .ast-left-sidebar,
body.woocommerce-page .ast-right-sidebar,
body.woocommerce-page #secondary,
body.woocommerce-page .widget-area {
  display: none !important;
}
/* Cart page: form full width, totals box 48% on the right, one line. */
.woocommerce-cart .woocommerce-cart-form,
.woocommerce-cart table.shop_table.cart {
  width: 100% !important;
}
.woocommerce-cart .cart-collaterals {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
}
.woocommerce-cart .cart-collaterals .cart_totals {
  width: 48% !important;
  max-width: 480px !important;
  float: right !important;
}
/* Patch 02b — THE width bug, found in the LIVE files:
   page.php wraps Cart/Checkout content in .pc-content, and .pc-content
   has max-width: 760px. 760 / 1120 = 68% — exactly the narrow content
   with the wide empty column on the right in every screenshot. Patch 02
   and 02a fixed every container EXCEPT this one. Fixed here, scoped to
   WooCommerce pages only (text pages keep their 760px readable width). */
body.woocommerce-page .pc-main > article > .pc-container > .pc-content,
body.woocommerce-page .pc-main .pc-content {
  max-width: 100% !important;
  width: 100% !important;
}
/* Checkout page: grid WITH row spanning. Billing spans both rows on the
   left; heading (row 1) + order review (row 2) stack on the right.
   Patch 02's grid failed because it had no row spanning: row 1 stretched
   to the tall billing column, so the order review dropped below it.
   Patch 02a's floats could also drop the review below. This cannot. */
.woocommerce-checkout form.checkout {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 420px !important;
  column-gap: 48px !important;
  align-items: start !important;
}
.woocommerce-checkout form.checkout::after {
  content: none !important;
}
.woocommerce-checkout form.checkout .col2-set {
  grid-column: 1 !important;
  grid-row: 1 / 3 !important;
  width: 100% !important;
  float: none !important;
}
.woocommerce-checkout form.checkout #order_review_heading {
  grid-column: 2 !important;
  grid-row: 1 !important;
  width: 100% !important;
  float: none !important;
  clear: none !important;
}
.woocommerce-checkout form.checkout #order_review {
  grid-column: 2 !important;
  grid-row: 2 !important;
  width: 100% !important;
  float: none !important;
  clear: none !important;
}
/* Cart badge: always in the DOM (hidden at 0) so fragments can update it. */
.pc-cart-count--empty { display: none; }
/* "View cart" link that WooCommerce adds after an AJAX add-to-cart. */
.woocommerce a.added_to_cart,
.woocommerce-page a.added_to_cart {
  display: inline-block;
  margin-top: 12px;
  background: var(--pc-terracotta);
  color: var(--pc-white);
  border-radius: 999px;
  padding: 10px 20px;
  font-weight: 700;
  text-decoration: none;
}
.woocommerce a.added_to_cart:hover,
.woocommerce-page a.added_to_cart:hover {
  background: var(--pc-terracotta-dark);
  color: var(--pc-white);
}
/* WooCommerce notices: visible, theme colours, readable. */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
  border: 1px solid var(--pc-border);
  border-left: 4px solid var(--pc-terracotta);
  background: #FFF7E6;
  color: var(--pc-ink);
  border-radius: 10px;
  padding: 14px 18px;
}
.woocommerce-message a.button,
.woocommerce-info a.button {
  background: var(--pc-terracotta);
  color: var(--pc-white);
  border-radius: 999px;
}
.woocommerce-message a.button:hover,
.woocommerce-info a.button:hover {
  background: var(--pc-terracotta-dark);
  color: var(--pc-white);
}
/* "Update cart" and other disabled buttons: solid, readable — never the
   pale washed-out button from the screenshot. !important because
   WooCommerce's stylesheet loads after the theme's. */
.woocommerce button.button:disabled,
.woocommerce button.button.disabled,
.woocommerce a.button:disabled,
.woocommerce input.button:disabled {
  background: var(--pc-terracotta) !important;
  color: var(--pc-white) !important;
  opacity: 1 !important;
  cursor: not-allowed;
}
/* Added-to-cart toast: HIDDEN by default. Only .pc-cart-toast--show
   displays it. (Patch 02 had display:flex here, which overrode the
   [hidden] attribute and left an empty black pill on every page.) */
.pc-cart-toast {
  display: none;
  position: fixed;
  top: 84px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  background: var(--pc-ink);
  color: var(--pc-white);
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  gap: 16px;
  align-items: center;
  max-width: calc(100% - 32px);
}
.pc-cart-toast[hidden] { display: none !important; }
.pc-cart-toast--show { display: flex; }
.pc-cart-toast a { color: var(--pc-terracotta); font-weight: 700; white-space: nowrap; }
.pc-cart-toast a:hover { color: var(--pc-white); }
/* Mobile: hide the "Browse Recipes" header button (user request). */
@media (max-width: 768px) {
  .pc-header-cta > a.pc-btn { display: none !important; }
}
@media (max-width: 900px) {
  .woocommerce-checkout form.checkout {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .woocommerce-checkout form.checkout .col2-set,
  .woocommerce-checkout form.checkout #order_review_heading,
  .woocommerce-checkout form.checkout #order_review {
    grid-column: 1 !important;
    grid-row: auto !important;
    width: 100% !important;
    float: none !important;
    clear: none !important;
  }
  .woocommerce-cart .cart-collaterals .cart_totals {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
  }
}

/* ============ Patch 02a — Full-site responsive (mobile + desktop) ============ */
/* Every page, every width: grids use minmax(0,1fr) so long words can never
   force horizontal overflow; header, hero, cards, tables, cart, checkout
   and My Account all stack cleanly on phones. Desktop keeps the 1120px
   container; tablet gets 2-column grids. */
/* --- Grids: never overflow, shrink safely ---
   Patch 03 note: these minmax rules used to sit here as BASE rules, AFTER
   the theme's @media 900px/640px blocks, with equal specificity — so they
   silently overrode every mobile rule (hero stayed 2-col, footer 4-col,
   grids 2-col). They now live in the Patch 03 desktop-only block below. */
/* --- Desktop / small laptop (1024–1200px) --- */
@media (max-width: 1200px) {
  .pc-grid { gap: 20px; }
  .pc-hero-grid { gap: 32px; }
  .pc-section { padding: 56px 0; }
}
/* --- Tablet (max 900px) --- */
@media (max-width: 900px) {
  .pc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pc-grid-2 { grid-template-columns: minmax(0, 1fr); }
  .woocommerce div.product div.images,
  .woocommerce div.product div.summary {
    float: none !important;
    width: 100% !important;
  }
  .woocommerce div.product div.images { margin-bottom: 24px; }
}
/* --- Phone (max 768px): cart table, checkout, My Account --- */
@media (max-width: 768px) {
  .pc-container { padding-left: 16px; padding-right: 16px; }
  .pc-header-inner { gap: 12px; padding-top: 12px; padding-bottom: 12px; }
  .pc-brand-text { font-size: 1.25rem; }
  .pc-hero-actions .pc-btn { width: 100%; text-align: center; }
  .pc-card-img img { height: 180px; }
  .pc-recipe-img img { height: 240px; }
  .pc-recipe-meta { padding: 16px; }
  .pc-recipe-meta table,
  .pc-recipe-meta tbody,
  .pc-recipe-meta tr,
  .pc-recipe-meta th,
  .pc-recipe-meta td { display: block; width: auto !important; }
  .pc-recipe-meta th { padding-bottom: 0; }
  .pc-recipe-meta td { padding-top: 2px; padding-bottom: 12px; }
  /* WooCommerce cart table: stack rows, label each cell. */
  .woocommerce table.shop_table.cart thead { display: none; }
  .woocommerce table.shop_table.cart,
  .woocommerce table.shop_table.cart tbody,
  .woocommerce table.shop_table.cart tr,
  .woocommerce table.shop_table.cart td {
    display: block;
    width: 100% !important;
    border: none;
  }
  .woocommerce table.shop_table.cart tr {
    border: 1px solid var(--pc-border);
    border-radius: 12px;
    margin-bottom: 16px;
    padding: 12px;
  }
  .woocommerce table.shop_table.cart td { padding: 6px 0; text-align: left !important; }
  .woocommerce table.shop_table.cart td::before {
    content: attr(data-title) ": ";
    font-weight: 700;
  }
  .woocommerce table.shop_table.cart td.product-remove::before,
  .woocommerce table.shop_table.cart td.product-thumbnail::before,
  .woocommerce table.shop_table.cart td.actions::before { content: ""; }
  .woocommerce table.shop_table.cart td.product-thumbnail img { width: 80px; }
  .woocommerce table.shop_table.cart td.actions .coupon { float: none; width: 100%; margin-bottom: 12px; }
  .woocommerce table.shop_table.cart td.actions .coupon input,
  .woocommerce table.shop_table.cart td.actions .coupon button,
  .woocommerce table.shop_table.cart td.actions > button {
    width: 100%;
    margin-bottom: 8px;
  }
  /* Checkout: every field full width, order summary below billing. */
  .woocommerce form .form-row-first,
  .woocommerce form .form-row-last {
    width: 100% !important;
    float: none !important;
  }
  .woocommerce form .form-row input,
  .woocommerce form .form-row select,
  .woocommerce form .form-row textarea { width: 100%; }
  /* Shop toolbar: count and sorting stack. */
  .woocommerce .woocommerce-result-count,
  .woocommerce .woocommerce-ordering { float: none; width: 100%; margin-bottom: 12px; }
  .woocommerce .woocommerce-ordering select { width: 100%; }
  /* My Account: navigation above content. */
  .woocommerce-account .woocommerce-MyAccount-navigation,
  .woocommerce-account .woocommerce-MyAccount-content {
    width: 100% !important;
    float: none !important;
  }
  .woocommerce-account .woocommerce-MyAccount-navigation { margin-bottom: 24px; }
  /* Toast: full-width friendly on phones. */
  .pc-cart-toast { top: 72px; padding: 10px 16px; font-size: 0.95rem; flex-wrap: wrap; justify-content: center; text-align: center; }
}
/* --- Small phone (max 480px) --- */
@media (max-width: 480px) {
  body { font-size: 16px; }
  h1, .pc-hero h1 { font-size: 1.9rem; }
  h2 { font-size: 1.6rem; }
  .pc-section { padding: 40px 0; }
  .pc-hero { padding: 40px 0; }
  .pc-cta { padding: 28px 16px; }
  .pc-article { padding: 40px 0; }
  .pc-search-bar form { flex-direction: column; }
  .pc-search-bar form button { width: 100%; }
  .woocommerce ul.products { gap: 16px; }
  .pc-grid { gap: 16px; }
}

/* ============ Patch 03 (2026-12-02): Mobile perfect — 1 column on phones ============ */
/* Root cause (my Patch-02a mistake, owned): the minmax grid rules above
   were BASE rules placed AFTER the theme's @media (max-width: 900px) and
   (max-width: 640px) blocks, with EQUAL specificity. CSS rule: equal
   specificity means the LATER rule wins — so the mobile 1-column rules
   never applied. Hero stayed 2-col, footer stayed 4-col (columns
   overlapping), home grids stayed 2-col on phones. Fixed here:
   (1) desktop minmax rules moved into @media (min-width: 1025px);
   (2) every tablet/mobile rule below uses !important, so neither Astra
   nor any later base rule can override it again. */
/* --- Desktop only (1025px+): 3-col grids, 2-col hero, 4-col footer --- */
@media (min-width: 1025px) {
  .pc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .pc-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .woocommerce ul.products,
  body.woocommerce-page ul.products,
  .woocommerce ul.products.columns-3,
  .woocommerce ul.products.columns-4 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
  .pc-hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr) !important; }
  .pc-footer-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) !important; }
}
/* --- Tablet (769–1024px): 2 columns, hero stacked, footer 2 columns --- */
@media (max-width: 1024px) {
  .pc-grid,
  .pc-grid-2,
  .woocommerce ul.products,
  body.woocommerce-page ul.products,
  .woocommerce ul.products.columns-3,
  .woocommerce ul.products.columns-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .pc-hero-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .pc-footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
/* --- Mobile (768px and below): 1 column EVERYWHERE --- */
@media (max-width: 768px) {
  .pc-container { padding-left: 16px !important; padding-right: 16px !important; }
  /* Shop + home grids: ONE column, not two. */
  .pc-grid,
  .pc-grid-2,
  .woocommerce ul.products,
  body.woocommerce-page ul.products,
  .woocommerce ul.products.columns-3,
  .woocommerce ul.products.columns-4,
  .woocommerce .related ul.products,
  .woocommerce .upsells ul.products {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  /* Hero: text first, image below, buttons full width. */
  .pc-hero-grid { grid-template-columns: minmax(0, 1fr) !important; gap: 24px !important; }
  .pc-hero { padding: 40px 0 !important; }
  .pc-hero h1 { font-size: 1.9rem !important; line-height: 1.2 !important; }
  .pc-hero p { font-size: 1rem !important; }
  .pc-hero-actions .pc-btn { width: 100% !important; text-align: center !important; }
  .pc-hero-img img { aspect-ratio: 16 / 10 !important; }
  /* Sections + cards. */
  .pc-section { padding: 40px 0 !important; }
  .pc-section-head { margin-bottom: 24px !important; }
  .pc-section-head h2 { font-size: 1.6rem !important; }
  .pc-card-img img { height: 200px !important; }
  .pc-card-body h3 { font-size: 1.25rem !important; }
  .pc-cta { padding: 28px 16px !important; }
  /* Footer: ONE column, no overlap. */
  .pc-footer-grid { grid-template-columns: minmax(0, 1fr) !important; gap: 28px !important; }
  .pc-footer-grid > * { min-width: 0 !important; overflow-wrap: break-word !important; }
  .pc-footer { padding: 40px 0 24px !important; }
  .pc-footer-bottom { flex-direction: column !important; align-items: flex-start !important; gap: 8px !important; }
  /* Single recipe / blog / pages. */
  .pc-article { padding: 40px 0 !important; }
  .pc-recipe-img img { height: 240px !important; }
  .pc-content { overflow-wrap: break-word !important; }
  /* Single product: image above summary. */
  .woocommerce div.product div.images,
  .woocommerce div.product div.summary { float: none !important; width: 100% !important; }
  .woocommerce div.product div.images { margin-bottom: 24px !important; }
  /* Shop toolbar + pagination: stack, big tap targets. */
  .woocommerce .woocommerce-result-count,
  .woocommerce .woocommerce-ordering { float: none !important; width: 100% !important; margin-bottom: 12px !important; }
  .woocommerce .woocommerce-ordering select { width: 100% !important; }
  .woocommerce nav.woocommerce-pagination { text-align: center !important; }
  .woocommerce nav.woocommerce-pagination ul.page-numbers li a,
  .woocommerce nav.woocommerce-pagination ul.page-numbers li span { padding: 12px 16px !important; }
}
/* --- Small phone (480px and below): header fits, headings smaller --- */
@media (max-width: 480px) {
  .pc-header-inner { gap: 8px !important; }
  .pc-brand-text { font-size: 1.15rem !important; }
  h1, .pc-hero h1 { font-size: 1.7rem !important; }
  h2 { font-size: 1.5rem !important; }
}
