/* Lucaffè Mobile CTA & Buy Fixes */

/* 1) Mobile single-product purchase area */
@media (max-width: 767px) {
  body.single-product form.cart,
  body.single-product .cart,
  body.single-product .woocommerce div.product form.cart {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: stretch !important;
    gap: 12px !important;
  }

  body.single-product form.cart .quantity,
  body.single-product .woocommerce div.product form.cart .quantity {
    width: 88px !important;
    min-width: 88px !important;
    max-width: 88px !important;
    flex: 0 0 88px !important;
  }

  body.single-product form.cart .single_add_to_cart_button,
  body.single-product .woocommerce div.product form.cart .single_add_to_cart_button,
  body.single-product form.cart button[name="add-to-cart"] {
    flex: 1 1 calc(100% - 100px) !important;
    min-width: 170px !important;
    width: auto !important;
    min-height: 62px !important;
    border-radius: 24px !important;
    padding: 18px 22px !important;
    white-space: nowrap !important;
    text-align: center !important;
    line-height: 1.1 !important;
    font-size: 18px !important;
    letter-spacing: .04em !important;
    writing-mode: horizontal-tb !important;
    word-break: keep-all !important;
    overflow-wrap: normal !important;
  }

  /* vertical text reset in case theme/plugin rotates or constrains button */
  body.single-product form.cart .single_add_to_cart_button * {
    writing-mode: horizontal-tb !important;
    word-break: keep-all !important;
  }

  body.single-product .woocommerce .quantity input.qty,
  body.single-product .quantity .qty {
    width: 100% !important;
    height: 62px !important;
    min-height: 62px !important;
    text-align: center !important;
    border-radius: 20px !important;
  }
}

/* 2) Mobile CTA card reveal for business block */
@media (max-width: 767px) {
  .lucaffe-mobile-cta-fixed {
    overflow: visible !important;
  }

  .lucaffe-mobile-cta-fixed .lucaffe-cta-stack {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    width: 100% !important;
    margin-top: 8px !important;
  }

  .lucaffe-mobile-cta-fixed .lucaffe-cta-stack > a,
  .lucaffe-mobile-cta-fixed .lucaffe-cta-stack > button,
  .lucaffe-mobile-cta-fixed .lucaffe-cta-stack > .wpex-button,
  .lucaffe-mobile-cta-fixed .lucaffe-cta-stack > .theme-button {
    width: 100% !important;
    max-width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
    display: inline-flex !important;
    align-items: center !important;
    min-height: 64px !important;
    overflow: visible !important;
    white-space: normal !important;
  }

  .lucaffe-mobile-cta-fixed .lucaffe-cta-secondary {
    opacity: 0;
    transform: translateY(18px);
    animation: lucaffeCtaReveal .7s ease-out .18s forwards;
  }
}

@keyframes lucaffeCtaReveal {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
