/**
 * Clara Tierra — Estilos de Conversión, Carrito Lateral (Astra Slide-in Cart),
 * Página /cart/ y Limpieza Visual de Impuestos en Checkout.
 *
 * Paleta corporativa de Astra (claratierra.es):
 * - Verde oliva principal: #7e8427 (--ast-global-color-0)
 * - Verde oliva hover:     #696f1f
 * - Terracota hover:       #c89374 (--ast-global-color-6)
 * - Tierra suave:          #f4e9e3 (--ast-global-color-4)
 * - Borde arena:           #e8e0d5
 * - Texto principal:       #2d2a26
 * - Texto secundario:      #6c675f
 * - Tipografías:           Lexend (títulos) / Hind (cuerpo)
 */

:root {
  --ct-olive: #7e8427;
  --ct-olive-dark: #696f1f;
  --ct-olive-soft: #eef0df;
  --ct-earth: #f4e9e3;
  --ct-earth-hover: #eadad0;
  --ct-terracotta: #c89374;
  --ct-border: #ebe4db;
  --ct-border-strong: #ddd4c8;
  --ct-ink: #2d2a26;
  --ct-muted: #6c675f;
  --ct-white: #ffffff;
  --ct-font-heading: 'Lexend', -apple-system, BlinkMacSystemFont, sans-serif;
  --ct-font-body: 'Hind', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* =========================================================================
   1. OCULTAR AVISOS DUPLICADOS DE WOOCOMMERCE AL USAR CAJÓN LATERAL
   ========================================================================= */

body:not(.woocommerce-cart):not(.woocommerce-checkout) a.added_to_cart.wc-forward,
.ct-wc-added-notice-hidden {
  display: none !important;
}

/* =========================================================================
   2. PANEL LATERAL DESLIZANTE DE ASTRA (#astra-mobile-cart-drawer)
   ========================================================================= */

.astra-mobile-cart-overlay {
  background: rgba(34, 31, 27, 0.45) !important;
  backdrop-filter: blur(2px);
  z-index: 99998 !important;
}

.ast-desktop #astra-mobile-cart-drawer.astra-cart-drawer,
#astra-mobile-cart-drawer.astra-cart-drawer {
  width: 420px !important;
  max-width: 100vw !important;
  background: var(--ct-white) !important;
  box-shadow: -8px 0 32px rgba(28, 25, 21, 0.16) !important;
  display: flex !important;
  flex-direction: column !important;
  height: 100vh !important;
  height: 100dvh !important;
  padding: 0 !important;
  overflow: hidden !important;
  z-index: 99999 !important;
  font-family: var(--ct-font-body) !important;
  color: var(--ct-ink) !important;
  box-sizing: border-box !important;
}

body.admin-bar #astra-mobile-cart-drawer.astra-cart-drawer {
  padding-top: 32px !important;
}

@media (max-width: 782px) {
  body.admin-bar #astra-mobile-cart-drawer.astra-cart-drawer {
    padding-top: 46px !important;
  }
}

#astra-mobile-cart-drawer *,
#astra-mobile-cart-drawer *::before,
#astra-mobile-cart-drawer *::after {
  box-sizing: border-box;
}

/* Cabecera del panel lateral: «Mi Carrito (N)» + botón cerrar */
#astra-mobile-cart-drawer .astra-cart-drawer-header {
  display: flex !important;
  flex-direction: row-reverse !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 18px 20px 15px !important;
  border-bottom: 1px solid var(--ct-border) !important;
  background: var(--ct-white) !important;
  flex-shrink: 0 !important;
  position: relative !important;
  min-height: 60px !important;
}

#astra-mobile-cart-drawer .astra-cart-drawer-title {
  font-family: var(--ct-font-heading) !important;
  font-size: 19px !important;
  font-weight: 500 !important;
  color: var(--ct-ink) !important;
  letter-spacing: -0.01em;
  line-height: 1.25 !important;
  margin: 0 !important;
  padding: 0 !important;
}

#astra-mobile-cart-drawer .astra-cart-drawer-close {
  position: static !important;
  margin: 0 !important;
  padding: 6px !important;
  width: 34px !important;
  height: 34px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: transparent !important;
  border: none !important;
  border-radius: 50% !important;
  color: var(--ct-ink) !important;
  cursor: pointer !important;
  transition: background-color 0.18s ease, color 0.18s ease;
}

