/* ── WooCommerce Overrides ───────────────────────────────────── */

/* ─ Breadcrumb ───────────────────────────────────────────────── */
.woocommerce-breadcrumb {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 16px;
}
.woocommerce-breadcrumb a { color: var(--sky); text-decoration: none; }

/* ─ Form Rows ────────────────────────────────────────────────── */
.woocommerce form .form-row { margin-bottom: 12px; padding: 0; }
.woocommerce form .form-row label { margin-bottom: 6px; }
.woocommerce form .form-row .required { color: var(--pink); }
.woocommerce form .form-row input[type="checkbox"],
.woocommerce form .form-row input[type="radio"] {
  width: auto;
  margin-right: 6px;
}
.woocommerce form select { appearance: auto; }

/* ─ Products Grid ────────────────────────────────────────────── */
ul.products {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

/* Ordering select compacto */
.woocommerce-ordering select {
  width: auto;
  min-width: 200px;
  padding: 8px 12px;
  font-size: 13px;
  margin-bottom: 20px;
}

ul.products li.product {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  text-align: center;
  transition: box-shadow .2s, transform .2s;
  display: flex;
  flex-direction: column;
  padding: 0;
}
ul.products li.product:hover {
  box-shadow: 0 6px 24px rgba(46,120,191,.14);
  transform: translateY(-2px);
}
ul.products li.product a {
  text-decoration: none;
  color: var(--ink);
}

/* Imagen: va al tope de la card sin padding */
ul.products li.product a img,
ul.products li.product img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  display: block;
  background: #f0f6fb;
}

/* Info debajo de la imagen */
ul.products li.product .woocommerce-loop-product__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--blue);
  margin: 12px 12px 6px;
  line-height: 1.3;
}
ul.products li.product .price {
  font-size: 17px;
  font-weight: 800;
  color: var(--blue);
  background: var(--yellow);
  display: inline-block;
  padding: 3px 12px;
  border-radius: 20px;
  margin: 0 0 12px;
}
ul.products li.product .button {
  font-size: 13px;
  padding: 10px 16px;
  margin: 0 12px 14px;
  width: calc(100% - 24px);
  border-radius: 8px;
}

/* ─ Single Product ───────────────────────────────────────────── */

/* Layout: 2 columnas en desktop, 1 en mobile */
.woocommerce div.product {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 640px) {
  .woocommerce div.product {
    grid-template-columns: 300px 1fr;
    align-items: start;
    gap: 28px;
  }
  .woocommerce div.product .woocommerce-product-gallery {
    grid-column: 1;
    grid-row: 1;
  }
  .woocommerce div.product .summary {
    grid-column: 2;
    grid-row: 1;
  }
  /* Tabs, descripción y productos relacionados → ancho completo */
  .woocommerce div.product .woocommerce-tabs,
  .woocommerce div.product .related,
  .woocommerce div.product .upsells {
    grid-column: 1 / -1;
  }
}

/* Imagen principal: cuadrada 1:1 con contain (sin recorte) */
.woocommerce div.product .woocommerce-product-gallery {
  margin-bottom: 0;
}
.woocommerce div.product .woocommerce-product-gallery__wrapper {
  border-radius: 10px;
  overflow: hidden;
  background: #f0f6fb;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.woocommerce div.product .woocommerce-product-gallery__wrapper img,
.woocommerce div.product .woocommerce-product-gallery .wp-post-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
/* Oculta el ícono de zoom */
.woocommerce div.product .woocommerce-product-gallery__trigger { display: none; }

/* Thumbnail gallery mínima */
.flex-control-thumbs {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  padding: 0;
  list-style: none;
}
.flex-control-thumbs li { flex: 1; max-width: 60px; }
.flex-control-thumbs li img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 6px;
  opacity: .7;
  cursor: pointer;
}
.flex-control-thumbs li img.flex-active { opacity: 1; outline: 2px solid var(--sky); }

/* Título y precio */
.woocommerce div.product .product_title {
  font-size: 20px;
  color: var(--blue);
  margin-bottom: 6px;
  line-height: 1.3;
}
.woocommerce div.product p.price,
.woocommerce div.product span.price {
  color: var(--yellow);
  font-size: 24px;
  font-weight: 800;
  display: inline-block;
  background: var(--blue);
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 14px;
}

