/* Minimal styling so it fits Elessi without breaking buttons/layout */
.whapido-pca-field-wrap {
  margin: 10px 0 14px 0;
  width: 100%;
}

.whapido-pca-label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}

.whapido-pca-textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-height: 44px;
}

/* Opciones alineadas (aunque el texto sea largo) */
.whapido-pca-cb-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px 16px;
  align-items: start;
}

.whapido-pca-rb-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Cada opción: checkbox/radio + texto + cantidad (y luego precio) */
.whapido-pca-cb-item,
.whapido-pca-rb-item {
  display: grid;
  /* col1: checkbox/radio | col2: texto | col3: qty | col4: precio */
  grid-template-columns: 18px 1fr auto auto;
  align-items: center;
  column-gap: 8px;
  row-gap: 4px;
  width: 100%;
}

.whapido-pca-cb-item input[type="checkbox"],
.whapido-pca-rb-item input[type="radio"] {
  margin: 0;
}

.whpc-option__price {
  opacity: .85;
  font-size: .95em;
  margin-left: 6px;
  white-space: nowrap;
  justify-self: end;
}

/* Mini badge per option (e.g. "Nuevo") */
.whpc-option__badge{
  display:inline-flex;
  align-items:center;
  margin-left:6px;
  padding:2px 8px;
  border-radius:9999px;
  background:#25D366; /* WhatsApp green */
  color:#fff;
  font-size:10px;
  line-height:1;
  white-space:nowrap;
}

.whpc-option__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 8px;
  min-width: 0;
}

.whpc-qty {
  width: 2.2em !important;
  /* ~2 dígitos */
  min-width: 2.2em !important;
  max-width: 2.2em !important;
  height: 26px !important;
  line-height: 24px !important;
  box-sizing: border-box !important;
  padding: 0 !important;
  border-radius: 0 !important;
  text-align: center !important;
  margin: 0 !important;
}

.whpc-qty-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0;
  margin-left: 0;
  border: 1px solid rgba(0, 0, 0, .18);
  border-radius: 10px;
  overflow: hidden;
}

.whpc-qty-btn {
  width: 26px;
  height: 26px;
  line-height: 24px;
  padding: 0;
  border: 0;
  border-radius: 0;
  cursor: pointer;
}

.whpc-qty-btn--minus {
  background: #ffecec;
  color: #b00020;
}

.whpc-qty-btn--plus {
  background: #eaffea;
  color: #0b6b0b;
}

.whpc-qty {
  border: 0;
  border-left: 1px solid rgba(0, 0, 0, .14);
  border-right: 1px solid rgba(0, 0, 0, .14);
}

.whpc-qty-btn:active {
  transform: scale(.98);
}

/* Quita flechas nativas en algunos browsers */
.whpc-qty::-webkit-outer-spin-button,
.whpc-qty::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.whpc-qty {
  -moz-appearance: textfield;
  appearance: textfield;
}


/* --- Whapido: bloques prolijos + alineación columnas (v0.3.4) --- */
.whpc-qty-counter {
  float: right;
  color: #888;
  font-size: 11px;
  font-weight: 400;
  margin-top: 0;
  margin-right: 0;
}

.whpc-qty-counter.whpc-limit-reached {
  color: #15803d;
}

.whpc-field {
  position: relative;
  border: 1px solid rgba(0, 0, 0, .10);
  border-radius: 12px;
  padding: 12px 12px;
  margin: 12px 0;
  background: rgba(255, 255, 255, .55);
}

.whpc-field .whpc-label,
.whpc-field .whapido-pca-label {
  margin-bottom: 10px;
}

/* Listado de opciones */
.whpc-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Cada opción como fila con columnas: izquierda (input + texto) / derecha (qty + precio) */
.whpc-option {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 8px;
  justify-content: space-between;
}

.whpc-option__left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
}

.whpc-option__right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  margin-left: auto;
  white-space: nowrap;
}

