/*
Theme Name: WikiSTL
Template: blocksy
Description: Tema hijo de Blocksy con la identidad visual de WikiSTL.
Version: 1.0.0
*/

:root {
  --bg: #FAF7F2;
  --bg-alt: #F3EFE8;
  --surface: #FFFFFF;
  --ink: #1A0F24;
  --ink-soft: #4B3E5C;
  --muted: #685C7A;
  --border: #E5DED3;
  --border-soft: #EDE7DC;

  --brand: #2D0F4C;
  --brand-600: #3D1A5C;
  --brand-500: #5B2A9E;
  --brand-400: #7E3FD6;
  --brand-50: #F3EBFF;

  --accent: #E4B87A;
  --success: #0E9F6E;
  --danger: #D1455B;

  --shadow-sm: 0 1px 2px rgba(45, 15, 76, 0.04), 0 1px 1px rgba(45, 15, 76, 0.02);
  --shadow-md: 0 4px 16px rgba(45, 15, 76, 0.06), 0 2px 4px rgba(45, 15, 76, 0.04);
  --shadow-lg: 0 20px 40px -12px rgba(45, 15, 76, 0.15), 0 8px 16px -8px rgba(45, 15, 76, 0.08);
  --shadow-brand: 0 20px 40px -12px rgba(45, 15, 76, 0.35), 0 8px 16px -8px rgba(45, 15, 76, 0.2);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ========== BASE ========== */
body, p, input, textarea, select, button {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif !important;
  color: var(--ink);
}
body { background: var(--bg) !important; }

h1, h2, h3, h4,
.wp-block-heading,
.section-title,
.ct-page-title {
  font-family: 'Fraunces', serif !important;
  font-weight: 500 !important;
  color: var(--brand) !important;
  letter-spacing: -0.01em;
}
h1 em, h2 em, .section-title em {
  font-style: italic;
  font-weight: 400;
  color: var(--brand-500) !important;
}

a { color: var(--brand-500); }
a:hover { color: var(--brand); }

/* ========== HEADER / NAV ========== */
#masthead, .header-main, .ct-header {
  background: rgba(250, 247, 242, 0.92) !important;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.ct-menu-link {
  color: var(--ink-soft) !important;
  font-weight: 500 !important;
  font-size: 14.5px !important;
}
.ct-menu-link:hover { color: var(--brand) !important; }

/* El panel del menú móvil (offcanvas) es oscuro por diseño del tema;
   los enlaces deben ser claros ahí, no el morado oscuro del resto del sitio. */
#offcanvas .ct-menu-link { color: #ffffff !important; }
#offcanvas .ct-menu-link:hover { color: var(--accent) !important; }
#offcanvas .ct-header { background: transparent !important; }

/* ========== BOTONES (sitio + WooCommerce) ========== */
.wp-block-button__link,
.button,
button,
input[type="submit"],
.woocommerce a.button,
.woocommerce button.button,
.woocommerce #respond input#submit,
.wcv_submit_button,
.wcvendors_pro_submit_button {
  font-family: 'Manrope', sans-serif !important;
  font-weight: 600 !important;
  border-radius: 100px !important;
  padding: 13px 26px !important;
  background: var(--brand) !important;
  color: #fff !important;
  border: none !important;
  box-shadow: var(--shadow-brand);
  transition: all 0.2s var(--ease) !important;
}
.wp-block-button__link:hover,
.button:hover,
button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce #respond input#submit:hover {
  background: var(--brand-600) !important;
  transform: translateY(-2px);
}
.wp-block-button.is-style-outline .wp-block-button__link {
  background: transparent !important;
  color: var(--brand) !important;
  border: 1.5px solid var(--brand) !important;
  box-shadow: none;
}

/* ========== TARJETAS GENERALES / PRODUCTOS ========== */
.woocommerce ul.products li.product,
.wc-block-grid__product,
.wcv-vendor-shop-header,
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  padding: 20px !important;
  position: relative;
  overflow: hidden;
  transition: all 0.3s var(--ease);
  box-shadow: none !important;
}
.woocommerce ul.products li.product::before,
.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-400), var(--brand-500));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.woocommerce ul.products li.product:hover,
.feature-card:hover {
  border-color: var(--brand-400) !important;
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg) !important;
}
.woocommerce ul.products li.product:hover::before,
.feature-card:hover::before { transform: scaleX(1); }

.feature-icon, .highlight-icon {
  width: 52px;
  height: 52px;
  background: var(--brand-50);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-500);
  flex-shrink: 0;
}
.feature-icon { margin: 0 auto 16px; }
.feature-icon svg, .highlight-icon svg { width: 26px; height: 26px; }
.highlight-icon { width: 44px; height: 44px; background: #fff; box-shadow: var(--shadow-sm); border-radius: 12px; }
.highlight-icon svg { width: 22px; height: 22px; }

.woocommerce ul.products li.product .price {
  color: var(--brand) !important;
  font-family: 'Fraunces', serif !important;
  font-size: 20px !important;
  font-weight: 500 !important;
}
.woocommerce ul.products li.product h2,
.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-family: 'Fraunces', serif !important;
  color: var(--brand) !important;
}