/* Descripción corta */
.woocommerce div.product .woocommerce-product-details__short-description {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 16px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

/* Stock */
.woocommerce div.product .stock {
  font-size: 12px;
  font-weight: 600;
  color: #166534;
  background: #dcfce7;
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 12px;
}

/* Quantity + Botón en fila */
.woocommerce div.product form.cart {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.woocommerce div.product form.cart .qty {
  width: 64px !important;
  text-align: center;
  padding: 12px 8px;
  font-size: 16px;
  font-weight: 700;
  margin: 0;
}
.woocommerce div.product form.cart .button {
  flex: 1;
  min-width: 140px;
  margin-top: 0;
  font-size: 15px;
  padding: 13px 20px;
}

/* Meta (SKU, categorías, tags) */
.woocommerce div.product .product_meta {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
}
.woocommerce div.product .product_meta a {
  color: var(--sky);
  text-decoration: none;
  font-weight: 500;
}
.woocommerce div.product .product_meta span { display: block; }

/* ── Tabs (Descripción / Info adicional) ── */
.woocommerce div.product .woocommerce-tabs {
  margin-top: 8px;
}
.woocommerce div.product .woocommerce-tabs ul.tabs {
  list-style: none;
  padding: 0;
  margin: 0 0 0;
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--line);
}
.woocommerce div.product .woocommerce-tabs ul.tabs li { margin: 0; padding: 0; }
.woocommerce div.product .woocommerce-tabs ul.tabs li a {
  display: inline-block;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a {
  color: var(--blue);
  border-bottom-color: var(--blue);
}
.woocommerce div.product .woocommerce-tabs .panel {
  padding: 16px 0 0;
  font-size: 14px;
  color: var(--ink);
  line-height: 1.65;
}
.woocommerce div.product .woocommerce-tabs .panel h2 {
  font-size: 16px;
  margin-bottom: 10px;
}
.woocommerce div.product .woocommerce-tabs .panel h3 {
  font-size: 14px;
  margin-bottom: 8px;
}

/* ─ Productos relacionados / Upsells ────────────────────────── */
.woocommerce div.product .related,
.woocommerce div.product .upsells {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 2px solid var(--line);
}
.woocommerce div.product .related > h2,
.woocommerce div.product .upsells > h2 {
  font-size: 16px;
  color: var(--blue);
  margin-bottom: 16px;
}
/* Grid de 3 columnas en desktop, 2 en tablet, 1 en mobile chico */
.woocommerce div.product .related ul.products,
.woocommerce div.product .upsells ul.products {
  grid-template-columns: repeat(3, 1fr) !important;
}
@media (max-width: 600px) {
  .woocommerce div.product .related ul.products,
  .woocommerce div.product .upsells ul.products {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}
@media (max-width: 380px) {
  .woocommerce div.product .related ul.products,
  .woocommerce div.product .upsells ul.products {
    grid-template-columns: 1fr !important;
  }
}

/* ─ Cart: stack vertical ─────────────────────────────────────── */
.woocommerce-cart .woocommerce::after { content: ""; display: table; clear: both; }
.woocommerce-cart-form,
.cart-collaterals,
.woocommerce-cart .cart_totals,
.woocommerce-cart .cross-sells {
  float: none !important;
  width: 100% !important;
  clear: both !important;
}

/* ─ Cart Table ───────────────────────────────────────────────── */

/* En mobile ocultar columna "Precio unitario" para ahorrar espacio */
@media (max-width: 540px) {
  .woocommerce-cart-form table.shop_table thead th.product-price,
  .woocommerce-cart-form table.shop_table td.product-price { display: none; }
}

.woocommerce-cart-form table.shop_table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.woocommerce-cart-form table.shop_table th {
  color: var(--blue);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .5px;
  border-bottom: 2px solid var(--line);
  padding: 8px 8px;
  text-align: left;
}
.woocommerce-cart-form table.shop_table td {
  padding: 12px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

/* Imagen del producto en cart */
.woocommerce-cart-form table.shop_table td.product-thumbnail img {
  width: 56px !important;
  height: 56px !important;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

.woocommerce-cart-form table.shop_table td.product-name a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  font-size: 14px;
}
.woocommerce-cart-form table.shop_table td.product-name .variation {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.woocommerce-cart-form table.shop_table td.product-subtotal {
  font-weight: 700;
  color: var(--blue);
  font-size: 15px;
}
.woocommerce-cart-form table.shop_table td.product-price {
  color: var(--muted);
  font-size: 13px;
}
.woocommerce-cart-form table.shop_table td.product-remove {
  width: 32px;
  text-align: center;
}
.woocommerce-cart-form table.shop_table td.product-remove a {
  color: var(--muted);
  font-size: 18px;
  text-decoration: none;
  line-height: 1;
}
.woocommerce-cart-form table.shop_table td.product-remove a:hover { color: #b91c1c; }

/* Quantity stepper en cart */
.woocommerce-cart-form table.shop_table td.product-quantity .qty {
  width: 56px;
  text-align: center;
  padding: 6px 4px;
  font-size: 14px;
  font-weight: 700;
}

/* Fila de acciones del carrito */
.woocommerce-cart-form .actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 10px 0 0;
  gap: 10px;
}
.woocommerce-cart-form .actions .coupon {
  display: flex;
  gap: 8px;
  flex: 1;
  flex-wrap: wrap;
}
.woocommerce-cart-form .actions .coupon input#coupon_code {
  flex: 1;
  min-width: 120px;
  padding: 10px 12px;
  font-size: 14px;
}
.woocommerce-cart-form .actions .coupon .button {
  width: auto;
  padding: 10px 16px;
  font-size: 13px;
  background: transparent;
  color: var(--blue) !important;
  border: 1.5px solid var(--blue);
  margin-top: 0;
}
.woocommerce-cart-form .button[name="update_cart"] {
  width: auto;
  font-size: 13px;
  padding: 10px 16px;
  background: transparent;
  color: var(--muted) !important;
  border: 1.5px solid var(--line);
  font-weight: 600;
  margin-top: 0;
}

/* ─ Cart Totals ──────────────────────────────────────────────── */
.cart_totals {
  margin-top: 4px;
  background: #f8fbfd;
  border: 1px solid var(--line);
  border-left: 4px solid var(--sky);
  border-radius: 10px;
  padding: 16px;
}
.cart_totals h2 {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--muted);
  margin-bottom: 12px;
}
.cart_totals table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin-bottom: 0;
}
.cart_totals table th,
.cart_totals table td {
  padding: 8px 4px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}
.cart_totals table th { color: var(--muted); font-weight: 600; width: 40%; }
.cart_totals table td { text-align: right; font-weight: 600; }
.cart_totals table .order-total th,
.cart_totals table .order-total td {
  font-weight: 800;
  color: var(--blue);
  font-size: 17px;
  border-bottom: none;
  padding-top: 12px;
}
.wc-proceed-to-checkout {
  margin-top: 14px;
}
.wc-proceed-to-checkout a,
.wc-proceed-to-checkout a.checkout-button,
.wc-proceed-to-checkout a.button,
.wc-proceed-to-checkout a.wc-forward,
a.checkout-button.button,
a.checkout-button {
  display: block !important;
  width: 100% !important;
  font-size: 16px !important;
  padding: 15px !important;
  background: #8BC53F !important;
  color: #fff !important;
  text-align: center !important;
  border-radius: 10px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  border: none !important;
  box-sizing: border-box !important;
  margin-top: 0 !important;
}

/* ─ Checkout ─────────────────────────────────────────────────── */
.woocommerce-checkout .col2-set {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 600px) {
  .woocommerce-checkout .col2-set { grid-template-columns: 1fr; }
}
.woocommerce-checkout h3 {
  font-size: 15px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--line);
}
.woocommerce-checkout #order_review_heading { margin-top: 20px; }
.woocommerce-checkout table.shop_table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin-bottom: 16px;
}
.woocommerce-checkout table.shop_table th,
.woocommerce-checkout table.shop_table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.woocommerce-checkout table.shop_table .order-total th,
.woocommerce-checkout table.shop_table .order-total td {
  font-weight: 700;
  color: var(--blue);
  font-size: 15px;
}
#payment {
  background: #f8fbfd;
  border-radius: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  margin-top: 16px;
}
#payment ul.payment_methods {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}
#payment ul.payment_methods li {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
#payment ul.payment_methods li:last-child { border-bottom: none; }
#place_order { margin-top: 0; }

