/* Aerostar — tienda: tarjetas, carrito lateral, avisos y controles de WooCommerce. */

/* ---------- Tarjeta ---------- */
.aero-card { position: relative; }
.aero-card__media { position: relative; }
.aero-card__img--alt {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity .35s ease, transform .5s ease !important;
}
@media (hover: hover) {
  .aero-card__link:hover .aero-card__img--alt { opacity: 1; }
}
.aero-card__badge {
  position: absolute; top: 12px; left: 12px;
  padding: 4px 8px;
  background: #000; color: #fff;
  font-family: var(--font-body); font-size: 12px; font-weight: 700; letter-spacing: .02em;
}
.aero-card__price del { color: #6b6b72; font-weight: 500; margin-right: 6px; }
.aero-card__meta { margin-top: 6px; font-size: 13px; color: var(--aero-mute); }
.aero-card__add {
  position: absolute; right: 10px; top: 10px;
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 12px 0 10px;
  background: #fff; color: #000;
  border: 1px solid #000; border-radius: 999px;
  font-family: var(--font-display); font-size: 13px; font-weight: 600;
  opacity: 0; transform: translateY(-4px);
  transition: opacity .2s, transform .2s, background .15s, color .15s;
}
.aero-card__add svg { width: 14px; height: 14px; }
.aero-card:hover .aero-card__add, .aero-card__add:focus-visible { opacity: 1; transform: none; }
.aero-card__add:hover { background: #000; color: #fff; }
@media (hover: none) {
  .aero-card__add { opacity: 1; transform: none; padding: 0; width: 36px; justify-content: center; }
  .aero-card__add span { display: none; }
}

/* ---------- Carrito lateral ---------- */
.aero-cart { position: fixed; inset: 0; z-index: 95; display: flex; justify-content: flex-end; }
.aero-cart[hidden] { display: none; }
.aero-cart__backdrop { position: absolute; inset: 0; background: rgb(0 0 0 / .55); animation: aero-fade .25s; }
.aero-cart__panel {
  position: relative;
  width: min(450px, 100vw);
  height: 100%;
  display: flex; flex-direction: column;
  background: #fff;
  animation: aero-slide .32s var(--ease-out);
  outline: 0;
}
@keyframes aero-slide { from { transform: translateX(100%); } }
.aero-cart__head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--aero-hair);
}
.aero-cart__title { font-family: var(--font-display); font-size: 20px; font-weight: 600; letter-spacing: .02em; }
.aero-cart__title span { color: var(--aero-mute); font-weight: 500; }