#astra-mobile-cart-drawer .astra-cart-drawer-close:hover,
#astra-mobile-cart-drawer .astra-cart-drawer-close:focus-visible {
  background: var(--ct-earth) !important;
  color: var(--ct-olive) !important;
}

#astra-mobile-cart-drawer .astra-cart-drawer-close svg {
  width: 20px !important;
  height: 20px !important;
  fill: currentColor !important;
}

/* Contenedor de contenido completo */
#astra-mobile-cart-drawer .astra-cart-drawer-content {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
}

#astra-mobile-cart-drawer .widget_shopping_cart,
#astra-mobile-cart-drawer .widget_shopping_cart_content {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#astra-mobile-cart-drawer .ct-drawer-inner {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: opacity 0.16s ease;
}

#astra-mobile-cart-drawer.is-ct-loading .ct-drawer-inner {
  opacity: 0.65;
  pointer-events: none;
}

/* =========================================================================
   3. BARRA DINÁMICA DE ENVÍO GRATIS (PANEL LATERAL Y PÁGINA /cart/)
   ========================================================================= */

.ct-drawer-shipping-wrap {
  padding: 14px 20px 10px;
  flex-shrink: 0;
  background: var(--ct-white);
}

.ct-shipping-bar {
  background-color: var(--ct-olive);
  color: var(--ct-white);
  border-radius: 8px;
  padding: 12px 15px 13px;
  font-family: var(--ct-font-body);
}

.ct-shipping-bar.is-unlocked {
  background-color: #6b7622;
}

.ct-shipping-bar__text {
  font-size: 13.5px;
  line-height: 1.35;
  color: var(--ct-white);
  margin-bottom: 9px;
  font-weight: 400;
}

.ct-shipping-bar__text strong {
  color: var(--ct-white);
  font-weight: 600;
}

.ct-shipping-bar__check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  margin-right: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  font-size: 11px;
  font-weight: 700;
  vertical-align: -1px;
}

.ct-shipping-bar__zone {
  opacity: 0.9;
  font-size: 12.5px;
}

.ct-shipping-bar__meter {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ct-shipping-bar__track {
  flex: 1 1 auto;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  overflow: hidden;
  position: relative;
}

.ct-shipping-bar__fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: #e9e2ca;
  transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  min-width: 0;
}

.ct-shipping-bar.is-unlocked .ct-shipping-bar__fill {
  background: #ffffff;
}

.ct-shipping-bar__target {
  flex-shrink: 0;
  font-family: var(--ct-font-heading);
  font-size: 13px;
  font-weight: 500;
  color: var(--ct-white);
  letter-spacing: -0.01em;
}

/* =========================================================================
   4. ÁREA SCROLLABLE DEL PANEL: ITEMS + COMPLETA TU RUTINA
   ========================================================================= */

#astra-mobile-cart-drawer .ct-drawer-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 4px 20px 14px;
  -webkit-overflow-scrolling: touch;
}

#astra-mobile-cart-drawer .ct-drawer-scroll::-webkit-scrollbar {
  width: 5px;
}

#astra-mobile-cart-drawer .ct-drawer-scroll::-webkit-scrollbar-thumb {
  background: #ddd4c8;
  border-radius: 999px;
}

/* Lista de productos del carrito (3 columnas limpias: miniatura | info + qty | precio) */
#astra-mobile-cart-drawer ul.ct-drawer-items,
.woocommerce #astra-mobile-cart-drawer ul.woocommerce-mini-cart.ct-drawer-items,
.woocommerce-js #astra-mobile-cart-drawer .astra-cart-drawer-content ul.woocommerce-mini-cart.ct-drawer-items {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  flex: 0 0 auto !important;
}

/* Anular pseudo-elementos clearfix de WooCommerce que rompen el Grid */
#astra-mobile-cart-drawer ul.ct-drawer-items::before,
#astra-mobile-cart-drawer ul.ct-drawer-items::after,
#astra-mobile-cart-drawer ul.ct-drawer-items li.ct-drawer-item::before,
#astra-mobile-cart-drawer ul.ct-drawer-items li.ct-drawer-item::after,
.woocommerce #astra-mobile-cart-drawer ul.cart_list li.ct-drawer-item::before,
.woocommerce #astra-mobile-cart-drawer ul.cart_list li.ct-drawer-item::after {
  content: none !important;
  display: none !important;
}