/* ─ Thank You / Order Received ───────────────────────────────── */
.woocommerce-thankyou-order-received {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: 500;
}
ul.woocommerce-order-overview {
  list-style: none;
  padding: 14px 16px;
  margin: 0 0 20px;
  background: #f8fbfd;
  border: 1px solid var(--line);
  border-left: 4px solid var(--sky);
  border-radius: 8px;
}
ul.woocommerce-order-overview li {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}
ul.woocommerce-order-overview li:last-child { border-bottom: none; }
ul.woocommerce-order-overview li strong { color: var(--ink); font-weight: 700; }
.woocommerce-order-details { margin-top: 16px; }
.woocommerce-order-details h2 { font-size: 16px; }
.woocommerce-thankyou-order-failed-actions a.button,
.woocommerce-thankyou-order-failed-actions a.button:hover { width: auto; margin-right: 8px; }

/* ─ My Account ───────────────────────────────────────────────── */
.woocommerce-MyAccount-navigation { margin-bottom: 20px; }
.woocommerce-MyAccount-navigation ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.woocommerce-MyAccount-navigation ul li a {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
  border: 1.5px solid var(--line);
  text-decoration: none;
  transition: background .12s, border-color .12s;
}
.woocommerce-MyAccount-navigation ul li a:hover {
  background: #f1f7fc;
  border-color: var(--sky);
}
.woocommerce-MyAccount-navigation ul li.is-active a,
.woocommerce-MyAccount-navigation ul li.active a {
  background: var(--blue);
  color: #fff !important;
  border-color: var(--blue);
}
.woocommerce-MyAccount-content p { font-size: 14px; color: var(--muted); }

