/**
 * Cristal — botões ProfitizeBuild adaptados ao tema Byolishop.
 * Chip usa --ink da loja; crystal = vidro + seta com nude da marca.
 */

.hero-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.glass-btn {
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 14px;
  height: 50px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
  text-decoration: none;
  text-transform: none;
  cursor: pointer;
  transition:
    background 0.16s var(--ease),
    border-color 0.16s var(--ease),
    color 0.16s var(--ease),
    transform 0.1s var(--ease),
    box-shadow 0.22s var(--ease);
}
.glass-btn__label {
  flex: 0 1 auto;
  min-width: 0;
}
.glass-btn--block .glass-btn__label,
.drawer-cat__all .glass-btn__label {
  flex: 1 1 auto;
}
.glass-btn:active {
  transform: translateY(1px);
}
.glass-btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 3px;
}
.glass-btn:disabled,
.glass-btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Principal — pílula clara + chip ink */
.glass-btn--light {
  padding: 7px 7px 7px 22px;
  background: #fafafa;
  color: #0a0a0a;
}
.glass-btn--light:hover {
  background: #fff;
}
.glass-btn__chip {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--ink, #332f2f);
  color: #fff;
}
.glass-btn__chip svg {
  display: block;
}

/* Frost — vidro claro sobre foto (hero / home-banners / wide-banners) */
.glass-btn--frost {
  padding: 7px 7px 7px 22px;
  color: var(--ink, #332f2f);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.22) 48%),
    linear-gradient(165deg, rgba(244, 223, 214, 0.55), rgba(255, 254, 245, 0.35));
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow:
    inset 0 1px 0.5px rgba(255, 255, 255, 0.9),
    inset 0 -8px 14px rgba(51, 47, 47, 0.08),
    0 10px 26px rgba(26, 22, 20, 0.22);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
}
.glass-btn--frost:hover {
  color: #0a0a0a;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.35) 48%),
    linear-gradient(165deg, rgba(244, 223, 214, 0.7), rgba(255, 254, 245, 0.5));
  border-color: rgba(255, 255, 255, 0.65);
}
.glass-btn--frost:focus-visible {
  outline-color: rgba(255, 255, 255, 0.7);
}
.glass-btn--frost .glass-btn__chip {
  background: var(--ink, #332f2f);
  color: #fff;
}

/* Secundária — vidro cristal + nude mais escuro + seta */
.glass-btn--crystal {
  padding: 7px 7px 7px 22px;
  color: #f7f8f9;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 42%),
    linear-gradient(165deg, #5c5550 0%, #3d3834 48%, #2a2624 100%);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow:
    inset 0 1px 0.5px rgba(255, 255, 255, 0.28),
    inset 0 -8px 14px rgba(0, 0, 0, 0.28),
    0 8px 22px rgba(51, 47, 47, 0.22);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}
.glass-btn--crystal:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0) 42%),
    linear-gradient(165deg, #6a625c 0%, #45403b 48%, #332f2f 100%);
}
.glass-btn--crystal:focus-visible {
  outline-color: rgba(51, 47, 47, 0.45);
}
.glass-btn--crystal .glass-btn__chip {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

/* Primário em fundo claro — degradé ink + chip nude */
.glass-btn--ink {
  padding: 7px 7px 7px 22px;
  color: #f7f8f9;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0) 40%),
    linear-gradient(160deg, #4a4444 0%, #332f2f 55%, #1f1c1c 100%);
  border-color: rgba(0, 0, 0, 0.2);
  box-shadow:
    inset 0 1px 0.5px rgba(255, 255, 255, 0.22),
    inset 0 -8px 14px rgba(0, 0, 0, 0.3),
    0 10px 24px rgba(51, 47, 47, 0.24);
}
.glass-btn--ink:hover {
  color: #fff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0) 40%),
    linear-gradient(160deg, #5a5353 0%, #3d3838 55%, #292525 100%);
}
.glass-btn--ink:focus-visible {
  outline-color: rgba(51, 47, 47, 0.55);
}
.glass-btn--ink .glass-btn__chip {
  background: #f4dfd6;
  color: #332f2f;
}

/* Vidro líquido (sobre hero / fundo escuro) */
.glass-btn--glass {
  padding: 0 26px;
  color: #dcdcdc;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0) 46%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.02));
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow:
    inset 0 1px 0.5px rgba(255, 255, 255, 0.5),
    inset 0 -8px 14px rgba(0, 0, 0, 0.2),
    inset 0 2px 10px rgba(255, 255, 255, 0.05),
    0 8px 22px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(14px) saturate(170%);
  -webkit-backdrop-filter: blur(14px) saturate(170%);
}
.glass-btn--glass:hover {
  color: #fff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0) 46%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.045));
  border-color: rgba(255, 255, 255, 0.22);
}

/* Variante para fundos claros (loja / filtros) */
.glass-btn--glass-ink {
  padding: 0 26px;
  color: var(--ink, #332f2f);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.55) 46%),
    linear-gradient(180deg, rgba(244, 223, 214, 0.45), rgba(255, 255, 255, 0.25));
  border-color: rgba(51, 47, 47, 0.14);
  box-shadow:
    inset 0 1px 0.5px rgba(255, 255, 255, 0.85),
    inset 0 -6px 12px rgba(51, 47, 47, 0.06),
    0 6px 18px rgba(51, 47, 47, 0.08);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
}
.glass-btn--glass-ink:hover {
  color: #0a0a0a;
  border-color: rgba(51, 47, 47, 0.22);
}
.glass-btn--glass-ink:focus-visible {
  outline-color: rgba(51, 47, 47, 0.45);
}

.glass-btn--sm {
  height: 42px;
  font-size: 0.78rem;
  gap: 10px;
}
.glass-btn--sm.glass-btn--light,
.glass-btn--sm.glass-btn--frost,
.glass-btn--sm.glass-btn--crystal,
.glass-btn--sm.glass-btn--ink {
  padding: 5px 5px 5px 16px;
}
.glass-btn--sm .glass-btn__chip {
  width: 30px;
  height: 30px;
}
.glass-btn--sm.glass-btn--glass,
.glass-btn--sm.glass-btn--glass-ink {
  padding: 0 18px;
}

.glass-btn--xs {
  height: 38px;
  font-size: 0.72rem;
  gap: 8px;
}
.glass-btn--xs.glass-btn--light,
.glass-btn--xs.glass-btn--frost,
.glass-btn--xs.glass-btn--crystal,
.glass-btn--xs.glass-btn--ink {
  padding: 4px 4px 4px 14px;
}
.glass-btn--xs .glass-btn__chip {
  width: 28px;
  height: 28px;
}
.glass-btn--xs .glass-btn__chip svg {
  width: 14px;
  height: 14px;
}

.glass-btn--block {
  width: 100%;
  justify-content: space-between;
}

/* ─── Remap legado .btn → Cristal (home, carrinho, cookies, etc.) ─── */
.btn.btn--solid:not(.btn--soft),
a.btn.btn--solid:not(.btn--soft),
button.btn.btn--solid:not(.btn--soft),
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt,
.woocommerce #respond input#submit.alt,
.woocommerce a.checkout-button,
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button,
.single_add_to_cart_button.button,
button.single_add_to_cart_button,
#place_order,
button#place_order,
.woocommerce button.button.alt.checkout-button,
.woocommerce-checkout #place_order {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  height: 50px;
  min-height: 50px;
  max-width: 100%;
  padding: 7px 7px 7px 16px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0) 40%),
    linear-gradient(160deg, #4a4444 0%, #332f2f 55%, #1f1c1c 100%);
  color: #f7f8f9;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  white-space: nowrap;
  overflow: hidden;
  box-sizing: border-box;
  box-shadow:
    inset 0 1px 0.5px rgba(255, 255, 255, 0.22),
    0 10px 24px rgba(51, 47, 47, 0.22);
}
.btn.btn--solid:not(.btn--soft):hover,
a.btn.btn--solid:not(.btn--soft):hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.single_add_to_cart_button.button:hover,
button.single_add_to_cart_button:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0) 40%),
    linear-gradient(160deg, #5a5353 0%, #3d3838 55%, #292525 100%);
  color: #fff;
  transform: none;
}

.btn.btn--solid:not(.btn--soft):not(.glass-btn)::after,
.woocommerce a.button.alt:not(.glass-btn)::after,
.woocommerce button.button.alt:not(.glass-btn)::after,
.single_add_to_cart_button.button:not(.glass-btn)::after,
button.single_add_to_cart_button:not(.glass-btn)::after {
  content: "";
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background-color: #f4dfd6;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M40 128h176M144 56l72 72-72 72' fill='none' stroke='%23332f2f' stroke-width='16' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px 16px;
}

.btn.btn--ghost:not(.btn--soft),
a.btn.btn--ghost:not(.btn--soft),
button.btn.btn--ghost:not(.btn--soft),
.woocommerce a.button:not(.alt):not(.glass-btn),
.woocommerce button.button:not(.alt):not(.glass-btn):not(.single_add_to_cart_button) {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  height: 50px;
  min-height: 50px;
  padding: 7px 7px 7px 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: #f7f8f9;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 42%),
    linear-gradient(165deg, #5c5550 0%, #3d3834 48%, #2a2624 100%);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: none;
  white-space: nowrap;
  box-shadow:
    inset 0 1px 0.5px rgba(255, 255, 255, 0.28),
    0 8px 22px rgba(51, 47, 47, 0.18);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}
.btn.btn--ghost:not(.btn--soft):hover,
.woocommerce a.button:not(.alt):not(.glass-btn):hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0) 42%),
    linear-gradient(165deg, #6a625c 0%, #45403b 48%, #332f2f 100%);
  color: #fff;
}
.btn.btn--ghost:not(.btn--soft):not(.glass-btn)::after,
.woocommerce a.button:not(.alt):not(.glass-btn)::after,
.woocommerce button.button:not(.alt):not(.glass-btn):not(.single_add_to_cart_button)::after {
  content: "";
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.16);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M40 128h176M144 56l72 72-72 72' fill='none' stroke='%23fff' stroke-width='16' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px 16px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.btn.btn--sm {
  height: 42px;
  min-height: 42px;
  font-size: 0.78rem;
  gap: 10px;
  padding: 5px 5px 5px 16px;
}
.btn.btn--sm::after {
  width: 30px;
  height: 30px;
  background-size: 14px 14px;
}