#astra-mobile-cart-drawer ul.ct-drawer-items li.ct-drawer-item,
.woocommerce #astra-mobile-cart-drawer ul.cart_list li.ct-drawer-item,
.woocommerce-js #astra-mobile-cart-drawer .astra-cart-drawer-content .widget_shopping_cart_content ul.ct-drawer-items li.ct-drawer-item {
  display: grid !important;
  grid-template-columns: 48px minmax(0, 1fr) auto !important;
  grid-template-rows: auto auto !important;
  grid-template-areas:
    "thumb info price"
    "thumb qty price" !important;
  align-items: start !important;
  column-gap: 14px !important;
  row-gap: 8px !important;
  padding: 14px 0 !important;
  margin: 0 !important;
  min-height: 0 !important;
  border: none !important;
  border-bottom: 1px solid #f2ece4 !important;
  position: relative !important;
  text-align: left !important;
  list-style: none !important;
}

#astra-mobile-cart-drawer ul.ct-drawer-items li.ct-drawer-item:last-child,
.woocommerce-js #astra-mobile-cart-drawer .astra-cart-drawer-content .widget_shopping_cart_content ul.ct-drawer-items li.ct-drawer-item:last-child {
  border-bottom: none !important;
}

#astra-mobile-cart-drawer .ct-drawer-item__thumb-wrap {
  grid-area: thumb !important;
  position: relative !important;
  width: 48px !important;
  height: 48px !important;
  margin: 0 !important;
  padding: 0 !important;
  flex-shrink: 0 !important;
}

#astra-mobile-cart-drawer .ct-drawer-item__thumb {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 48px !important;
  height: 48px !important;
  margin: 0 !important;
  padding: 3px !important;
  line-height: 0 !important;
  border: 1px solid var(--ct-border) !important;
  border-radius: 6px !important;
  background: var(--ct-white) !important;
  overflow: hidden !important;
}

.woocommerce-js #astra-mobile-cart-drawer ul.cart_list li.ct-drawer-item img,
.woocommerce-js #astra-mobile-cart-drawer ul.product_list_widget li.ct-drawer-item img,
.woocommerce #astra-mobile-cart-drawer ul.cart_list li.ct-drawer-item img,
.woocommerce #astra-mobile-cart-drawer ul.product_list_widget li.ct-drawer-item img,
#astra-mobile-cart-drawer .ct-drawer-item__thumb img {
  position: static !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  transform: none !important;
  float: none !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  object-position: center center !important;
  margin: 0 !important;
  padding: 0 !important;
  display: block !important;
}

#astra-mobile-cart-drawer .ct-drawer-item__qty-badge {
  position: absolute !important;
  top: -6px !important;
  right: -6px !important;
  z-index: 2 !important;
  pointer-events: none !important;
  min-width: 19px !important;
  height: 19px !important;
  padding: 0 5px !important;
  border-radius: 999px !important;
  background: var(--ct-olive) !important;
  color: var(--ct-white) !important;
  font-family: var(--ct-font-heading) !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  line-height: 19px !important;
  text-align: center !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.14) !important;
}

#astra-mobile-cart-drawer .ct-drawer-item__info {
  grid-area: info !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
  text-align: left !important;
}

#astra-mobile-cart-drawer .ct-drawer-item__added-tag {
  display: block !important;
  font-family: var(--ct-font-heading) !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  color: var(--ct-olive) !important;
  line-height: 1.25 !important;
  margin: 0 0 1px !important;
  padding: 0 !important;
}

#astra-mobile-cart-drawer a.ct-drawer-item__name,
#astra-mobile-cart-drawer span.ct-drawer-item__name {
  font-family: var(--ct-font-body) !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  line-height: 1.35 !important;
  color: var(--ct-ink) !important;
  text-decoration: none !important;
  display: block !important;
  white-space: normal !important;
  overflow: visible !important;
  word-break: break-word !important;
  overflow-wrap: break-word !important;
  margin: 0 !important;
  padding: 0 !important;
}

#astra-mobile-cart-drawer a.ct-drawer-item__name:hover {
  color: var(--ct-olive) !important;
}

