/* Polett 0.13 — shared collection, product and purchase surfaces.
 * Flat white surfaces, fine rules and square controls extend the approved shop.
 * Important radius declarations resolve legacy theme rules only; native radio
 * buttons, checkboxes, status marks and gallery dots retain their semantics.
 */
body.polett-commerce-polish,
body.polett-store-preview-page .polett-store-preview {
  --polett-buy-radius: 0;
  --polett-surface: #fff;
  --polett-surface-soft: #f3f3ef;
  --polett-card-space: clamp(0.85rem, 1.4vw, 1.25rem);
}

.polett-tax-note {
  display: inline-block;
  margin-inline-start: 0.3em;
  color: var(--polett-muted, #65555d);
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
}

/* Home primary actions use the store ink in every interaction state. */
body.polett-store-preview-page #polett-contenido .polett-button.button-primary {
  border-color: var(--polett-ink);
  color: var(--polett-white);
  background: var(--polett-ink);
}
body.polett-store-preview-page #polett-contenido .polett-button.button-primary:is(:hover, :focus, :active) {
  border-color: #000;
  color: var(--polett-white);
  background: #000;
}
body.polett-store-preview-page #polett-contenido .polett-button.button-primary:focus-visible {
  outline: 2px solid var(--polett-ink);
  outline-offset: 3px;
}

/* Shop toolbar: Kadence wraps the count and order form in one extra row. */
body.polett-catalog-archive .polett-shop-results {
  display: block;
}

body.polett-catalog-archive .polett-shop-results .woocommerce-notices-wrapper:empty {
  display: none;
}

body.polett-catalog-archive .polett-shop-results .kadence-shop-top-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  width: 100%;
  margin: 1.5rem 0;
}

body.polett-catalog-archive .polett-shop-results :is(.kadence-shop-top-item, .woocommerce-result-count, .woocommerce-ordering) {
  float: none;
  margin: 0;
}

body.polett-catalog-archive .polett-shop-results .kadence-woo-toggle {
  display: none;
}

/* Product cards: compact copy, a visible frame and an explicit purchase action. */
body.polett-catalog-archive ul.products {
  row-gap: 1.75rem;
}

body.polett-catalog-archive .polett-archive-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--polett-border);
  background: var(--polett-surface);
  transition: border-color 160ms ease;
}

body.polett-catalog-archive .polett-archive-card:is(:hover, :focus-within) {
  border-color: var(--polett-control);
}

body.polett-catalog-archive .polett-loop-product-image {
  aspect-ratio: 1;
  border-bottom: 1px solid var(--polett-border);
  background: var(--polett-surface-soft);
}

body.polett-catalog-archive .polett-archive-card__body {
  flex: 1;
  padding: var(--polett-card-space) var(--polett-card-space) 0;
}

body.polett-catalog-archive .polett-archive-card .product-details {
  padding: 0;
}

body.polett-catalog-archive ul.products li.product .woocommerce-loop-product__title {
  display: block;
  min-height: 2.76em;
  margin: 0.4rem 0 0.75rem;
  overflow: visible;
  font-size: 0.94rem;
  line-height: 1.38;
  -webkit-line-clamp: unset;
}

body.polett-catalog-archive .polett-archive-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 0.65rem;
  min-height: 0;
  border-top: 1px solid var(--polett-border);
  padding-top: 0.85rem;
}

body.polett-catalog-archive ul.products li.product .price {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 650;
}

body.polett-catalog-archive .price .polett-tax-note {
  display: block;
  margin: 0.15rem 0 0;
}

body.polett-catalog-archive .polett-archive-card__actions {
  display: flex;
  align-items: stretch;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0;
  padding: 1rem 0 var(--polett-card-space);
}

body.polett-catalog-archive ul.products li.product .polett-archive-card .product-action-wrap {
  width: 100% !important;
  margin: 0;
  padding: 0;
}

body.polett-catalog-archive .polett-archive-card__actions .button {
  display: inline-flex !important;
  width: 100% !important;
  height: auto;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  margin: 0;
  padding: 0.7rem 0.65rem !important;
  font-size: 0.76rem;
  line-height: 1.35;
  text-transform: none !important;
}

body.polett-catalog-archive .polett-archive-card__actions .polett-cart-button__label {
  position: static;
  flex: 0 1 auto;
  min-width: 0;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  clip-path: none;
  white-space: normal;
}

body.polett-catalog-archive .polett-archive-card__actions .polett-cart-button__icon {
  flex: 0 0 1.05rem;
}

/* Match homepage product content to the same compact price/action hierarchy. */
body.polett-store-preview-page .polett-category-carousel .polett-product-card__body {
  min-height: 0;
  padding-bottom: 1rem;
}
body.polett-store-preview-page .polett-category-carousel .polett-product-card__meta {
  margin-top: 0.85rem;
}

