/* v1.9.00 premium responsive reset: removes the aggressive layout rewrite and keeps the premium card intact */

.single-product div.product .summary .afp-builder-shell,
.single-product div.product .summary .afp-unified-card,
.single-product div.product .woocommerce-product-gallery,
.single-product div.product .images {
  width: 100% !important;
  max-width: 100% !important;
}

.afp-widget .afp-control--format-simple,
.afp-widget .afp-control--area-simple,
.afp-widget .afp-option-list,
.afp-widget .afp-range-shell,
.afp-widget .afp-live-panel,
.afp-widget .afp-preview-card {
  max-width: 100% !important;
}

.afp-widget .afp-tier-table,
.afp-widget .afp-result-table {
  width: 100% !important;
}

@media (min-width: 981px) and (max-width: 1280px) {
  .single-product div.product .woocommerce-product-gallery,
  .single-product div.product .images {
    --afp-gallery-stage-min-height-desktop: clamp(360px, 31vw, 520px);
  }

  .afp-widget .afp-master-heading {
    padding: 24px 22px 22px !important;
  }

  .afp-widget .afp-submit-row__actions {
    flex-wrap: wrap !important;
    justify-content: flex-end !important;
  }

  .afp-widget .afp-add-to-cart.single_add_to_cart_button.button.alt,
  .afp-widget .afp-checkout-button.button {
    min-width: 220px !important;
  }
}

@media (max-width: 980px) {
  .afp-widget .afp-master-heading {
    padding: 20px 18px 18px !important;
  }

  .afp-widget .afp-calculator-headline {
    padding: 16px !important;
  }

  .afp-widget .afp-submit-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 14px !important;
  }

  .afp-widget .afp-submit-row__total,
  .afp-widget .afp-submit-row__actions {
    width: 100% !important;
    min-width: 0 !important;
  }

  .afp-widget .afp-submit-row__actions {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 12px !important;
    justify-content: stretch !important;
  }

  .afp-widget .afp-add-to-cart.single_add_to_cart_button.button.alt,
  .afp-widget .afp-checkout-button.button {
    width: 100% !important;
    min-width: 0 !important;
  }

  .afp-widget .afp-option-row {
    gap: 12px !important;
  }

  .afp-widget .afp-tier-table,
  .afp-widget .afp-result-table {
    display: block !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
}

@media (max-width: 640px) {
  .single-product div.product .woocommerce-product-gallery,
  .single-product div.product .images {
    border-radius: 24px !important;
  }

  .afp-widget .afp-master-heading {
    padding: 18px 14px 16px !important;
  }

  .afp-widget .afp-product-title {
    line-height: 1.06 !important;
  }

  .afp-widget .afp-product-excerpt {
    line-height: 1.6 !important;
  }

  .afp-widget .afp-control--format-simple,
  .afp-widget .afp-control--area-simple {
    min-height: 58px !important;
    border-radius: 20px !important;
  }

  .afp-widget .afp-format-trigger,
  .afp-widget .afp-control--format-simple select#afp_format,
  .afp-widget .afp-control--area-simple #afp_area {
    min-height: 58px !important;
    height: 58px !important;
  }

  .afp-widget .afp-control--area-simple #afp_area {
    padding-right: 132px !important;
  }

  .afp-widget .afp-option-row {
    padding: 14px !important;
  }

  .afp-widget .afp-submit-row__actions {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .afp-widget .afp-tier-table th,
  .afp-widget .afp-tier-table td,
  .afp-widget .afp-result-table th,
  .afp-widget .afp-result-table td {
    white-space: nowrap !important;
  }
}

@media (max-width: 389px) {
  .afp-widget .afp-control--area-simple #afp_area {
    padding-right: 124px !important;
  }
}
