/* Copynami · base común: tokens del logo, cabecera, pie y botones. */
/* Los colores se eligen en Copy-Tec → Ajustes → Aspecto (--copy-tec-color-*); estos valores son los de serie. */
:root {
	--cw-mint: var(--copy-tec-color-mint, #9be6cd);
	--cw-mint-soft: var(--copy-tec-color-mint-soft, #ddf6ec);
	--cw-pink: var(--copy-tec-color-pink, #fe7888);
	--cw-orange: var(--copy-tec-color-orange, #faab26);
	--cw-yellow: var(--copy-tec-color-yellow, #ffd315);
	--cw-cream: var(--copy-tec-color-chip, #fff3c4);
	--cw-paper: var(--copy-tec-color-cream, #fff8e1);
	--cw-blue: var(--copy-tec-color-blue, #3892ca);
	--cw-magenta: var(--copy-tec-color-brand, #c7026e);
	--cw-ink: var(--copy-tec-color-ink, #1c1b22);
	--cw-muted: var(--copy-tec-color-muted, #55545f);
	--cw-radius: 28px;
	--cw-font: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* Sustituimos la cabecera y el pie de Blocksy por los propios. */
body.cpwh-site #header,
body.cpwh-site #footer,
body.cpwh-site .ct-header,
body.cpwh-site .ct-footer { display: none !important; }
body.cpwh-bare .hero-section,
body.cpwh-bare .entry-header,
body.cpwh-notitle .hero-section,
body.cpwh-notitle .entry-header { display: none; }
body.cpwh-site { font-family: var(--cw-font); color: var(--cw-ink); }

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Botones: planos, redondos, con el negro del logo */
.cpwh-btn {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 52px; padding: 0 28px; border: 0; border-radius: 999px;
	font: 800 1rem var(--cw-font); letter-spacing: -0.01em; text-decoration: none !important; cursor: pointer;
	transition: transform .18s ease, background-color .18s ease, color .18s ease;
}
.cpwh-btn:hover { transform: translateY(-2px) rotate(-1deg); }
.cpwh-btn:active { transform: translateY(0) scale(.98); }
.cpwh-btn--pink { background: var(--cw-pink); color: var(--cw-ink) !important; }
.cpwh-btn--pink:hover { background: #ff93a0; }
.cpwh-btn--yellow { background: var(--cw-yellow); color: var(--cw-ink) !important; }
.cpwh-btn--yellow:hover { background: #ffe14d; }
.cpwh-btn--ink { background: var(--cw-ink); color: #fff !important; }
.cpwh-btn--ink:hover { background: #2f2e3a; }
.cpwh-btn--white { background: #fff; color: var(--cw-ink) !important; }
.cpwh-btn--magenta { background: var(--cw-magenta); color: #fff !important; }
.cpwh-btn--magenta:hover { background: #a80059; }

:where(.cpwh-header, .cpwh-footer, #cpwh-home, .cpwh-shophead) :focus-visible { outline: 3px solid var(--cw-ink); outline-offset: 3px; border-radius: 6px; }
.cpwh-footer :focus-visible { outline-color: var(--cw-mint); }

/* Barra promocional */
.cpwh-promo { background: var(--cw-ink); color: var(--cw-yellow); text-align: center; font: 700 .92rem var(--cw-font); }
.cpwh-promo p { margin: 0; padding: 10px 20px; }

/* Cabecera */
.cpwh-header { position: sticky; top: 0; z-index: 900; background: var(--cw-mint); font-family: var(--cw-font); }
.admin-bar .cpwh-header { top: 32px; }
.cpwh-header-in { width: min(1240px, 100% - 32px); margin-inline: auto; min-height: 84px; display: flex; align-items: center; gap: 24px; }
.cpwh-logo { display: block; flex: none; line-height: 0; }
.cpwh-logo img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; display: block; transition: transform .35s ease; }
.cpwh-logo:hover img { transform: rotate(-8deg) scale(1.06); }
.cpwh-nav { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.cpwh-nav > a:not(.cpwh-btn) { padding: 10px 16px; border-radius: 999px; font-weight: 700; color: var(--cw-ink); text-decoration: none; }
.cpwh-nav > a:not(.cpwh-btn):hover { background: rgba(255, 255, 255, .65); }
.cpwh-nav > a.cpwh-staff { padding: 8px 14px; box-shadow: inset 0 0 0 2px var(--cw-ink); font-size: .88rem; font-weight: 800; }
.cpwh-nav > a.cpwh-staff:hover { background: var(--cw-ink); color: #fff; }
.cpwh-nav-cta { margin-left: 10px; min-height: 48px !important; }
.cpwh-tools { display: flex; align-items: center; gap: 4px; }
.cpwh-icon { position: relative; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; color: var(--cw-ink); transition: background-color .18s ease; }
.cpwh-icon:hover { background: rgba(255, 255, 255, .7); }
.cpwh-cartcount { position: absolute; top: 2px; right: 0; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--cw-magenta); color: #fff; font: 800 .74rem/20px var(--cw-font); text-align: center; }
.cpwh-cartcount.is-empty { display: none; }
.cpwh-burger { display: none; width: 46px; height: 46px; border: 0; border-radius: 50%; background: var(--cw-ink); cursor: pointer; place-items: center; }
.cpwh-burger-bars, .cpwh-burger-bars::before, .cpwh-burger-bars::after { display: block; width: 20px; height: 3px; border-radius: 3px; background: #fff; transition: transform .2s ease, opacity .2s ease; }
.cpwh-burger-bars { position: relative; }
.cpwh-burger-bars::before, .cpwh-burger-bars::after { content: ""; position: absolute; left: 0; }
.cpwh-burger-bars::before { top: -7px; }
.cpwh-burger-bars::after { top: 7px; }
.cpwh-burger[aria-expanded="true"] .cpwh-burger-bars { background: transparent; }
.cpwh-burger[aria-expanded="true"] .cpwh-burger-bars::before { transform: translateY(7px) rotate(45deg); }
.cpwh-burger[aria-expanded="true"] .cpwh-burger-bars::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 960px) {
	.cpwh-header-in { min-height: 72px; }
	.cpwh-logo img { width: 54px; height: 54px; }
	.cpwh-tools { margin-left: auto; }
	.cpwh-burger { display: grid; }
	.cpwh-nav {
		position: absolute; left: 0; right: 0; top: 100%; margin: 0; padding: 12px 16px 24px;
		flex-direction: column; align-items: stretch; gap: 2px; background: var(--cw-mint);
		visibility: hidden; opacity: 0; transform: translateY(-8px); transition: opacity .2s ease, transform .2s ease, visibility .2s;
	}
	.cpwh-nav.is-open { visibility: visible; opacity: 1; transform: none; }
	.cpwh-nav > a:not(.cpwh-btn) { padding: 14px 16px; font-size: 1.15rem; }
	.cpwh-nav-cta { margin: 10px 0 0; }
}
@media (max-width: 782px) { .admin-bar .cpwh-header { top: 46px; } }

/* Olas del logo */
.cpwh-waves { display: block; width: 100%; height: clamp(70px, 10vw, 150px); }

/* Pie */
.cpwh-footer { background: var(--cw-ink); color: #fff; font-family: var(--cw-font); padding: clamp(56px, 8vw, 110px) 0 28px; overflow: hidden; }
.cpwh-footer-in { width: min(1240px, 100% - 32px); margin-inline: auto; display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: clamp(24px, 4vw, 64px); }
.cpwh-footer-brand img { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; }
.cpwh-footer-brand p { color: #d8d7e0; max-width: 28ch; margin: 16px 0 0; }
.cpwh-footer-col { display: grid; align-content: start; gap: 10px; }
.cpwh-footer-col h2 { margin: 0 0 6px; font: 800 1.1rem var(--cw-font); color: var(--cw-yellow); }
.cpwh-footer-col a { color: #fff; text-decoration: none; padding: 2px 0; }
.cpwh-footer-col a:hover { color: var(--cw-mint); text-decoration: underline; text-underline-offset: 4px; }
.cpwh-footer-copy { margin: clamp(32px, 5vw, 56px) 16px 0; text-align: center; color: #b5b4c0; font-size: .9rem; }
@media (max-width: 880px) {
	.cpwh-footer-in { grid-template-columns: 1fr 1fr; }
	.cpwh-footer-brand { grid-column: 1 / -1; }
}

/* Cabecera visual del pedido (imprimir, carrito y pago): título, pasos y garantías sobre menta con olas. */
.cpwh-shophead { background: var(--cw-mint); margin: 0 0 8px; width: 100vw; margin-left: calc(50% - 50vw); font-family: var(--cw-font); color: var(--cw-ink); }
.cpwh-shophead-in { width: min(1240px, 100% - 32px); margin-inline: auto; padding: clamp(32px, 5vw, 64px) 0 12px; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px 48px; }
.cpwh-shophead h1 { margin: 0 0 .25em; font: 800 clamp(2.2rem, 5vw, 3.8rem)/1 var(--cw-font); letter-spacing: -0.035em; }
.cpwh-shophead p { margin: 0 0 1.2em; max-width: 44ch; font-size: 1.12rem; }
.cpwh-shophead .cpwh-btn { min-height: 48px; }
.cpwh-flow { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.cpwh-flow li { padding: 10px 20px; border-radius: 999px; background: rgba(255, 255, 255, .6); font-weight: 700; color: #3a3943; }
.cpwh-flow li.is-done { background: #fff; color: var(--cw-ink); }
.cpwh-flow li.is-done span::before { content: "✓ "; }
.cpwh-flow li.is-now { background: var(--cw-ink); color: #fff; }
.cpwh-trust { list-style: none; width: min(1240px, 100% - 32px); margin: 18px auto 28px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 12px; font-family: var(--cw-font); }
.cpwh-trust li { padding: 8px 16px; border-radius: 999px; background: var(--cw-cream); font-weight: 600; font-size: .92rem; }

/* Página de imprimir: mismo fondo crema que carrito y pago, y el configurador sin su propio título (lo pone la cabecera). */
body.cpwh-notitle, body.cpwh-shop, body.cpwh-bare { background-color: var(--cw-paper) !important; overflow-x: clip; }
body.cpwh-notitle #main, body.cpwh-shop #main, body.cpwh-bare #main { padding-top: 0 !important; }
body.cpwh-notitle .copy-tec-head { display: none; }
body.cpwh-shop .hero-section, body.cpwh-shop .woocommerce-products-header { display: none; }

/* Entrada de bloques al hacer scroll. Sin JS todo se ve. */
.cpwh-js .cpwh-rise { opacity: 0; transform: translateY(26px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1); transition-delay: calc(var(--i, 0) * 80ms); }
.cpwh-js .cpwh-rise.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
	.cpwh-btn, .cpwh-logo img, .cpwh-nav { transition: none !important; }
	.cpwh-btn:hover { transform: none; }
	.cpwh-js .cpwh-rise { opacity: 1; transform: none; transition: none; }
}

/* Barra oscura superior (opcional) */
.cpwh-topbar { background: var(--cw-ink); color: #fff; font-family: var(--cw-font); font-size: .95rem; }
.cpwh-topbar-in { width: min(1240px, 100% - 32px); margin-inline: auto; min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.cpwh-topbar a { color: #fff; text-decoration: none; }
.cpwh-topbar a:hover { text-decoration: underline; text-underline-offset: 4px; }
.cpwh-topbar-links, .cpwh-topbar-user { display: flex; align-items: center; gap: 6px 22px; flex-wrap: wrap; }
.cpwh-topbar-links a { display: inline-flex; align-items: center; gap: 8px; padding: 12px 0; font-weight: 600; }
.cpwh-topbar-pill { padding: 6px 16px; border-radius: 10px; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .85); font-weight: 600; }
.cpwh-topbar-pill:hover { background: rgba(255, 255, 255, .12); text-decoration: none !important; }
.cpwh-topbar-help { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .85); font-weight: 700; }
.cpwh-topbar :focus-visible { outline: 3px solid var(--cw-mint); outline-offset: 3px; border-radius: 6px; }
@media (max-width: 960px) { .cpwh-topbar-links { display: none; } .cpwh-topbar-in { justify-content: flex-end; min-height: 44px; } }

/* Cabecera del mostrador: logo, título y dos accesos */
.cpwh-header--counter .cpwh-header-in { min-height: 76px; }
.cpwh-counter-title { font: 800 1.5rem/1 var(--cw-font); letter-spacing: -0.03em; }
.cpwh-nav--counter { margin-left: auto; }
@media (max-width: 960px) {
	.cpwh-header--counter .cpwh-nav--counter { position: static; visibility: visible; opacity: 1; transform: none; flex-direction: row; padding: 0; background: none; }
	.cpwh-nav--counter > a:not(.cpwh-btn) { padding: 8px 12px; font-size: .95rem; }
}
