/* WordPress / Blocksy / block-editor adjustments so the demo CSS works on block markup */

:root { --wrap: 1240px; }
body { background: var(--cream); color: var(--charcoal); font-family: var(--body); font-size: 19px; line-height: 1.6; }

/* Sticky header: Blocksy wraps our header in <header id="header"> */
#header { position: sticky; top: var(--wp-admin--admin-bar--height, 0px); z-index: 50; }
.site-header { position: relative; top: auto; }
.site-header .nav a, .site-footer a { color: inherit; }
.site-header .brand { color: var(--charcoal); }

/* Blocksy's default text colours/links shouldn't fight the design */
:where(.lel-page, .editor-styles-wrapper) a:where(:not(.wp-block-button__link):not(.btn)) { color: inherit; }
:is(.lel-page, .editor-styles-wrapper) :where(h1, h2, h3, h4) { color: inherit; }

/* Block layout: undo default flow spacing; the demo CSS does its own */
:is(.lel-page, .editor-styles-wrapper) .is-layout-flow > *,
:is(.lel-page, .editor-styles-wrapper) .is-layout-constrained > * { margin-block-start: 0; }
:is(.lel-page, .editor-styles-wrapper) figure.wp-block-image { margin: 0; }
:is(.lel-page, .editor-styles-wrapper) .wp-block-group.wrap { width: min(var(--wrap), 100% - 48px); margin-inline: auto; max-width: none; }
:is(.lel-page, .editor-styles-wrapper) p.eyebrow { display: block; }
.section-head.center .eyebrow { display: block; }

