/* ============================================================
   TIENDA - Bases musicales de meditación
   Sonidos del Alma · José Manuel Vargas
   ============================================================ */

/* ── Hero tienda ────────────────────────────────────────────── */
.td-hero {
  padding: 80px 0 48px;
  text-align: center;
}
.td-hero h1 {
  font-family: 'Cinzel', Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--color-primary, #00c9b1);
  letter-spacing: 3px;
  margin-bottom: 12px;
}
.td-hero p {
  color: #94a3b8;
  font-size: 1.05rem;
  max-width: 540px;
  margin: 0 auto;
}

/* ── Filtro de categorías ───────────────────────────────────── */
.td-filtros {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 40px;
}
.td-filtro-btn {
  background: transparent;
  border: 1px solid rgba(0, 201, 177, 0.3);
  color: #94a3b8;
  border-radius: 999px;
  padding: 6px 18px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.25s ease;
}
.td-filtro-btn:hover,
.td-filtro-btn.activo {
  background: rgba(0, 201, 177, 0.12);
  border-color: rgba(0, 201, 177, 0.6);
  color: #00c9b1;
}

/* ── Grid de productos ──────────────────────────────────────── */
.td-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
  padding-bottom: 60px;
}

/* ── Tarjeta de producto ────────────────────────────────────── */
.td-card {
  background: rgba(13, 21, 48, 0.7);
  border: 1px solid rgba(0, 201, 177, 0.15);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}