/* Label fila completa (para el render "simple" checkbox/radio): izquierda texto / derecha badge+precio */
.whpc-option__row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  width:100%;
  gap:8px;
}
.whpc-option__row .whpc-option__text{
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.whpc-option__label {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.whpc-option__price {
  min-width: 64px;
  text-align: right;
}


/* Input (radio/checkbox) */
.whpc-option>input.whpc-input {
  margin: 0;
  flex: 0 0 auto;
}

/* Texto: ocupa el espacio, siempre a la izquierda */
.whpc-option__label {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
  line-height: 1.25;
}

/* Cantidad se va a la derecha */
.whpc-option .whpc-qty-wrap {
  margin-left: auto;
  flex: 0 0 auto;
}

/* Precio a la derecha (si no hay qty, también empuja a la derecha) */
.whpc-option__price {
  margin-left: auto;
  flex: 0 0 auto;
  white-space: nowrap;
  text-align: right;
  opacity: .95;
}

/* Si hay qty antes del precio, no queremos que el precio empuje todo (ya lo empuja la qty) */
.whpc-option .whpc-qty-wrap+.whpc-option__price {
  margin-left: 8px;
}

/* Botones +/- bien pegados y notorios */
.whpc-qty-wrap {
  border-radius: 10px;
  overflow: hidden;
}

.whpc-qty-btn {
  border: 0;
}

.whpc-qty-btn--minus {
  background: rgba(255, 59, 48, .12);
  color: #b42318;
}

.whpc-qty-btn--plus {
  background: rgba(52, 199, 89, .14);
  color: #0b6b0b;
}

/* Un poquito más compacto en general */
.whpc-qty,
.whpc-qty-btn {
  height: 30px;
}

/* mobile: un poco menos padding para que respire */
@media (max-width: 480px) {
  .whpc-field {
    padding: 10px 10px;
    border-radius: 12px;
  }
}

/* Títulos de bloques (labels) alineados a la izquierda */
.whpc-field .whapido-pca-label,
.whpc-label {
  text-align: left !important;
  display: block;
  width: 100%;
}


.whpc-max-msg {
  font-size: 12px;
  margin: 6px 0 0;
  opacity: .85;
}

.whpc-option--disabled,
.whpc-option--admin-disabled {
  opacity: .5;
  pointer-events: none;
  cursor: not-allowed;
}

.woocommerce-error,
.woocommerce-message,
.woocommerce-info,
.woocommerce-notices-wrapper {
  position: relative !important;
  z-index: 999999999 !important;
}

/* Category Grouping Styles */
.whpc-cat-title {
  font-size: 1.05em;
  font-weight: 700;
  margin: 18px 0 10px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  padding-bottom: 6px;
  color: var(--whpc-title, inherit);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.whpc-cat-limit-info {
  font-size: 0.8em;
  font-weight: normal;
  margin-left: 10px;
  color: #888;
}

.whpc-cat-qty-counter {
  color: #888;
  font-size: 0.8em;
  font-weight: normal;
  margin-left: 10px;
  display: inline-block;
}

.whpc-cat-qty-counter.whpc-cat-limit-reached {
  color: #15803d;
  font-weight: 700;
}
/* Bulk Variations container (WHPBV) can hide the default form; ensure fields are visible */
#whpbv .whpc-fields{
  display:block !important;
  visibility:visible !important;
  opacity:1 !important;
  margin-top:12px;
}


/* v0.8.0 - Qty controls alignment (especially inside Bulk Variations / Elessi) */
.whpc-qty-wrap{display:inline-flex;align-items:center;gap:6px;}
.whpc-qty-btn{width:28px;height:28px;line-height:26px;padding:0;border-radius:6px;border:1px solid rgba(0,0,0,.12);background:#fff;}
.whpc-qty-btn:disabled{opacity:.4;cursor:not-allowed;}
.whpc-qty-input{width:44px;min-width:44px;max-width:44px;height:28px;padding:0 6px;text-align:center;border-radius:6px;border:1px solid rgba(0,0,0,.12);}
#whpbv .whpc-fields .whpc-option{align-items:flex-start;}
#whpbv .whpc-fields .whpc-option__label{gap:8px;}
#whpbv .whpc-fields .whpc-option__price{white-space:nowrap;margin-left:6px;}

/* Disabled options: visible but not selectable */
.whpc-option--disabled,
.whpc-option--admin-disabled{
  opacity:.45;
  filter:grayscale(1);
  cursor:not-allowed;
}
.whpc-option--disabled .whpc-option__left,
.whpc-option--disabled .whpc-option__right,
.whpc-option--admin-disabled .whpc-option__left,
.whpc-option--admin-disabled .whpc-option__right{
  cursor:not-allowed;
}
.whpc-option--disabled input,
.whpc-option--admin-disabled input{
  cursor:not-allowed;
}


/* v0.9.7.3 - robust 3-column extras layout for simple + variable products */
.whpc-field {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 6px 0;
  box-shadow: none;
}
.whpc-field + .whpc-field {
  border-top: 1px solid rgba(0,0,0,.06);
  margin-top: 8px;
  padding-top: 10px;
}
.whpc-options {
  gap: 0;
}
.whpc-option {
  display: grid !important;
  grid-template-columns: 24px minmax(0,1fr) auto;
  column-gap: 10px;
  align-items: center !important;
  width: 100%;
  padding: 8px 0;
}
.whpc-option + .whpc-option {
  border-top: 1px solid rgba(0,0,0,.06);
}
.whpc-option__control {
  grid-column: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}
.whpc-option__control input.whpc-input {
  margin: 0;
}
.whpc-option__info {
  grid-column: 2;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  margin: 0;
  cursor: pointer;
}
.whpc-option__name,
.whpc-option__text,
.whpc-option__label {
  display: block;
  width: 100%;
  min-width: 0;
  text-align: left !important;
  line-height: 1.15;
  white-space: normal;
  overflow: visible;
  text-overflow: initial;
  font-weight: 600;
}
.whpc-option__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  width: 100%;
  text-align: left;
  line-height: 1.1;
}
.whpc-option__meta .whpc-option__price,
.whpc-option__price {
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0;
  text-align: left !important;
  white-space: normal;
  opacity: .9;
  font-size: .95em;
  justify-self: auto;
}
.whpc-option__meta .whpc-option__badge {
  margin-left: 0;
}
.whpc-option__qty {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  margin: 0;
}
.whpc-option__qty--empty {
  display: none;
}
.whpc-option .whpc-qty-wrap {
  margin-left: 0;
}
/* Blindaje contra wrappers de producto variable / theme */
.single-product div.product .whpc-option,
.variations_form .whpc-option,
#whpbv .whpc-option {
  display: grid !important;
  grid-template-columns: 24px minmax(0,1fr) auto !important;
  align-items: center !important;
}
.single-product div.product .whpc-option__info,
.variations_form .whpc-option__info,
#whpbv .whpc-option__info {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
}
.single-product div.product .whpc-option__price,
.variations_form .whpc-option__price,
#whpbv .whpc-option__price {
  width: 100% !important;
  text-align: left !important;
  margin: 0 !important;
}
.single-product div.product .whpc-option__qty,
.variations_form .whpc-option__qty,
#whpbv .whpc-option__qty {
  justify-self: end !important;
}
@media (max-width: 480px) {
  .whpc-option {
    grid-template-columns: 22px minmax(0,1fr) auto;
    column-gap: 8px;
    padding: 7px 0;
  }
  .whpc-qty-btn,
  .whpc-qty-input {
    height: 30px;
  }
}