/* Shared commerce controls. Keep disabled, focus and validation behaviors. */
body.polett-commerce-polish :is(.button, .wp-element-button, .wc-block-components-button, .polett-buy-action),
body.polett-store-preview-page .polett-product-card__cart {
  border-radius: 0 !important;
  box-shadow: none !important;
}
body.polett-commerce-polish :is(.button, .wp-element-button, .polett-buy-action):hover {
  transform: none;
}
body.polett-commerce-polish .polett-header-action {
  border-radius: 0;
  box-shadow: none;
}

/* Product detail and related products. */
body.single-product.polett-commerce-polish .content-area {
  padding-top: clamp(1.5rem, 3vw, 2.75rem);
}
body.single-product.polett-commerce-polish .woocommerce-product-gallery__wrapper {
  border: 1px solid var(--polett-border);
  border-radius: 0;
  background: var(--polett-surface-soft);
  box-shadow: none;
}
body.single-product.polett-commerce-polish .summary.entry-summary {
  border: 0;
  border-top: 1px solid var(--polett-border);
  border-radius: 0;
  padding: clamp(1.25rem, 2.5vw, 2rem) 0 0;
  background: transparent;
  box-shadow: none;
}
body.single-product.polett-commerce-polish .summary .product_title {
  font-size: clamp(1.9rem, 3.1vw, 3rem);
  letter-spacing: -0.04em;
  line-height: 1.12;
}
body.single-product.polett-commerce-polish :is(.woocommerce-product-gallery__trigger, .flex-control-thumbs img, .polett-gallery-nav__button, .polett-gallery-applied, .qty, .woocommerce-tabs ul.tabs li, .related.products ul.products li.product img, .related.products.polett-related-carousel ul.products li.product img) {
  border-radius: 0 !important;
  box-shadow: none;
}
body.single-product.polett-commerce-polish .related.products ul.products li.product {
  border: 1px solid var(--polett-border);
  border-radius: 0;
  background: var(--polett-surface);
  box-shadow: none;
}
body.single-product.polett-commerce-polish .polett-mobile-buybar {
  border-top: 1px solid var(--polett-border);
  box-shadow: none;
}
body.single-product.polett-commerce-polish .polett-mobile-buybar__button {
  border-radius: 0;
}

/* Cart drawer: fine divisions, neutral total, square quantity/remove controls. */
#polett-mini-cart {
  border-left: 1px solid var(--polett-border);
  border-radius: 0;
  box-shadow: none;
}
#polett-mini-cart .polett-mini-cart__header {
  background: var(--polett-surface-soft);
}
#polett-mini-cart :is(.polett-mini-cart__header button, .polett-mini-cart-product__media, .woocommerce-mini-cart-item img, .polett-mini-cart-quantity, .woocommerce-mini-cart__buttons a, .polett-mini-cart-empty__link) {
  border-radius: 0;
  box-shadow: none;
}
#polett-mini-cart .polett-mini-cart__header button {
  border-color: var(--polett-border);
  background: var(--polett-white);
}
#polett-mini-cart .polett-mini-cart-body .woocommerce-mini-cart-item a.remove.remove_from_cart_button,
#polett-mini-cart .polett-mini-cart-body .woocommerce-mini-cart-item a.remove.remove_from_cart_button:hover,
#polett-mini-cart .polett-mini-cart-body .woocommerce-mini-cart-item a.remove.remove_from_cart_button:focus-visible {
  border-radius: 0 !important;
}
#polett-mini-cart .polett-mini-cart-body .woocommerce-mini-cart__total {
  flex-wrap: wrap;
  gap: 0.4rem 0.75rem;
  border-top: 1px solid var(--polett-border);
  padding-block: 1.15rem;
}
#polett-mini-cart .woocommerce-mini-cart__total > .polett-tax-note {
  flex-basis: 100%;
  margin: 0;
  text-align: right;
}
#polett-mini-cart .polett-mini-cart-line-total .polett-tax-note {
  display: block;
  margin: 0.2rem 0 0;
}