.aero-cart__shipping { padding: 14px 20px 16px; background: var(--aero-soft); text-align: center; }
.aero-cart__shipping p { font-size: 14px; margin-bottom: 10px; }
.aero-cart__shipping strong { font-weight: 700; }
.aero-cart__bar { position: relative; height: 6px; background: #d9d9dc; border-radius: 3px; overflow: hidden; }
.aero-cart__bar span { position: absolute; inset: 0 auto 0 0; width: 0; background: #000; border-radius: 3px; transition: width .5s var(--ease-out); }
.aero-cart__shipping.is-done .aero-cart__bar span { background: var(--aero-ok); }

.aero-cart__body { flex: 1; overflow-y: auto; padding: 8px 20px 20px; overscroll-behavior: contain; }
.aero-cart__loading { padding-top: 14px; }
.aero-cart__items { display: grid; }
.aero-cart-item {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--aero-hair);
  transition: opacity .2s;
}
.aero-cart-item.is-busy { opacity: .5; pointer-events: none; }
.aero-cart-item__img { width: 96px; height: 96px; background: var(--aero-soft); }
.aero-cart-item__img img { width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; }
.aero-cart-item__name { font-family: var(--font-body); font-size: 15px; font-weight: 600; line-height: 1.3; }
.aero-cart-item__name a:hover { text-decoration: underline; }
.aero-cart-item__var { margin-top: 3px; font-size: 13px; color: var(--aero-mute); }
.aero-cart-item__unit { margin-top: 4px; font-size: 13px; color: #444; }
.aero-cart-item__unit del { color: var(--aero-mute); margin-right: 4px; }
.aero-cart-item__row { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; gap: 10px; }
.aero-cart-item__total { font-family: var(--font-body); font-weight: 700; font-size: 15px; white-space: nowrap; }
.aero-cart-item__remove { align-self: start; color: #8d8d93; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; }
.aero-cart-item__remove:hover { color: #000; background: var(--aero-soft); }
.aero-cart-item__remove svg { width: 18px; height: 18px; }
.aero-cart-item__warn { grid-column: 2 / -1; font-size: 13px; color: var(--aero-error); }

.aero-qty { display: inline-flex; align-items: center; border: 1px solid #cfcfd3; border-radius: 999px; }
.aero-qty button { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; }
.aero-qty button:hover { background: var(--aero-soft); }
.aero-qty button[disabled] { opacity: .3; }
.aero-qty svg { width: 14px; height: 14px; }
.aero-qty output, .aero-qty input { min-width: 28px; text-align: center; font-weight: 600; font-size: 14px; border: 0; background: none; }

.aero-cart__empty { text-align: center; padding: 48px 12px 24px; }
.aero-cart__empty-title { font-family: var(--font-display); font-size: 22px; font-weight: 600; margin-bottom: 8px; }
.aero-cart__empty p { color: #555; margin-bottom: 22px; }

.aero-cart__foot { border-top: 1px solid var(--aero-hair); padding: 12px 20px 18px; box-shadow: 0 -10px 24px rgb(0 0 0 / .05); }
.aero-cart__coupon summary {
  display: flex; align-items: center; gap: 8px;
  cursor: pointer; list-style: none;
  font-size: 14px; padding: 6px 0 10px;
}
.aero-cart__coupon summary::-webkit-details-marker { display: none; }
.aero-cart__coupon summary svg { width: 18px; height: 18px; }
.aero-cart__coupon-form { display: flex; gap: 8px; margin-bottom: 6px; }
.aero-cart__coupon-form input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid #cfcfd3; font-size: 15px; text-transform: uppercase; }
.aero-cart__coupon-form button { padding: 0 16px; background: #000; color: #fff; font-weight: 600; font-size: 14px; }
.aero-cart__coupon-msg { font-size: 13px; min-height: 0; }
.aero-cart__coupon-msg.is-error { color: var(--aero-error); }
.aero-cart__applied { display: flex; flex-wrap: wrap; gap: 6px; }
.aero-cart__applied li { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; background: var(--aero-soft); border-radius: 999px; font-size: 13px; font-weight: 600; }
.aero-cart__applied button { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; }
.aero-cart__applied button:hover { background: #ddd; }
.aero-cart__applied svg { width: 12px; height: 12px; }
.aero-cart__totals { display: grid; gap: 6px; padding: 10px 0; }
.aero-cart__totals div { display: flex; justify-content: space-between; font-size: 15px; }
.aero-cart__totals dt { font-weight: 600; }
.aero-cart__totals .is-discount dd { color: var(--aero-ok); }
.aero-cart__totals .is-total { padding-top: 8px; margin-top: 4px; border-top: 1px dashed #c9c9cc; font-size: 18px; font-weight: 700; }
.aero-cart__note { font-size: 12.5px; text-align: center; color: #555; margin-bottom: 12px; }
.aero-cart__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.aero-cart__actions .aero-btn { padding: 12px 10px; font-size: 14px; }
.aero-cart__checkout { width: 100%; justify-content: space-between; padding: 15px 20px; font-size: 16px; font-weight: 600; }

/* Recomendaciones (izquierda en escritorio) */
.aero-cart__suggest {
  position: relative;
  width: 350px; height: 100%;
  overflow-y: auto;
  background: #f4f4f5;
  padding: 22px 16px;
  animation: aero-slide .38s var(--ease-out);
}
.aero-cart__suggest-title { font-family: var(--font-display); font-size: 16px; font-weight: 600; margin-bottom: 14px; }
.aero-cart__suggest-list { display: grid; gap: 10px; }
.aero-sugg {
  display: grid; grid-template-columns: 76px 1fr; gap: 12px; align-items: center;
  padding: 10px; background: #fff; border-radius: 6px;
}
.aero-sugg img { width: 76px; height: 76px; object-fit: cover; background: var(--aero-soft); mix-blend-mode: multiply; }
.aero-sugg__name { font-size: 13.5px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.aero-sugg__row { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; gap: 8px; }
.aero-sugg__price { font-size: 13.5px; }
.aero-sugg__add { padding: 5px 10px; border: 1px solid #000; border-radius: 999px; font-size: 12px; font-weight: 700; }
.aero-sugg__add:hover { background: #000; color: #fff; }
.aero-cart__suggest-mobile { margin-top: 18px; }
.aero-cart__suggest-row { display: grid; grid-auto-flow: column; grid-auto-columns: 74%; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; }
.aero-cart__suggest-row > li { scroll-snap-align: start; }
.aero-cart__suggest-row .aero-sugg { background: var(--aero-soft); }

@media (max-width: 900px) {
  .aero-cart__suggest { display: none; }
}

/* ---------- Avisos de WooCommerce ---------- */
.woocommerce-notices-wrapper:empty { display: none; }
.woocommerce-message, .woocommerce-info, .woocommerce-error {
  list-style: none;
  margin: 16px 0; padding: 14px 18px;
  border-left: 4px solid #000;
  background: var(--aero-soft);
  font-size: 15px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
}
.woocommerce-error { border-color: var(--aero-error); background: #fdf1f0; display: block; }
.woocommerce-error li + li { margin-top: 4px; }
.woocommerce-message { border-color: var(--aero-ok); }
.woocommerce-message .button, .woocommerce-info .button { order: 2; text-decoration: underline; font-weight: 600; }

/* Controles WooCommerce que aparecen en varias vistas */
.quantity { display: inline-flex; }
.quantity .qty {
  width: 64px; height: 48px;
  border: 1px solid #cfcfd3;
  text-align: center; font-size: 16px; font-weight: 600;
  -moz-appearance: textfield;
}
.quantity .qty::-webkit-outer-spin-button, .quantity .qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.button, button.button, a.button, input.button, .single_add_to_cart_button {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 22px;
  background: #000; color: #fff;
  border: 1px solid #000;
  font-family: var(--font-display); font-size: 15px; font-weight: 600;
  cursor: pointer;
}
.button:hover { background: #2d2d35; }
.button.disabled, .button:disabled, .single_add_to_cart_button.disabled { opacity: .45; cursor: not-allowed; }
.price del { color: var(--aero-mute); }
.price ins { text-decoration: none; }
.screen-reader-text:focus { clip: auto; }

/* Hover con segunda foto: la principal se desvanece para que no se mezclen (ambas usan multiply). */
.aero-card__media > .aero-card__img:not(.aero-card__img--alt) { transition: opacity .35s ease, transform .5s ease; }
@media (hover: hover) {
  .aero-card__link:hover .aero-card__media:has(.aero-card__img--alt) > .aero-card__img:not(.aero-card__img--alt) { opacity: 0; }
}

/* Regalos y oferta especial (promos.js) */
.aero-cart-item__promo { margin-top: 3px; font-size: 12px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: #7b3fa0; }
.aero-gifts { margin: 14px 0 4px; display: grid; gap: 12px; }
.aero-gifts__tier { border: 1px solid var(--aero-line); border-radius: 10px; padding: 14px; background: var(--aero-white); }
.aero-gifts__tier.is-locked { background: var(--aero-soft); border-style: dashed; font-size: 14px; }
.aero-gifts__tier.is-locked p { margin: 0; }
.aero-gifts__title { margin: 0 0 2px; font-family: Raleway, sans-serif; font-weight: 700; font-size: 16px; color: var(--aero-ink); }
.aero-gifts__text { margin: 0 0 10px; font-size: 13px; color: var(--aero-muted); }
.aero-gifts__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.aero-gift { display: flex; flex-direction: column; gap: 4px; padding: 8px; border: 1px solid transparent; border-radius: 8px; background: var(--aero-soft); font-family: Manrope, sans-serif; }
.aero-gift.is-chosen { border-color: #7b3fa0; background: #f6effa; }
.aero-gift img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 6px; background: var(--aero-white); }
.aero-gift__name { margin: 0; font-size: 12px; line-height: 1.3; color: var(--aero-text); }
.aero-gift__price { margin: 0; font-size: 12px; }
.aero-gift__price del { color: var(--aero-muted); }
.aero-gift__price strong { color: #7b3fa0; }
.aero-gift__var { width: 100%; font-size: 12px; }
.aero-gift__btn { margin-top: auto; padding: 7px 8px; border: 0; border-radius: 6px; background: var(--aero-btn); color: var(--aero-white); font: 600 12px Raleway, sans-serif; cursor: pointer; }
.aero-gift__btn.is-chosen { background: #7b3fa0; }
.aero-gift__btn:disabled { opacity: .45; cursor: not-allowed; }
.aero-gift__btn.is-loading { opacity: .6; pointer-events: none; }
.aero-gifts--checkout { margin: 0 0 18px; }
.aero-gifts--checkout .aero-gifts__list { grid-template-columns: repeat(auto-fill, minmax(110px, 150px)); }

/* Panel izquierdo del carrito con los regalos (escritorio, promos.js) */
.aero-cart.is-gift-aside #aero-cart-suggest-title,
.aero-cart.is-gift-aside [data-cart-suggest] { display: none; }
.aero-cart__gift-tier + .aero-cart__gift-tier { margin-top: 22px; }
.aero-cart__gift-text { margin: -8px 0 12px; font-size: 13px; color: var(--aero-muted); }
.aero-sugg--gift { border: 1px solid transparent; }
.aero-sugg--gift.is-chosen { border-color: #7b3fa0; background: #f6effa; }
.aero-sugg--gift .aero-sugg__price del { color: var(--aero-muted); font-size: 12px; }
.aero-sugg--gift .aero-sugg__price strong { color: #7b3fa0; }
.aero-sugg--gift .aero-sugg__add.is-chosen { background: #7b3fa0; border-color: #7b3fa0; color: #fff; }
.aero-sugg--gift .aero-sugg__add:disabled { opacity: .4; cursor: not-allowed; }
.aero-sugg--gift .aero-gift__var { width: 100%; margin-top: 4px; font-size: 12px; }
