/**
 * Gicell Academy — Ebooks (infoproductos WooCommerce): loop + single/landing.
 * Cargado solo en el archive de product_cat=ebooks (o subcat) y en el single de
 * un producto ebook. Depende de gicell-tokens.css (global).
 */

/* Fondo paper en las vistas de ebooks (el CSS solo carga aquí). */
body.tax-product_cat,
body.single-product {
	background: var(--paper);
}

.gicell-ebooks-page {
	max-width: 1240px;
	margin: 0 auto;
	padding: 48px 20px 80px;
	font-family: var(--font-body);
	color: var(--ink);
}

/* ═══════════ Portada tipográfica (card / hero / mini) ═══════════ */
.gicell-ebook-cover {
	position: relative;
	display: block;
	aspect-ratio: 3 / 4.2;
	border-radius: 6px;
	overflow: hidden;
	background: linear-gradient(158deg, #232323 0%, #141414 55%, #0E0E0E 100%);
	box-shadow: 0 10px 30px rgba(14, 14, 14, 0.18);
}
.gicell-ebook-cover__frame {
	position: absolute;
	inset: 10px;
	border: 1px solid rgba(201, 168, 106, 0.55);
	border-radius: 3px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 14px 12px;
	gap: 10px;
}
.gicell-ebook-cover__imprint {
	position: absolute;
	top: 12px;
	left: 0;
	right: 0;
	font-size: 8.5px;
	letter-spacing: 0.32em;
	text-transform: uppercase;
	color: var(--gold-soft);
}
.gicell-ebook-cover__title {
	font-family: var(--font-display);
	font-weight: 500;
	line-height: 1.18;
	color: #F5EFE3;
	font-size: 18px;
}
.gicell-ebook-cover__rule {
	width: 26px;
	height: 1px;
	background: var(--gold);
}
.gicell-ebook-cover__author {
	font-size: 10.5px;
	letter-spacing: 0.06em;
	color: rgba(255, 255, 255, 0.62);
}
.gicell-ebook-cover__foot {
	position: absolute;
	bottom: 12px;
	left: 0;
	right: 0;
	font-size: 8px;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.4);
}
.gicell-ebook-cover--mini {
	aspect-ratio: 3 / 4;
	border-radius: 4px;
}
.gicell-ebook-cover--mini .gicell-ebook-cover__frame { inset: 5px; padding: 8px 6px; gap: 5px; }
.gicell-ebook-cover--mini .gicell-ebook-cover__title { font-size: 10.5px; }
.gicell-ebook-cover--mini .gicell-ebook-cover__imprint,
.gicell-ebook-cover--mini .gicell-ebook-cover__author,
.gicell-ebook-cover--mini .gicell-ebook-cover__foot,
.gicell-ebook-cover--mini .gicell-ebook-cover__rule { display: none; }
.gicell-ebook-cover--hero .gicell-ebook-cover__title { font-size: 30px; }
.gicell-ebook-cover--hero .gicell-ebook-cover__author { font-size: 13px; }
.gicell-ebook-cover--hero .gicell-ebook-cover__imprint { font-size: 10px; top: 20px; }
.gicell-ebook-cover--hero .gicell-ebook-cover__frame { inset: 16px; gap: 16px; }

/* ═══════════ Estrellas ═══════════ */
.gicell-ebook-stars { letter-spacing: 1px; font-size: 13px; }
.gicell-ebook-star--on { color: var(--gold); }
.gicell-ebook-star--off { color: var(--line); }

/* ═══════════ LOOP: cabecera ═══════════ */
.gicell-ebooks-head { margin-bottom: 28px; }
.gicell-ebooks-eyebrow {
	font-size: 11px;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--gold);
	margin: 0 0 10px;
}
.gicell-ebooks-title {
	font-family: var(--font-display);
	font-weight: 500;
	font-size: 42px;
	line-height: 1.1;
	margin: 0 0 12px;
	color: var(--ink);
}
.gicell-ebooks-intro {
	max-width: 620px;
	color: var(--muted);
	font-size: 15px;
	line-height: 1.6;
	margin: 0;
}

