/* P&T Made cart confirmation and persistent count. No Stripe/gallery overrides. */
.pt-header-actions a[href*="/cart"] { position: relative; }
.pt-header-actions .pt-cart-count {
  position: absolute; top: -7px; right: -9px; min-width: 17px; height: 17px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 3px; box-sizing: border-box; background: #211d18; color: #fff;
  border: 1px solid #f8f3ea; border-radius: 9px;
  font: 600 11px/1 system-ui,sans-serif; pointer-events: none;
}
.pt-header-actions .pt-cart-count[hidden] { display: none !important; }
.pt-cart-toast {
  position: fixed; z-index: 9991; top: 92px; right: 18px;
  width: max-content; max-width: calc(100vw - 36px);
  box-sizing: border-box; display: block;
  padding: 10px 12px;
  border: 1px solid #c9bcac; border-radius: 3px;
  background: #f8f4ec; box-shadow: 0 3px 12px rgba(30,22,14,.12);
  color: #2b261f; font: 14px/1.35 system-ui,sans-serif;
}
.pt-cart-toast[hidden] { display: none !important; }
.pt-cart-toast-message { font: inherit !important; line-height: inherit !important; }
.pt-cart-toast a, .pt-cart-toast button.pt-cart-toast-undo,
.pt-cart-toast button.pt-cart-toast-remove,
.pt-cart-toast button.pt-cart-toast-confirm,
.pt-cart-toast button.pt-cart-toast-keep,
.pt-cart-notice-undo, .pt-cart-notice-remove { background: none !important; border: 0 !important;
  border-radius: 0 !important; margin: 0 !important; padding: 0 !important;
  display: inline !important; vertical-align: baseline !important;
  color: #403327 !important; text-decoration: underline !important;
  text-underline-offset: 2px; box-shadow: none !important;
  font: inherit !important; line-height: inherit !important;
  font-weight: 500 !important; white-space: nowrap !important;
  width: auto !important; height: auto !important; cursor: pointer; }
/* Native product-page cart actions stay inside the original Woo notice,
   with the same understated text-button treatment as the initial actions. */
