/* ==========================================================================
   Flyer Configurator for WooCommerce v2 — estilo imprenta online
   Aislado bajo .flycfg. Personaliza la paleta en las variables.
   ========================================================================== */

.flycfg {
	--fc-ink: #333a40;
	--fc-muted: #70777d;
	--fc-line: #d4d7d9;
	--fc-line-soft: #e7e9ea;
	--fc-bg: #fff;
	--fc-soft: #f6f7f7;
	--fc-accent: #f60;          /* selección (naranja imprenta) */
	--fc-accent-soft: #fff4ec;
	--fc-green: #2e7d4f;        /* banner "fabricado en", éxito */
	--fc-red: #c0392b;          /* precio neto destacado */
	--fc-cta: #ff7900;          /* botón Añadir a la cesta */
	--fc-radius: 3px;

	max-width: 860px;
	margin: 0 auto;
	color: var(--fc-ink);
	font-size: 15px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

.flycfg *, .flycfg *::before, .flycfg *::after { box-sizing: border-box; }
.flycfg button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.flycfg button:focus-visible, .flycfg a:focus-visible, .flycfg label:focus-within {
	outline: 2px solid var(--fc-accent);
	outline-offset: 2px;
}

.flycfg__title { margin: 0 0 14px; font-size: 30px; font-weight: 700; }
.flycfg__h2 { margin: 0 0 6px; font-size: 19px; font-weight: 700; }

/* ---------- banner ---------- */

.flycfg__banner {
	display: flex;
	gap: 14px;
	align-items: flex-start;
	margin-bottom: 20px;
	padding: 14px 16px;
	border: 1px solid #cfe3d6;
	border-radius: var(--fc-radius);
	background: #f0f7f2;
}
.flycfg__banner-icon { color: var(--fc-green); flex: none; margin-top: 2px; }
.flycfg__banner-title { margin: 0 0 2px; font-size: 15px; font-weight: 700; }
.flycfg__banner-text { margin: 0; font-size: 13.5px; color: var(--fc-muted); }

/* ---------- acordeones ---------- */

.flycfg__config { border-top: 1px solid var(--fc-line); }
.flycfg__acc { border-bottom: 1px solid var(--fc-line); }

.flycfg__acc-head {
	display: flex;
	align-items: center;
	gap: 14px;
	width: 100%;
	padding: 15px 4px;
	text-align: left;
}
.flycfg__acc-title { flex: none; min-width: 170px; font-weight: 700; font-size: 15px; }
.flycfg__acc-sel { flex: 1; text-align: right; color: var(--fc-ink); font-size: 14.5px; }
.flycfg__acc-sel .flycfg__acc-price { color: var(--fc-ink); font-weight: 700; margin-left: 6px; }
.flycfg__chev { flex: none; color: var(--fc-muted); transition: transform .18s; }
.flycfg__acc.is-open .flycfg__chev { transform: rotate(90deg); }

.flycfg__acc-body { display: none; padding: 4px 0 20px; }
.flycfg__acc.is-open .flycfg__acc-body { display: block; }

.flycfg__sectiontitle {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	margin: 34px 0 8px;
}
.flycfg__sectiontitle h2 { margin: 0; font-size: 19px; font-weight: 700; }
.flycfg__sectiontitle span { color: var(--fc-muted); font-size: 13px; }

/* ---------- fichas ---------- */

.flycfg__tabs { display: flex; gap: 18px; margin: 4px 2px 14px; flex-wrap: wrap; }
.flycfg__tab {
	padding: 4px 0;
	border-bottom: 2px solid transparent;
	color: var(--fc-muted);
	font-size: 14px;
	font-weight: 600;
}
.flycfg__tab:hover { color: var(--fc-ink); }
.flycfg__tab.is-active { color: var(--fc-ink); border-bottom-color: var(--fc-accent); }

.flycfg__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
	gap: 10px;
}
.flycfg__tile {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	min-height: 64px;
	padding: 14px 10px;
	border: 1px solid var(--fc-line);
	border-radius: var(--fc-radius);
	background: var(--fc-bg);
	text-align: center;
	font-size: 14px;
	transition: border-color .12s, box-shadow .12s;
}
.flycfg__tile:hover { border-color: var(--fc-accent); }
.flycfg__tile.is-selected {
	border-color: var(--fc-accent);
	box-shadow: inset 0 0 0 1px var(--fc-accent);
	background: var(--fc-accent-soft);
}
.flycfg__tile.is-selected::after {
	content: '';
	position: absolute;
	top: -7px;
	right: -7px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--fc-accent) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="none" stroke="white" stroke-width="2.4" d="M3.5 8.5l3 3 6-6.5"/></svg>') center/11px no-repeat;
}
.flycfg__tile-label { font-weight: 600; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.flycfg__tile-sub { color: var(--fc-muted); font-size: 12.5px; }
.flycfg__tile-price { font-size: 13px; }
.flycfg__tile-price s { color: var(--fc-muted); margin-right: 4px; }
.flycfg__tile-price b { color: var(--fc-ink); }

.flycfg__sheet {
	display: block;
	margin: 0 auto 4px;
	border: 1px solid #b9bdc0;
	background: linear-gradient(180deg, #fff, #eef0f1);
}
.flycfg__tile.is-selected .flycfg__sheet { border-color: var(--fc-accent); }

.flycfg__badge {
	display: inline-block;
	margin-left: 6px;
	padding: 1px 7px;
	border-radius: 99px;
	background: #e7f3ec;
	color: var(--fc-green);
	font-size: 11px;
	font-weight: 700;
	vertical-align: middle;
}

/* ---------- subtotal ---------- */

.flycfg__subtotal {
	display: flex;
	justify-content: space-between;
	padding: 14px 4px;
	border-bottom: 1px solid var(--fc-line);
	font-size: 15px;
}

/* ---------- entrega ---------- */

.flycfg__deliverysec { margin-top: 36px; }
.flycfg__deadline { margin: 0; font-size: 13.5px; color: var(--fc-ink); }
.flycfg__hint { margin: 2px 0 14px; font-size: 13.5px; color: var(--fc-muted); }

.flycfg__delivery { display: flex; flex-direction: column; gap: 8px; }
.flycfg__deliv {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	padding: 13px 14px;
	border: 1px solid var(--fc-line);
	border-radius: var(--fc-radius);
	background: var(--fc-bg);
	text-align: left;
	transition: border-color .12s, box-shadow .12s;
}
.flycfg__deliv:hover { border-color: var(--fc-accent); }
.flycfg__deliv.is-selected {
	border-color: var(--fc-accent);
	box-shadow: inset 0 0 0 1px var(--fc-accent);
	background: var(--fc-accent-soft);
}
.flycfg__radio {
	flex: none;
	width: 17px;
	height: 17px;
	border: 2px solid var(--fc-line);
	border-radius: 50%;
	background: #fff;
}
.flycfg__deliv.is-selected .flycfg__radio {
	border-color: var(--fc-accent);
	box-shadow: inset 0 0 0 3.5px #fff;
	background: var(--fc-accent);
}
.flycfg__deliv-main { flex: 1; display: flex; flex-direction: column; }
.flycfg__deliv-main strong { font-size: 15px; }
.flycfg__deliv-main small { color: var(--fc-muted); font-size: 12.5px; }
.flycfg__deliv-price { font-weight: 700; font-size: 14.5px; white-space: nowrap; }

/* ---------- archivos ---------- */

.flycfg__filesec { margin-top: 36px; }
.flycfg__files { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.flycfg__filecard {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	padding: 26px 20px;
	border: 1px solid var(--fc-line);
	border-radius: var(--fc-radius);
	background: var(--fc-bg);
	text-align: center;
}
.flycfg__filecard.is-selected {
	border-color: var(--fc-accent);
	box-shadow: inset 0 0 0 1px var(--fc-accent);
}
.flycfg__filecard svg { color: var(--fc-muted); }
.flycfg__filecard h3 { margin: 0; font-size: 15.5px; font-weight: 700; }
.flycfg__filecard p { margin: 0 0 6px; color: var(--fc-muted); font-size: 13.5px; }

.flycfg__filestatus { min-height: 1em; margin: 0; font-size: 13px; }
.flycfg__filestatus.is-ok { color: var(--fc-green); font-weight: 600; }
.flycfg__filestatus.is-error { color: var(--fc-red); font-weight: 600; }

/* ---------- botones ---------- */

.flycfg__btn {
	display: inline-block;
	padding: 11px 22px;
	border: 1px solid var(--fc-ink);
	border-radius: var(--fc-radius);
	background: #fff;
	color: var(--fc-ink);
	font-size: 14.5px;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
	transition: background .12s, color .12s, filter .12s;
}
.flycfg__btn:hover { background: var(--fc-soft); color: var(--fc-ink); text-decoration: none; }
.flycfg__btn--quiet { border-color: var(--fc-line); width: 100%; max-width: 260px; }
.flycfg__btn--tertiary { border-color: var(--fc-line); }
.flycfg__btn--cta {
	border-color: var(--fc-cta);
	background: var(--fc-cta);
	color: #fff;
	padding: 12px 28px;
}
.flycfg__btn--cta:hover { filter: brightness(0.93); background: var(--fc-cta); color: #fff; }
.flycfg__btn--cta:disabled { opacity: .6; cursor: wait; }

/* ---------- barra total fija ---------- */

.flycfg__total {
	position: sticky;
	bottom: 0;
	z-index: 60;
	display: grid;
	grid-template-columns: 1fr auto auto;
	align-items: center;
	gap: 8px 26px;
	margin-top: 34px;
	padding: 14px 18px;
	border: 1px solid var(--fc-line);
	border-bottom: 0;
	background: #fff;
	box-shadow: 0 -6px 18px rgba(0, 0, 0, .08);
}
.flycfg__total-shipping { font-size: 13.5px; color: var(--fc-muted); }
.flycfg__total-shipping strong { color: var(--fc-ink); margin-left: 4px; }
.flycfg__weight { margin-left: 6px; }

.flycfg__total-price { display: flex; flex-direction: column; align-items: flex-end; }
.flycfg__total-net span { color: var(--fc-red); font-size: 23px; font-weight: 800; }
.flycfg__total-net small, .flycfg__total-gross small { color: var(--fc-muted); margin-left: 6px; font-size: 12px; }
.flycfg__total-gross span { font-size: 14.5px; font-weight: 600; }
.flycfg__total-discount { color: var(--fc-green); font-size: 12px; font-weight: 600; }

.flycfg__total-cta { display: flex; gap: 10px; align-items: center; }
.flycfg__total-msg { grid-column: 1 / -1; margin: 0; font-size: 13px; min-height: 1em; }
.flycfg__total-msg.is-ok { color: var(--fc-green); font-weight: 600; }
.flycfg__total-msg.is-error { color: var(--fc-red); font-weight: 600; }
.flycfg__total-msg a { color: var(--fc-accent); font-weight: 700; }

/* ---------- notas ---------- */

.flycfg__notes { margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--fc-line-soft); }
.flycfg__notes ul { margin: 8px 0 0; padding-left: 18px; color: var(--fc-muted); font-size: 13.5px; }
.flycfg__notes li { margin-bottom: 5px; }
.flycfg__notes strong { color: var(--fc-ink); }

/* ---------- responsive ---------- */

@media (max-width: 680px) {
	.flycfg { font-size: 14px; }
	.flycfg__grid { grid-template-columns: repeat(2, 1fr); }
	.flycfg__files { grid-template-columns: 1fr; }
	.flycfg__acc-title { min-width: 0; }
	.flycfg__total { grid-template-columns: 1fr; }
	.flycfg__total-price { align-items: flex-start; }
	.flycfg__total-cta { flex-direction: column; align-items: stretch; }
	.flycfg__total-cta .flycfg__btn { text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
	.flycfg * { transition: none !important; }
}

/* ==========================================================================
   v3 — layout con galería de imágenes (WooCommerce) a la izquierda
   ========================================================================== */

.flycfg--with-gallery {
	max-width: 1200px;
	display: grid;
	grid-template-columns: 360px 1fr;
	gap: 40px;
	align-items: start;
}
.flycfg--with-gallery .flycfg__main { min-width: 0; }

.flycfg__gallery {
	position: sticky;
	top: 24px;
}
.flycfg__gallery-main {
	border: 1px solid var(--fc-line);
	border-radius: var(--fc-radius);
	background: #fff;
	overflow: hidden;
}
.flycfg__gallery-main img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: contain;
}
.flycfg__gallery-thumbs {
	display: flex;
	gap: 8px;
	margin-top: 10px;
	flex-wrap: wrap;
}
.flycfg__gallery-thumb {
	width: 64px;
	height: 64px;
	padding: 0;
	border: 1px solid var(--fc-line);
	border-radius: var(--fc-radius);
	background: #fff;
	overflow: hidden;
	transition: border-color .12s;
}
.flycfg__gallery-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.flycfg__gallery-thumb:hover { border-color: var(--fc-accent); }
.flycfg__gallery-thumb.is-active {
	border-color: var(--fc-accent);
	box-shadow: inset 0 0 0 1px var(--fc-accent);
}

/* formato con página propia */
.flycfg__tile--link:hover { background: var(--fc-soft); }
.flycfg__linkmark { color: var(--fc-accent); font-weight: 800; }

@media (max-width: 920px) {
	.flycfg--with-gallery { grid-template-columns: 1fr; }
	.flycfg__gallery { position: static; max-width: 420px; }
}
