/* Constructor Experto — CSS del frontend (ligero, sin dependencias). */
.cex-page { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; color: var(--cex-secondary, #111827); line-height: 1.6; }
.cex-section { width: 100%; }
.cex-container { max-width: var(--cex-container, 1140px); margin: 0 auto; padding-left: 20px; padding-right: 20px; }
.cex-full .cex-container { max-width: none; }
.cex-row { display: flex; flex-wrap: wrap; gap: 24px; }
.cex-col { flex: 1 1 0; min-width: 0; }
.cex-col > * { margin-top: 0; }
.cex-heading { line-height: 1.2; margin: 0 0 12px; color: var(--cex-secondary, #111827); }
.cex-text p { margin: 0 0 12px; }
.cex-text p:last-child { margin-bottom: 0; }
.cex-image { max-width: 100%; height: auto; border-radius: 8px; }
.cex-image-wrap { margin-bottom: 16px; }
.cex-btn { display: inline-block; padding: 12px 24px; border-radius: 8px; text-decoration: none; font-weight: 600; line-height: 1.2; }
.cex-btn-primary { background: var(--cex-primary, #1a73e8); color: #fff; }
.cex-btn-secondary { background: var(--cex-secondary, #111827); color: #fff; }
.cex-btn-outline { border: 2px solid var(--cex-primary, #1a73e8); color: var(--cex-primary, #1a73e8); background: transparent; }
.cex-button-wrap { margin: 8px 0 16px; }
.cex-video { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: 8px; margin-bottom: 16px; }
.cex-video iframe, .cex-video video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }
.cex-testimonial { border-left: 4px solid var(--cex-accent, #f59e0b); background: #f9fafb; padding: 20px 24px; margin: 0 0 16px; border-radius: 0 8px 8px 0; }
.cex-testimonial p { font-size: 1.1em; font-style: italic; margin: 0 0 10px; }
.cex-testimonial footer { font-size: .9em; color: #4b5563; }
.cex-cta { text-align: center; padding: 40px 24px; border-radius: 12px; margin-bottom: 16px; }
.cex-cta h3 { margin: 0 0 8px; font-size: 1.6em; }
.cex-cta p { margin: 0 0 16px; }
.cex-list { margin: 0 0 16px; padding-left: 4px; list-style: none; }
.cex-list li { padding: 4px 0 4px 28px; position: relative; }
.cex-list-check li::before { content: "✓"; position: absolute; left: 0; color: var(--cex-primary, #1a73e8); font-weight: 700; }
.cex-list-disc { list-style: disc; padding-left: 24px; }
.cex-list-disc li { padding-left: 0; }
.cex-list-disc li::before { content: none; }
.cex-list-number { list-style: decimal; padding-left: 24px; }
.cex-list-number li { padding-left: 0; }
.cex-list-number li::before { content: none; }
.cex-spacer { display: block; }
/* Responsivo: las columnas se apilan en móvil. */
@media (max-width: 768px) {
  .cex-row { flex-direction: column; }
  .cex-col { flex-basis: 100% !important; }
  .cex-cta { padding: 28px 16px; }
}

/* ---------- v1.1.0: widgets nuevos ---------- */
.cex-accordion { margin-bottom: 16px; }
.cex-acc-item { border: 1px solid #e5e7eb; border-radius: 8px; margin-bottom: 8px; overflow: hidden; }
.cex-acc-item summary { cursor: pointer; padding: 14px 18px; font-weight: 600; background: #f9fafb; }
.cex-acc-item p { padding: 14px 18px; margin: 0; }

.cex-tabs { margin-bottom: 16px; }
.cex-tab-radio { position: absolute; opacity: 0; pointer-events: none; }
.cex-tab-label { display: inline-block; padding: 10px 18px; border: 1px solid #e5e7eb; border-bottom: 0; border-radius: 8px 8px 0 0; cursor: pointer; background: #f9fafb; font-weight: 600; margin-right: 4px; }
.cex-tab-panel { display: none; border: 1px solid #e5e7eb; border-radius: 0 8px 8px 8px; padding: 18px; }
.cex-tab-panel p { margin: 0; }
.cex-tabs .cex-tab-radio:nth-of-type(1):checked ~ .cex-tab-panel-1,
.cex-tabs .cex-tab-radio:nth-of-type(2):checked ~ .cex-tab-panel-2,
.cex-tabs .cex-tab-radio:nth-of-type(3):checked ~ .cex-tab-panel-3,
.cex-tabs .cex-tab-radio:nth-of-type(4):checked ~ .cex-tab-panel-4,
.cex-tabs .cex-tab-radio:nth-of-type(5):checked ~ .cex-tab-panel-5,
.cex-tabs .cex-tab-radio:nth-of-type(6):checked ~ .cex-tab-panel-6,
.cex-tabs .cex-tab-radio:nth-of-type(7):checked ~ .cex-tab-panel-7,
.cex-tabs .cex-tab-radio:nth-of-type(8):checked ~ .cex-tab-panel-8 { display: block; }

.cex-gallery { display: grid; grid-template-columns: repeat(var(--cex-gal-cols, 3), 1fr); gap: 12px; margin-bottom: 16px; }
.cex-gal-item { margin: 0; }
.cex-gal-item img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; display: block; }
@media (max-width: 768px) { .cex-gallery { grid-template-columns: repeat(2, 1fr); } }

.cex-pricing { text-align: center; border: 1px solid #e5e7eb; border-radius: 12px; padding: 32px 24px; margin-bottom: 16px; background: #fff; }
.cex-pricing h3 { margin: 0 0 8px; }
.cex-price { font-size: 2em; font-weight: 700; margin: 0 0 16px; color: var(--cex-primary, #1a73e8); }
.cex-price span { font-size: .5em; font-weight: 400; color: #6b7280; }
.cex-pricing-features { list-style: none; padding: 0; margin: 0 0 20px; }
.cex-pricing-features li { padding: 6px 0; border-bottom: 1px solid #f3f4f6; }

.cex-countdown { text-align: center; padding: 24px; background: #f9fafb; border-radius: 12px; margin-bottom: 16px; }
.cex-countdown-label { font-weight: 600; margin: 0 0 8px; }
.cex-countdown-time { font-size: 1.8em; font-weight: 700; margin: 0; font-variant-numeric: tabular-nums; }

.cex-social { margin-bottom: 16px; }
.cex-social-link { display: inline-block; padding: 8px 16px; margin: 0 6px 6px 0; border-radius: 999px; background: var(--cex-secondary, #111827); color: #fff; text-decoration: none; font-weight: 600; font-size: .9em; }

.cex-map { margin-bottom: 16px; }
.cex-map iframe { width: 100%; height: 320px; border: 0; border-radius: 8px; }

.cex-quote { font-size: 1.25em; font-style: italic; border-left: 4px solid var(--cex-primary, #1a73e8); padding: 8px 0 8px 20px; margin: 0 0 16px; }
.cex-quote cite { display: block; font-size: .75em; font-style: normal; color: #6b7280; margin-top: 8px; }

.cex-divider { border: 0; margin: 24px 0; }

.cex-contact-form { margin-bottom: 16px; }
.cex-contact-form label { display: block; font-weight: 600; margin-bottom: 4px; }
.cex-contact-form input[type="text"], .cex-contact-form input[type="email"], .cex-contact-form textarea { width: 100%; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 8px; margin-bottom: 12px; box-sizing: border-box; font: inherit; }
.cex-form-ok { background: #ecfdf5; border: 1px solid #6ee7b7; color: #065f46; padding: 12px 16px; border-radius: 8px; }

/* Noticias y revistas */
.cex-posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 16px; }
.cex-posts-list { display: flex; flex-direction: column; gap: 16px; margin-bottom: 16px; }
.cex-card { border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden; background: #fff; }
.cex-card-list { display: flex; }
.cex-card-list a:first-child { flex: 0 0 160px; }
.cex-card-thumb { width: 100%; height: auto; display: block; }
.cex-card-list .cex-card-thumb { height: 100%; object-fit: cover; }
.cex-card-body { padding: 16px; }
.cex-card-date { font-size: .85em; color: #6b7280; margin: 0 0 6px; }
.cex-card-body h3 { margin: 0 0 8px; font-size: 1.1em; }
.cex-card-body h3 a { text-decoration: none; color: inherit; }
.cex-card-body p { margin: 0 0 8px; }
@media (max-width: 768px) {
  .cex-posts-grid { grid-template-columns: 1fr; }
  .cex-card-list { flex-direction: column; }
  .cex-card-list a:first-child { flex: none; }
}

.cex-featured { border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden; background: #fff; margin-bottom: 16px; }
.cex-featured-thumb { width: 100%; height: auto; display: block; }
.cex-featured-body { padding: 24px; }
.cex-featured-body h2 { margin: 0 0 10px; }
.cex-featured-body h2 a { text-decoration: none; color: inherit; }

.cex-author-box { display: flex; gap: 16px; align-items: flex-start; background: #f9fafb; border-radius: 12px; padding: 20px; margin-bottom: 16px; }
.cex-author-avatar { border-radius: 50%; flex: 0 0 auto; }
.cex-author-info p { margin: 6px 0 0; }

.cex-note { color: #6b7280; font-size: .9em; }

/* WooCommerce */
.cex-product-price { font-size: 1.6em; font-weight: 700; color: var(--cex-primary, #1a73e8); margin: 0 0 12px; }
.cex-add-cart { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; }
.cex-add-cart input[type="number"] { width: 70px; padding: 10px; border: 1px solid #d1d5db; border-radius: 8px; }

/* ---------- Popups ---------- */
.cex-popup-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); z-index: 99999; display: flex; align-items: center; justify-content: center; padding: 20px; }
/* El display:flex de arriba anula el [hidden] del navegador: sin esta regla
   el overlay oculto seguiría tapando toda la página y bloqueando los clics. */
.cex-popup-overlay[hidden] { display: none; }
.cex-popup { position: relative; background: #fff; border-radius: 12px; max-width: 560px; width: 100%; max-height: 85vh; overflow: auto; padding: 32px 28px; }
.cex-popup-close { position: absolute; top: 12px; right: 12px; border: 0; background: #f3f4f6; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: 14px; line-height: 1; }
body.cex-popup-open { overflow: hidden; }