/* Cart and checkout keep native field, coupon, shipping and payment logic. */
body.polett-commerce-polish:is(.woocommerce-cart, .woocommerce-checkout) article.entry {
  background: transparent;
  box-shadow: none;
}
body.polett-commerce-polish:is(.woocommerce-cart, .woocommerce-checkout) :is(.wc-block-cart__sidebar, .wc-block-checkout__main, .wc-block-checkout__sidebar, .wp-block-woocommerce-empty-cart-block) {
  border: 1px solid var(--polett-border);
  border-radius: 0 !important;
  background: var(--polett-surface);
  box-shadow: none !important;
}
body.polett-commerce-polish:is(.woocommerce-cart, .woocommerce-checkout) :is(.wc-block-components-quantity-selector, .wc-block-cart-item__remove-link, .wc-block-cart-item__image img, .wc-block-components-order-summary-item__image img, .wc-block-components-order-summary-item__quantity, .wc-block-components-order-summary, .wc-block-components-notice-banner, .wc-block-components-text-input input, .wc-block-components-combobox input, .wc-block-components-select__select, .wc-block-components-textarea, .wc-block-components-panel, .wc-block-components-totals-coupon__input input, .wc-block-checkout__order-notes textarea) {
  border-radius: 0 !important;
}
body.polett-commerce-polish:is(.woocommerce-cart, .woocommerce-checkout) .wc-block-components-notice-banner {
  border-width: 1px;
  box-shadow: none;
}
body.polett-commerce-polish:is(.woocommerce-cart, .woocommerce-checkout) .wc-block-components-totals-footer-item {
  background: var(--polett-surface-soft);
}
body.woocommerce-checkout.polett-commerce-polish .wc-block-components-checkout-step__title::before {
  border-radius: 0 !important;
}

@media (max-width: 600px) {
  body.polett-catalog-archive .polett-shop-results .kadence-shop-top-row {
    align-items: stretch;
    gap: 0.8rem;
  }
  body.polett-catalog-archive .polett-shop-results .kadence-shop-top-item,
  body.polett-catalog-archive .polett-shop-results .woocommerce-ordering,
  body.polett-catalog-archive .polett-shop-results .woocommerce-ordering select {
    width: 100%;
    max-width: 100%;
  }
  body.polett-catalog-archive ul.products li.product .woocommerce-loop-product__title {
    min-height: 0;
  }
  body.single-product.polett-commerce-polish .summary.entry-summary {
    padding-top: 1.5rem;
  }
  body.polett-commerce-polish:is(.woocommerce-cart, .woocommerce-checkout) :is(.wc-block-components-text-input input, .wc-block-components-combobox input, .wc-block-components-select__select, .wc-block-components-textarea) {
    font-size: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.polett-catalog-archive .polett-archive-card {
    transition: none;
  }
}

/* Reset remaining Kadence/Woo block shells, including the mobile order summary. */
body.woocommerce-checkout.polett-commerce-polish:not(.woocommerce-order-received) .entry-content-wrap {
  border-radius: 0;
  padding: 0;
  background: transparent;
}
body.woocommerce-checkout.polett-commerce-polish:not(.woocommerce-order-received) .wp-block-woocommerce-checkout :is(.wc-block-components-checkout-place-order-button, .wc-blocks-components-select__container, .wc-blocks-components-select__select, .wc-block-components-order-summary, .wc-block-components-order-summary-content, .wp-block-woocommerce-checkout-order-summary-block, .checkout-order-summary-block-fill) {
  border-radius: 0 !important;
}
body.polett-commerce-polish:is(.woocommerce-cart, .woocommerce-checkout) .wc-block-components-totals-footer-item {
  padding: 0.85rem;
  gap: 0.5rem;
}
body.polett-commerce-polish:is(.woocommerce-cart, .woocommerce-checkout) .wc-block-components-totals-footer-item-value {
  white-space: normal;
}
@media (max-width: 600px) {
  body.woocommerce-cart.polett-commerce-polish .wc-block-cart-items__row {
    grid-template-columns: 4.5rem minmax(0, 1fr);
    column-gap: 1rem;
  }
  body.woocommerce-cart.polett-commerce-polish table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__image {
    grid-column: 1;
    grid-row: 1 / 3;
    width: 4.5rem;
  }
  body.woocommerce-cart.polett-commerce-polish table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__product {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    padding-bottom: 0;
  }
  body.woocommerce-cart.polett-commerce-polish table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__total {
    grid-column: 2;
    grid-row: 2;
    min-width: 0;
    padding: 0 0 1rem;
    justify-content: flex-start;
    text-align: left;
  }
  body.woocommerce-cart.polett-commerce-polish .wc-block-cart-item__total-price-and-sale-badge-wrapper {
    padding: 0;
  }
}
#polett-mini-cart .polett-mini-cart-quantity__button:is(:hover, :focus):not(:disabled) {
  color: var(--polett-white);
  background: var(--polett-ink);
}
#polett-mini-cart .polett-mini-cart-quantity__button:disabled {
  color: var(--polett-muted);
  background: var(--polett-surface-soft);
}
#polett-mini-cart .polett-mini-cart-quantity__button:focus-visible {
  outline: 2px solid var(--polett-hot);
  outline-offset: -3px;
}