.pt-cart-notice-inline button.pt-cart-toast-undo,
.pt-cart-notice-inline button.pt-cart-toast-remove,
.pt-cart-notice-inline button.pt-cart-toast-confirm,
.pt-cart-notice-inline button.pt-cart-toast-keep {
  background: none !important; border: 0 !important; border-radius: 0 !important;
  margin: 0 !important; padding: 0 !important;
  display: inline !important; vertical-align: baseline !important;
  color: #403327 !important; text-decoration: underline !important;
  text-underline-offset: 2px; box-shadow: none !important;
  font: inherit !important; line-height: inherit !important;
  font-weight: 500 !important; white-space: nowrap !important;
  width: auto !important; height: auto !important; cursor: pointer;
}
/* Match the site's round, dark image controls; override theme button defaults. */
body .pt-cart-toast button.pt-cart-toast-close {
  -webkit-appearance: none !important; appearance: none !important;
  display: inline-flex !important; align-items: center !important;
  justify-content: center !important; flex: 0 0 28px !important;
  box-sizing: border-box !important; width: 28px !important; height: 28px !important;
  min-width: 28px !important; min-height: 28px !important;
  max-width: 28px !important; max-height: 28px !important;
  margin: 0 0 0 7px !important; padding: 0 !important;
  vertical-align: middle !important;
  border: 1px solid #211d18 !important; border-radius: 50% !important;
  background: #211d18 !important; color: #fff !important;
  box-shadow: none !important; text-align: center !important;
  font-size: 0 !important; line-height: 0 !important; cursor: pointer !important;
}
body .pt-cart-toast button.pt-cart-toast-close svg {
  display: block !important; width: 14px !important; height: 14px !important;
  min-width: 14px !important; min-height: 14px !important;
  max-width: 14px !important; max-height: 14px !important;
  flex: 0 0 14px !important; fill: none !important; stroke: #fff !important;
  stroke-width: 2 !important; stroke-linecap: round !important;
  stroke-linejoin: round !important; transform: none !important;
}
body .pt-cart-toast button.pt-cart-toast-close:is(:hover,:focus-visible) {
  background: #3a3129 !important; border-color: #3a3129 !important;
}
.pt-cart-toast button:disabled,.pt-cart-notice-undo:disabled { opacity: .45; cursor: wait; }
/* Restrained native WC add-to-cart messages, preserving WC's normal content. */
body.single-product .woocommerce-message,
body.single-product .wc-block-components-notice-banner.is-success {
  box-sizing: border-box !important; padding: 10px 12px !important;
  margin: 8px 0 14px !important; border: 1px solid #d0c3b3 !important;
  border-radius: 2px !important; background: #f8f4ec !important;
  color: #352c24 !important; box-shadow: none !important;
  font: 14px/1.4 system-ui,sans-serif !important;
}
body.single-product .woocommerce-message::before,
body.single-product .wc-block-components-notice-banner.is-success > svg { display: none !important; }
body.single-product .woocommerce-message .button,
body.single-product .wc-block-components-notice-banner.is-success a {
  display: inline !important; float: none !important; width: auto !important;
  margin: 0 9px 0 0 !important; padding: 0 !important;
  border: 0 !important; border-radius: 0 !important;
  background: transparent !important; box-shadow: none !important;
  font: inherit !important; line-height: inherit !important;
  font-weight: 500 !important; vertical-align: baseline !important;
  color: #403327 !important; text-decoration: underline !important;
}
/* Match native Woo notice controls to the sentence's typography/baseline. */
body.single-product .woocommerce-message :is(.pt-cart-notice-undo, .pt-cart-notice-remove),
body.single-product .wc-block-components-notice-banner.is-success :is(.pt-cart-notice-undo, .pt-cart-notice-remove) {
  display: inline !important;
  font: inherit !important;
  line-height: inherit !important;
  font-weight: 500 !important;
  vertical-align: baseline !important;
  white-space: nowrap !important;
  padding: 0 !important;
  margin: 0 !important;
}
/* Inline cart updates retain Woo's original notice, but no nested flex/grid. */
body.single-product .pt-cart-notice-inline { display: block !important; }
body.single-product .pt-cart-notice-inline :is(.pt-cart-toast-undo, .pt-cart-toast-remove, .pt-cart-toast-confirm, .pt-cart-toast-keep, a) {
  display: inline !important;
  font: inherit !important;
  line-height: inherit !important;
  font-weight: 500 !important;
  vertical-align: baseline !important;
  margin: 0 !important;
  padding: 0 !important;
  white-space: nowrap !important;
}
@media(max-width:600px){ .pt-cart-toast { top: auto; bottom: 16px; right: 12px; left: 12px; width: auto; max-width: none; } }

/* Undo/Remove are links visually, even under theme/Woo button states.
   No dark button backgrounds on hover, focus or the final-item state. */
body.single-product :is(.woocommerce-message, .wc-block-components-notice-banner.is-success, .pt-cart-notice-inline) :is(
  .pt-cart-notice-undo, .pt-cart-notice-remove,
  .pt-cart-toast-undo, .pt-cart-toast-remove,
  .pt-cart-toast-confirm, .pt-cart-toast-keep
),
body.single-product :is(.woocommerce-message, .wc-block-components-notice-banner.is-success, .pt-cart-notice-inline) :is(
  .pt-cart-notice-undo, .pt-cart-notice-remove,
  .pt-cart-toast-undo, .pt-cart-toast-remove,
  .pt-cart-toast-confirm, .pt-cart-toast-keep
):is(:hover, :focus, :focus-visible, :active) {
  appearance: none !important;
  display: inline !important;
  vertical-align: baseline !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  color: #403327 !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
  text-shadow: none !important;
  font: inherit !important;
  line-height: inherit !important;
  font-weight: 500 !important;
  text-decoration: underline !important;
  text-underline-offset: 2px !important;
  width: auto !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 0 !important;
}
body.single-product :is(.woocommerce-message, .wc-block-components-notice-banner.is-success, .pt-cart-notice-inline) :is(
  .pt-cart-notice-undo, .pt-cart-notice-remove,
  .pt-cart-toast-undo, .pt-cart-toast-remove,
  .pt-cart-toast-confirm, .pt-cart-toast-keep
)::before,
body.single-product :is(.woocommerce-message, .wc-block-components-notice-banner.is-success, .pt-cart-notice-inline) :is(
  .pt-cart-notice-undo, .pt-cart-notice-remove,
  .pt-cart-toast-undo, .pt-cart-toast-remove,
  .pt-cart-toast-confirm, .pt-cart-toast-keep
)::after { content: none !important; }

