/* RTG 2.0 — /carttest (carrito rediseñado) */
.rtgc { max-width: 1120px; margin: 0 auto; width: 100%; padding-top: 28px; }

/* ── Cabecera ── */
.rtgc-head { position: relative; margin-bottom: 30px; }
.rtgc-head::before {
  content: ''; position: absolute; left: 50%; top: -60px; width: min(780px, 130vw); height: 420px; transform: translateX(-50%);
  background: radial-gradient(ellipse at 50% 30%, rgba(201,168,76,.2), rgba(201,168,76,0) 65%); pointer-events: none;
}
.rtgc-head > * { position: relative; }
.rtgc-badge { display: inline-block; margin-bottom: 18px; padding: 6px 14px; border-radius: 999px; border: 1px dashed rgba(201,168,76,.5); color: var(--gold-light); font-family: 'Barlow Condensed', sans-serif; font-size: 12px; letter-spacing: 2px; text-transform: uppercase; }
.rtgc-badge a { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }
.rtgc-title-row { display: flex; align-items: flex-end; gap: 18px; }
.rtgc-index { font-family: 'Bebas Neue', sans-serif; font-size: clamp(88px, 18vw, 150px); line-height: .8; color: transparent; -webkit-text-stroke: 1.5px var(--gold); font-variant-numeric: tabular-nums; }
.rtgc-eyebrow { font-family: 'Barlow Condensed', sans-serif; font-size: 11px; letter-spacing: 4px; text-transform: uppercase; color: var(--gold); margin-bottom: 6px; }
.rtgc-title { font-family: 'Bebas Neue', sans-serif; font-weight: 400; font-size: clamp(44px, 9vw, 72px); line-height: .95; letter-spacing: 2px; margin: 0; color: var(--white); }


.rtgc-notes { margin: 0 0 22px; }
.rtgc-notes:empty { display: none; }

/* ── Estructura ── */
.rtgc-grid { display: block; }
.rtgc-grid[hidden], .rtgc-empty[hidden], .rtgc-bar[hidden] { display: none; }