/* v0.9.7.4 - restore Suggestive-style qty stepper without breaking variable layout */
.whpc-option__qty,
.single-product div.product .whpc-option__qty,
.variations_form .whpc-option__qty,
#whpbv .whpc-option__qty {
  justify-self: end !important;
  align-self: center !important;
}

.whpc-option .whpc-qty-wrap,
.single-product div.product .whpc-option .whpc-qty-wrap,
.variations_form .whpc-option .whpc-qty-wrap,
#whpbv .whpc-option .whpc-qty-wrap {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 0 !important;
  min-width: 98px;
  height: 34px;
  padding: 0 6px;
  border: 1px solid #d6dbe1;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
  overflow: hidden;
  margin-left: 0 !important;
}

.whpc-option .whpc-qty-btn,
.single-product div.product .whpc-option .whpc-qty-btn,
.variations_form .whpc-option .whpc-qty-btn,
#whpbv .whpc-option .whpc-qty-btn {
  width: 24px;
  min-width: 24px;
  height: 24px;
  padding: 0;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #1f2937 !important;
  box-shadow: none !important;
  line-height: 24px;
  font-size: 19px;
  font-weight: 700;
}

.whpc-option .whpc-qty-btn--minus,
.whpc-option .whpc-qty-btn--plus {
  background: transparent !important;
  color: #1f2937 !important;
}

.whpc-option .whpc-qty-input,
.whpc-option .whpc-qty,
.single-product div.product .whpc-option .whpc-qty-input,
.single-product div.product .whpc-option .whpc-qty,
.variations_form .whpc-option .whpc-qty-input,
.variations_form .whpc-option .whpc-qty,
#whpbv .whpc-option .whpc-qty-input,
#whpbv .whpc-option .whpc-qty {
  width: 26px !important;
  min-width: 26px !important;
  max-width: 26px !important;
  height: 24px !important;
  padding: 0 !important;
  margin: 0 6px !important;
  border: 0 !important;
  border-left: 0 !important;
  border-right: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  text-align: center !important;
  line-height: 24px !important;
  font-size: 17px !important;
  font-weight: 700 !important;
  color: #1f2937 !important;
  appearance: textfield;
}