/* Buscador con toggle segmentado (visual). */
.gicell-ebooks-search {
	display: flex;
	align-items: center;
	gap: 10px;
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: 999px;
	padding: 6px 6px 6px 20px;
	margin: 28px 0 16px;
}
.gicell-ebooks-search input {
	flex: 1;
	border: none;
	outline: none;
	background: transparent;
	font-family: var(--font-body);
	font-size: 14px;
	color: var(--ink);
}
.gicell-ebooks-search input::placeholder { color: var(--muted); }
.gicell-ebooks-seg { display: inline-flex; background: var(--paper-2); border-radius: 999px; padding: 3px; }
.gicell-ebooks-seg button {
	border: none;
	background: transparent;
	font-family: var(--font-body);
	font-size: 12.5px;
	color: var(--muted);
	padding: 7px 14px;
	border-radius: 999px;
	cursor: pointer;
}
.gicell-ebooks-seg button.is-active { background: var(--ink); color: var(--white); }
.gicell-ebooks-search__go {
	width: 38px;
	height: 38px;
	border-radius: 999px;
	background: var(--gold);
	border: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	color: #14110a;
}
.gicell-ebooks-search__go .ic { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Fila de filtros dropdown (visual). */
.gicell-ebooks-filters { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 34px; }
.gicell-ebooks-filter {
	appearance: none;
	-webkit-appearance: none;
	flex: 0 0 auto;
	width: auto;
	min-width: 150px;
	max-width: 220px;
	background: var(--white) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M0 0l5 6 5-6z' fill='%236F6B65'/></svg>") no-repeat right 14px center;
	border: 1px solid var(--line);
	border-radius: 999px;
	padding: 10px 34px 10px 16px;
	font-family: var(--font-body);
	font-size: 13px;
	color: var(--ink);
	cursor: pointer;
}
.gicell-ebooks-filter:focus { outline: none; border-color: var(--gold); }

/* ═══════════ LOOP: grid + cards ═══════════ */
.gicell-ebooks-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 28px 24px;
}
.gicell-ebook-card { display: flex; flex-direction: column; }
.gicell-ebook-card__media { position: relative; display: block; }
.gicell-ebook-card__media .gicell-ebook-cover { transition: transform 0.4s ease, box-shadow 0.4s ease; }
.gicell-ebook-card__media:hover .gicell-ebook-cover {
	transform: translateY(-4px);
	box-shadow: 0 18px 42px rgba(14, 14, 14, 0.26);
}
.gicell-ebook-badge {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 2;
	background: var(--gold);
	color: #14110a;
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: 4px 10px;
	border-radius: 999px;
}
.gicell-ebook-card__body { padding: 14px 2px 0; }
.gicell-ebook-card__title {
	font-family: var(--font-display);
	font-weight: 500;
	font-size: 16px;
	line-height: 1.3;
	margin: 0 0 4px;
}
.gicell-ebook-card__title a { color: var(--ink); text-decoration: none; }
.gicell-ebook-card__title a:hover { color: var(--gold); }
.gicell-ebook-card__author { font-size: 12.5px; color: var(--muted); margin: 0 0 8px; }
.gicell-ebook-card__foot { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.gicell-ebook-card__price { font-family: var(--font-display); font-size: 17px; color: var(--ink); }
.gicell-ebook-card__price del { color: var(--muted); font-size: 13px; margin-right: 6px; opacity: 0.75; }
.gicell-ebook-card__price ins { text-decoration: none; }
.gicell-ebook-card__meta { font-size: 11.5px; color: var(--muted); }

/* Panel "Más vendidos" (ocupa una celda del grid). */
.gicell-ebooks-bestsellers {
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 20px;
	display: flex;
	flex-direction: column;
}
.gicell-ebooks-bestsellers__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.gicell-ebooks-bestsellers__title { font-family: var(--font-display); font-weight: 500; font-size: 18px; margin: 0; color: var(--ink); }
.gicell-ebooks-bestsellers__arrow { width: 30px; height: 30px; border-radius: 999px; border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; color: var(--gold); }
.gicell-ebooks-bestsellers__arrow .ic { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.gicell-bestseller { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.gicell-bestseller:first-of-type { border-top: none; padding-top: 0; }
.gicell-bestseller__cover { flex: 0 0 42px; width: 42px; }
.gicell-bestseller__info { min-width: 0; }
.gicell-bestseller__title { font-family: var(--font-display); font-size: 13.5px; font-weight: 500; margin: 0 0 2px; line-height: 1.25; }
.gicell-bestseller__title a { color: var(--ink); text-decoration: none; }
.gicell-bestseller__title a:hover { color: var(--gold); }
.gicell-bestseller__author { font-size: 11.5px; color: var(--muted); }

/* Paginación. */
.gicell-ebooks-pagination { margin-top: 44px; display: flex; justify-content: center; }
.gicell-ebooks-pagination .page-numbers {
	display: inline-flex;
	min-width: 38px;
	height: 38px;
	align-items: center;
	justify-content: center;
	padding: 0 12px;
	border: 1px solid var(--line);
	border-radius: 999px;
	margin: 0 4px;
	color: var(--ink);
	text-decoration: none;
	font-size: 14px;
}
.gicell-ebooks-pagination .page-numbers.current { background: var(--ink); color: var(--white); border-color: var(--ink); }

@media (max-width: 1080px) { .gicell-ebooks-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .gicell-ebooks-grid { grid-template-columns: repeat(2, 1fr); } .gicell-ebooks-bestsellers { grid-column: 1 / -1; } }
@media (max-width: 480px) { .gicell-ebooks-grid { grid-template-columns: 1fr; } .gicell-ebooks-title { font-size: 32px; } }

/* ═══════════════════════════════════════════════════════════════
 * SINGLE / LANDING de ebook
 * ═══════════════════════════════════════════════════════════════ */
.gicell-ebook-single { font-family: var(--font-body); color: var(--ink); }
.gicell-ebook-wrap { max-width: 1140px; margin: 0 auto; padding: 0 20px; }

/* Hero */
.gicell-ebook-hero {
	display: grid;
	grid-template-columns: 1fr 0.9fr;
	gap: 56px;
	align-items: center;
	padding: 64px 0 72px;
}
.gicell-ebook-hero__title {
	font-family: var(--font-display);
	font-weight: 500;
	font-size: 46px;
	line-height: 1.08;
	margin: 0 0 18px;
	color: var(--ink);
}
.gicell-ebook-hero__by { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); margin-bottom: 22px; }
.gicell-ebook-hero__by strong { color: var(--ink); font-weight: 500; }
.gicell-ebook-awards { display: flex; gap: 22px; margin-bottom: 30px; }
.gicell-ebook-award { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; width: 84px; }
.gicell-ebook-award__seal {
	width: 54px; height: 54px; border-radius: 999px;
	border: 1px solid var(--gold);
	display: flex; align-items: center; justify-content: center;
	color: var(--gold);
	position: relative;
}
.gicell-ebook-award__seal::before,
.gicell-ebook-award__seal::after {
	content: "";
	position: absolute; top: 12px; bottom: 12px; width: 8px;
	border: 1px solid var(--gold-soft); border-radius: 999px;
}
.gicell-ebook-award__seal::before { left: -3px; border-right: none; }
.gicell-ebook-award__seal::after { right: -3px; border-left: none; }
.gicell-ebook-award__seal .ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.gicell-ebook-award__label { font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); line-height: 1.3; }
.gicell-ebook-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.gicell-ebook-btn {
	display: inline-flex; align-items: center; gap: 10px;
	padding: 15px 30px;
	border-radius: 999px;
	font-family: var(--font-body);
	font-size: 13.5px;
	font-weight: 500;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
	transition: all 0.25s ease;
}
.gicell-ebook-btn--buy { background: var(--gold); color: #14110a; border: 1px solid var(--gold); }
.gicell-ebook-btn--buy:hover { background: #14110a; color: var(--gold); border-color: #14110a; }
.gicell-ebook-btn--buy .gicell-ebook-btn__price { font-family: var(--font-display); font-weight: 500; }
.gicell-ebook-btn--demo { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.gicell-ebook-btn--demo:hover { background: var(--ink); color: var(--white); }

.gicell-ebook-hero__cover { position: relative; display: flex; justify-content: center; }
.gicell-ebook-hero__cover .gicell-ebook-cover {
	width: 300px;
	transform: perspective(1400px) rotateY(-14deg) rotateX(2deg);
	box-shadow: -22px 26px 60px rgba(14, 14, 14, 0.32);
}
.gicell-ebook-hero__seal {
	position: absolute; top: 8px; right: 4px;
	width: 88px; height: 88px; border-radius: 999px;
	background: var(--white); border: 1px solid var(--line);
	display: flex; align-items: center; justify-content: center;
	font-family: var(--font-display); font-size: 30px; color: var(--gold);
	box-shadow: 0 10px 26px rgba(14, 14, 14, 0.12);
}

/* Discover / citas */
.gicell-ebook-section { padding: 56px 0; }
.gicell-ebook-section--tint { background: var(--paper-2); }
.gicell-ebook-seyebrow { font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); margin: 0 0 8px; }
.gicell-ebook-stitle { font-family: var(--font-display); font-weight: 500; font-size: 30px; margin: 0 0 30px; color: var(--ink); }
.gicell-ebook-quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.gicell-ebook-quote {
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 26px 24px;
}
.gicell-ebook-quote__mark {
	width: 34px; height: 34px; border-radius: 999px;
	background: var(--paper-2); color: var(--gold);
	display: inline-flex; align-items: center; justify-content: center;
	font-family: var(--font-display); font-size: 24px; line-height: 1;
	margin-bottom: 16px;
}
.gicell-ebook-quote__text { font-size: 14.5px; line-height: 1.6; color: var(--ink-2); margin: 0; }
.gicell-ebook-dots { display: flex; justify-content: center; gap: 8px; margin-top: 26px; }
.gicell-ebook-dots span { width: 7px; height: 7px; border-radius: 999px; background: var(--line); }
.gicell-ebook-dots span.is-active { background: var(--gold); width: 20px; }

/* Autor */
.gicell-ebook-author { display: grid; grid-template-columns: 320px 1fr; gap: 48px; align-items: center; }
.gicell-ebook-author__portrait { position: relative; display: flex; justify-content: center; align-items: center; }
.gicell-ebook-author__disc { position: absolute; width: 220px; height: 220px; border-radius: 999px; background: linear-gradient(150deg, var(--gold-soft), var(--gold)); }
.gicell-ebook-author__mono {
	position: relative;
	width: 210px; height: 250px; border-radius: 8px;
	background: linear-gradient(158deg, #232323, #0E0E0E);
	display: flex; align-items: center; justify-content: center;
	font-family: var(--font-display); font-size: 66px; color: var(--gold-soft);
	box-shadow: 0 18px 44px rgba(14, 14, 14, 0.28);
}
.gicell-ebook-author__name { font-family: var(--font-display); font-weight: 500; font-size: 30px; margin: 0 0 8px; }
.gicell-ebook-author__rating { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.gicell-ebook-author__bio { font-family: var(--font-display); font-style: italic; font-size: 18px; line-height: 1.6; color: var(--ink-2); max-width: 560px; margin: 0 0 22px; }
.gicell-ebook-author__sign {
	font-family: var(--font-display); font-style: italic; font-size: 26px; color: var(--ink);
	border-bottom: 1px solid var(--line); display: inline-block; padding-bottom: 4px; margin-bottom: 6px;
}
.gicell-ebook-author__role { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }

/* Tabla de contenidos */
.gicell-ebook-toc { display: grid; grid-template-columns: 280px 1fr; gap: 48px; align-items: start; }
.gicell-ebook-toc__cover { width: 240px; }
.gicell-ebook-toc__list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.gicell-ebook-toc-item {
	display: flex; align-items: center; gap: 14px;
	background: var(--white); border: 1px solid var(--line);
	border-radius: var(--radius); padding: 14px 18px;
}
.gicell-ebook-toc-item__n {
	flex: 0 0 30px; width: 30px; height: 30px; border-radius: 999px;
	background: var(--ink); color: var(--white);
	display: inline-flex; align-items: center; justify-content: center;
	font-size: 13px; font-weight: 600;
}
.gicell-ebook-toc-item__t { font-size: 14px; color: var(--ink); }

@media (max-width: 900px) {
	.gicell-ebook-hero { grid-template-columns: 1fr; gap: 36px; padding: 40px 0 48px; }
	.gicell-ebook-hero__title { font-size: 36px; }
	.gicell-ebook-quotes { grid-template-columns: 1fr; }
	.gicell-ebook-author { grid-template-columns: 1fr; gap: 28px; justify-items: center; text-align: center; }
	.gicell-ebook-author__bio { text-align: left; }
	.gicell-ebook-toc { grid-template-columns: 1fr; }
	.gicell-ebook-toc__list { grid-template-columns: 1fr; }
	.gicell-ebook-toc__cover { width: 180px; margin: 0 auto; }
}
