/* Kunari · carrito (componente a medida, fuera de Elementor) */
body button.k-cart-btn, body button.k-icon-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 0; padding: 0; background: transparent;
  color: var(--e-global-color-text, #2D2D5E); display: grid; place-items: center; position: relative;
  cursor: pointer; transition: background .2s;
}
body button.k-cart-btn:hover, body button.k-icon-btn:hover, body button.k-cart-btn:focus, body button.k-icon-btn:focus { background: rgba(182,170,249,.3); color: var(--e-global-color-text, #2D2D5E); }
.k-cart-btn svg, .k-icon-btn svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.k-cart-count {
  position: absolute; top: 2px; right: 0; min-width: 20px; height: 20px; padding: 0 5px;
  background: var(--e-global-color-accent, #D51F4F); color: #fff; border-radius: 999px;
  font-size: .72rem; font-weight: 700; line-height: 20px; text-align: center;
}
.k-cart-count.is-bump { animation: k-bump .4s; }
@keyframes k-bump { 50% { transform: scale(1.4); } }

.k-overlay { position: fixed; inset: 0; background: rgba(45,45,94,.45); backdrop-filter: blur(3px); z-index: 9990; }
.k-drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: min(420px, 100%); z-index: 9999;
  background: var(--e-global-color-cream, #FFF8F1); color: var(--e-global-color-text, #2D2D5E);
  display: flex; flex-direction: column; transform: translateX(100%); visibility: hidden;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), visibility .35s;
}
.k-drawer.is-open { transform: none; visibility: visible; box-shadow: -20px 0 50px -20px rgba(0,0,0,.3); }
.k-drawer__head { display: flex; justify-content: space-between; align-items: center; padding: 1.3rem 1.5rem; border-bottom: 1px solid rgba(45,45,94,.1); }
body .k-drawer__head h2 { margin: 0; letter-spacing: 0; color: inherit; font-family: inherit; font-size: 1.4rem; font-weight: 800; line-height: 1.2; }
.k-drawer__body { flex: 1; overflow-y: auto; padding: 1rem 1.5rem; }
.k-drawer__empty { text-align: center; color: var(--e-global-color-muted, #6B6890); padding: 3rem 1rem; }
.k-drawer__empty img { width: 140px; margin: 0 auto 1rem; display: block; }
.k-line { display: grid; grid-template-columns: 72px 1fr auto; gap: .9rem; align-items: center; padding: .9rem 0; border-bottom: 1px solid rgba(45,45,94,.08); }
.k-line img { width: 72px; height: 72px; border-radius: 14px; object-fit: cover; }
.k-line__name { display: block; color: inherit; text-decoration: none; font-weight: 700; font-size: .95rem; line-height: 1.2; }
.k-line__name:hover { text-decoration: underline; }
.k-line__price { color: var(--e-global-color-accent, #D51F4F); font-weight: 700; font-size: .9rem; margin-top: .2rem; }
.k-qty { display: inline-flex; align-items: center; gap: .2rem; background: #fff; border-radius: 999px; border: 1px solid rgba(45,45,94,.12); margin-top: .4rem; }
body .k-qty button { width: 28px; height: 28px; padding: 0; border: 0; background: none; border-radius: 50%; font-weight: 700; color: var(--e-global-color-text, #2D2D5E); cursor: pointer; }
body .k-qty button:hover, body .k-qty button:focus { background: var(--e-global-color-lilac, #D2B3F2); color: var(--e-global-color-text, #2D2D5E); }
.k-qty span { min-width: 20px; text-align: center; font-weight: 600; font-size: .9rem; }
body button.k-line__remove { border: 0; padding: 0; background: none; color: var(--e-global-color-muted, #6B6890); font-size: .8rem; text-decoration: underline; cursor: pointer; }
body button.k-line__remove:hover, body button.k-line__remove:focus { background: none; color: var(--e-global-color-accent, #D51F4F); }
.k-drawer__foot { padding: 1.3rem 1.5rem 1.6rem; border-top: 1px solid rgba(45,45,94,.1); background: #fff; }
.k-drawer__total { display: flex; justify-content: space-between; font-size: 1.15rem; margin-bottom: .4rem; }
.k-drawer__total b { color: var(--e-global-color-accent, #D51F4F); font-size: 1.35rem; }
.k-drawer__note { color: var(--e-global-color-muted, #6B6890); font-size: .85rem; margin: 0 0 1rem; }
body button.k-btn-pink {
  width: 100%; border: 0; border-radius: 999px; padding: .95rem 1.7rem; cursor: pointer;
  background: var(--e-global-color-accent, #D51F4F); color: #fff; font-weight: 700; font-size: 1rem;
  box-shadow: 0 10px 24px -10px var(--e-global-color-accent, #D51F4F); transition: background .2s;
}
body button.k-btn-pink:hover, body button.k-btn-pink:focus { background: var(--e-global-color-crimson_deep, #B0173F); color: #fff; }
body button.k-btn-pink:disabled { opacity: .5; cursor: not-allowed; }

.k-toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 200%); z-index: 10000;
  background: var(--e-global-color-text, #2D2D5E); color: #fff; padding: .85rem 1.4rem; border-radius: 999px; font-weight: 600;
  box-shadow: 0 18px 40px -18px rgba(45,45,94,.35); visibility: hidden; white-space: nowrap; max-width: calc(100% - 32px);
  transition: transform .35s cubic-bezier(.2,.8,.2,1), visibility .35s;
}
.k-toast.is-show { transform: translate(-50%, 0); visibility: visible; }

@media (prefers-reduced-motion: reduce) {
  .k-drawer, .k-toast, .k-cart-count { transition: none; animation: none; }
}

/* ---------- Ficha de producto: [kunari_qty] ---------- */
.k-buy__row { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.k-stepper-label { display: block; margin-bottom: .45rem; font-weight: 600; font-size: .95rem; color: var(--e-global-color-text, #2D2D5E); }
.k-stepper { display: inline-flex; align-items: center; border: 2px solid var(--e-global-color-field_border, #928DB9); border-radius: 999px; background: #FBFAFF; }
body .k-stepper button {
  width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--e-global-color-text, #2D2D5E);
  font-size: 1.4rem; font-weight: 700; line-height: 1; display: grid; place-items: center; cursor: pointer;
}
body .k-stepper button:hover:not(:disabled), body .k-stepper button:focus:not(:disabled) { background: var(--e-global-color-lilac, #D2B3F2); color: var(--e-global-color-text, #2D2D5E); }
body .k-stepper button:disabled { color: #A9A6C4; cursor: not-allowed; background: none; }
body .k-buy__row .k-stepper input[type="number"] {
  height: 44px; box-shadow: none; outline-offset: 2px; border-radius: 8px;
  width: 3.2rem; padding: 0; border: 0; background: none; text-align: center; color: var(--e-global-color-text, #2D2D5E);
  font: inherit; font-size: 1.15rem; font-weight: 700; -moz-appearance: textfield; appearance: textfield;
}
.k-stepper input::-webkit-outer-spin-button, .k-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.k-buy__total { margin: 0; text-align: right; font-size: .95rem; color: var(--e-global-color-muted, #6B6890); }
.k-buy__total b { display: block; font-size: 1.4rem; color: var(--e-global-color-text, #2D2D5E); }

/* ---------- Ficha de producto: [kunari_specs] ---------- */
.k-specs { margin: 0; background: #fff; border-radius: 24px; border: 1px solid rgba(45,45,94,.08); overflow: hidden; }
.k-specs div { display: grid; grid-template-columns: 9rem 1fr; gap: 1rem; padding: 1rem 1.3rem; }
.k-specs div + div { border-top: 1px solid rgba(45,45,94,.08); }
.k-specs dt { color: var(--e-global-color-muted, #6B6890); }
.k-specs dd { margin: 0; font-weight: 600; color: var(--e-global-color-text, #2D2D5E); }
@media (max-width: 767px) { .k-specs div { grid-template-columns: 7.5rem 1fr; padding: .9rem 1rem; } }

/* Con la barra de compra visible en móvil, el toast sube */
body.k-has-buybar .k-toast { bottom: 96px; }