.whpc-option .whpc-qty-input:focus,
.whpc-option .whpc-qty:focus {
  outline: none;
  box-shadow: none !important;
}

@media (max-width: 480px) {
  .whpc-option .whpc-qty-wrap,
  .single-product div.product .whpc-option .whpc-qty-wrap,
  .variations_form .whpc-option .whpc-qty-wrap,
  #whpbv .whpc-option .whpc-qty-wrap {
    min-width: 94px;
    height: 32px;
    padding: 0 5px;
  }

  .whpc-option .whpc-qty-btn,
  .single-product div.product .whpc-option .whpc-qty-btn,
  .variations_form .whpc-option .whpc-qty-btn,
  #whpbv .whpc-option .whpc-qty-btn {
    width: 22px;
    min-width: 22px;
    height: 22px;
    line-height: 22px;
    font-size: 18px;
  }
}


.whpc-dozen-live-total{display:inline-flex;align-items:center;font-weight:700;white-space:nowrap;margin-right:12px;color:inherit;}
.whpc-dozen-hidden-price{display:none !important;}

.whpc-dozen-step-badge{display:none;margin:0 0 10px 0;padding:3px 15px;border-radius:999px;background:#25D366;color:#fff;font-size:13px;font-weight:500;line-height:1.35;width:-moz-fit-content;width:fit-content;max-width:100%;}
.whpc-dozen-step-success{display:none !important;margin:0;font-size:0;line-height:0;color:transparent;}
.whpc-atc-disabled{opacity:.55;pointer-events:none;}

.whpc-dozen-cart-qty{display:inline-flex;align-items:center;justify-content:center;min-width:28px;font-weight:700;}

.whpc-dozen-mini-cart-qty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: #16a34a;
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  line-height: 1;
  vertical-align: middle;
  margin-right: 6px;
}


.whpc-price-mask--dozen-table{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:4px;
  line-height:1.25;
}

.whpc-dozen-price-table__title{
  display:block;
  font-size:12px;
  font-weight:700;
  color:#2d3748;
  text-transform:none;
}

.whpc-dozen-price-table{
  display:flex;
  flex-direction:column;
  gap:2px;
}

.whpc-dozen-price-table__row{
  display:flex;
  align-items:baseline;
  gap:6px;
  flex-wrap:wrap;
}

.whpc-dozen-price-table__label{
  font-size:14px;
  font-weight:600;
  color:#111827;
}

.whpc-dozen-price-table__sep{
  font-size:13px;
  font-weight:500;
  color:#6b7280;
}

.whpc-dozen-price-table__value{
  font-size:15px;
  font-weight:700;
  color:#111827;
}

.single-product div.product .summary .whpc-price-mask--dozen-table,
.single-product .product .summary .whpc-price-mask--dozen-table{
  margin-bottom:8px;
}


/* v0.9.9.37 - sale by dozen hides native product qty controls */
body.whpc-sale-by-dozen-active form.cart.whpc-sale-by-dozen-active .quantity,
body.whpc-sale-by-dozen-active .nasa-single-btn-clone .quantity,
body.whpc-sale-by-dozen-active #whp-sticky-atc .whp-sticky-qty,
.whpc-sale-by-dozen-hidden-qty {
  display: none !important;
}

body.whpc-sale-by-dozen-active form.cart.whpc-sale-by-dozen-active input.qty,
body.whpc-sale-by-dozen-active form.cart.whpc-sale-by-dozen-active input[name="quantity"],
body.whpc-sale-by-dozen-active .nasa-single-btn-clone input.qty,
body.whpc-sale-by-dozen-active .nasa-single-btn-clone input[name="quantity"],
body.whpc-sale-by-dozen-active #whp-sticky-atc .whp-sticky-qty input {
  pointer-events: none !important;
}

.whpc-dozen-category-note {
  margin: 6px 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-size: 13px;
  line-height: 1.4;
}

.whpc-cat-limit-info--dozen {
  color: #475569;
}

.whpc-cat-qty-counter--dozen {
  color: #475569;
}

.whpc-cat-qty-counter.whpc-cat-limit-exceeded {
  color: #b91c1c;
  font-weight: 700;
}

.whpc-cat-dozen-error {
  display: none;
  margin: 8px 0 10px;
  color: #b91c1c;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 600;
}