/* ─ Orders Table ─────────────────────────────────────────────── */
.woocommerce-orders-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.woocommerce-orders-table th {
  color: var(--blue);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .5px;
  border-bottom: 2px solid var(--line);
  padding: 8px 10px;
  text-align: left;
}
.woocommerce-orders-table td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.woocommerce-orders-table .woocommerce-button,
.woocommerce-orders-table a.button {
  font-size: 12px;
  padding: 6px 12px;
  width: auto;
  margin-top: 0;
}

/* ─ Order Status Badges ──────────────────────────────────────── */
.woocommerce-order-status,
mark.order-status {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
  background: var(--line);
  color: var(--muted);
  display: inline-block;
}
mark.order-status.status-completed,
.woocommerce-order-status.status-completed { background: #dcfce7; color: #166534; }
mark.order-status.status-processing,
.woocommerce-order-status.status-processing { background: #dbeafe; color: #1e40af; }
mark.order-status.status-pending,
.woocommerce-order-status.status-pending { background: #fef9c3; color: #854d0e; }
mark.order-status.status-cancelled,
.woocommerce-order-status.status-cancelled { background: #fee2e2; color: #991b1b; }
mark.order-status.status-refunded,
.woocommerce-order-status.status-refunded { background: #f3e8ff; color: #6b21a8; }

/* ─ Login / Register Form ────────────────────────────────────── */
.woocommerce-form-login,
.woocommerce-form-register {
  border: none !important;
  padding: 0 !important;
  box-shadow: none !important;
}
.woocommerce-form-login .form-row,
.woocommerce-form-register .form-row { padding: 0; }
#customer_login {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
@media (max-width: 600px) {
  #customer_login { grid-template-columns: 1fr; }
}
#customer_login h2 { padding-bottom: 8px; border-bottom: 2px solid var(--line); }

/* ─ Ingreso con código (AYUVI Sorteos) ───────────────────────── */
.ayuvi-code-login .form-row { padding: 0; margin-bottom: 12px; }
.ayuvi-code-login .button { width: 100%; }
.ayuvi-code-login__sent { font-size: 14px; color: var(--muted); margin: 0 0 12px; }
.ayuvi-code-login #ayuvi-login-code { font-size: 22px; letter-spacing: 6px; text-align: center; }
.ayuvi-code-login__back {
  display: block;
  margin: 10px auto 0;
  background: none;
  border: 0;
  color: var(--sky);
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
}
.ayuvi-code-login__msg { font-size: 14px; margin: 10px 0 0; min-height: 1em; }
.ayuvi-code-login__msg.is-error { color: #b42318; }
.ayuvi-password-login { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 14px; }
.ayuvi-password-login > summary { cursor: pointer; color: var(--sky); font-size: 14px; margin-bottom: 12px; }

/* ─ Lost Password ────────────────────────────────────────────── */
.woocommerce-LostPassword { margin-top: 10px; font-size: 13px; }
.woocommerce-LostPassword a { color: var(--sky); }

/* ─ Remember Me ──────────────────────────────────────────────── */
.woocommerce-form-login__rememberme {
  display: flex !important;
  align-items: center;
  gap: 6px;
  font-weight: 400 !important;
  color: var(--muted) !important;
  font-size: 13px;
}

/* ─ Address Forms ────────────────────────────────────────────── */
.woocommerce-address-fields .form-row {
  margin-bottom: 12px;
}

/* ── My Account Header ───────────────────────────────────────── */
.ayuvi-myaccount-header {
  margin-bottom: 16px;
}
.ayuvi-myaccount-title {
  font-size: 20px;
  color: var(--blue);
  margin: 0;
  font-weight: 800;
}

/* ── My Account Nav ──────────────────────────────────────────── */
.woocommerce-MyAccount-navigation {
  margin-bottom: 24px;
}
.woocommerce-MyAccount-navigation ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.woocommerce-MyAccount-navigation ul li a {
  display: inline-block;
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
  border: 1.5px solid var(--line);
  text-decoration: none;
  transition: background .12s, border-color .12s;
}
.woocommerce-MyAccount-navigation ul li a:hover {
  background: #f1f7fc;
  border-color: var(--sky);
}
.woocommerce-MyAccount-navigation ul li.is-active a,
.woocommerce-MyAccount-navigation ul li.active a {
  background: var(--blue);
  color: #fff !important;
  border-color: var(--blue);
}

/* ── View Order: status bar ──────────────────────────────────── */
.ayuvi-order-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #f8fbfd;
  border: 1px solid var(--line);
  border-left: 4px solid var(--sky);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.ayuvi-order-status-bar__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ayuvi-order-status-bar__num {
  font-size: 16px;
  font-weight: 800;
  color: var(--blue);
}
.ayuvi-order-status-bar__date {
  font-size: 12px;
  color: var(--muted);
}

/* ── Order Details Table ─────────────────────────────────────── */
.woocommerce-order-details {
  margin-bottom: 24px;
}
.woocommerce-order-details h2 {
  font-size: 15px;
  color: var(--blue);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--line);
}
table.woocommerce-table--order-details {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
table.woocommerce-table--order-details thead th {
  color: var(--blue);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .5px;
  border-bottom: 2px solid var(--line);
  padding: 8px 10px;
  text-align: left;
}
table.woocommerce-table--order-details thead th:last-child { text-align: right; }
table.woocommerce-table--order-details tbody td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
table.woocommerce-table--order-details tbody td.product-name a {
  color: var(--blue);
  font-weight: 600;
  text-decoration: none;
}
table.woocommerce-table--order-details tbody td.product-name a:hover {
  color: var(--sky);
}
table.woocommerce-table--order-details tbody td.product-total {
  text-align: right;
  font-weight: 700;
  color: var(--ink);
}

/* Totals al final de la tabla */
table.woocommerce-table--order-details tfoot th,
table.woocommerce-table--order-details tfoot td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
table.woocommerce-table--order-details tfoot th { color: var(--muted); font-weight: 600; }
table.woocommerce-table--order-details tfoot td { text-align: right; font-weight: 700; }
table.woocommerce-table--order-details tfoot .order-total th,
table.woocommerce-table--order-details tfoot .order-total td {
  font-size: 16px;
  font-weight: 800;
  color: var(--blue);
  border-bottom: none;
  padding-top: 12px;
}

/* ── Order Again Button ──────────────────────────────────────── */
.woocommerce-order-again .button,
p.order-again .button,
.order-again {
  width: auto !important;
  display: inline-block !important;
  padding: 12px 24px !important;
  font-size: 14px !important;
  margin: 0 0 20px !important;
}

/* ── Customer / Billing Address ──────────────────────────────── */
.woocommerce-customer-details {
  margin-top: 4px;
}
.woocommerce-customer-details h2 {
  font-size: 15px;
  color: var(--blue);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--line);
}
.woocommerce-customer-details address {
  background: #f8fbfd;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 14px;
  font-style: normal;
  line-height: 1.7;
  color: var(--ink);
}
.woocommerce-customer-details .woocommerce-customer-details--phone,
.woocommerce-customer-details .woocommerce-customer-details--email {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
}

/* ── Order Notes ─────────────────────────────────────────────── */
.ayuvi-order-notes {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 20px;
}
.ayuvi-order-notes h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #075985;
  margin: 0 0 10px;
}
.ayuvi-order-notes .woocommerce-OrderUpdates {
  list-style: none;
  padding: 0;
  margin: 0;
}
.ayuvi-order-notes .woocommerce-OrderUpdate {
  font-size: 13px;
  color: #075985;
  padding: 6px 0;
  border-bottom: 1px solid #bae6fd;
}
.ayuvi-order-notes .woocommerce-OrderUpdate:last-child { border-bottom: none; }
.ayuvi-order-notes .woocommerce-OrderUpdate time {
  display: block;
  font-size: 11px;
  opacity: .7;
  margin-bottom: 2px;
}

/* ══════════════════════════════════════════════════════════════
   CAMPAÑA FIN DE AÑO — My Account
══════════════════════════════════════════════════════════════ */

/* ── Mostrar/ocultar contraseña: ícono de ojo dentro del campo ─ */
.woocommerce form .password-input {
  position: relative;
  display: block;
  width: 100%;
}
.woocommerce form .password-input input {
  padding-right: 48px;
}
.woocommerce form .show-password-input {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0;
  line-height: 0;
  color: transparent !important;
  box-shadow: none;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232E78BF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / 20px 20px no-repeat;
}
.woocommerce form .show-password-input:hover {
  background-color: #f1f7fc;
  filter: none;
}
.woocommerce form .show-password-input:focus-visible {
  outline: 2px solid var(--sky);
  outline-offset: 1px;
}
/* Ojo tachado cuando la contraseña está visible */
.woocommerce form .show-password-input.display-password {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232E78BF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24'/%3E%3Cline x1='1' y1='1' x2='23' y2='23'/%3E%3C/svg%3E");
}
/* Por si el toggle fuera un ::after heredado de Woo */
.woocommerce form .show-password-input::after { content: none; }

/* ── Login Hero (campaña Gran Sorteo) ────────────────────────── */
.ayuvi-login-hero {
  display: flex;
  align-items: stretch;
  background: var(--campaign-blue);
  background-image: radial-gradient(circle at 85% 15%, rgba(255,255,255,.10), transparent 45%);
  border-radius: 18px;
  overflow: hidden;
  color: #fff;
  margin-bottom: 30px;
  box-shadow: 0 8px 30px rgba(1,77,165,.25);
}
.ayuvi-login-hero__content {
  flex: 1.25;
  min-width: 0;
  padding: 30px 10px 30px 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.ayuvi-login-hero__logo {
  width: 190px;
  height: auto;
  margin-bottom: 16px;
}
.ayuvi-login-hero__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.15;
  letter-spacing: .4px;
  color: #fff;
  margin: 0 0 10px;
  text-shadow: 0 3px 0 rgba(1,77,165,.55);
}
.ayuvi-login-hero__title span { color: var(--yellow); }
.ayuvi-login-hero__sub {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255,255,255,.92);
  margin: 0 0 16px;
  max-width: 380px;
}
.ayuvi-login-hero__perks {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.ayuvi-login-hero__perks li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}
.ayuvi-login-hero__perks svg { color: var(--yellow); flex-shrink: 0; }

.ayuvi-login-hero__photo {
  flex: 1;
  position: relative;
  min-height: 280px;
}
.ayuvi-login-hero__photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}
/* Funde la foto con el panel azul */
.ayuvi-login-hero__photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--campaign-blue) 0%, rgba(0,92,185,0) 30%);
}

