/* ===========================
   AVES PATAGONIA — tienda.css
   =========================== */

.tienda-main { padding-top: var(--nav-h); min-height: 80vh; }

/* ── HERO TIENDA ── */
.t-hero { padding: clamp(3rem,7vw,6rem) 0 2rem; }
.t-hero__title { font-size: clamp(2rem,5vw,3.5rem); margin: .5rem 0 1rem; }
.t-hero__sub { color: var(--text-muted); max-width: 580px; }

/* ── SECTION TITLE ── */
.t-section-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem,3vw,2.4rem);
  margin-bottom: 2.5rem;
  padding-top: clamp(2.5rem,5vw,4rem);
}

/* ── PRODUCT GRID ── */
.t-productos { padding: 3rem 0 6rem; }
.t-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}
.t-card {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
  transition: border-color .2s, transform .2s;
}
.t-card:hover { border-color: rgba(255,255,255,.3); transform: translateY(-3px); }
.t-card--highlight {
  border-color: rgba(255,255,255,.35);
  background: linear-gradient(160deg, rgba(255,255,255,.04) 0%, var(--bg-3) 60%);
}
.t-card__tier {
  display: inline-block;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: .5rem;
}
.t-card__tier--traduccion,
.t-card__tier--bundle { color: var(--accent); }
.t-card__nombre { font-size: 1.15rem; margin-bottom: .75rem; }
.t-card__precio {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  margin-bottom: .75rem;
}
.t-card__precio span { font-size: .8rem; color: var(--text-muted); font-family: var(--font-body); font-weight: 400; }
.t-card__desc { font-size: .875rem; color: var(--text-muted); margin-bottom: 1rem; line-height: 1.6; }
.t-card__items { display: flex; flex-direction: column; gap: .3rem; margin-bottom: 1rem; }
.t-card__items li { font-size: .8rem; color: var(--text-muted); padding-left: 1rem; position: relative; }
.t-card__items li::before { content: '✓'; position: absolute; left: 0; color: var(--accent); font-size: .7rem; }
.t-card__actions { display: flex; flex-direction: column; gap: .6rem; }
.t-card__add { font-size: .8rem; }

/* ── NAV CART BADGE ── */
.nav__cart-link { position: relative; }
.nav__cart-badge {
  position: absolute;
  top: -.5rem;
  right: -.7rem;
  background: #ffffff;
  color: #050505;
  font-size: .6rem;
  font-weight: 700;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ── BACK LINK ── */
.t-back {
  display: inline-block;
  font-size: .82rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  transition: color .2s;
}
.t-back:hover { color: var(--text); }

/* ── PRODUCTO DETALLE ── */
.t-detalle { padding: clamp(2rem,5vw,4rem) 0 6rem; }
.t-detalle__grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 4rem;
  align-items: start;
}
.t-detalle__info h1 { margin: .5rem 0 1.5rem; }
.t-detalle__desc { color: var(--text-muted); line-height: 1.8; margin-bottom: 2rem; }
.t-detalle__includes h3 { font-size: 1rem; margin-bottom: .75rem; }
.t-detalle__includes ul { display: flex; flex-direction: column; gap: .5rem; }
.t-detalle__includes li { font-size: .9rem; color: var(--text-muted); padding-left: 1.2rem; position: relative; }
.t-detalle__includes li::before { content: '✓'; position: absolute; left: 0; color: var(--accent); }

.t-compra-card {
  background: var(--bg-3);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 6px;
  padding: 2rem;
  position: sticky;
  top: calc(var(--nav-h) + 2rem);
}
.t-compra-card__precio {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: .5rem;
}
.t-compra-card__precio span { font-size: .9rem; color: var(--text-muted); font-family: var(--font-body); font-weight: 400; }
.t-compra-card__desc { font-size: .875rem; color: var(--text-muted); margin-bottom: 1.5rem; }
.t-compra-btn { font-size: 1rem; padding: 1rem; }
.t-compra-card__nota { font-size: .75rem; color: var(--text-muted); text-align: center; margin-top: 1rem; opacity: .6; }

