/**
 * Pavaintegra - WooCommerce Styles
 *
 * @package Pavaintegra
 * @since 1.0.0
 */

/* ==========================================================================
   General WooCommerce
   ========================================================================== */
.woocommerce-notices-wrapper {
  margin-bottom: var(--wp--preset--spacing--30);
}

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
  padding: 15px 20px;
  border-radius: 4px;
  margin-bottom: 15px;
}

.woocommerce-message {
  background: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
}

.woocommerce-info {
  background: #d1ecf1;
  border: 1px solid #bee5eb;
  color: #0c5460;
}

.woocommerce-error {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
}

/* ==========================================================================
   Products Grid
   ========================================================================== */
.woocommerce ul.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
  padding: 0;
  list-style: none;
}

.woocommerce ul.products li.product {
  margin: 0;
  padding: 0;
}

.woocommerce ul.products li.product .woocommerce-loop-product__link {
  display: block;
  text-decoration: none;
}

.woocommerce ul.products li.product img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 15px;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--pava-primary);
  margin-bottom: 10px;
}

.woocommerce ul.products li.product .price {
  color: var(--pava-secondary);
  font-weight: 700;
  font-size: 1.1rem;
}

.woocommerce ul.products li.product .price del {
  color: var(--pava-gray);
  font-weight: 400;
  font-size: 0.9rem;
}

.woocommerce ul.products li.product .button {
  background: var(--pava-primary);
  color: var(--pava-white);
  padding: 10px 20px;
  border-radius: 4px;
  text-decoration: none;
  display: inline-block;
  margin-top: 10px;
  transition: background var(--pava-transition);
}

.woocommerce ul.products li.product .button:hover {
  background: var(--pava-secondary);
}

/* ==========================================================================
   Cart
   ========================================================================== */
.woocommerce-cart table.cart {
  width: 100%;
  border-collapse: collapse;
}

.woocommerce-cart table.cart th,
.woocommerce-cart table.cart td {
  padding: 15px;
  border-bottom: 1px solid #eee;
}

.woocommerce-cart table.cart .product-thumbnail img {
  width: 80px;
  height: auto;
  border-radius: 4px;
}

/* Quantity controls */
.quantity {
  display: inline-flex;
  align-items: center;
  gap: 0;
}

.quantity .qty {
  width: 50px;
  text-align: center;
  border: 1px solid #ddd;
  border-left: none;
  border-right: none;
  padding: 8px;
  -moz-appearance: textfield;
}

.quantity .qty::-webkit-outer-spin-button,
.quantity .qty::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.quantity .qty-minus,
.quantity .qty-plus {
  background: var(--pava-gray-light);
  border: 1px solid #ddd;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  transition: background var(--pava-transition);
}

.quantity .qty-minus:hover,
.quantity .qty-plus:hover {
  background: var(--pava-secondary);
  color: var(--pava-white);
  border-color: var(--pava-secondary);
}

.quantity .qty-minus {
  border-radius: 4px 0 0 4px;
}

.quantity .qty-plus {
  border-radius: 0 4px 4px 0;
}

/* ==========================================================================
   Checkout
   ========================================================================== */
.woocommerce-checkout .woocommerce-form-row label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
}

.woocommerce-checkout .woocommerce-form-row input,
.woocommerce-checkout .woocommerce-form-row select,
.woocommerce-checkout .woocommerce-form-row textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.woocommerce-checkout #place_order {
  background: var(--pava-secondary);
  color: var(--pava-white);
  padding: 15px 30px;
  border: none;
  border-radius: 4px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--pava-transition);
}

.woocommerce-checkout #place_order:hover {
  background: var(--pava-secondary-dark);
}

/* ==========================================================================
   Product Category Archive (custom template)
   ========================================================================== */