@media (max-width: 700px) {
  .ayuvi-login-hero { flex-direction: column; }
  .ayuvi-login-hero__content { padding: 24px 22px 20px; }
  .ayuvi-login-hero__photo { min-height: 220px; }
  .ayuvi-login-hero__photo::after {
    background: linear-gradient(180deg, var(--campaign-blue) 0%, rgba(0,92,185,0) 30%);
  }
}

/* ── Login / Register: títulos con tipografía de campaña ─────── */
#customer_login h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 24px;
  color: var(--campaign-blue);
  letter-spacing: .4px;
  border-bottom: none;
  padding-bottom: 0;
  position: relative;
  margin-bottom: 14px;
}
#customer_login h2::after {
  content: "";
  display: block;
  width: 46px;
  height: 5px;
  border-radius: 4px;
  background: var(--yellow);
  margin-top: 8px;
}
@media (min-width: 601px) {
  #customer_login .col-1 {
    padding-right: 28px;
    border-right: 1px solid var(--line);
  }
}

/* ── My Account: encabezado ──────────────────────────────────── */
.ayuvi-myaccount-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 28px;
  letter-spacing: .4px;
  color: var(--campaign-blue);
}
.ayuvi-myaccount-sub {
  font-size: 13px;
  color: var(--muted);
  margin: 4px 0 0;
}
.ayuvi-myaccount-header { margin-bottom: 18px; }