.btn.btn--soft {
  /* fav / share: manter compacto sem chip */
}
.btn.btn--soft::after {
  content: none !important;
}

.btn.btn--block {
  width: 100%;
  justify-content: space-between;
}

/* Botões Woo full-width: seta no extremo direito (espec. > .woocommerce button.button) */
.woocommerce .woocommerce-form-coupon button.button,
.woocommerce .checkout_coupon button.button,
.woocommerce .woocommerce-cart-form .coupon button.button,
.woocommerce .woocommerce-form-login button.button.woocommerce-form-login__submit,
.woocommerce .woocommerce-form-login button.button[name="login"],
.woocommerce a.button.checkout-button,
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button,
.minicart__checkout,
.pcard__sheet .single_add_to_cart_button {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  justify-content: space-between !important;
}

.pcard__cta {
  display: inline-flex !important;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  height: 42px;
  min-height: 42px;
  padding: 5px 5px 5px 14px !important;
  border: 1px solid transparent;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0) 40%),
    linear-gradient(160deg, #4a4444 0%, #332f2f 55%, #1f1c1c 100%) !important;
  color: #f7f8f9 !important;
  font-size: 0.72rem !important;
  font-weight: 600;
  letter-spacing: 0.03em !important;
  text-transform: none !important;
  white-space: nowrap !important;
  box-shadow: inset 0 1px 0.5px rgba(255, 255, 255, 0.2), 0 8px 18px rgba(51, 47, 47, 0.18);
}
.pcard__cta:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0) 40%),
    linear-gradient(160deg, #5a5353 0%, #3d3838 55%, #292525 100%) !important;
  color: #fff !important;
}
.pcard__cta:not(.glass-btn)::after {
  content: "";
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: #f4dfd6;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M40 128h176M144 56l72 72-72 72' fill='none' stroke='%23332f2f' stroke-width='16' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 13px 13px;
}
.pcard__cta[aria-disabled="true"] {
  opacity: 0.5;
}
.pcard__cta svg,
.pcard__cta.add_to_cart_button:not(.product_type_variation)::before {
  display: none !important;
}