/* ── CARRITO ── */
.t-carrito { padding-bottom: 6rem; }
.t-carrito__grid { display: grid; grid-template-columns: 1fr 320px; gap: 3rem; align-items: start; }
.t-carrito__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}
.t-carrito__item-info { display: flex; flex-direction: column; gap: .2rem; }
.t-carrito__item-tipo { font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted); }
.t-carrito__item-nombre { font-weight: 500; }
.t-carrito__item-right { display: flex; align-items: center; gap: 1.25rem; }
.t-carrito__item-precio { font-family: var(--font-display); font-size: 1.1rem; }
.t-carrito__remove {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: 3px;
  cursor: pointer;
  font-size: .75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .2s, color .2s;
}
.t-carrito__remove:hover { border-color: #c0392b; color: #c0392b; }
.t-carrito__divider { border: none; border-top: 1px solid var(--border); margin: 1.5rem 0; }
.t-carrito__total { display: flex; justify-content: space-between; font-weight: 600; }
.t-carrito__total-num { font-family: var(--font-display); font-size: 1.3rem; }

.t-carrito__aside { position: sticky; top: calc(var(--nav-h) + 2rem); }
.t-carrito__resumen {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.75rem;
}
.t-carrito__resumen h3 { margin-bottom: 1.25rem; font-size: 1rem; }
.t-carrito__resumen-rows { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 1.5rem; }
.t-carrito__resumen-row { display: flex; justify-content: space-between; font-size: .875rem; color: var(--text-muted); }
.t-carrito__resumen-total { display: flex; justify-content: space-between; font-weight: 600; padding-top: .75rem; border-top: 1px solid var(--border); margin-top: .5rem; }

/* ── CHECKOUT ── */
.t-checkout { padding-bottom: 6rem; }
.t-checkout__grid { display: grid; grid-template-columns: 1fr 320px; gap: 4rem; align-items: start; }
.t-checkout__step { font-size: 1.1rem; margin-bottom: 1.5rem; color: var(--text-muted); font-family: var(--font-body); font-weight: 500; letter-spacing: .02em; }
.t-form { display: flex; flex-direction: column; gap: 1.25rem; }
.t-form__hint { font-size: .75rem; color: var(--text-muted); margin-top: .3rem; }
.t-checkout__pago { margin-top: 2rem; }
.t-pago-placeholder {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 6px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}
.t-pago-placeholder__icon { font-size: 1.5rem; flex-shrink: 0; }
.t-pago-placeholder strong { display: block; margin-bottom: .3rem; }
.t-pago-placeholder p { font-size: .85rem; color: var(--text-muted); }
.t-checkout__submit { padding: 1.1rem; font-size: 1rem; margin-top: .5rem; }
.t-checkout__resumen {
  position: sticky;
  top: calc(var(--nav-h) + 2rem);
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.75rem;
}
.t-checkout__resumen h3 { margin-bottom: 1.25rem; }
.t-checkout__resumen-row { display: flex; justify-content: space-between; font-size: .875rem; color: var(--text-muted); padding: .4rem 0; }
.t-checkout__resumen-total { display: flex; justify-content: space-between; font-weight: 600; padding-top: .75rem; border-top: 1px solid var(--border); margin-top: .5rem; }
.t-checkout__edit { display: block; font-size: .8rem; color: var(--text-muted); text-align: center; margin-top: 1rem; transition: color .2s; }
.t-checkout__edit:hover { color: var(--text); }
.t-error { color: #e74c3c; font-size: .875rem; padding: .75rem 1rem; border: 1px solid rgba(231,76,60,.3); border-radius: 3px; margin-bottom: 1rem; }

/* ── CONFIRMACION ── */
.t-confirmacion { padding: clamp(3rem,8vw,7rem) 0 6rem; }
.t-confirmacion__inner { max-width: 560px; margin: 0 auto; text-align: center; }
.t-confirmacion__check {
  width: 72px; height: 72px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  color: #ffffff;
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}
.t-confirmacion__inner h1 { font-size: 1.4rem; letter-spacing: .1em; margin: .5rem 0 1rem; }
.t-confirmacion__sub { color: var(--text-muted); margin-bottom: 2.5rem; }
.t-confirmacion__detalle {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  text-align: left;
}
.t-confirmacion__detalle h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .12em; color: var(--text-muted); margin-bottom: 1rem; }
.t-confirmacion__row { display: flex; justify-content: space-between; font-size: .9rem; padding: .4rem 0; color: var(--text-muted); }
.t-confirmacion__total { display: flex; justify-content: space-between; font-weight: 600; padding-top: .75rem; border-top: 1px solid var(--border); margin-top: .5rem; color: var(--text); }
.t-confirmacion__aviso {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.25rem;
  text-align: left;
  margin-bottom: 2rem;
}
.t-aviso-icon { font-size: 1.4rem; flex-shrink: 0; }
.t-confirmacion__aviso strong { display: block; margin-bottom: .3rem; }
.t-confirmacion__aviso p { font-size: .875rem; color: var(--text-muted); }

/* ── EMPTY STATES ── */
.t-empty-state { text-align: center; padding: 5rem 0; }
.t-empty-state p { color: var(--text-muted); margin-bottom: 1.5rem; }
.t-empty { color: var(--text-muted); }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .t-detalle__grid { grid-template-columns: 1fr; }
  .t-compra-card { position: static; }
  .t-carrito__grid { grid-template-columns: 1fr; }
  .t-carrito__aside { position: static; }
  .t-checkout__grid { grid-template-columns: 1fr; }
  .t-checkout__resumen { position: static; }
}

@media (max-width: 600px) {
  .t-grid { grid-template-columns: 1fr; }

  /* Cart row: precio + botón en línea propia en pantallas pequeñas */
  .t-carrito__row { flex-wrap: wrap; gap: .6rem; }
  .t-carrito__item-right { margin-left: auto; }

  /* Padding reducido */
  .t-card { padding: 1.25rem; }
  .t-compra-card { padding: 1.25rem; }
  .t-carrito__resumen { padding: 1.25rem; }
  .t-checkout__resumen { padding: 1.25rem; }
  .t-confirmacion__detalle { padding: 1.25rem; }
  .t-confirmacion__aviso { flex-direction: column; gap: .5rem; }

  /* Precio en detalle */
  .t-compra-card__precio { font-size: 1.8rem; }
}

@media (max-width: 480px) {
  /* Prevent iOS zoom on input focus */
  .t-form input,
  .t-form select,
  .t-form textarea { font-size: 1rem; }

  /* Confirmacion en mobile muy pequeño */
  .t-confirmacion__row { flex-direction: column; gap: .15rem; }
  .t-confirmacion__total { flex-direction: row; }
}