#astra-mobile-cart-drawer .ct-drawer-item__meta {
  font-size: 11.5px;
  color: var(--ct-muted);
  line-height: 1.3;
}

#astra-mobile-cart-drawer .ct-drawer-item__meta dl.variation {
  margin: 2px 0 0;
  padding: 0;
  border: none;
}

#astra-mobile-cart-drawer .ct-drawer-item__meta dt,
#astra-mobile-cart-drawer .ct-drawer-item__meta dd {
  display: inline;
  margin: 0 4px 0 0;
}

/* display: contents permite colocar el precio a la derecha y el selector -/+ debajo del nombre */
#astra-mobile-cart-drawer .ct-drawer-item__controls {
  display: contents !important;
}

#astra-mobile-cart-drawer .ct-drawer-item__price {
  grid-area: price !important;
  justify-self: end !important;
  align-self: start !important;
  text-align: right !important;
  font-family: var(--ct-font-heading) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  color: var(--ct-ink) !important;
  white-space: nowrap !important;
  line-height: 1.3 !important;
  padding-top: 1px !important;
  margin: 0 !important;
}

#astra-mobile-cart-drawer .ct-drawer-item__price .tax_label {
  display: none !important;
}

/* Control compacto de cantidad (- / +) alineado debajo del nombre en columna central */
#astra-mobile-cart-drawer .ct-qty-stepper {
  grid-area: qty !important;
  justify-self: start !important;
  align-self: start !important;
  display: inline-flex !important;
  align-items: center !important;
  border: 1px solid var(--ct-border-strong) !important;
  border-radius: 5px !important;
  background: var(--ct-white) !important;
  overflow: hidden !important;
  height: 28px !important;
  margin: 0 !important;
}

#astra-mobile-cart-drawer .ct-qty-btn {
  width: 26px !important;
  height: 26px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  background: transparent !important;
  color: var(--ct-ink) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: background-color 0.15s ease, color 0.15s ease;
}

#astra-mobile-cart-drawer .ct-qty-btn:hover:not(:disabled) {
  background: var(--ct-earth) !important;
  color: var(--ct-olive) !important;
}

#astra-mobile-cart-drawer .ct-qty-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed !important;
}

#astra-mobile-cart-drawer .ct-qty-value {
  min-width: 24px;
  text-align: center;
  font-family: var(--ct-font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--ct-ink);
  border-left: 1px solid #f0e9e0;
  border-right: 1px solid #f0e9e0;
  line-height: 26px;
}

/* Estado vacío del carrito */
#astra-mobile-cart-drawer .ct-drawer-empty {
  text-align: center;
  padding: 28px 10px 22px;
}

#astra-mobile-cart-drawer .ct-drawer-empty__title {
  font-family: var(--ct-font-heading);
  font-size: 16px;
  font-weight: 500;
  color: var(--ct-ink);
  margin: 0 0 6px;
}

#astra-mobile-cart-drawer .ct-drawer-empty__subtitle {
  font-size: 13.5px;
  color: var(--ct-muted);
  margin: 0 0 16px;
  line-height: 1.45;
}

#astra-mobile-cart-drawer a.ct-drawer-empty__cta {
  display: inline-block !important;
  background: var(--ct-olive) !important;
  color: var(--ct-white) !important;
  font-family: var(--ct-font-heading) !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  padding: 10px 22px !important;
  border-radius: 6px !important;
  text-decoration: none !important;
  transition: background-color 0.2s ease;
}

#astra-mobile-cart-drawer a.ct-drawer-empty__cta:hover {
  background: var(--ct-olive-dark) !important;
  color: var(--ct-white) !important;
}

/* =========================================================================
   5. BLOQUE «COMPLETA TU RUTINA» EN PANEL LATERAL
   ========================================================================= */

#astra-mobile-cart-drawer .ct-drawer-routine {
  margin-top: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--ct-border);
}

#astra-mobile-cart-drawer .ct-drawer-routine__heading {
  font-family: var(--ct-font-heading);
  font-size: 16px;
  font-weight: 500;
  color: var(--ct-ink);
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}

#astra-mobile-cart-drawer ul.ct-drawer-routine__list {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#astra-mobile-cart-drawer li.ct-drawer-routine__item {
  display: grid !important;
  grid-template-columns: 46px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 11px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
}