/* ========== FORMULARIOS (login, registro, checkout, vendedor) ========== */
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.woocommerce-form-login input,
.woocommerce-form-register input,
.wcv-form input,
.wcv_form_field input {
  border: 1px solid var(--border) !important;
  border-radius: 10px !important;
  padding: 12px 16px !important;
  background: var(--surface) !important;
  font-family: 'Manrope', sans-serif !important;
}
.woocommerce form .form-row input.input-text:focus,
.woocommerce-form-login input:focus,
.woocommerce-form-register input:focus {
  outline: none !important;
  border-color: var(--brand-400) !important;
  box-shadow: 0 0 0 3px rgba(126, 63, 214, 0.15) !important;
}
.woocommerce-form-login,
.woocommerce-form-register,
.woocommerce-ResetPassword {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px !important;
}

/* ========== CORRECCIONES ========== */
.site-logo-container img.default-logo {
  height: 44px !important;
  width: auto !important;
}
.site-title-container { display: none !important; }
body.home .hero-section { display: none !important; }
.vendors_list--shop-phone, .vendors_list--shop-address { display: none !important; }

/* Footer propio (sustituye al footer de Blocksy, que trae texto roto) */
.ct-footer { display: none !important; }
.wikistl-footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 60px 24px 30px;
}
.wikistl-footer-inner { max-width: 1200px; margin: 0 auto; }
.wikistl-footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.wikistl-footer h4 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand) !important;
  margin-bottom: 16px;
}
.wikistl-footer ul { list-style: none; margin: 0; padding: 0; }
.wikistl-footer ul li { margin-bottom: 10px; }
.wikistl-footer ul a { color: var(--ink-soft); text-decoration: none; font-size: 14.5px; }
.wikistl-footer ul a:hover { color: var(--brand); }
.wikistl-footer-brand p { color: var(--ink-soft); font-size: 14px; max-width: 320px; margin-top: 12px; line-height: 1.6; }
.wikistl-footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 13.5px;
  color: var(--muted);
}
@media (max-width: 760px) {
  .wikistl-footer-top { grid-template-columns: 1fr; gap: 28px; }
}

/* ========== MI CUENTA ========== */
.woocommerce-MyAccount-navigation ul {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
}
.woocommerce-MyAccount-navigation li { border-bottom: 1px solid var(--border-soft); }
.woocommerce-MyAccount-navigation li a {
  display: block;
  padding: 14px 20px;
  color: var(--ink-soft);
  font-weight: 500;
}
.woocommerce-MyAccount-navigation li.is-active a,
.woocommerce-MyAccount-navigation li a:hover { color: var(--brand); background: var(--brand-50); }

/* ========== BLOQUE EMBED STL ========== */
.embed-stl-target {
  border-radius: var(--radius-lg) !important;
  background: var(--bg-alt) !important;
}

/* ========== SECCIONES ESTILO HOME ========== */
.section-eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-500);
  margin-bottom: 16px;
}
.highlight-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 28px 0;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  background: var(--bg-alt);
  margin: 40px 0;
}
.highlight-item { display: flex; align-items: center; gap: 12px; justify-content: center; text-align: left; }
.highlight-item strong { display: block; color: var(--brand); font-size: 15px; }
.highlight-item span { color: var(--ink-soft); font-size: 13px; }

/* ========== FAQ (bloques <details>) ========== */
details.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  padding: 0;
  overflow: hidden;
}
details.faq-item summary {
  padding: 18px 24px;
  cursor: pointer;
  font-weight: 600;
  color: var(--brand);
  list-style: none;
}
details.faq-item summary::-webkit-details-marker { display: none; }
details.faq-item[open] { border-color: var(--brand-400); }
details.faq-item p { padding: 0 24px 20px; color: var(--ink-soft); }

/* ========== FOOTER ========== */
#colophon, .ct-footer {
  background: var(--bg) !important;
  border-top: 1px solid var(--border);
  color: var(--ink-soft);
}
#colophon a, .ct-footer a { color: var(--ink-soft); }
#colophon a:hover, .ct-footer a:hover { color: var(--brand); }

/* ========== AVISO DE BORRAR CUENTA ========== */
.wikistl-delete-account {
  background: #FBEAED;
  border: 1px solid #F3C4CD;
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-top: 24px;
}
.wikistl-delete-account h2 { color: var(--danger) !important; font-size: 20px !important; }
.wikistl-delete-account .button-delete {
  background: var(--danger) !important;
  box-shadow: none !important;
}
.wikistl-delete-account .button-delete:hover { background: #B23349 !important; }

/* ========== RESPONSIVE ========== */
@media (max-width: 760px) {
  .highlight-strip { grid-template-columns: 1fr; }
}
