/* ============================================================
   JH Cart Page - Rediseno carrito completo (jokerhouse theme)
   ============================================================ */
.jh-cart-page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 24px 120px;
  font-family: 'Inter', system-ui, sans-serif;
}
.jh-cart-page__title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.jh-cart-page__title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -.02em;
  margin: 0;
}
.jh-cart-page__count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff8e7;
  color: #92400e;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
  border: 1px solid #f6c34f55;
}
.jh-cart-page__count::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #d4a040;
  border-radius: 999px;
}
.jh-cart-page__layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
  align-items: start;
}
.jh-cart-page__items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.jh-cart-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Cart item — nuevo layout: nombre arriba, foto+qty+precio+remove en linea */
.jh-cart-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  background: #fff;
  border-radius: 14px;
  border: 1px solid #eee;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.jh-cart-item:hover {
  border-color: #ddd;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.jh-cart-item__name {
  font-weight: 700;
  font-size: 16px;
  line-height: 1.3;
  color: #111;
  text-decoration: none;
  display: block;
}
.jh-cart-item__name:hover { color: #d4a040; }
.jh-cart-item__meta {
  font-size: 12px;
  color: #888;
  margin-top: -4px;
}
.jh-cart-item__row {
  display: grid;
  grid-template-columns: 90px auto 1fr auto;
  gap: 16px;
  align-items: center;
}
.jh-cart-item__img {
  width: 90px;
  height: 90px;
  border-radius: 10px;
  overflow: hidden;
  background: #f4f4f4;
  display: flex;
  align-items: center;
  justify-content: center;
}
.jh-cart-item__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.jh-cart-item__qty {
  display: inline-flex;
  align-items: center;
  background: #f4f4f4;
  border-radius: 999px;
  padding: 2px;
  gap: 2px;
}
.jh-cart-item__qty-btn {
  background: transparent;
  border: 0;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #111;
  text-decoration: none;
  transition: background .15s ease, opacity .15s ease;
}
.jh-cart-item__qty-btn:hover { background: #fff; color: #111; }
.jh-cart-item__qty-btn--disabled {
  opacity: .3;
  cursor: not-allowed;
  pointer-events: auto;
}
.jh-cart-item__qty-btn--disabled:hover { background: transparent; }
.jh-cart-item__qty-val {
  min-width: 28px;
  text-align: center;
  font-weight: 600;
  font-size: 14px;
}
.jh-cart-item__prices {
  margin-left: auto;
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.jh-cart-item__price {
  font-weight: 700;
  font-size: 16px;
  color: #111;
}
.jh-cart-item__unit { font-size: 11px; color: #999; }
.jh-cart-item__stock-low {
  font-size: 11px;
  color: #d97706;
  font-weight: 600;
}
.jh-cart-item__remove {
  background: transparent;
  border: 0;
  color: #999;
  padding: 6px;
  border-radius: 8px;
  text-decoration: none;
  transition: color .15s ease, background .15s ease;
  display: inline-flex;
}
.jh-cart-item__remove:hover {
  color: #dc2626;
  background: #fef2f2;
}

/* Summary sticky */
.jh-cart-page__summary {
  position: sticky;
  top: 90px;
}
.jh-cart-page__summary-inner {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #eee;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,.03);
}
.jh-summary__title {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 16px;
}
.jh-summary__lines {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eee;
}
.jh-summary__line {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: #444;
}
.jh-summary__line--muted { font-size: 13px; color: #888; }
.jh-summary__line--shipping .jh-summary__value { font-weight: 600; }
.jh-summary__line--discount .jh-summary__value { color: #16a34a; font-weight: 700; }
.jh-summary__total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 16px 0 18px;
}
.jh-summary__total-label { font-size: 14px; color: #666; }
.jh-summary__total-val {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -.02em;
}

/* Progress envio gratis */
.jh-shipping-progress {
  background: linear-gradient(90deg, #fff8e7, #fff);
  border: 1px solid #f6c34f33;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 16px;
}
.jh-shipping-progress--achieved {
  background: linear-gradient(90deg, #ecfdf5, #fff);
  border-color: #16a34a44;
}
.jh-shipping-progress__msg {
  font-size: 13px;
  color: #444;
  margin-bottom: 8px;
}
.jh-shipping-progress--achieved .jh-shipping-progress__msg { color: #15803d; }
.jh-shipping-progress__bar {
  height: 6px;
  background: #f4f4f4;
  border-radius: 999px;
  overflow: hidden;
}
.jh-shipping-progress__fill {
  height: 100%;
  background: linear-gradient(90deg, #f6c34f, #d4a040);
  border-radius: 999px;
  transition: width .4s ease;
}
.jh-shipping-progress--achieved .jh-shipping-progress__fill {
  background: linear-gradient(90deg, #22c55e, #16a34a);
}

/* CTA principal */
.jh-cta {
  width: 100%;
  background: #111;
  color: #fff;
  border: 0;
  padding: 16px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  transition: background .2s ease, transform .1s ease;
  margin-bottom: 14px;
  cursor: pointer;
  font-family: inherit;
}
.jh-cta:hover {
  background: #000;
  color: #fff;
  transform: translateY(-1px);
}
.jh-cta--disabled { background: #ddd; cursor: not-allowed; }

/* Express */
.jh-express { margin-bottom: 18px; }
.jh-express__sep {
  text-align: center;
  position: relative;
  margin: 14px 0 12px;
}
.jh-express__sep::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: #eee;
}
.jh-express__sep span {
  position: relative;
  background: #fff;
  padding: 0 10px;
  font-size: 11px;
  color: #999;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 600;
}
.jh-express__buttons { display: flex; flex-direction: column; gap: 8px; }

.jh-cart-actions { margin-bottom: 16px; }

/* Alert warning */
.jh-alert {
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 12px;
}
.jh-alert--warning {
  background: #fef3c7;
  border: 1px solid #fcd34d;
  color: #92400e;
}

/* Crosssell wrapper */
.jh-crosssell-wrapper {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #eee;
}

/* Mobile bottom bar */
.jh-cart-page__mobile-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid #eee;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  z-index: 50;
  box-shadow: 0 -4px 12px rgba(0,0,0,.06);
  gap: 12px;
  align-items: center;
}
.jh-cart-page__mobile-bar-info { display: flex; flex-direction: column; flex-shrink: 0; }
.jh-cart-page__mobile-bar-label { font-size: 11px; color: #888; }
.jh-cart-page__mobile-bar-total { font-size: 20px; font-weight: 800; }
.jh-cart-page__mobile-bar-cta {
  flex: 1;
  background: #111;
  color: #fff;
  padding: 14px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
}
.jh-cart-page__mobile-bar-cta:hover { color: #fff; }

.jh-cart-empty-msg {
  text-align: center;
  padding: 60px 20px;
  color: #888;
  font-size: 16px;
}

/* Mobile */
@media (max-width: 768px) {
  .jh-cart-page { padding: 16px 16px 120px; }
  .jh-cart-page__title { font-size: 22px; }
  .jh-cart-page__layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .jh-cart-page__summary {
    position: static;
    order: 2;
  }
  .jh-cart-page__items { order: 1; }
  .jh-cart-item {
    grid-template-columns: 80px 1fr;
    gap: 12px;
    padding: 12px;
  }
  .jh-cart-item__img { width: 80px; height: 80px; }
  .jh-cart-page__summary-inner .jh-cta { display: none; }
  .jh-cart-page__mobile-bar { display: flex; }
}

/* ===== Trust signals propios (en lugar del hook blockreassurance) ===== */
.jh-trust-list {
  list-style: none;
  margin: 16px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid #eee;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.jh-trust-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #555;
  font-weight: 500;
}
.jh-trust-list svg {
  color: #16a34a;
  flex-shrink: 0;
}

/* Ajustes spacing y prices en la fila */
.jh-cart-item__prices {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.jh-cart-item__stock-low { display: block; margin-top: 2px; }

@media (max-width: 768px) {
  .jh-cart-item__row {
    grid-template-columns: 70px auto 1fr auto;
    gap: 10px;
  }
  .jh-cart-item__img { width: 70px; height: 70px; }
}

/* ===== Alineación correcta de valores en summary ===== */
.jh-summary__line {
  align-items: baseline;
}
.jh-summary__label {
  flex: 1;
  min-width: 0;
}
.jh-summary__label-extra {
  color: #999;
  font-weight: 400;
  font-size: 12px;
  margin-left: 4px;
}
.jh-summary__value {
  white-space: nowrap;
  text-align: right;
  font-variant-numeric: tabular-nums;
  min-width: 70px;
}
.jh-summary__total {
  align-items: flex-end;
}
.jh-summary__total-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.jh-summary__total-label {
  font-size: 16px;
  font-weight: 700;
  color: #111;
}
.jh-summary__total-tax-note {
  font-size: 11px;
  color: #888;
  font-weight: 400;
}

/* ===== Voucher (cupón) — diseño moderno alineado con CTA ===== */
.jh-voucher {
  margin: 0 0 14px;
}
.jh-voucher__applied {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.jh-voucher__applied-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 8px;
  font-size: 13px;
  color: #15803d;
}
.jh-voucher__applied-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}
.jh-voucher__applied-value { font-weight: 700; }
.jh-voucher__remove {
  color: #15803d;
  padding: 2px;
  border-radius: 4px;
  display: inline-flex;
  text-decoration: none;
  transition: background .15s ease;
}
.jh-voucher__remove:hover { background: #d1fae5; }

.jh-voucher__details {
  border-radius: 10px;
}
.jh-voucher__toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  list-style: none;
  font-size: 13px;
  color: #666;
  font-weight: 500;
  padding: 10px 0;
  transition: color .15s ease;
}
.jh-voucher__toggle::-webkit-details-marker { display: none; }
.jh-voucher__toggle::after {
  content: '+';
  margin-left: auto;
  font-size: 18px;
  color: #999;
  transition: transform .2s ease;
  line-height: 1;
}
.jh-voucher__details[open] .jh-voucher__toggle::after {
  content: '−';
}
.jh-voucher__toggle:hover { color: #111; }
.jh-voucher__toggle svg { color: #d4a040; }

.jh-voucher__form-wrap {
  margin-top: 4px;
  padding-top: 10px;
}
.jh-voucher__form {
  display: flex;
  gap: 6px;
}
.jh-voucher__input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.jh-voucher__input:focus {
  outline: none;
  border-color: #111;
  box-shadow: 0 0 0 3px rgba(17,17,17,.06);
}
.jh-voucher__btn {
  padding: 0 16px;
  background: #111;
  color: #fff;
  border: 0;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .15s ease;
  font-family: inherit;
}
.jh-voucher__btn:hover { background: #000; }

.jh-voucher__error {
  display: none;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 8px 10px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}
.jh-voucher__error.is-visible { display: flex; }
/* JS de PS classic muestra el error con .show() (display:block inline).
   Lo permitimos si tiene contenido en la span de texto. */
.jh-voucher__error[style*="block"]:has(.js-error-text:not(:empty)) {
  display: flex !important;
}

.jh-voucher__available {
  margin-top: 12px;
  padding: 10px 12px;
  background: #fff8e7;
  border: 1px dashed #f6c34f;
  border-radius: 8px;
}
.jh-voucher__available-title {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  color: #92400e;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.jh-voucher__available-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 12px;
  color: #444;
}
.jh-voucher__code {
  font-family: 'Courier New', monospace;
  background: #fff;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 700;
}