#astra-mobile-cart-drawer a.ct-drawer-routine__thumb {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--ct-border);
  border-radius: 6px;
  background: var(--ct-white);
  padding: 3px;
  overflow: hidden;
}

#astra-mobile-cart-drawer a.ct-drawer-routine__thumb img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  margin: 0 !important;
  float: none !important;
}

#astra-mobile-cart-drawer .ct-drawer-routine__info {
  min-width: 0;
}

#astra-mobile-cart-drawer a.ct-drawer-routine__name {
  font-family: var(--ct-font-body) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 1.28 !important;
  color: var(--ct-ink) !important;
  text-decoration: none !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 2px;
}

#astra-mobile-cart-drawer a.ct-drawer-routine__name:hover {
  color: var(--ct-olive) !important;
}

#astra-mobile-cart-drawer .ct-drawer-routine__meta {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  line-height: 1.25;
}

#astra-mobile-cart-drawer .ct-drawer-routine__price {
  font-family: var(--ct-font-heading);
  font-weight: 500;
  color: var(--ct-ink);
}

#astra-mobile-cart-drawer .ct-drawer-routine__stock {
  color: #4f772d;
  font-size: 12px;
  font-weight: 500;
}

#astra-mobile-cart-drawer button.ct-routine-add {
  border-radius: 5px !important;
  padding: 7px 12px !important;
  font-family: var(--ct-font-heading) !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  cursor: pointer !important;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
}

/* Todos los botones "+ Añadir" de Completa tu rutina en verde oliva corporativo con texto blanco */
#astra-mobile-cart-drawer button.ct-routine-add,
#astra-mobile-cart-drawer button.ct-routine-add--soft,
#astra-mobile-cart-drawer button.ct-routine-add--primary {
  background: var(--ct-olive) !important;
  color: var(--ct-white) !important;
  border: 1px solid var(--ct-olive) !important;
}

#astra-mobile-cart-drawer button.ct-routine-add:hover,
#astra-mobile-cart-drawer button.ct-routine-add--soft:hover,
#astra-mobile-cart-drawer button.ct-routine-add--primary:hover {
  background: var(--ct-olive-dark) !important;
  border-color: var(--ct-olive-dark) !important;
  color: var(--ct-white) !important;
}

#astra-mobile-cart-drawer button.ct-routine-add.is-loading {
  opacity: 0.7;
  pointer-events: none;
}

/* =========================================================================
   6. PIE FIJO DEL PANEL: SUBTOTAL, CUPÓN, FINALIZAR COMPRA Y SEGUIR COMPRANDO
   ========================================================================= */

#astra-mobile-cart-drawer .ct-drawer-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--ct-border);
  background: var(--ct-white);
  padding: 13px 20px 15px;
  box-shadow: 0 -4px 16px rgba(34, 31, 27, 0.04);
}

#astra-mobile-cart-drawer .ct-drawer-notice {
  display: none;
  font-size: 12.5px;
  line-height: 1.35;
  padding: 8px 11px;
  border-radius: 6px;
  margin-bottom: 10px;
}

#astra-mobile-cart-drawer .ct-drawer-notice.is-visible {
  display: block;
}

#astra-mobile-cart-drawer .ct-drawer-notice.is-success {
  background: var(--ct-olive-soft);
  color: #464c16;
  border: 1px solid #d7dcb5;
}

#astra-mobile-cart-drawer .ct-drawer-notice.is-error {
  background: #fdf2f0;
  color: #8f2d1f;
  border: 1px solid #f0cbc4;
}

#astra-mobile-cart-drawer .ct-drawer-coupons-applied {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

#astra-mobile-cart-drawer .ct-coupon-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--ct-olive-soft);
  color: #464c16;
  border: 1px solid #d7dcb5;
  border-radius: 999px;
  padding: 3px 9px 3px 10px;
  font-size: 12px;
  line-height: 1.3;
}

#astra-mobile-cart-drawer .ct-coupon-pill__remove {
  background: transparent !important;
  border: none !important;
  color: #464c16 !important;
  font-size: 15px !important;
  line-height: 1 !important;
  padding: 0 2px !important;
  cursor: pointer !important;
}

#astra-mobile-cart-drawer .ct-coupon-pill__remove:hover {
  color: #8f2d1f !important;
}

#astra-mobile-cart-drawer .ct-drawer-subtotal-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}