/* ── Piezas ── */
.rtgc-item {
  position: relative; display: grid; grid-template-columns: 112px 1fr auto; gap: 8px 20px; align-items: start; padding: 16px; margin-bottom: 14px;
  background: var(--card); border: 1px solid var(--border); border-radius: 24px;
  opacity: 0; transform: translateY(14px); animation: rtgc-in .7s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 70ms);
  transition: border-color .3s ease, opacity .25s ease, transform .35s var(--ease);
}
@keyframes rtgc-in { to { opacity: 1; transform: none; } }
@media (hover: hover) { .rtgc-item:hover { border-color: rgba(201,168,76,.5); } }
.rtgc-item.is-busy { opacity: .6; pointer-events: none; }
.rtgc-item.is-leaving { opacity: 0; transform: translateX(-26px) scale(.98); pointer-events: none; }
.rtgc-thumb { grid-row: 1 / span 2; display: block; width: 112px; height: 112px; border-radius: 18px; overflow: hidden; background: #1a1a1a; }
.rtgc-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rtgc-info { min-width: 0; align-self: center; }
.rtgc-name { display: block; color: var(--white); text-decoration: none; font-family: 'Barlow Condensed', sans-serif; font-weight: 600; font-size: 19px; line-height: 1.2; }
.rtgc-name:hover { color: var(--gold-light); }
.rtgc-vars { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.rtgc-vars span { padding: 3px 10px; border-radius: 999px; background: #202020; color: var(--muted); font-size: 12px; letter-spacing: .5px; text-transform: uppercase; }
.rtgc-vars b { color: var(--white); font-weight: 600; }
.rtgc-unit { margin-top: 8px; color: var(--muted); font-size: 13px; }
.rtgc-qty { display: inline-flex; align-items: center; margin-top: 12px; border: 1px solid #333; border-radius: 999px; overflow: hidden; }
.rtgc-qty button { width: 42px; height: 40px; border: 0; background: transparent; color: var(--white); font-size: 20px; cursor: pointer; transition: background .2s ease, color .2s ease; }
.rtgc-qty button:hover:not(:disabled), .rtgc-qty button:focus-visible { background: var(--gold); color: var(--black); }
.rtgc-qty button:disabled { opacity: .3; cursor: not-allowed; }
.rtgc-qty output { min-width: 40px; text-align: center; font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; }
.rtgc-line { align-self: center; justify-self: end; font-family: 'Bebas Neue', sans-serif; font-size: 28px; letter-spacing: 1px; color: var(--gold-light); white-space: nowrap; }
.rtgc-remove { grid-column: 3; align-self: end; justify-self: end; display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 999px; border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer; font-family: 'Barlow Condensed', sans-serif; font-size: 13px; letter-spacing: 2px; text-transform: uppercase; transition: color .25s ease, border-color .25s ease; }
.rtgc-remove:hover, .rtgc-remove:focus-visible { color: #ff8b82; border-color: rgba(255,139,130,.4); }
.rtgc-more { display: inline-block; margin: 8px 0 0; color: var(--muted); text-decoration: none; font-family: 'Barlow Condensed', sans-serif; font-size: 14px; letter-spacing: 2px; text-transform: uppercase; }
.rtgc-more:hover { color: var(--gold-light); }

/* ── Lateral ── */
.rtgc-aside { margin-top: 26px; display: flex; flex-direction: column; gap: 14px; }
.rtgc-card { padding: 24px; background: var(--card); border: 1px solid var(--border); border-radius: 24px; }
.rtgc-h { font-family: 'Bebas Neue', sans-serif; font-weight: 400; font-size: 30px; letter-spacing: 1.5px; margin: 0 0 14px; color: var(--white); }
.rtgc-row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid #202020; color: #c9c4ba; font-size: 15px; }
.rtgc-row--fee { color: #7ee2a0; }
.rtgc-total { border-bottom: 0; padding-top: 16px; align-items: baseline; color: var(--white); font-family: 'Bebas Neue', sans-serif; font-size: 24px; letter-spacing: 2px; }
.rtgc-total span:last-child { font-size: 42px; color: var(--gold-light); }
.rtgc-saved { margin-top: 4px; padding: 10px 14px; border-radius: 14px; background: rgba(126,226,160,.1); color: #7ee2a0; font-size: 14px; text-align: center; }
.rtgc-saved b { font-weight: 700; }

/* Mayoreo: una sola tira plegable */
.rtgc-whbox { border: 1px solid rgba(201,168,76,.4); border-radius: 20px; background: linear-gradient(180deg, #1a1810, #141414); overflow: hidden; }
.rtgc-wh-toggle { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 16px; background: transparent; border: 0; cursor: pointer; color: var(--white); text-align: left; }
.rtgc-wh-ico { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(201,168,76,.18); color: var(--gold-light); font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 15px; }
.rtgc-wh-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rtgc-wh-txt b { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 13px; letter-spacing: 2px; text-transform: uppercase; color: var(--gold-light); }
.rtgc-wh-txt small { font-size: 13px; color: #c9c4ba; line-height: 1.35; }
.rtgc-wh-chev { flex: none; color: var(--muted); transition: transform .45s var(--ease); }
.rtgc-whbox.is-open .rtgc-wh-chev { transform: rotate(180deg); }
.rtgc-wh-toggle:focus-visible { outline: 2px solid var(--gold-light); outline-offset: -3px; border-radius: 20px; }
.rtgc-wh-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .5s var(--ease); }
.rtgc-whbox.is-open .rtgc-wh-panel { grid-template-rows: 1fr; }
.rtgc-wh-inner { min-height: 0; overflow: hidden; }
.rtgc-wh-list { max-height: 300px; overflow-y: auto; overscroll-behavior: contain; padding: 4px 16px 14px; border-top: 1px solid rgba(201,168,76,.2); }
.rtgc-wh { padding: 12px 0; border-bottom: 1px solid #262626; }
.rtgc-wh:last-child { border-bottom: 0; padding-bottom: 2px; }
.rtgc-wh-top { display: flex; justify-content: space-between; gap: 12px; font-family: 'Barlow Condensed', sans-serif; font-size: 13px; letter-spacing: 2px; text-transform: uppercase; color: var(--white); }
.rtgc-wh-top span { color: var(--muted); }
.rtgc-wh-bar { height: 5px; margin: 9px 0 7px; border-radius: 5px; background: #262626; overflow: hidden; }
.rtgc-wh-bar i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--gold), var(--gold-light)); box-shadow: 0 0 10px rgba(201,168,76,.5); transition: width .6s var(--ease); }
.rtgc-wh p { margin: 0; font-size: 13px; color: #c9c4ba; }
.rtgc-wh p b { color: var(--white); }
.rtgc-wh.is-max p { color: #7ee2a0; }

/* Vacío */
.rtgc-empty { text-align: center; padding: 56px 10px 30px; color: var(--muted); }
.rtgc-empty-big { font-family: 'Bebas Neue', sans-serif; font-size: clamp(150px, 34vw, 280px); line-height: .8; color: transparent; -webkit-text-stroke: 1.5px var(--gold); margin-bottom: 18px; }
.rtgc-empty h2 { font-family: 'Bebas Neue', sans-serif; font-weight: 400; font-size: 40px; letter-spacing: 2px; color: var(--white); margin: 0 0 8px; }
.rtgc-empty p { margin: 0 auto 24px; max-width: 34ch; line-height: 1.6; }

.rtgc-recent { margin-top: 60px; }

/* Barra fija en celular */
.rtgc-bar { display: none; }

@media (min-width: 960px) {
  .rtgc-grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 40px; align-items: start; }
  .rtgc-aside { margin-top: 0; position: sticky; top: 110px; }
}
@media (max-width: 959px) {
  .rtgc { padding-bottom: 116px; }
  .rtgc-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 400; display: flex; align-items: center; gap: 16px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: rgba(12,12,12,.92); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-top: 1px solid #262626;
  }
  .rtgc-bar-t { display: flex; flex-direction: column; line-height: 1.1; }
  .rtgc-bar-t span { font-family: 'Barlow Condensed', sans-serif; font-size: 11px; letter-spacing: 3px; text-transform: uppercase; color: var(--muted); }
  .rtgc-bar-t b { font-family: 'Bebas Neue', sans-serif; font-weight: 400; font-size: 28px; letter-spacing: 1px; color: var(--gold-light); }
  .rtgc-aside .rtgc-btn, .rtgc-aside .rtgc-how { display: none; }
}
@media (max-width: 560px) {
  .rtgc-item { grid-template-columns: 88px 1fr; gap: 6px 14px; padding: 14px; }
  .rtgc-thumb { width: 88px; height: 88px; grid-row: 1 / span 3; }
  .rtgc-line { grid-column: 2; justify-self: start; font-size: 24px; }
  .rtgc-remove { grid-column: 2; grid-row: auto; justify-self: start; padding: 6px 8px; margin-left: -8px; }
}
@media (prefers-reduced-motion: reduce) {
  .rtgc-item { animation: none; opacity: 1; transform: none; }
  body .rtgc .wc-proceed-to-checkout .checkout-button:not(#rtg)::after { animation: none; }
}

/* El brillo de la cabecera puede salirse del contenedor, pero nunca debe crear scroll horizontal */
body.rtg-newcart { overflow-x: clip; }
.rtgc-empty p { text-transform: none; letter-spacing: 0; font-size: 16px; font-family: inherit; }

/* ── Botón "Generar pedido RTG": el mismo de /cart (estilo 3D y estado "cargando"), más el brillo que cruza de lado a lado ── */
.rtgc .rtgc-btn { margin-top: 22px; }
.rtgc .rtgc-btn .wc-proceed-to-checkout { margin: 0; }
.rtgc .rtgc-btn .checkout-button {
  display: flex; align-items: center; justify-content: center; width: 100%; padding: 17px 24px;
  font-family: 'Barlow Condensed', sans-serif; font-size: 14px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; text-decoration: none; cursor: pointer;
}
body .rtgc .wc-proceed-to-checkout .checkout-button:not(#rtg)::after { animation: rtgc-shine 3.4s ease-in-out 1.4s infinite; transition: none; }
@keyframes rtgc-shine { 0%, 55% { left: -80%; } 100% { left: 140%; } }
.rtgc-steps { margin-top: 26px; margin-bottom: 0; }
@media (max-width: 959px) {
  /* Barra inferior: botón angosto, a la derecha y centrado entre el borde de arriba y el de abajo (el estilo 3D le suma un
   * margen y un "canto" de 5px por debajo, que se compensan aquí) */
  .rtgc .rtgc-btn.rtgc-btn--bar { flex: 0 1 200px; margin: 0 0 0 auto; }
  .rtgc-btn--bar .wc-proceed-to-checkout { margin: 0; }
  .rtgc-btn--bar .checkout-button { padding: 14px 12px; margin: 0 !important; white-space: nowrap; letter-spacing: 1.4px; }
}

/* Botón más angosto y centrado; el resumen más compacto para que el botón quede más arriba */
.rtgc .rtgc-sum .rtgc-btn { max-width: 300px; margin: 18px auto 0; }
.rtgc .rtgc-sum .rtgc-btn .checkout-button { padding: 16px 20px; }
.rtgc-card.rtgc-sum { padding: 20px 22px; }
.rtgc-h { margin-bottom: 8px; }
.rtgc-total { padding-top: 12px; }
.rtgc-how { margin-top: 18px; padding-top: 14px; }
@media (min-width: 960px) { .rtgc-aside { top: 96px; } }
@media (prefers-reduced-motion: reduce) { .rtgc-wh-panel, .rtgc-wh-chev, .rtgc-wh-bar i { transition: none; } }

.rtgc-how { list-style: none; margin: 18px 0 0; padding: 14px 0 0; border-top: 1px solid #222; display: flex; flex-direction: column; gap: 10px; }
.rtgc-how li { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; }
.rtgc-how b { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #222; color: var(--gold-light); font-family: 'Barlow Condensed', sans-serif; font-size: 13px; }

@media (max-width: 959px) {
  .rtgc-bar { align-items: center; padding: 14px 16px calc(20px + env(safe-area-inset-bottom)); }
}
.rtgc-remove { min-height: 42px; }