/* Classic WooCommerce forms must follow the same system as Blocks checkout. */
body.woocommerce-checkout.polett-commerce-polish:not(.woocommerce-order-received) :is(form.checkout_coupon, form.checkout .col2-set, #order_review, #payment, #payment .payment_box, #payment .woocommerce-info, #payment .woocommerce-error, #payment .woocommerce-message, .shop_table, .select2-selection, input.input-text, textarea, select, #place_order),
body.woocommerce-cart.polett-commerce-polish :is(.woocommerce-cart-form, .shop_table, .cart_totals, .coupon .input-text, .quantity .qty, .select2-selection) {
  border-radius: 0 !important;
  box-shadow: none;
}
body.woocommerce-checkout.polett-commerce-polish:not(.woocommerce-order-received) form.checkout.woocommerce-checkout {
  grid-template-rows: min-content 1fr;
  row-gap: 1rem;
}
body.woocommerce-checkout.polett-commerce-polish:not(.woocommerce-order-received) form.checkout.woocommerce-checkout::before,
body.woocommerce-checkout.polett-commerce-polish:not(.woocommerce-order-received) form.checkout.woocommerce-checkout::after {
  display: none;
}
body.woocommerce-checkout.polett-commerce-polish:not(.woocommerce-order-received) #order_review_heading {
  margin: 0;
}
body.woocommerce-checkout.polett-commerce-polish:not(.woocommerce-order-received) #payment {
  background: var(--polett-surface-soft);
}
body.polett-commerce-polish :is(.woocommerce-message, .woocommerce-error, .woocommerce-info) {
  border-radius: 0;
  box-shadow: none;
}
body.polett-commerce-polish .woocommerce-notices-wrapper .button,
body.woocommerce-checkout.polett-commerce-polish form.checkout_coupon .button {
  border-color: var(--polett-ink) !important;
  color: var(--polett-white) !important;
  background: var(--polett-ink) !important;
}
body.woocommerce-checkout.polett-commerce-polish .select2-container--default .select2-results__option--highlighted[aria-selected] {
  color: var(--polett-white);
  background: var(--polett-ink);
}
/* Independent image/name grid; never let widget rules indent or overlap copy. */
#polett-mini-cart .polett-mini-cart-product {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  text-indent: 0;
}
#polett-mini-cart .polett-mini-cart-product__name {
  position: static;
  min-width: 0;
  margin: 0;
  padding-inline: 0;
  text-indent: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  transform: none;
}
#polett-mini-cart .polett-mini-cart-product__media img {
  float: none !important;
  margin: 0 !important;
  transform: none !important;
}
#polett-mini-cart input.polett-mini-cart-quantity__input {
  border: 0;
  border-inline: 1px solid var(--polett-border);
  border-radius: 0 !important;
  padding: 0;
  color: var(--polett-ink);
  background: var(--polett-white);
  box-shadow: none;
}
#polett-mini-cart input.polett-mini-cart-quantity__input:focus-visible {
  outline: 2px solid var(--polett-ink);
  outline-offset: -2px;
}
@media (max-width: 900px) {
  body.woocommerce-checkout.polett-commerce-polish:not(.woocommerce-order-received) form.checkout.woocommerce-checkout {
    grid-template-rows: auto auto auto;
  }
}
/* Complete the classic cart controls as well as its checkout destination. */
body.woocommerce-cart.polett-commerce-polish :is(.woocommerce-cart-form, .cart_totals) {
  border: 1px solid var(--polett-border);
  padding: clamp(0.85rem, 2vw, 1.25rem);
  background: var(--polett-white);
}
body.woocommerce-cart.polett-commerce-polish :is(.woocommerce-cart-form, .cart_totals) .button {
  border: 1px solid var(--polett-ink) !important;
  border-radius: 0 !important;
  color: var(--polett-white) !important;
  background: var(--polett-ink) !important;
  white-space: normal;
}
body.woocommerce-cart.polett-commerce-polish :is(.woocommerce-cart-form, .cart_totals) :is(input.input-text, .qty, select) {
  border: 1px solid var(--polett-control);
  border-radius: 0;
  color: var(--polett-ink);
  background: var(--polett-white);
}
body.woocommerce-cart.polett-commerce-polish .woocommerce-cart-form .coupon {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.5rem;
}
body.woocommerce-cart.polett-commerce-polish .woocommerce-cart-form .coupon :is(input.input-text, .button) {
  float: none;
  width: auto !important;
  min-width: 0;
  max-width: 100%;
  margin: 0;
}
body.woocommerce-cart.polett-commerce-polish .woocommerce-cart-form .coupon input.input-text {
  flex: 1 1 10rem;
}
body.woocommerce-cart.polett-commerce-polish .woocommerce-cart-form .coupon .button {
  flex: 1 0 auto;
}
body .polett-commerce-header .polett-header-action:is(:hover, :focus-visible) {
  color: var(--polett-white) !important;
  background: var(--polett-ink);
}