/* Buttons block → demo .btn look */
:is(.lel-page, .editor-styles-wrapper) .wp-block-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }
:is(.lel-page, .editor-styles-wrapper) .wp-block-button__link {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 1.05rem 2.1rem;
  border-radius: 999px;
  border: 2px solid var(--charcoal);
  background: var(--charcoal);
  color: var(--cream);
  font: 700 1.05rem var(--body);
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
:is(.lel-page, .editor-styles-wrapper) .wp-block-button__link:hover { transform: translateY(-3px); background: var(--pink); border-color: var(--pink); color: #fff; }
:is(.lel-page, .editor-styles-wrapper) .is-style-outline .wp-block-button__link { background: transparent; color: var(--charcoal); }
:is(.lel-page, .editor-styles-wrapper) .is-style-outline .wp-block-button__link:hover { background: var(--charcoal); border-color: var(--charcoal); color: var(--cream); }
.banner--extra .wp-block-button__link { background: var(--cream); color: var(--charcoal); border-color: var(--cream); }
.banner--extra .is-style-outline .wp-block-button__link { background: transparent; color: #fff; border-color: #fff; }

/* Banner characters: images are wrapped in <figure> by the image block */
.pals figure { position: absolute; margin: 0; }
.pals figure img { position: static; width: 100%; height: 100%; }
.pals figure:nth-child(1) { width: 190px; height: 190px; top: 0; }
.pals figure:nth-child(2) { width: 140px; height: 140px; bottom: 0; }
.pals--left figure:nth-child(1) { left: 0; }
.pals--left figure:nth-child(2) { right: 0; }
.pals--right figure:nth-child(1) { right: 0; }
.pals--right figure:nth-child(2) { left: 0; }
.pals img { border-radius: 50%; object-fit: cover; object-position: top; border: 6px solid var(--paper); box-shadow: 0 18px 36px -18px rgba(43, 43, 46, 0.45); }

/* Split tiles: whole tile clickable via the "Meet them" link */
.split__tile { position: relative; color: inherit; }
.split__tile > div { padding: 2.2rem 2.4rem 2.6rem; }
.split__tile .more { margin: 0; }
.split__tile .more a { font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.split__tile .more a::after { content: ""; position: absolute; inset: 0; }
.split__tile--extra :where(h3, p, a) { color: var(--cream); }

/* Perks: icons drawn in CSS so the text stays editable */
.perk > div p { margin: 0; }
.perk strong { display: block; }
.perk .perk__sub { font-size: 1.05rem; opacity: 0.85; line-height: 1.4; }
.perk::before {
  content: "";
  flex: none;
  width: 4.2rem; height: 4.2rem;
  border-radius: 16px;
  background: var(--pink) var(--ico) center / 30px no-repeat;
}
.perk--download { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12M7 10l5 5 5-5M5 21h14'/%3E%3C/svg%3E"); }
.perk--secure   { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='11' width='16' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E"); }
.perk--heart    { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.8 4.6a5.5 5.5 0 0 0-7.8 0L12 5.7l-1-1.1a5.5 5.5 0 0 0-7.8 7.8L12 21l8.8-8.6a5.5 5.5 0 0 0 0-7.8z'/%3E%3C/svg%3E"); }
.perk--print    { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9V3h12v6'/%3E%3Crect x='3' y='9' width='18' height='9' rx='2'/%3E%3Cpath d='M6 15h12v6H6z'/%3E%3C/svg%3E"); }

/* Rails rendered by shortcodes */
:is(.lel-page, .editor-styles-wrapper) section.block > .wrap > .lel-rail .rail-head { margin-bottom: 2.5rem; }
.friends .rail-head { margin-bottom: 2.5rem; }
.friend .add { color: #fff; text-decoration: none; }
.friend .add.added, .friend .add.is-added { background: var(--teal); }
.friend .add.added .plus, .friend .add.is-added .plus { display: none; }
.friend .add.added .tick, .friend .add.is-added .tick { display: block; }
.friend .add.loading { opacity: 0.6; }
.friend .added_to_cart { display: none !important; }
.friend .add::after { display: none !important; } /* Woo's loading spinner */
.tile .thumb img { display: block; height: auto; }

/* Freebie */
.freebie__offer .eyebrow { margin-bottom: 1rem; }
.freebie__small { display: block; margin-top: 0.8rem; font-size: 0.9rem; color: var(--charcoal-soft); padding-left: 1.4rem; }
.signup--pill .btn { background: var(--charcoal); border-color: var(--charcoal); color: var(--cream); }
.signup--pill .btn:hover { background: var(--pink); border-color: var(--pink); }
.signup__done { margin: 0; padding: 0.8rem 1.1rem; font-weight: 700; color: var(--teal); }

/* Toast "View cart" link */
.toast .toast__btn { flex: none; border-radius: 999px; background: var(--pink); color: #fff; font: 700 0.9rem var(--body); padding: 0.6rem 1rem; text-decoration: none; }
.toast[hidden] { display: none; }

/* Footer inside Blocksy's <footer id="footer"> */
#footer { background: var(--charcoal); }
.site-footer .foot-brand { color: var(--cream); }

@media (max-width: 980px) {
  .perk::before { width: 3.6rem; height: 3.6rem; }
  .freebie__small { padding-left: 0; }
}

/* ---------- Fixes after first WordPress render ---------- */
:is(.lel-page, .editor-styles-wrapper) .friend .add { color: #fff; }
:is(.lel-page, .editor-styles-wrapper) .eyebrow { color: var(--teal); }
:is(.lel-page, .editor-styles-wrapper) .freebie__small { font-size: 0.9rem; }

/* Outline buttons: Blocksy's own outline style is more specific, so match it */
:is(.lel-page, .editor-styles-wrapper) .wp-block-button.is-style-outline > .wp-block-button__link {
  padding: 1.05rem 2.1rem;
  border: 2px solid var(--charcoal);
  background: transparent;
  color: var(--charcoal);
  font: 700 1.05rem var(--body);
}
:is(.lel-page, .editor-styles-wrapper) .wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--charcoal); color: var(--cream); }
:is(.lel-page, .editor-styles-wrapper) .banner--extra .wp-block-button.is-style-outline > .wp-block-button__link { border-color: #fff; color: #fff; }
:is(.lel-page, .editor-styles-wrapper) .banner--extra .wp-block-button.is-style-outline > .wp-block-button__link:hover { background: #fff; color: var(--teal); }
:is(.lel-page, .editor-styles-wrapper) .split { align-items: stretch; }
:is(.lel-page, .editor-styles-wrapper) .split__tile { height: 100%; }
:is(.lel-page, .editor-styles-wrapper) .section-head p.eyebrow,
:is(.lel-page, .editor-styles-wrapper) p.eyebrow { color: var(--teal); }