#astra-mobile-cart-drawer .ct-drawer-subtotal-label {
  font-family: var(--ct-font-heading);
  font-size: 15.5px;
  font-weight: 500;
  color: var(--ct-ink);
}

#astra-mobile-cart-drawer .ct-drawer-subtotal-value {
  font-family: var(--ct-font-heading);
  font-size: 17px;
  font-weight: 600;
  color: var(--ct-ink);
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
}

#astra-mobile-cart-drawer .ct-drawer-subtotal-old {
  font-size: 13px;
  font-weight: 400;
  color: var(--ct-muted);
}

/* Campo compacto de cupón */
#astra-mobile-cart-drawer .ct-drawer-coupon-form {
  display: flex;
  gap: 8px;
  margin: 0 0 11px;
}

#astra-mobile-cart-drawer input.ct-drawer-coupon-input {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  height: 38px !important;
  padding: 0 12px !important;
  border: 1px solid var(--ct-border-strong) !important;
  border-radius: 5px !important;
  background: var(--ct-white) !important;
  font-family: var(--ct-font-body) !important;
  font-size: 13.5px !important;
  color: var(--ct-ink) !important;
  margin: 0 !important;
  outline: none !important;
}

#astra-mobile-cart-drawer input.ct-drawer-coupon-input:focus {
  border-color: var(--ct-olive) !important;
}

#astra-mobile-cart-drawer button.ct-drawer-coupon-submit {
  flex-shrink: 0 !important;
  height: 38px !important;
  padding: 0 16px !important;
  border-radius: 5px !important;
  background: var(--ct-earth) !important;
  color: var(--ct-ink) !important;
  border: 1px solid #e7d8ce !important;
  font-family: var(--ct-font-heading) !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

#astra-mobile-cart-drawer button.ct-drawer-coupon-submit:hover {
  background: var(--ct-olive) !important;
  border-color: var(--ct-olive) !important;
  color: var(--ct-white) !important;
}

/* Botón principal Finalizar Compra */
#astra-mobile-cart-drawer a.ct-drawer-checkout-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 44px !important;
  border-radius: 6px !important;
  background: var(--ct-olive) !important;
  color: var(--ct-white) !important;
  font-family: var(--ct-font-heading) !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  text-decoration: none !important;
  letter-spacing: 0.01em;
  transition: background-color 0.2s ease, transform 0.12s ease;
}

#astra-mobile-cart-drawer a.ct-drawer-checkout-btn:hover {
  background: var(--ct-olive-dark) !important;
  color: var(--ct-white) !important;
}

/* Enlace inferior «← Seguir comprando» */
#astra-mobile-cart-drawer .ct-drawer-continue-wrap {
  text-align: center;
  margin-top: 10px;
}

a.ct-continue-shopping {
  display: inline-flex !important;
  align-items: center;
  gap: 5px;
  font-family: var(--ct-font-body) !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  color: var(--ct-muted) !important;
  text-decoration: none !important;
  transition: color 0.18s ease;
}

a.ct-continue-shopping:hover {
  color: var(--ct-olive) !important;
  text-decoration: underline !important;
}

@media (max-width: 544px) {
  .ast-desktop #astra-mobile-cart-drawer.astra-cart-drawer,
  #astra-mobile-cart-drawer.astra-cart-drawer {
    width: 100vw !important;
  }
  #astra-mobile-cart-drawer .astra-cart-drawer-header,
  .ct-drawer-shipping-wrap,
  #astra-mobile-cart-drawer .ct-drawer-scroll,
  #astra-mobile-cart-drawer .ct-drawer-footer {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  #astra-mobile-cart-drawer ul.ct-drawer-items li.ct-drawer-item,
  .woocommerce #astra-mobile-cart-drawer ul.cart_list li.ct-drawer-item,
  .woocommerce-js #astra-mobile-cart-drawer .astra-cart-drawer-content .widget_shopping_cart_content ul.ct-drawer-items li.ct-drawer-item {
    column-gap: 12px !important;
  }
}

/* =========================================================================
   7. MEJORAS EN LA PÁGINA COMPLETA DEL CARRITO (/cart/)
   ========================================================================= */

.ct-cart-top-bar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}