/* Keep a clearly visible gap between cart-action text links without
   changing their inline flow, size, baseline, position or behavior. */
.pt-cart-toast :is(.pt-cart-toast-undo, .pt-cart-toast-remove, .pt-cart-toast-confirm, .pt-cart-toast-keep, a),
body.single-product .pt-cart-notice-inline :is(.pt-cart-toast-undo, .pt-cart-toast-remove, .pt-cart-toast-confirm, .pt-cart-toast-keep, a),
body.single-product :is(.woocommerce-message, .wc-block-components-notice-banner.is-success) :is(.pt-cart-notice-undo, .pt-cart-notice-remove) {
  margin-inline-start: .75em !important;
}

/* P&T empty-cart presentation — apply only to Woo's EMPTY cart contents.
   Woo inserts a huge mask icon and a decorative dotted separator by default.
   Keep the Browse Store link; reclaim the dead space and show product images. */
body.woocommerce-cart .wp-block-woocommerce-empty-cart-block {
  --wp--style--block-gap: 0px !important;
  row-gap: 0 !important;
  padding-block: 0 !important;
  min-height: 0 !important;
}
body.woocommerce-cart .wp-block-woocommerce-empty-cart-block > * + * {
  margin-block-start: 0 !important;
}
/* Woo's default 6em solid sad-face graphic: replace with a small SVG outline
   placed ON THE SAME LINE as the empty-cart message. */
body.woocommerce-cart .wp-block-woocommerce-empty-cart-block .wc-block-cart__empty-cart__title {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-wrap: wrap !important;
  gap: 9px !important;
  min-height: 0 !important;
  margin: 0 auto 7px !important;
  padding: 0 !important;
  text-align: center !important;
  font-size: clamp(18px, 2.2vw, 23px) !important;
  line-height: 1.3 !important;
}
body.woocommerce-cart .wp-block-woocommerce-empty-cart-block .wc-block-cart__empty-cart__title.with-empty-cart-icon::before {
  content: "" !important;
  display: block !important;
  position: static !important;
  float: none !important;
  flex: 0 0 27px !important;
  width: 27px !important;
  height: 27px !important;
  min-width: 27px !important;
  min-height: 27px !important;
  max-width: 27px !important;
  max-height: 27px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  transform: none !important;
  background: transparent center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236c5e4d' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Cpath d='M8 15.7c1.2-1.2 2.5-1.8 4-1.8s2.8.6 4 1.8'/%3E%3Cpath d='M8.5 9h.01M15.5 9h.01' stroke-width='2.5'/%3E%3C/svg%3E") !important;
  -webkit-mask: none !important;
  mask: none !important;
}
/* The three light-gray dots have no functional purpose. Remove their block,
   not merely their decorative ink, so it cannot consume vertical space. */
body.woocommerce-cart .wp-block-woocommerce-empty-cart-block .wp-block-separator.is-style-dots,
body.woocommerce-cart .wp-block-woocommerce-empty-cart-block hr.is-style-dots {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}
body.woocommerce-cart .wp-block-woocommerce-empty-cart-block > p {
  margin: 0 auto 11px !important;
  padding: 0 !important;
  line-height: 1.3 !important;
  width: 100% !important;
  text-align: center !important;
}
body.woocommerce-cart .wp-block-woocommerce-empty-cart-block > .wp-block-heading:not(.wc-block-cart__empty-cart__title) {
  margin: 4px auto 12px !important;
  padding: 0 !important;
  line-height: 1.25 !important;
  width: 100% !important;
  text-align: center !important;
}
body.woocommerce-cart .wp-block-woocommerce-empty-cart-block > .wp-block-spacer {
  display: none !important;
}
/* Empty-cart recommendations: four EQUAL fluid columns on large screens,
   two on small screens. The WooCommerce grid and its items must not use
   intrinsic image widths, flex-basis or percentage max-widths to size cards.
   No pixel-based image dimensions or maximum grid width are imposed. */