.td-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 201, 177, 0.12);
}
.td-card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}
.td-card-img-placeholder {
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg, rgba(0,201,177,0.08), rgba(79,110,247,0.08));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}
.td-card-body {
  padding: 18px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.td-card-categoria {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(0, 201, 177, 0.7);
  font-weight: 600;
}
.td-card-titulo {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 1.05rem;
  color: #e2e8f0;
  line-height: 1.4;
  margin: 0;
}
.td-card-desc {
  font-size: 0.88rem;
  color: #8892a4;
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.td-card-meta {
  display: flex;
  gap: 12px;
  font-size: 0.8rem;
  color: #64748b;
}
.td-card-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ── Player de preview ──────────────────────────────────────── */
.td-player {
  background: rgba(0, 201, 177, 0.05);
  border: 1px solid rgba(0, 201, 177, 0.12);
  border-radius: 10px;
  padding: 10px 12px;
}
.td-player audio {
  width: 100%;
  height: 36px;
  accent-color: #00c9b1;
}
.td-player-label {
  font-size: 0.72rem;
  color: rgba(0, 201, 177, 0.6);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
  display: block;
}

/* ── Pie de tarjeta ─────────────────────────────────────────── */
.td-card-footer {
  padding: 14px 20px;
  border-top: 1px solid rgba(0, 201, 177, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.td-precio {
  font-size: 1.3rem;
  font-weight: 700;
  color: #00c9b1;
}
.td-btn-comprar {
  background: rgba(0, 201, 177, 0.15);
  border: 1px solid rgba(0, 201, 177, 0.4);
  color: #00c9b1;
  border-radius: 999px;
  padding: 7px 20px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s ease;
  white-space: nowrap;
}
.td-btn-comprar:hover {
  background: #00c9b1;
  color: #0d1530;
  border-color: #00c9b1;
}

/* ── Formulario de compra ───────────────────────────────────── */
.td-compra-box {
  max-width: 520px;
  margin: 60px auto;
  background: rgba(13, 21, 48, 0.7);
  border: 1px solid rgba(0, 201, 177, 0.15);
  border-radius: 20px;
  padding: 36px 40px;
}
.td-compra-box h2 {
  font-family: 'Cinzel', Georgia, serif;
  color: var(--color-primary, #00c9b1);
  font-size: 1.3rem;
  margin-bottom: 6px;
}
.td-compra-producto {
  background: rgba(0, 201, 177, 0.06);
  border: 1px solid rgba(0, 201, 177, 0.15);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.td-compra-producto-nombre {
  font-size: 0.95rem;
  color: #c0cfe0;
}
.td-compra-producto-precio {
  font-size: 1.2rem;
  font-weight: 700;
  color: #00c9b1;
}
.td-form-label {
  display: block;
  font-size: 0.85rem;
  color: #8892a4;
  margin-bottom: 6px;
  font-weight: 500;
}
.td-form-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(0, 201, 177, 0.2);
  border-radius: 8px;
  color: #e2e8f0;
  padding: 11px 14px;
  /* FIX #7: 16px evita el auto-zoom de Safari iOS al enfocar el campo */
  font-size: 1rem;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.td-form-input:focus {
  outline: none;
  border-color: rgba(0, 201, 177, 0.6);
  background: rgba(255, 255, 255, 0.06);
}
.td-boletin-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(0, 201, 177, 0.05);
  border: 1px solid rgba(0, 201, 177, 0.15);
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
}
.td-boletin-check input[type="checkbox"] {
  margin-top: 2px;
  accent-color: #00c9b1;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  cursor: pointer;
}
.td-boletin-check-texto {
  font-size: 0.87rem;
  color: #94a3b8;
  line-height: 1.5;
}
.td-boletin-check-texto strong {
  color: #c0cfe0;
}
.td-btn-submit {
  width: 100%;
  background: #00c9b1;
  border: none;
  color: #0d1530;
  border-radius: 999px;
  padding: 13px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
  margin-top: 8px;
}
.td-btn-submit:hover { opacity: 0.88; }
.td-btn-submit:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Página pendiente (Bizum) ───────────────────────────────── */
.td-pendiente-box {
  max-width: 540px;
  margin: 60px auto;
  text-align: center;
}
.td-pendiente-box h1 {
  font-family: 'Cinzel', Georgia, serif;
  color: var(--color-primary, #00c9b1);
  font-size: 1.6rem;
  margin-bottom: 8px;
}
.td-bizum-card {
  background: rgba(13, 21, 48, 0.7);
  border: 1px solid rgba(0, 201, 177, 0.2);
  border-radius: 16px;
  padding: 28px 32px;
  margin: 28px 0;
  text-align: left;
}
.td-bizum-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  gap: 12px;
  flex-wrap: wrap;
}
.td-bizum-row:last-child { border-bottom: none; }
.td-bizum-label {
  font-size: 0.82rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 1px;
  flex-shrink: 0;
}
.td-bizum-valor {
  font-weight: 700;
  color: #e2e8f0;
  word-break: break-all;
}
.td-bizum-valor.concepto {
  color: #00c9b1;
  font-size: 1rem;
}
.td-bizum-valor.importe {
  color: #34d399;
  font-size: 1.2rem;
}
.td-copy-btn {
  background: rgba(0, 201, 177, 0.1);
  border: 1px solid rgba(0, 201, 177, 0.3);
  color: #00c9b1;
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}
.td-copy-btn:hover { background: rgba(0, 201, 177, 0.2); }
.td-copy-btn.copiado { color: #34d399; border-color: #34d399; }
.td-aviso {
  font-size: 0.85rem;
  color: #64748b;
  line-height: 1.7;
  margin-top: 20px;
}

/* ── Light mode overrides ───────────────────────────────────── */
body.light-mode .td-hero h1       { color: var(--color-primary); }
body.light-mode .td-hero p        { color: #475569; }
body.light-mode .td-filtro-btn    { color: #475569; border-color: rgba(10,123,108,0.3); }
body.light-mode .td-filtro-btn:hover,
body.light-mode .td-filtro-btn.activo {
  background: rgba(10,123,108,0.1);
  border-color: rgba(10,123,108,0.6);
  color: #0a7b6c;
}
body.light-mode .td-card {
  background: #ffffff;
  border-color: rgba(10,123,108,0.15);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
body.light-mode .td-card-titulo   { color: #1e293b; }
body.light-mode .td-card-desc     { color: #64748b; }
body.light-mode .td-card-meta     { color: #94a3b8; }
body.light-mode .td-player        { background: rgba(10,123,108,0.05); border-color: rgba(10,123,108,0.15); }
body.light-mode .td-card-footer   { border-top-color: rgba(10,123,108,0.08); }
body.light-mode .td-precio        { color: #0a7b6c; }
body.light-mode .td-btn-comprar   { background: rgba(10,123,108,0.1); border-color: rgba(10,123,108,0.4); color: #0a7b6c; }
body.light-mode .td-btn-comprar:hover { background: #0a7b6c; color: #fff; border-color: #0a7b6c; }
body.light-mode .td-compra-box    { background: #fff; border-color: rgba(10,123,108,0.15); box-shadow: 0 4px 24px rgba(0,0,0,0.07); }
body.light-mode .td-compra-box h2 { color: var(--color-primary); }
body.light-mode .td-compra-producto { background: rgba(10,123,108,0.05); border-color: rgba(10,123,108,0.15); }
body.light-mode .td-compra-producto-nombre { color: #334155; }
body.light-mode .td-compra-producto-precio { color: #0a7b6c; }
body.light-mode .td-form-label    { color: #475569; }
body.light-mode .td-form-input    { background: #f8fafc; border-color: #cbd5e1; color: #1e293b; }
body.light-mode .td-form-input:focus { border-color: #0a7b6c; background: #fff; }
body.light-mode .td-boletin-check { background: rgba(10,123,108,0.04); border-color: rgba(10,123,108,0.18); }
body.light-mode .td-boletin-check-texto { color: #64748b; }
body.light-mode .td-boletin-check-texto strong { color: #334155; }
body.light-mode .td-btn-submit    { background: #0a7b6c; color: #fff; }
body.light-mode .td-bizum-card    { background: #fff; border-color: rgba(10,123,108,0.2); box-shadow: 0 2px 12px rgba(0,0,0,0.06); }
body.light-mode .td-bizum-label   { color: #94a3b8; }
body.light-mode .td-bizum-valor   { color: #1e293b; }
body.light-mode .td-bizum-valor.concepto { color: #0a7b6c; }
body.light-mode .td-bizum-valor.importe  { color: #065f46; }
body.light-mode .td-copy-btn      { background: rgba(10,123,108,0.08); border-color: rgba(10,123,108,0.3); color: #0a7b6c; }
body.light-mode .td-aviso         { color: #94a3b8; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 600px) {
  .td-compra-box   { padding: 24px 20px; margin: 30px 16px; }
  .td-bizum-card   { padding: 20px 18px; }
  .td-grid         { grid-template-columns: 1fr; }
}

/* ============================================================
   Estilos consolidados desde los <style> inline de los .php
   (refactor 2026-04-28 — tienda/index.php, producto.php,
    carrito.php, categoria.php)
   ============================================================ */

/* ── Botón flotante carrito (FAB) ───────────────────────────── */
.td-carrito-fab { position:fixed; bottom:1.5rem; right:1.5rem; z-index:999;
                  background:var(--color-primary); color:#fff; border-radius:50px;
                  padding:.65rem 1.1rem; text-decoration:none; font-weight:700;
                  font-size:.9rem; display:flex; align-items:center; gap:.5rem;
                  box-shadow:0 4px 20px rgba(13,148,136,.45); transition:opacity .2s; }
.td-carrito-fab:hover { opacity:.85; color:#fff; }
.td-carrito-badge { background:#fff; color:var(--color-primary); border-radius:50%;
                    width:20px; height:20px; display:inline-flex; align-items:center;
                    justify-content:center; font-size:.72rem; font-weight:800; }

/* ── Botón "Añadir al carrito" en cards ─────────────────────── */
.td-btn-carrito   { background: rgba(13,148,136,.15); border: 1px solid rgba(13,148,136,.4);
                    color: var(--color-primary); font-size: .8rem; font-weight: 700;
                    padding: .4rem .9rem; border-radius: 8px; cursor: pointer;
                    transition: background .15s; white-space: nowrap; }
.td-btn-carrito:hover  { background: rgba(13,148,136,.3); }
.td-btn-carrito.en-carrito { background: rgba(34,197,94,.15); border-color: rgba(34,197,94,.4);
                             color: #4ade80; }

/* ── Breadcrumb ─────────────────────────────────────────────── */
.td-breadcrumb { font-size: .82rem; color: #64748b; margin: 1rem 0 1.5rem; }
.td-breadcrumb a { color: #64748b; text-decoration: none; }
.td-breadcrumb a:hover { color: var(--color-primary); }

/* ── Página detalle de producto ─────────────────────────────── */
.td-detalle             { max-width: 860px; margin: 0 auto; padding: 2rem 1rem 4rem; }
.td-detalle-grid        { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }
.td-detalle-img         { width: 100%; border-radius: 14px; box-shadow: 0 8px 32px rgba(0,0,0,.18); }
.td-detalle-placeholder { background: linear-gradient(135deg,#0f172a,#1e293b); border-radius: 14px;
                          aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center;
                          font-size: 4rem; }
.td-detalle-categoria   { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
                          color: var(--color-primary); margin-bottom: .5rem; }
.td-detalle-titulo      { font-size: 1.8rem; font-weight: 800; margin: 0 0 .75rem; line-height: 1.2; }
.td-detalle-desc        { color: #94a3b8; font-size: .95rem; line-height: 1.7; margin-bottom: 1.25rem; }
.td-detalle-meta        { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.td-detalle-meta span   { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
                          padding: .3rem .75rem; border-radius: 20px; font-size: .82rem; }
.td-detalle-precio      { font-size: 2rem; font-weight: 800; color: var(--color-primary); margin-bottom: 1.5rem; }
.td-detalle-player      { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1);
                          border-radius: 10px; padding: .75rem 1rem; margin-bottom: 1.5rem; }
.td-detalle-player p    { font-size: .8rem; color: #94a3b8; margin: 0 0 .4rem; }
.td-detalle-player audio{ width: 100%; }
.td-btn-comprar-grande  { display: block; background: var(--color-primary); color: #fff; text-align: center;
                          font-weight: 700; font-size: 1.1rem; padding: .9rem 1.5rem; border-radius: 10px;
                          text-decoration: none; transition: opacity .2s; }
.td-btn-comprar-grande:hover { opacity: .85; color: #fff; }

/* ── Página de carrito ──────────────────────────────────────── */
.td-carrito-box   { max-width: 720px; margin: 0 auto; padding: 2rem 1rem 4rem; }
.td-carrito-item  { display: flex; align-items: center; gap: 1rem;
                    background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
                    border-radius: 12px; padding: 1rem; margin-bottom: .75rem; }
.td-carrito-img   { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.td-carrito-img-ph{ width: 64px; height: 64px; border-radius: 8px; background: rgba(255,255,255,.06);
                    display: flex; align-items: center; justify-content: center; font-size: 1.6rem; flex-shrink: 0; }
.td-carrito-info  { flex: 1; min-width: 0; }
.td-carrito-titulo{ font-weight: 700; color: #f1f5f9; font-size: .95rem;
                    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.td-carrito-precio{ font-size: 1.05rem; font-weight: 800; color: var(--color-primary); white-space: nowrap; }
.td-carrito-quitar{ background: none; border: none; color: #ef4444; cursor: pointer;
                    font-size: 1.2rem; padding: .25rem .5rem; border-radius: 6px;
                    transition: background .15s; flex-shrink: 0; }
.td-carrito-quitar:hover { background: rgba(239,68,68,.12); }
.td-carrito-total { display: flex; justify-content: space-between; align-items: center;
                    border-top: 1px solid rgba(255,255,255,.1); margin-top: 1.25rem;
                    padding-top: 1.25rem; }
.td-carrito-total-label { color: #94a3b8; font-size: .9rem; }
.td-carrito-total-precio{ font-size: 1.6rem; font-weight: 800; color: #f1f5f9; }
.td-carrito-actions { display: flex; flex-direction: column; gap: .75rem; margin-top: 1.5rem; }
.td-btn-pagar     { display: block; background: var(--color-primary); color: #fff;
                    text-align: center; font-weight: 700; font-size: 1.05rem;
                    padding: .9rem 1.5rem; border-radius: 10px; text-decoration: none;
                    transition: opacity .2s; }
.td-btn-pagar:hover { opacity: .85; color: #fff; }
.td-vaciar-link   { text-align: center; color: #64748b; font-size: .82rem; cursor: pointer;
                    background: none; border: none; text-decoration: underline; }
.td-vaciar-link:hover { color: #ef4444; }
.td-carrito-empty { text-align: center; padding: 4rem 1rem; }
.td-carrito-empty p { color: #64748b; }

/* ── Responsive detalle ─────────────────────────────────────── */
@media (max-width: 640px) {
  .td-detalle-grid   { grid-template-columns: 1fr; }
  .td-detalle-titulo { font-size: 1.4rem; }
}