.pava-product-cat-archive {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.pava-product-cat-archive__breadcrumb {
  font-size: 14px;
}

.pava-product-cat-archive__breadcrumb a {
  color: #23af95;
  font-weight: 600;
}

.pava-product-cat-archive__heading {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  text-align: center;
}

.pava-product-cat-archive__h1,
.pava-product-cat-archive__h2 {
  margin: 0;
  color: var(--wp--preset--color--primario, #143b42);
}

.pava-product-cat-archive__h1-text,
.pava-product-cat-archive__h2-text {
  color: var(--wp--preset--color--secondario-primo-piano);
  max-width: 920px;
  margin-inline: auto;
  text-align: center;
}

.pava-product-cat-archive__h1-text {
  margin: 0 auto;
  font-size: clamp(1.3rem, 2vw, 1.7rem);
  font-weight: 600;
  line-height: 1.3;
}

.pava-product-cat-archive__h1-text p,
.pava-product-cat-archive__h2-text p {
  margin: 0;
}

.pava-product-cat-archive__details {
  width: min(100%, 920px);
  margin-inline: auto;
}

.pava-product-cat-archive__details-summary {
  list-style: none;
  cursor: pointer;
  color: var(--wp--preset--color--primario, #143b42);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0;
}

.pava-product-cat-archive__details-summary::-webkit-details-marker {
  display: none;
}

.pava-product-cat-archive__details-summary::after {
  content: "+";
  display: inline-block;
  margin-left: 8px;
  font-weight: 700;
  transition: transform 0.2s ease;
}

.pava-product-cat-archive__details[open] .pava-product-cat-archive__details-summary::after {
  transform: rotate(45deg);
}

.pava-product-cat-archive__details-content {
  margin-top: 8px;
}

.pava-product-cat-archive__content {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.pava-product-cat-archive__content--no-filters {
  grid-template-columns: minmax(0, 1fr);
}

.pava-product-cat-archive__filters {
  position: sticky;
  top: 24px;
}

.pava-product-cat-archive__filters .widget {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.pava-product-cat-archive__filters .widgettitle,
.pava-product-cat-archive__filters .widget-title {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 600;
  color: var(--wp--preset--color--primario, #143b42);
}
.pava-product-cat-archive__filters
  .krfil-collapsible-content
  .krfil-layered-nav
  ul
  li,
.pava-product-cat-archive__filters .krfil-collapsible-content .slider-values p {
  font-size: 14px;
  font-weight: 500;
  color: var(--wp--preset--color--header-primo-piano, #0a0a0a);
}
.pava-product-cat-archive__filters-empty {
  font-size: 14px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  padding: 12px;
}

.pava-product-cat-archive__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.pava-product-cat-archive__toolbar .woocommerce-ordering {
  margin: 0;
}

.pava-product-cat-archive__toolbar .woocommerce-result-count {
  margin: 0;
}

.pava-product-cat-archive__toolbar .orderby {
  min-width: 220px;
}

.pava-product-cat-archive__supplementary,
.pava-product-cat-archive__seo {
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
  margin-bottom: 2em;
}

.pava-product-cat-archive__supplementary h1,
.pava-product-cat-archive__supplementary h2,
.pava-product-cat-archive__supplementary h3,
.pava-product-cat-archive__supplementary h4,
.pava-product-cat-archive__supplementary h5,
.pava-product-cat-archive__supplementary h6,
.pava-product-cat-archive__seo h1,
.pava-product-cat-archive__seo h2,
.pava-product-cat-archive__seo h3,
.pava-product-cat-archive__seo h4,
.pava-product-cat-archive__seo h5,
.pava-product-cat-archive__seo h6 {
  text-align: center;
}

.pava-product-cat-archive__supplementary p,
.pava-product-cat-archive__supplementary li,
.pava-product-cat-archive__seo p,
.pava-product-cat-archive__seo li {
  text-align: justify;
}

.pava-product-cat-archive__supplementary > :first-child,
.pava-product-cat-archive__seo > :first-child {
  margin-top: 0;
}

.pava-product-cat-archive__supplementary > :last-child,
.pava-product-cat-archive__seo > :last-child {
  margin-bottom: 0;
}

@media (max-width: 991px) {
  .pava-product-cat-archive__content {
    grid-template-columns: 1fr;
  }

  .pava-product-cat-archive__filters {
    position: static;
  }
}

/* ================================
   Cart Help Modal
================================ */
.pava-help-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}

.pava-help-modal.is-open {
  display: block;
}

.pava-help-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.7);
}

.pava-help-modal__dialog {
  position: relative;
  width: min(460px, calc(100vw - 32px));
  margin: max(24px, 10vh) auto 0;
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e5e8ec;
  padding: 22px 24px 24px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
  z-index: 1;
}

.pava-help-modal__close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: 0;
  background: transparent;
  color: #143b42;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.pava-help-modal__icon {
  margin: 0 0 8px;
  color: #23af95;
  font-size: 60px;
  line-height: 1;
}

.pava-help-modal__title {
  margin: 0 0 10px;
  color: #143b42;
  font-size: 2em;
  line-height: 1.05;
  font-weight: 600;
  text-transform: uppercase;
}

.pava-help-modal__text {
  margin: 0;
  color: #143b42;
  font-size: 1.2em;
  line-height: 1.22;
  font-weight: 500;
}

.pava-help-modal__text a {
  color: #143b42;
  font-weight: 700;
  text-decoration: underline;
}

@media (max-width: 991px) {
  .pava-help-modal__dialog {
    border-radius: 14px;
    padding: 18px 16px 18px;
  }

  .pava-help-modal__title {
    font-size: 30px;
  }

  .pava-help-modal__text {
    font-size: 22px;
  }
}

/* ==========================================================================
   Cart Layout Refresh
   ========================================================================== */

.wc-block-components-quantity-selector {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 96px;
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
}
.wc-block-components-form .wc-block-components-text-input input[type="email"],
.wc-block-components-form .wc-block-components-text-input input[type="number"],
.wc-block-components-form
  .wc-block-components-text-input
  input[type="password"],
.wc-block-components-form .wc-block-components-text-input input[type="tel"],
.wc-block-components-form .wc-block-components-text-input input[type="text"],
.wc-block-components-form .wc-block-components-text-input input[type="url"],
.wc-block-components-text-input input[type="email"],
.wc-block-components-text-input input[type="number"],
.wc-block-components-text-input input[type="password"],
.wc-block-components-text-input input[type="tel"],
.wc-block-components-text-input input[type="text"],
.wc-block-components-text-input input[type="url"] {
  color: #0a0a0a !important;
  border: 1px solid #0a0a0a61 !important;
}
.wc-block-components-quantity-selector__button {
  flex: 0 0 30px;
  width: 30px;
  height: 32px;
  border: none;
  background: #f5f5f5 !important;
  cursor: pointer;
  font-size: 16px;
  color: #333;
  transition: background 0.2s ease;
}

table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__total,
.wc-block-components-totals-coupon .wc-block-components-panel__button,
.wc-block-cart
  .wp-block-woocommerce-cart-order-summary-block
  .wc-block-components-formatted-money-amount,
  .wc-block-components-formatted-money-amount {
  font-weight: 600 !important;
}
.wc-block-components-totals-discount .wc-block-components-totals-item__value{
  font-weight: 600 !important;
  color:#23AF95!important;
}
.wc-block-components-quantity-selector__button:hover {
  background: #eee;
}

.wc-block-components-quantity-selector__input {
  flex: 1 1 auto;
  width: 36px;
  min-width: 0;
  height: 32px;
  border: none;
  text-align: center;
  font-size: 14px;
  -moz-appearance: textfield;
  appearance: textfield;
}

.wc-block-components-quantity-selector__input::-webkit-outer-spin-button,
.wc-block-components-quantity-selector__input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.wc-block-components-product-metadata__description,
.wc-block-components-product-metadata__description p {
  font-size: 0.85em;
  line-height: 1.4;
  color: var(--pava-gray, #404040);
  margin: 0;
}

.wc-block-components-product-metadata {
  font-size: var(--wp--preset--font-size--small, 14px);
  line-height: 1.5;
}

.wc-block-components-product-price ins,
ins.wc-block-components-product-price__value.is-discounted {
  font-weight: 700;
  color: var(--wp--preset--color--secondario, #23af95);
  text-decoration: none;
}

.wc-block-components-product-price del {
  color: var(--pava-gray, #404040);
  font-weight: 400;
  opacity: 0.7;
  margin-right: 0.5em;
}

.wc-block-components-product-badge.wc-block-components-sale-badge {
  background-color: var(--wp--preset--color--secondario, #23af95);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.75em;
  padding: 4px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  display: inline-block;
}

.wc-block-cart-items th,
.wc-block-cart-items .wc-block-cart-items__header {
  font-size: 1.2rem;
  font-weight: 600 !important;
  color: var(--wp--preset--color--primario, #143b42);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.wc-block-cart-items__row .wc-block-components-product-name,
.wc-block-cart__main .wc-block-components-product-details__name {
  font-weight: 600 !important;
}
.wc-block-cart-item__wrap .wc-block-components-product-details {
  font-size: 0.88rem !important;
}
.wc-block-components-quantity-selector
  input.wc-block-components-quantity-selector__input {
  padding: 0 !important;
}
.wc-block-cart__totals-title,
.wp-block-woocommerce-cart-order-summary-heading-block {
  font-size: 1.2rem !important;
  font-weight: 600 !important;
  color: var(--wp--preset--color--primario, #143b42) !important;
  text-transform: uppercase !important;
  margin-bottom: 1em !important;
}

.wc-block-cart__sidebar,
.wp-block-woocommerce-cart-totals-block {
  background-color: #fafffe;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 5px 10px 0px rgba(0, 0, 0, 0.15);
}

.wc-block-components-totals-wrapper {
  background-color: transparent;
}

/* --- Responsive Styles --- */
@media (max-width: 991px) {
  .wc-block-cart-items th,
  .wc-block-cart-items .wc-block-cart-items__header {
    font-size: 1rem;
  }

  .wc-block-cart__totals-title,
  .wp-block-woocommerce-cart-order-summary-heading-block {
    font-size: 1.1rem;
  }

  .wc-block-cart__sidebar,
  .wp-block-woocommerce-cart-totals-block {
    padding: 15px;
  }
}

@media (max-width: 599px) {
  .wc-block-cart-items th,
  .wc-block-cart-items .wc-block-cart-items__header {
    font-size: 0.9rem;
  }

  .wc-block-cart__totals-title,
  .wp-block-woocommerce-cart-order-summary-heading-block {
    font-size: 1rem;
  }

  .wc-block-components-quantity-selector {
    min-width: 80px;
  }

  .wc-block-components-quantity-selector__button {
    flex: 0 0 26px;
    width: 26px;
    height: 28px;
    font-size: 14px;
  }

  .wc-block-components-quantity-selector__input {
    height: 28px;
    font-size: 13px;
  }
}

/* ==========================================================================
   Checkout Layout Refresh (WooCommerce Blocks)
   ========================================================================== */

/* --- Checkout Sidebar Background (like progress bar) --- */
.wp-block-woocommerce-checkout-totals-block,
.wc-block-checkout__sidebar {
box-shadow: 0 5px 10px 0px rgba(0, 0, 0, 0.15);
  background-color: #fff;
  border-radius: 10px;
  padding: 20px;
}
.wp-block-woocommerce-checkout-order-summary-block{
  border: 0 !important;
}
.wc-block-checkout__order-summary h2,
.wc-block-components-checkout-step__title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--wp--preset--color--primario, #143b42);
}

.wc-block-checkout .wc-block-components-product-price ins {
  font-weight: 700;
  color: var(--wp--preset--color--secondario, #23af95);
  text-decoration: none;
}

@media (max-width: 991px) {
  .wp-block-woocommerce-checkout-totals-block,
  .wc-block-checkout__sidebar {
    padding: 15px;
  }
}
