/*
 * RP-SYSTEM storefront design alignment (2026-10-09).
 * Shared commerce typography, CTA and form primitives, plus the /offerte/
 * WooCommerce shortcode grid. Uses existing theme brand and WCAG type tokens.
 */
:root {
  --rp-commerce-action: var(--rp-brand-brown, #8d6c48);
  --rp-commerce-action-hover: var(--rp-brand-brown-dark, #634721);
  --rp-commerce-action-text: #fff;
  --rp-commerce-type: var(--wp--preset--font-family--rp-sans, Inter, ui-sans-serif, system-ui, sans-serif);
  --rp-commerce-control-height: 48px;
  --rp-commerce-card-radius: 20px;
}
body.rp-theme :is(.site-main, .wp-site-blocks, .woocommerce) {
  font-family: var(--rp-commerce-type);
}
body.rp-theme :is(
  .site-main .product-card .quick-add,
  .site-main .product-card .button,
  .site-main .woocommerce ul.products li.product .button,
  .site-main .woocommerce ul.products li.product .add_to_cart_button,
  .single-product .single_add_to_cart_button,
  .woocommerce-cart .wc-proceed-to-checkout .checkout-button,
  .woocommerce-checkout #place_order,
  .wc-block-cart__submit-button,
  .wc-block-components-checkout-place-order-button
) {
  min-width: 0;
  min-height: var(--rp-commerce-control-height) !important;
  box-sizing: border-box;
  padding: 10px 15px !important;
  border: 1px solid var(--rp-commerce-action) !important;
  border-radius: 999px !important;
  background: var(--rp-commerce-action) !important;
  color: var(--rp-commerce-action-text) !important;
  font-family: var(--rp-commerce-type) !important;
  font-size: 0.75rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.045em !important;
  line-height: 1.25 !important;
  text-align: center;
  text-decoration: none !important;
  text-transform: uppercase;
  white-space: normal !important;
  overflow-wrap: normal;
  word-break: normal;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
}
body.rp-theme :is(
  .site-main .product-card .quick-add,
  .site-main .product-card .button,
  .site-main .woocommerce ul.products li.product .button,
  .single-product .single_add_to_cart_button,
  .woocommerce-cart .wc-proceed-to-checkout .checkout-button,
  .woocommerce-checkout #place_order,
  .wc-block-cart__submit-button,
  .wc-block-components-checkout-place-order-button
):is(:hover, :focus-visible) {
  background: var(--rp-commerce-action-hover) !important;
  border-color: var(--rp-commerce-action-hover) !important;
  color: #fff !important;
}
body.rp-theme :is(
  .site-main .product-card .quick-add,
  .site-main .product-card .button,
  .site-main .woocommerce ul.products li.product .button,
  .single-product .single_add_to_cart_button,
  .woocommerce-cart .wc-proceed-to-checkout .checkout-button,
  .woocommerce-checkout #place_order,
  .wc-block-cart__submit-button,
  .wc-block-components-checkout-place-order-button
):focus-visible {
  outline: 3px solid var(--rp-commerce-action-hover);
  outline-offset: 3px;
}
body.rp-theme :is(.site-main .woocommerce, .wc-block-cart, .wc-block-checkout) :is(
  input[type="text"], input[type="email"], input[type="tel"], input[type="number"],
  input[type="password"], select, textarea
) {
  font-family: var(--rp-commerce-type);
  font-size: 1rem;
  line-height: 1.45;
}
body.rp-theme :is(.site-main .woocommerce, .wc-block-cart, .wc-block-checkout) :is(
  input[type="text"], input[type="email"], input[type="tel"], input[type="number"],
  input[type="password"], select, textarea
):focus-visible {
  outline: 2px solid var(--rp-commerce-action);
  outline-offset: 2px;
}
/* The sale page uses a normal WP page + WC shortcode, not is_shop(). */
body.rp-theme.page-id-85066 .woocommerce ul.products {
  gap: 24px !important;
  align-items: stretch;
}
body.rp-theme.page-id-85066 .woocommerce ul.products li.product {
  min-width: 0;
  display: flex;
  flex-direction: column;
  border-color: var(--rp-brand-brown-line, rgba(141,108,72,.38));
  border-radius: var(--rp-commerce-card-radius);
  overflow: hidden;
}
body.rp-theme.page-id-85066 .woocommerce ul.products li.product :is(
  .product-info, .woocommerce-loop-product__title, .product-name
) {
  min-width: 0;
}
body.rp-theme.page-id-85066 .woocommerce ul.products li.product :is(
  .woocommerce-loop-product__title, .product-name
) {
  font-family: var(--rp-commerce-type) !important;
  font-size: var(--rp-type-product-title, 1.0625rem) !important;
  font-weight: 700 !important;
  letter-spacing: -0.015em !important;
  line-height: 1.3 !important;
  text-transform: none !important;
  overflow-wrap: break-word;
  white-space: normal;
}
body.rp-theme.page-id-85066 .woocommerce ul.products li.product .price {
  color: var(--text, #050505);
  font-family: var(--rp-commerce-type);
  font-size: 1.125rem;
  font-weight: 750;
  line-height: 1.35;
}
body.rp-theme.page-id-85066 .woocommerce ul.products li.product :is(
  .quick-add, .add_to_cart_button, a.button, button.button
) {
  width: calc(100% - 20px) !important;
  max-width: none !important;
  min-width: 0 !important;
  margin-inline: 10px !important;
  margin-block: auto 10px !important;
}
body.rp-theme.page-id-85066 .woocommerce ul.products li.product .product-info :is(
  .quick-add, .add_to_cart_button, a.button, button.button
) {
  width: 100% !important;
  margin-inline: 0 !important;
}
body.rp-theme.page-id-85066 .woocommerce :is(.woocommerce-result-count, .woocommerce-ordering select) {
  font-family: var(--rp-commerce-type);
  font-size: 0.875rem;
}
@media (max-width: 1199px) {
  body.rp-theme.page-id-85066 .woocommerce ul.products {gap: 20px !important;}
}
@media (max-width: 767px) {
  body.rp-theme.page-id-85066 .woocommerce ul.products {gap: 12px !important;}
  body.rp-theme.page-id-85066 .woocommerce ul.products li.product :is(
    .quick-add, .add_to_cart_button, a.button, button.button
  ) {
    min-height: 48px !important;
    font-size: 0.6875rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.015em !important;
    padding-inline: 6px !important;
    line-height: 1.25 !important;
  }
  body.rp-theme.page-id-85066 .woocommerce ul.products li.product :is(
    .woocommerce-loop-product__title, .product-name
  ) {
    font-size: var(--rp-type-product-title, 1.0625rem) !important;
  }
}
@media (max-width: 359px) {
  body.rp-theme.page-id-85066 .woocommerce ul.products {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  body.rp-theme .site-main .product-card,
  body.rp-theme.page-id-85066 .woocommerce ul.products li.product {
    transition: none !important;
  }
}