.wide-banner__cta.glass-btn {
  margin-top: 1.35rem;
}

@media (max-width: 900px) {
  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
    width: auto;
    max-width: min(240px, 72vw);
  }
  .hero-actions .glass-btn,
  .hero-actions .btn {
    width: auto;
    max-width: 100%;
    justify-content: flex-start;
  }
  .glass-btn--sm,
  .btn.btn--sm {
    height: 40px;
    min-height: 40px;
  }
  .glass-btn--crystal,
  .glass-btn--glass,
  .glass-btn--glass-ink,
  .btn.btn--ghost:not(.btn--soft) {
    backdrop-filter: blur(10px) saturate(140%);
    -webkit-backdrop-filter: blur(10px) saturate(140%);
  }
}

@media (max-width: 480px) {
  .glass-btn,
  .btn.btn--solid:not(.btn--soft),
  .btn.btn--ghost:not(.btn--soft) {
    height: 44px;
    min-height: 44px;
    gap: 10px;
    font-size: 0.82rem;
  }
  .glass-btn--light,
  .glass-btn--crystal,
  .btn.btn--solid:not(.btn--soft),
  .btn.btn--ghost:not(.btn--soft) {
    padding: 5px 5px 5px 16px;
  }
  .glass-btn__chip,
  .btn.btn--solid:not(.btn--soft)::after,
  .btn.btn--ghost:not(.btn--soft)::after {
    width: 30px;
    height: 30px;
  }
}

/* Loja: Filtrar só no mobile (Cristal carrega depois do byolishop.css) */
@media (min-width: 1024px) {
  .toolbar__filter-mobile,
  .toolbar .filter-toggle.glass-btn {
    display: none !important;
  }
}