/* Nav activa en azul de campaña */
.woocommerce-MyAccount-navigation ul li.is-active a,
.woocommerce-MyAccount-navigation ul li.active a {
  background: var(--campaign-blue);
  border-color: var(--campaign-blue);
}

/* ── Escritorio: intro ───────────────────────────────────────── */
.ayuvi-dash-intro {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 20px;
}
.ayuvi-dash-intro a { color: var(--sky); }
.ayuvi-dash-intro__logout {
  margin-left: 6px;
  font-weight: 600;
}

/* ── Escritorio: accesos rápidos ─────────────────────────────── */
.ayuvi-dash-quick {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 8px;
}
@media (max-width: 640px) {
  .ayuvi-dash-quick { grid-template-columns: 1fr; }
}
.ayuvi-dash-quick__card {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 16px;
  background: #f8fbfd;
  border: 1px solid var(--line);
  border-radius: 14px;
  text-decoration: none;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.ayuvi-dash-quick__card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(1,77,165,.12);
  border-color: var(--sky);
}
.ayuvi-dash-quick__icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--campaign-blue);
  color: var(--yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 7px;
}
.ayuvi-dash-quick__label {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
.ayuvi-dash-quick__hint {
  font-size: 12px;
  color: var(--muted);
}

/* ── Escritorio: secciones Tickets / Programas ───────────────── */
.ayuvi-dash-section {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.ayuvi-dash-section__header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 16px;
}
.ayuvi-dash-section__header .ayuvi-section-pill { margin-bottom: 0; }
.ayuvi-dash-section__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 21px;
  letter-spacing: .3px;
  color: var(--campaign-blue);
  margin: 0;
  flex: 1;
  min-width: 140px;
}
.ayuvi-dash-section__more {
  font-size: 13px;
  font-weight: 700;
  color: var(--sky);
  text-decoration: none;
  white-space: nowrap;
}
.ayuvi-dash-section__more:hover { color: var(--campaign-blue); }

