/* GTM Lab — Ecommerce + blog + contact mockup styles */
:root {
  --color-primary: #1a73e8;
  --color-primary-dark: #1557b0;
  --color-text: #202124;
  --color-text-muted: #5f6368;
  --color-border: #dadce0;
  --color-bg: #f8f9fa;
  --color-card: #fff;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.5;
}

/* Header and navigation */
.site-header {
  background: var(--color-card);
  border-bottom: 1px solid var(--color-border);
  padding: 0.75rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-primary);
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--color-text);
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
}

.site-nav a:hover {
  background: var(--color-bg);
  color: var(--color-primary);
}

.site-nav a.config-link {
  color: var(--color-primary);
  font-weight: 500;
}

/* Contenedor principal */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
}

/* Página Home */
.hero {
  background: linear-gradient(135deg, #1a73e8 0%, #34a853 100%);
  color: #fff;
  padding: 2rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  text-align: center;
}

.hero h1 {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
}

.hero p {
  margin: 0;
  opacity: 0.95;
}

/* Video practice page */
.video-intro {
  margin-bottom: 1.5rem;
  color: var(--color-text-muted);
  max-width: 720px;
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  max-width: 720px;
  margin-bottom: 1rem;
  border-radius: 8px;
  background: var(--color-border);
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-hint {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.video-hint a {
  color: var(--color-primary);
  word-break: break-all;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}

.product-card {
  background: var(--color-card);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: box-shadow 0.2s;
}

.product-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.product-card a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.product-card .thumb {
  height: 160px;
  background: var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--color-text-muted);
}

.product-card .info {
  padding: 1rem;
}

.product-card .name {
  font-weight: 600;
  margin: 0 0 0.25rem;
}

.product-card .price {
  color: var(--color-primary);
  font-weight: 600;
}

/* Botones */
.btn {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  text-decoration: none;
  text-align: center;
  transition: background 0.2s;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-primary-dark);
}

.btn-secondary {
  background: var(--color-bg);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  background: var(--color-border);
}

/* Ficha de producto */
.product-detail {
  display: grid;
  gap: 2rem;
  max-width: 800px;
}

@media (min-width: 600px) {
  .product-detail {
    grid-template-columns: 1fr 1fr;
  }
}

.product-detail .gallery {
  height: 280px;
  background: var(--color-border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: var(--color-text-muted);
}

.product-detail .meta h1 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
}

.product-detail .meta .price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 1rem;
}

/* Carrito */
.cart-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--color-card);
  border-radius: 8px;
  margin-bottom: 0.5rem;
  border: 1px solid var(--color-border);
}

.cart-item .name { flex: 1; font-weight: 500; }
.cart-item .qty { min-width: 3rem; text-align: center; }
.cart-item .price { font-weight: 600; color: var(--color-primary); }
.cart-item .remove { color: #c5221f; cursor: pointer; text-decoration: underline; font-size: 0.9rem; }

.cart-total {
  font-size: 1.25rem;
  font-weight: 700;
  text-align: right;
  margin-bottom: 1rem;
}

/* Formularios */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 500;
  font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  max-width: 400px;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
}

.form-group textarea {
  min-height: 100px;
  resize: vertical;
}

/* Checkout y contacto */
.checkout-form,
.contact-form {
  max-width: 480px;
  background: var(--color-card);
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid var(--color-border);
}

/* Página Gracias */
.thank-you {
  text-align: center;
  max-width: 500px;
  margin: 2rem auto;
}

.thank-you h1 { color: var(--color-primary); margin-bottom: 0.5rem; }
.thank-you .order-id { font-family: monospace; background: var(--color-bg); padding: 0.25rem 0.5rem; border-radius: 4px; }

/* Blog */
.post-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.post-list li {
  margin-bottom: 1rem;
}

.post-list a {
  display: block;
  padding: 1rem;
  background: var(--color-card);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--color-border);
}

.post-list a:hover {
  border-color: var(--color-primary);
  box-shadow: 0 2px 8px rgba(26, 115, 232, 0.15);
}

.post-list .post-title { margin: 0 0 0.35rem; font-weight: 600; }
.post-list .post-excerpt { margin: 0; font-size: 0.9rem; color: var(--color-text-muted); }

.post-single {
  max-width: 720px;
  margin: 0 auto;
}

.post-single .post-header { margin-bottom: 1.5rem; }
.post-single .post-header h1 { margin: 0 0 0.5rem; font-size: 1.75rem; }
.post-single .post-header .post-meta { color: var(--color-text-muted); font-size: 0.9rem; }
.post-single .post-author { font-weight: 500; color: var(--color-primary); }
.post-list .post-author-inline { display: block; font-size: 0.85rem; color: var(--color-text-muted); margin-top: 0.25rem; }

.post-single .post-body {
  background: var(--color-card);
  padding: 1.5rem 2rem;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  line-height: 1.7;
}

.post-single .post-body p {
  margin: 0 0 1rem;
}

.post-single .post-body p:last-child {
  margin-bottom: 0;
}

/* Config GTM */
.config-panel {
  max-width: 520px;
  background: var(--color-card);
  padding: 1.5rem 2rem;
  border-radius: 8px;
  border: 1px solid var(--color-border);
}

.config-panel h1 { margin: 0 0 1rem; font-size: 1.35rem; }
.config-panel p { margin: 0 0 1rem; color: var(--color-text-muted); font-size: 0.95rem; }
.config-panel .input-row { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.config-panel input[type="text"] {
  flex: 1;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-size: 1rem;
}
.config-panel .hint { font-size: 0.85rem; color: var(--color-text-muted); }
.config-panel .success { color: #1e8e3e; font-weight: 500; margin-top: 0.5rem; }
.config-panel .error { color: #c5221f; font-size: 0.9rem; margin-top: 0.5rem; }
.error { color: #c5221f; font-size: 0.9rem; }

/* Footer con enlaces externos y descargas */
.site-footer {
  margin-top: 3rem;
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--color-border);
  background: var(--color-card);
}

.site-footer .inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
}

.site-footer h4 { margin: 0 0 0.75rem; font-size: 0.9rem; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.5rem; }
.site-footer a { color: var(--color-primary); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* Enlaces externos y descargas (para prácticas GTM) */
.footer-external a[href^="http"]::after { content: " ↗"; font-size: 0.8em; }
.footer-downloads a[href$=".pdf"]::before { content: "📄 "; }
.footer-downloads a[href$=".mp3"]::before { content: "🎵 "; }

/* Utilidades */
.page-title { margin: 0 0 1.5rem; font-size: 1.5rem; }
.empty-state { text-align: center; padding: 2rem; color: var(--color-text-muted); }
.breadcrumb { font-size: 0.9rem; margin-bottom: 1rem; }
.breadcrumb a { color: var(--color-text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--color-primary); }
