/**
 * Poet Roastery — WooCommerce styling (Epic 6). Maps Woo's shop archive + single product
 * to the Coastal Editorial design (tokens). Variant-as-pills via poet-woo.js + styles here.
 */

/* ---- Shop archive grid ---- */
.woocommerce ul.products {
  display: grid; gap: var(--wp--preset--spacing--40, 32px); margin: 0; padding: 0;
  grid-template-columns: 1fr;
}
@media (min-width: 600px) { .woocommerce ul.products { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1025px) { .woocommerce ul.products { grid-template-columns: repeat(3, 1fr); } }
.woocommerce ul.products li.product {
  list-style: none; margin: 0; width: auto; float: none; text-align: left;
  background: var(--wp--preset--color--surface-container);
  border: 1px solid var(--wp--preset--color--outline-variant);
  border-radius: var(--wp--custom--rounded--md, 12px);
  padding: var(--wp--preset--spacing--30, 24px);
  transition: box-shadow .25s ease, transform .2s ease;
}
@media (hover:hover) { .woocommerce ul.products li.product:hover { transform: translateY(-4px); box-shadow: 0 14px 32px rgba(31,42,46,.10); } }
.woocommerce ul.products li.product img { border-radius: var(--wp--custom--rounded--md, 12px); margin-bottom: 12px; }
.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-family: var(--wp--preset--font-family--fraunces); font-size: var(--wp--preset--font-size--title);
  color: var(--wp--preset--color--on-surface); padding: 0;
}
.woocommerce ul.products li.product .price {
  color: var(--wp--preset--color--on-surface); font-family: var(--wp--preset--font-family--inter);
  font-weight: 600; font-size: var(--wp--preset--font-size--price);
}
.woocommerce .woocommerce-result-count, .woocommerce .woocommerce-ordering { color: var(--wp--preset--color--on-surface-variant); }

/* ---- Sold-out chip ---- */
.woocommerce ul.products li.product.outofstock { opacity: .9; }
.woocommerce span.onsale,
.woocommerce ul.products li.product .poet-stock-chip {
  background: var(--wp--preset--color--accent-green); color: var(--wp--preset--color--on-accent-green);
  border-radius: 9999px; padding: 4px 12px; font-size: 12px; font-weight: 600; min-height: 0;
}

/* ---- Buttons → our component look ---- */
.woocommerce a.button, .woocommerce button.button, .woocommerce .button,
.woocommerce #respond input#submit, .woocommerce .single_add_to_cart_button {
  background: var(--wp--preset--color--accent-yellow) !important;
  color: var(--wp--preset--color--on-accent-yellow) !important;
  border-radius: var(--wp--custom--rounded--default, 8px); font-family: var(--wp--preset--font-family--inter);
  font-weight: 600; letter-spacing: .04em; padding: 12px 28px; border: 0;
}
.woocommerce a.button.alt:hover, .woocommerce button.button:hover, .woocommerce .single_add_to_cart_button:hover {
  filter: brightness(.95);
}
.woocommerce .button.added, .woocommerce .added_to_cart { background: var(--wp--preset--color--secondary) !important; color: var(--wp--preset--color--on-secondary) !important; }

/* ---- Single product (PDP) ---- */
.woocommerce div.product .product_title {
  font-family: var(--wp--preset--font-family--fraunces); font-size: var(--wp--preset--font-size--headline-md);
}
.woocommerce div.product p.price, .woocommerce div.product span.price {
  color: var(--wp--preset--color--primary-deep); font-weight: 600; font-size: var(--wp--preset--font-size--headline-sm);
}
.woocommerce div.product .woocommerce-product-details__short-description { font-size: var(--wp--preset--font-size--body-lg); color: var(--wp--preset--color--on-surface-variant); }

/* PDP custom attributes (roast/tasting) rendered by poet-core */
.poet-pdp-attrs { margin: 16px 0; display: grid; gap: 6px; }
.poet-pdp-attrs .poet-pdp-attr { display: flex; gap: 8px; }
.poet-pdp-attrs .poet-pdp-attr b { font-family: var(--wp--preset--font-family--inter); min-width: 110px; color: var(--wp--preset--color--on-surface-variant); text-transform: uppercase; font-size: 12px; letter-spacing: .1em; }

/* ---- Variant-as-pills (poet-woo.js hides the <select>, shows these) ---- */
.poet-variant-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 16px; }
.poet-variant-pills button {
  border-radius: 9999px; border: 1px solid var(--wp--preset--color--outline);
  background: var(--wp--preset--color--surface-container); color: var(--wp--preset--color--on-surface);
  padding: 10px 18px; cursor: pointer; font-weight: 600; font-size: var(--wp--preset--font-size--body-sm);
  min-height: 44px;
}
.poet-variant-pills button[aria-pressed="true"] {
  background: var(--wp--preset--color--primary); color: var(--wp--preset--color--on-primary);
  border-color: var(--wp--preset--color--primary);
}
.poet-variant-pills button[disabled] { opacity: .4; cursor: not-allowed; text-decoration: line-through; }
.poet-hide-select { position: absolute !important; width:1px; height:1px; overflow:hidden; clip: rect(0 0 0 0); }

/* ---- Shop category filter pills ---- */
.poet-shop-filters { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-bottom: 32px; }
.poet-shop-filters a {
  border-radius: 9999px; padding: 8px 18px; text-decoration: none; font-size: var(--wp--preset--font-size--label-caps);
  font-weight: 600; letter-spacing: .08em; background: var(--wp--preset--color--surface-sand);
  color: var(--wp--preset--color--on-surface-variant); border: 1px solid transparent;
}
.poet-shop-filters a.is-active { background: var(--wp--preset--color--secondary); color: var(--wp--preset--color--on-secondary); }

/* ---- Bank-transfer Pending note (Story 7.4 — amber, never red) ---- */
.poet-pending {
  background: #FAE7C8;
  border: 1px solid var(--wp--preset--color--warning);
  border-left: 6px solid var(--wp--preset--color--warning);
  color: var(--wp--preset--color--on-surface); padding: 16px 20px;
  border-radius: var(--wp--custom--rounded--default, 8px); margin: 16px 0;
}
.poet-pending strong { color: var(--wp--preset--color--warning); }
.woocommerce-order .order_details { border-radius: var(--wp--custom--rounded--md, 12px); }
/* Tint the Woo "on-hold" order banner amber too (calm, not red) */
.woocommerce-order .woocommerce-thankyou-order-received { color: var(--wp--preset--color--on-surface); }