.ayuvi-products-grid--dash {
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}
@media (max-width: 540px) {
  .ayuvi-products-grid--dash { grid-template-columns: repeat(2, 1fr); }
}

/* ── Detalles de cuenta: fieldset "Cambio de contraseña" ─────── */
.woocommerce-EditAccountForm fieldset {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fbfd;
  padding: 6px 18px 16px;
  margin: 22px 0 4px;
}
.woocommerce-EditAccountForm fieldset legend {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 17px;
  letter-spacing: .3px;
  color: var(--campaign-blue);
  padding: 0 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
}

/* ── Botonera Mi Cuenta (barra segmentada con íconos) ────────── */
.woocommerce-MyAccount-navigation { margin-bottom: 26px; }
.woocommerce-MyAccount-navigation ul {
  list-style: none;
  margin: 0;
  padding: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
  background: #f8fbfd;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow-x: auto;
  flex-wrap: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.woocommerce-MyAccount-navigation ul::-webkit-scrollbar { display: none; }
.woocommerce-MyAccount-navigation ul li { margin: 0; flex-shrink: 0; }
.woocommerce-MyAccount-navigation ul li a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border: none;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
  white-space: nowrap;
  transition: background .12s, color .12s;
}
.woocommerce-MyAccount-navigation ul li a svg { flex-shrink: 0; opacity: .8; }
.woocommerce-MyAccount-navigation ul li a:hover {
  background: #e3f0fa;
  border-color: transparent;
}
.woocommerce-MyAccount-navigation ul li.is-active a,
.woocommerce-MyAccount-navigation ul li.active a {
  background: var(--campaign-blue);
  color: #fff !important;
  border-color: transparent;
  box-shadow: 0 3px 10px rgba(1,77,165,.30);
}
.woocommerce-MyAccount-navigation ul li.is-active a svg,
.woocommerce-MyAccount-navigation ul li.active a svg {
  color: var(--yellow);
  opacity: 1;
}
/* Salir: separado a la derecha, en rojo suave */
.woocommerce-MyAccount-navigation ul li.ayuvi-nav-item--customer-logout { margin-left: auto; }
.woocommerce-MyAccount-navigation ul li.ayuvi-nav-item--customer-logout a { color: #b91c1c; }
.woocommerce-MyAccount-navigation ul li.ayuvi-nav-item--customer-logout a:hover { background: #fee2e2; }

/* ══════════════════════════════════════════════════════════════
   MI CUENTA — Contenido de secciones
══════════════════════════════════════════════════════════════ */

/* ── Encabezado contextual de cada sección ───────────────────── */
.ayuvi-endpoint-header { margin-bottom: 18px; }
.ayuvi-endpoint-header__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 22px;
  letter-spacing: .3px;
  color: var(--campaign-blue);
  margin: 0;
  position: relative;
}
.ayuvi-endpoint-header__title::after {
  content: "";
  display: block;
  width: 46px;
  height: 5px;
  border-radius: 4px;
  background: var(--yellow);
  margin-top: 7px;
}
.ayuvi-endpoint-header__desc {
  font-size: 13px;
  color: var(--muted);
  margin: 8px 0 0;
}

/* ── Direcciones: tarjetas ───────────────────────────────────── */
.ayuvi-addresses {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}
.ayuvi-address-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  background: #f8fbfd;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.ayuvi-address-card--empty {
  background: #fff;
  border-style: dashed;
  border-width: 2px;
}
.ayuvi-address-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ayuvi-address-card__icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--campaign-blue);
  color: var(--yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ayuvi-address-card__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}
.ayuvi-address-card__body {
  font-style: normal;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink);
  flex: 1;
}
.ayuvi-address-card__placeholder {
  color: var(--muted);
  font-size: 13px;
}
.ayuvi-address-card__cta {
  align-self: flex-start;
}