body.woocommerce-cart .wp-block-woocommerce-empty-cart-block :is(
  .wc-block-grid, .wp-block-woocommerce-product-new
) {
  box-sizing: border-box !important;
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin: 0 auto !important;
  padding: 0 !important;
}
body.woocommerce-cart .wp-block-woocommerce-empty-cart-block :is(
  ul.wc-block-grid__products, ul.wc-block-product-template, ul.wp-block-post-template
) {
  box-sizing: border-box !important;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 1rem !important;
  align-items: start !important;
  justify-content: stretch !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin: 0 auto !important;
  padding: 0 !important;
  list-style: none !important;
}
/* Override Woo's column percentages, image-size-derived minimums, and
   link intrinsic width so every product occupies precisely one grid cell. */
body.woocommerce-cart .wp-block-woocommerce-empty-cart-block :is(
  .wc-block-grid__products, .wc-block-product-template, .wp-block-post-template
) > :is(li, div) {
  box-sizing: border-box !important;
  display: flex !important;
  flex-flow: column nowrap !important;
  align-items: stretch !important;
  justify-self: stretch !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  flex: none !important;
  margin: 0 !important;
  padding: 0 !important;
  text-align: center !important;
}
body.woocommerce-cart .wp-block-woocommerce-empty-cart-block :is(
  .wc-block-grid__product-link, .wc-block-components-product-image a,
  .wp-block-post-featured-image a
) {
  box-sizing: border-box !important;
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin-inline: auto !important;
}
/* The SQUARE FRAME occupies the entire grid-cell width, independent of the
   file's dimensions or WooCommerce's image width/height HTML attributes. */
body.woocommerce-cart .wp-block-woocommerce-empty-cart-block :is(
  .wc-block-grid__product-image, .wc-block-components-product-image,
  .wp-block-post-featured-image
) {
  box-sizing: border-box !important;
  display: block !important;
  position: relative !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: auto !important;
  aspect-ratio: 1 / 1 !important;
  overflow: hidden !important;
  margin: 0 auto .5rem !important;
  padding: 0 !important;
}
body.woocommerce-cart .wp-block-woocommerce-empty-cart-block :is(
  .wc-block-grid__product-image, .wc-block-components-product-image,
  .wp-block-post-featured-image
) img {
  box-sizing: border-box !important;
  display: block !important;
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: 100% !important;
  max-height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  object-position: center !important;
}
/* Some product blocks have a bare image as the link, without an image div.
   Give these the exact same fractional-cell square instead of relying on
   their intrinsic pixel dimensions. */
body.woocommerce-cart .wp-block-woocommerce-empty-cart-block :is(
  .wc-block-grid__product-link > img,
  .wc-block-product-template > li > a > img,
  .wp-block-post-template > li > a > img
) {
  box-sizing: border-box !important;
  display: block !important;
  width: 100% !important;
  height: auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  aspect-ratio: 1 / 1 !important;
  object-fit: contain !important;
  object-position: center !important;
  margin: 0 auto .5rem !important;
}
/* Maintain the compact pale buttons from v0.1.22 unchanged. */
body.woocommerce-cart .wp-block-woocommerce-empty-cart-block .wc-block-grid__product-add-to-cart {
  margin: 9px 0 4px !important;
  text-align: center !important;
}
body.woocommerce-cart .wp-block-woocommerce-empty-cart-block .wc-block-grid__product-add-to-cart .wp-block-button__link,
body.woocommerce-cart .wp-block-woocommerce-empty-cart-block .wc-block-grid__product-add-to-cart .added_to_cart {
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  min-height: 34px !important;
  max-width: 100% !important;
  margin: 0 auto !important;
  padding: 6px 12px !important;
  border: 1px solid #8b7a68 !important;
  border-radius: 4px !important;
  background: #f8f4ec !important;
  color: #211d18 !important;
  box-shadow: none !important;
  font: 500 13px/1.25 system-ui, sans-serif !important;
  text-align: center !important;
  text-decoration: none !important;
  white-space: normal !important;
}
body.woocommerce-cart .wp-block-woocommerce-empty-cart-block .wc-block-grid__product-add-to-cart .wp-block-button__link:is(:hover,:focus-visible),
body.woocommerce-cart .wp-block-woocommerce-empty-cart-block .wc-block-grid__product-add-to-cart .added_to_cart:is(:hover,:focus-visible) {
  background: #e9ddce !important;
  border-color: #59483a !important;
  color: #211d18 !important;
}
@media (max-width: 600px) {
  body.woocommerce-cart .wp-block-woocommerce-empty-cart-block :is(
    ul.wc-block-grid__products, ul.wc-block-product-template, ul.wp-block-post-template
  ) {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