.ct-cart-top-bar .ct-continue-shopping--cart {
  align-self: flex-start;
  padding: 6px 12px;
  border-radius: 5px;
  border: 1px solid var(--ct-border);
  background: #faf7f3;
  color: var(--ct-ink) !important;
  font-size: 13.5px !important;
}

.ct-cart-top-bar .ct-continue-shopping--cart:hover {
  border-color: var(--ct-olive);
  background: var(--ct-earth);
  color: var(--ct-olive) !important;
  text-decoration: none !important;
}

.ct-shipping-bar--cart {
  max-width: 100%;
  padding: 14px 20px 15px;
}

.ct-cart-totals-continue {
  text-align: center;
  margin-top: 12px;
}

/* Productos sugeridos (cross-sells) en /cart/: precio + botón añadir directo */
.woocommerce-cart .cross-sells ul.products li.product {
  display: flex !important;
  flex-direction: column !important;
  background: var(--ct-white);
  border: 1px solid var(--ct-border);
  border-radius: 8px;
  padding: 14px !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.woocommerce-cart .cross-sells ul.products li.product:hover {
  border-color: #d6cbbd;
  box-shadow: 0 6px 18px rgba(45, 42, 38, 0.06);
}

.woocommerce-cart .cross-sells ul.products li.product .ast-on-card-button {
  display: none !important;
}

.woocommerce-cart .cross-sells ul.products li.product .astra-shop-summary-wrap {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding-top: 10px;
}

.woocommerce-cart .cross-sells ul.products li.product .price {
  display: block !important;
  font-family: var(--ct-font-heading);
  font-size: 15px !important;
  font-weight: 600 !important;
  color: var(--ct-ink) !important;
  margin: 6px 0 12px !important;
}

.woocommerce-cart .cross-sells ul.products li.product .ct-cart-crosssell-cta {
  margin-top: auto;
}

.woocommerce-cart .cross-sells ul.products li.product a.ct-cart-crosssell-add {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 100% !important;
  padding: 9px 14px !important;
  background: var(--ct-olive) !important;
  color: var(--ct-white) !important;
  border: none !important;
  border-radius: 6px !important;
  font-family: var(--ct-font-heading) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  text-decoration: none !important;
  line-height: 1.3 !important;
  transition: background-color 0.2s ease;
}

.woocommerce-cart .cross-sells ul.products li.product a.ct-cart-crosssell-add:hover {
  background: var(--ct-olive-dark) !important;
  color: var(--ct-white) !important;
}

/* Si Astra también renderiza el botón estándar en cross-sells, ocultar el duplicado */
.woocommerce-cart .cross-sells ul.products li.product .astra-shop-summary-wrap > a.button:not(.ct-cart-crosssell-add) {
  display: none !important;
}

/* =========================================================================
   8. LIMPIEZA VISUAL DE IMPUESTOS EN CHECKOUT (CARTFLOWS, CLÁSICO Y BLOQUES)
   ========================================================================= */

/* Ocultar "(incl. impuestos)" repetitivo en líneas de producto, subtotales y envío */
.woocommerce-checkout .tax_label,
.woocommerce-cart .tax_label,
.wcf-embed-checkout-form .tax_label,
.cartflows_step-template-default .tax_label,
.woocommerce-checkout-review-order-table .product-total .tax_label,
.woocommerce-checkout-review-order-table .cart_item .tax_label,
.woocommerce-checkout-review-order-table .cart-subtotal .tax_label,
.woocommerce-checkout-review-order-table .cart-shipping .tax_label,
.wcf-shipping-method-options .tax_label,
.wc-block-checkout .tax_label,
.wc-block-checkout .wc-block-components-product-price__suffix,
.wc-block-checkout .wc-block-components-order-summary-item__total-price .tax_label,
.wp-block-woocommerce-checkout .tax_label,
.wp-block-woocommerce-checkout .wc-block-components-product-price__suffix {
  display: none !important;
}

/* Nota discreta "(IVA incluido)" bajo el Total */
.woocommerce-checkout .order-total .includes_tax,
.woocommerce-cart .order-total .includes_tax,
.wcf-embed-checkout-form .order-total .includes_tax,
.ct-iva-incluido,
.wc-block-checkout .wc-block-components-totals-footer-item-tax {
  display: block !important;
  font-family: var(--ct-font-body) !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  color: var(--ct-muted) !important;
  margin-top: 2px !important;
  line-height: 1.3 !important;
}