/* ── Tablas genéricas de Mi Cuenta (pedidos, descargas, pagos) ─ */
.woocommerce-MyAccount-content table.shop_table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.woocommerce-MyAccount-content table.shop_table th {
  color: var(--blue);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .5px;
  border-bottom: 2px solid var(--line);
  padding: 8px 10px;
  text-align: left;
}
.woocommerce-MyAccount-content table.shop_table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.woocommerce-MyAccount-content table.shop_table .button {
  font-size: 12px;
  padding: 7px 14px;
  width: auto;
  margin: 0 4px 0 0;
  display: inline-block;
  border-radius: 999px;
}
/* Acción destructiva (eliminar tarjeta) en rojo suave */
.woocommerce-MyAccount-content table.shop_table .button.delete {
  background: #fee2e2;
  color: #b91c1c !important;
}

/* Tablas apiladas como tarjetas en móvil (usa data-title de Woo) */
@media (max-width: 640px) {
  .woocommerce-MyAccount-content table.shop_table_responsive thead { display: none; }
  .woocommerce-MyAccount-content table.shop_table_responsive,
  .woocommerce-MyAccount-content table.shop_table_responsive tbody,
  .woocommerce-MyAccount-content table.shop_table_responsive tr { display: block; width: 100%; }
  .woocommerce-MyAccount-content table.shop_table_responsive tr {
    background: #f8fbfd;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 6px 14px;
    margin-bottom: 12px;
  }
  .woocommerce-MyAccount-content table.shop_table_responsive th,
  .woocommerce-MyAccount-content table.shop_table_responsive td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    text-align: right;
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
  }
  .woocommerce-MyAccount-content table.shop_table_responsive tr > *:last-child { border-bottom: none; }
  .woocommerce-MyAccount-content table.shop_table_responsive td::before,
  .woocommerce-MyAccount-content table.shop_table_responsive th::before {
    content: attr(data-title);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--blue);
    text-align: left;
  }
  .woocommerce-MyAccount-content table.shop_table_responsive td.woocommerce-orders-table__cell-order-actions {
    justify-content: flex-end;
  }
  .woocommerce-MyAccount-content table.shop_table_responsive td.woocommerce-orders-table__cell-order-actions::before { content: none; }
}

/* ── Estados vacíos (sin pedidos / descargas / tarjetas) ─────── */
.woocommerce-MyAccount-content .woocommerce-info,
.woocommerce-MyAccount-content .woocommerce-message {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.woocommerce-MyAccount-content .woocommerce-info .button,
.woocommerce-MyAccount-content .woocommerce-message .button {
  width: auto;
  margin: 0;
  padding: 9px 20px;
  font-size: 13px;
  border-radius: 999px;
  flex-shrink: 0;
}

/* ── Botones de acción sueltos (Agregar método de pago, etc.) ── */
.woocommerce-MyAccount-content > a.button,
.woocommerce-MyAccount-content p > a.button {
  width: auto;
  display: inline-block;
  padding: 12px 24px;
  font-size: 14px;
  border-radius: 999px;
}

/* ── Paginación de pedidos ───────────────────────────────────── */
.woocommerce-pagination--without-numbers {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
}
/* Solo "Siguientes" (sin "Anteriores") → alinear a la derecha */
.woocommerce-pagination--without-numbers a.woocommerce-button--next:only-child { margin-left: auto; }
.woocommerce-MyAccount-content .woocommerce-pagination--without-numbers a.button {
  width: auto;
  margin: 0;
  padding: 9px 22px;
  font-size: 13px;
  border-radius: 999px;
  background: transparent;
  border: 1.5px solid var(--blue);
  color: var(--blue) !important;
}
.woocommerce-MyAccount-content .woocommerce-pagination--without-numbers a.button:hover {
  background: #f1f7fc;
}

/* ── Formularios: nombre/apellido a dos columnas ─────────────── */
.woocommerce-EditAccountForm,
.woocommerce-address-fields__field-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 0 16px;
}
.woocommerce-EditAccountForm > *,
.woocommerce-address-fields__field-wrapper > * { flex: 1 1 100%; }
.woocommerce-EditAccountForm .form-row-first,
.woocommerce-EditAccountForm .form-row-last,
.woocommerce-address-fields__field-wrapper .form-row-first,
.woocommerce-address-fields__field-wrapper .form-row-last {
  flex: 1 1 calc(50% - 8px);
  min-width: 200px;
}
.woocommerce-address-fields > p.form-row { margin-top: 0; }

/* El botón Guardar con ancho cómodo, no full-width */
.woocommerce-EditAccountForm button[type="submit"],
.woocommerce-address-fields button[type="submit"] {
  width: auto;
  min-width: 220px;
  padding: 13px 36px;
  border-radius: 999px;
  align-self: flex-start;
}
