/**
 * GreenTicket — UI común (front-end).
 *   · Botones estilo menú (gradiente de marca)
 *   · Franja "añadido al carrito"
 *   · Mejora visual de la página de carrito
 *   · Vista de archivo en listado
 * Tokens de marca (theme.json + header).
 */
:root{
  --gtc-brand-grad:linear-gradient(320deg,#5a9fb5 0%,#7cb342 100%);
  --gtc-brand-grad-h:linear-gradient(135deg,#5a9fb5 0%,#7cb342 100%);
  --gtc-brand-blue:#5a9fb5;--gtc-brand-green:#7cb342;
  --gtc-ink-2:#333;--gtc-muted-2:#777;--gtc-border-2:#e6e9ee;
  --gtc-ease-2:cubic-bezier(.22,.61,.36,1);
}

/* Enlace de carrito ligero (reemplaza al bloque Mini-Cart en no-carrito) */
.gtc-cart-link{position:relative;display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;border-radius:50%;background:var(--gtc-brand-grad);color:#fff;text-decoration:none;box-shadow:0 6px 16px rgba(90,159,181,.28);transition:transform .2s var(--gtc-ease-2),box-shadow .2s var(--gtc-ease-2)}
.gtc-cart-link:hover{transform:translateY(-1px);box-shadow:0 10px 22px rgba(90,159,181,.4);color:#fff}
.gtc-cart-link svg{width:20px;height:20px}
.gtc-cart-count{position:absolute;top:-4px;right:-4px;min-width:18px;height:18px;padding:0 4px;border-radius:9px;background:#1d2327;color:#fff;font-size:.68rem;font-weight:800;display:grid;place-items:center;line-height:1}

/* ============================================================
   BOTONES ESTILO MENÚ (gradiente de marca)
   Aplica a: botones de producto (loops), añadir al carrito,
   proceder al pago (carrito), y utilitario .gtc-brandbtn.
   ============================================================ */
.wc-block-components-product-button a,
.wc-block-components-product-button .wp-block-button__link,
.single_add_to_cart_button,
.woocommerce-cart .wc-block-cart__submit-button,
.wp-block-woocommerce-cart .wc-block-components-button.contained,
.gtc-brandbtn{
  background:var(--gtc-brand-grad)!important;
  color:#fff!important;
  border:1px solid #fff!important;
  border-radius:30px!important;
  font-weight:700!important;
  box-shadow:0 6px 16px rgba(90,159,181,.28)!important;
  transition:background .3s var(--gtc-ease-2),transform .2s var(--gtc-ease-2),box-shadow .3s var(--gtc-ease-2)!important;
}
.wc-block-components-product-button a:hover,
.wc-block-components-product-button .wp-block-button__link:hover,
.single_add_to_cart_button:hover,
.woocommerce-cart .wc-block-cart__submit-button:hover,
.wp-block-woocommerce-cart .wc-block-components-button.contained:hover,
.gtc-brandbtn:hover{
  background:var(--gtc-brand-grad-h)!important;
  color:#fff!important;
  transform:translateY(-2px);
  box-shadow:0 10px 24px rgba(90,159,181,.42)!important;
}
.single_add_to_cart_button{padding:14px 28px!important}
.single_add_to_cart_button.disabled,
.single_add_to_cart_button:disabled{opacity:.5!important;transform:none!important;box-shadow:none!important}

/* ============================================================
   AVISOS (éxito / error / info) — mismo diseño, acento por tipo
   ============================================================ */
/* Caja común (bloque + clásico) */
.wc-block-components-notice-banner,
.woocommerce-message,.woocommerce-error,.woocommerce-info{
  border-radius:16px!important;
  box-shadow:0 8px 24px rgba(16,24,40,.08)!important;
  padding:18px 24px!important;
  border:1px solid var(--gtc-border-2)!important;
  border-left-width:5px!important;
}
/* Layout de fila solo para el banner de bloques */
.wc-block-components-notice-banner{
  display:flex!important;align-items:center;gap:18px;flex-wrap:wrap;
}
.wc-block-components-notice-banner > svg{flex:none;width:30px;height:30px}
.wc-block-components-notice-banner .wc-block-components-notice-banner__content{
  display:flex;align-items:center;gap:16px;flex:1 1 auto;flex-wrap:wrap;
  color:inherit;font-size:1.02rem;font-weight:500;margin:0;line-height:1.45;
}

/* --- Éxito (verde) --- */
.woocommerce-message,
.wc-block-components-notice-banner.is-success{
  background:linear-gradient(135deg,#eef8f0 0%,#eaf3fb 100%)!important;
  border-color:#d6ebdb!important;border-left-color:var(--gtc-brand-green)!important;color:#254a2c!important;
}
/* --- Error (rojo) --- */
.woocommerce-error,
.wc-block-components-notice-banner.is-error{
  background:linear-gradient(135deg,#fdeeed 0%,#fbeae9 100%)!important;
  border-color:#f3d3d0!important;border-left-color:#e0473a!important;color:#6b241f!important;
}
/* --- Info / aviso (azul de marca) --- */
.woocommerce-info,
.wc-block-components-notice-banner.is-info,
.wc-block-components-notice-banner.is-warning{
  background:linear-gradient(135deg,#eaf3fb 0%,#eef6fc 100%)!important;
  border-color:#cfe3f0!important;border-left-color:var(--gtc-brand-blue)!important;color:#22485c!important;
}

/* Botón dentro de cualquier aviso → pill de marca (alta especificidad) */
.wc-block-components-notice-banner .wc-block-components-notice-banner__content a.wc-forward,
.wc-block-components-notice-banner .wc-block-components-notice-banner__content a.button,
.woocommerce-message a.wc-forward,.woocommerce-message a.button,
.woocommerce-error a.button,.woocommerce-info a.button{
  margin-left:auto!important;
  display:inline-flex!important;align-items:center;gap:8px;
  background:var(--gtc-brand-grad)!important;color:#fff!important;
  border:1px solid #fff!important;border-radius:30px!important;
  padding:12px 26px!important;font-weight:700!important;font-size:.95rem!important;
  line-height:1!important;text-decoration:none!important;white-space:nowrap;
  box-shadow:0 6px 16px rgba(90,159,181,.32)!important;
  transition:background .3s var(--gtc-ease-2),transform .2s var(--gtc-ease-2),box-shadow .3s var(--gtc-ease-2)!important;
}
.wc-block-components-notice-banner .wc-block-components-notice-banner__content a.wc-forward::after,
.woocommerce-message a.wc-forward::after{content:"\2192";font-weight:800;font-size:1.05em;line-height:1}
.wc-block-components-notice-banner .wc-block-components-notice-banner__content a.wc-forward:hover,
.wc-block-components-notice-banner .wc-block-components-notice-banner__content a.button:hover,
.woocommerce-message a.wc-forward:hover,.woocommerce-message a.button:hover,
.woocommerce-error a.button:hover,.woocommerce-info a.button:hover{
  background:var(--gtc-brand-grad-h)!important;color:#fff!important;
  transform:translateY(-2px);box-shadow:0 10px 24px rgba(90,159,181,.45)!important;
}
@media(max-width:600px){
  .wc-block-components-notice-banner{padding:16px 18px!important;gap:12px}
  .wc-block-components-notice-banner .wc-block-components-notice-banner__content a.wc-forward,
  .wc-block-components-notice-banner .wc-block-components-notice-banner__content a.button{
    margin-left:0!important;width:100%;justify-content:center;
  }
}

/* ============================================================
   PÁGINA CARRITO — tarjetas y CTA
   ============================================================ */
.woocommerce-cart .wp-block-woocommerce-cart{margin-top:12px}
.woocommerce-cart .wc-block-cart-items,
.woocommerce-cart .wp-block-woocommerce-cart-line-items-block{
  background:#fff;border:1px solid var(--gtc-border-2);border-radius:16px;
  box-shadow:0 4px 14px rgba(16,24,40,.05);padding:6px 18px;
}
.woocommerce-cart .wc-block-cart-items__header{color:var(--gtc-muted-2);font-weight:700;letter-spacing:.3px}
.woocommerce-cart td.wc-block-cart-items__product img,
.woocommerce-cart .wc-block-cart-item__image img{border-radius:12px}
.woocommerce-cart .wp-block-woocommerce-cart-totals-block{
  background:#fff;border:1px solid var(--gtc-border-2);border-radius:16px;
  box-shadow:0 8px 24px rgba(16,24,40,.07);padding:22px 22px 26px;
}
.woocommerce-cart .wc-block-components-totals-item__value{font-weight:800;color:var(--gtc-ink-2)}
.woocommerce-cart .wc-block-cart__submit-button{width:100%;padding:14px 22px!important;font-size:1.02rem!important}
.woocommerce-cart .wc-block-cart-item__remove-link:hover{color:var(--gtc-brand-blue)}

/* ============================================================
   ARCHIVO (categoría / tienda) — VISTA LISTADO
   Solo en archivos, no en el single (que usa grid en la banda).
   ============================================================ */
.woocommerce.archive .wp-block-woocommerce-product-collection .wp-block-post-template.is-flex-container{
  display:flex!important;flex-direction:column;gap:16px;
}
.woocommerce.archive .wp-block-woocommerce-product-collection li.product{
  display:flex;align-items:center;gap:22px;
  background:#fff;border:1px solid var(--gtc-border-2);border-radius:16px;
  padding:14px 20px;box-shadow:0 2px 8px rgba(16,24,40,.06);
  transition:transform .3s var(--gtc-ease-2),box-shadow .3s var(--gtc-ease-2),border-color .3s;
  max-width:100%;
}
.woocommerce.archive .wp-block-woocommerce-product-collection li.product:hover{
  transform:translateY(-3px);box-shadow:0 16px 34px rgba(16,24,40,.12);border-color:#d3e3ef;
}
.woocommerce.archive li.product .wc-block-components-product-image{width:180px;flex:none;margin:0;overflow:hidden;border-radius:12px}
.woocommerce.archive li.product .wc-block-components-product-image img{aspect-ratio:16/11;object-fit:cover;width:100%;border-radius:12px}
.woocommerce.archive li.product .wp-block-post-title{flex:1;text-align:left!important;margin:0!important;font-size:1.2rem;font-weight:700}
.woocommerce.archive li.product .wp-block-post-title a{color:var(--gtc-ink-2);text-decoration:none}
.woocommerce.archive li.product:hover .wp-block-post-title a{color:var(--gtc-brand-blue)}
.woocommerce.archive li.product .wc-block-components-product-price{text-align:right!important;white-space:nowrap;font-weight:800;color:var(--gtc-ink-2);margin:0!important;font-size:1.05rem}
.woocommerce.archive li.product .wc-block-components-product-button{flex:none;margin:0!important}
.woocommerce.archive .wc-block-product-results-count{color:var(--gtc-muted-2)}
@media(max-width:640px){
  .woocommerce.archive .wp-block-woocommerce-product-collection li.product{flex-wrap:wrap;gap:12px}
  .woocommerce.archive li.product .wc-block-components-product-image{width:100%}
  .woocommerce.archive li.product .wp-block-post-title{flex-basis:100%}
  .woocommerce.archive li.product .wc-block-components-product-price{margin-left:0!important}
  .woocommerce.archive li.product .wc-block-components-product-button{flex-basis:100%}
  .woocommerce.archive li.product .wc-block-components-product-button a{width:100%}
}

@media(prefers-reduced-motion:reduce){
  .wc-block-components-product-button a,.single_add_to_cart_button,.woocommerce.archive li.product{transition:none!important}
}
