/*
Theme Name: Sleeply
Theme URI: https://sleeply.co.uk
Author: Indoor Living Limited
Description: One-page, mobile-first landing theme for the Sleeply hybrid mattress. Prices, sizes, photos and reviews come from the WooCommerce product; creator videos are set in Appearance > Customize > Sleeply page.
Version: 1.7.2
Requires at least: 6.3
Requires PHP: 7.4
WC requires at least: 8.0
License: Proprietary
Text Domain: sleeply
*/

/* ==================================================================
   Tokens — taken from the Sleeply logo
   ================================================================== */
:root {
	--navy: #152D52;
	--navy-2: #1F4470;
	--blue: #2A5A80;
	--mist: #DAEBF2;
	--mist-2: #EAF3F7;
	--line: #D5E5EE;
	--ink: #14243A;
	--body: #3B4A5E;
	--muted: #5E6672;
	--white: #FFFFFF;
	--save: #1E6B4A;
	--star: #A86A12;
	--foot: #0F2140;

	--font-head: "Nunito", ui-rounded, system-ui, sans-serif;
	--font-body: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

	--gutter: 16px;
	--radius: 18px;
	--radius-lg: 24px;
	--section: 64px;
	--bar-h: 72px;
}

/* ==================================================================
   Base
   ================================================================== */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 16px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
	margin: 0;
	background: var(--white);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.6;
	overflow-x: clip;
	-webkit-font-smoothing: antialiased;
}
img, video, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--navy-2); }
a:hover { color: var(--navy); }
h1, h2, h3 { margin: 0; }
p { margin: 0; }
button, input, select, textarea { font: inherit; font-size: max(16px, 1em); } /* 16px+ stops iOS zooming on focus */
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.wrap--narrow { max-width: 820px; }
.wrap--page { max-width: 1100px; padding-top: 32px; padding-bottom: 64px; }

.skip-link, .screen-reader-text {
	position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link:focus { position: fixed; top: 8px; left: 8px; width: auto; height: auto; clip: auto; z-index: 100; background: var(--white); padding: 12px 16px; border-radius: 10px; }

.icon { flex: none; }

/* ==================================================================
   Type
   ================================================================== */
.h2 {
	font-family: var(--font-head);
	font-weight: 900;
	font-size: clamp(30px, 8vw, 52px);
	line-height: 1.08;
	letter-spacing: -0.5px;
	color: var(--navy);
}
.h2--center { text-align: center; }
.eyebrow {
	font-size: 13px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase;
	color: var(--blue); margin-bottom: 8px;
}
.eyebrow--light { color: #A9D3E6; }
.lede { font-size: 17px; line-height: 1.65; color: var(--body); }

.section-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.section-head__aside { color: inherit; opacity: 0.85; max-width: 380px; }

/* ==================================================================
   Buttons
   ================================================================== */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	min-height: 48px; padding: 12px 24px;
	background: var(--navy-2); color: var(--white);
	border: 0; border-radius: 999px;
	font-family: var(--font-body); font-weight: 700; font-size: 16px; line-height: 1.2;
	text-decoration: none; text-align: center; cursor: pointer;
	transition: background-color .15s ease, transform .1s ease;
	-webkit-tap-highlight-color: transparent;
}
.btn:hover { background: var(--navy); color: var(--white); }
.btn:active { transform: scale(0.98); }
.btn[disabled] { background: #8A97A8; cursor: not-allowed; }
.btn--sm { min-height: 44px; padding: 10px 20px; font-size: 15px; }
.btn--lg { min-height: 56px; padding: 16px 28px; font-size: 17px; }
.btn--block { width: 100%; }
.btn--light { background: var(--white); color: var(--navy); }
.btn--light:hover { background: var(--mist); color: var(--navy); }
.btn__was { font-weight: 600; opacity: 0.7; }
@media (max-width: 399px) { .btn__was { display: none; } .btn--lg { padding-left: 20px; padding-right: 20px; } }

.chip {
	display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
	background: var(--mist); color: var(--navy);
	font-size: 13px; font-weight: 700; line-height: 1.3;
	padding: 8px 14px; border-radius: 999px; text-decoration: none;
}
.stars { color: var(--star); letter-spacing: 1px; white-space: nowrap; }
.stars__off { color: #C9D3DC; }

/* ==================================================================
   Announcement + header
   ================================================================== */
.announce { background: var(--navy); color: var(--mist-2); font-size: 13px; font-weight: 600; overflow: hidden; }
.announce__track {
	display: flex; justify-content: center; gap: 8px 28px; flex-wrap: wrap;
	padding: 8px var(--gutter); text-align: center;
}
/* On small phones show one message at a time so the bar stays one line. */
@media (max-width: 479px) {
	.announce__track { flex-wrap: nowrap; justify-content: flex-start; padding: 8px 0; animation: announce 12s steps(1) infinite; }
	.announce__track span { flex: 0 0 100%; text-align: center; }
	@keyframes announce { 0% { transform: translateX(0); } 33.33% { transform: translateX(-100%); } 66.66% { transform: translateX(-200%); } }
	@media (prefers-reduced-motion: reduce) { .announce__track { animation: none; } }
}

.site-header { background: var(--white); border-bottom: 1px solid var(--line); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.site-header__logo { display: inline-flex; align-items: center; min-height: 44px; flex: none; }
/* Logos are sized by width with !important so plugin or core image rules can't blow them up. */
.site-header__logo img { width: 96px !important; max-width: 96px !important; height: auto !important; }
.site-header__nav { display: none; }
.site-header__actions { display: flex; align-items: center; gap: 6px; flex: none; }
.basket-link {
	position: relative; display: inline-flex; align-items: center; justify-content: center;
	width: 44px; height: 44px; border-radius: 50%; color: var(--navy); text-decoration: none;
}
.basket-link:hover { background: var(--mist-2); color: var(--navy); }
.basket-link__count {
	position: absolute; top: 2px; right: 0; min-width: 20px; height: 20px; padding: 0 5px;
	border-radius: 999px; background: #C2562B; color: var(--white);
	font-size: 12px; font-weight: 800; line-height: 20px; text-align: center;
}

/* ==================================================================
   Hero
   ================================================================== */
.hero { padding: 24px 0 var(--section); }
.hero__inner { display: flex; flex-direction: column; gap: 28px; }
.hero__copy { display: flex; flex-direction: column; gap: 16px; }
.hero__title {
	font-family: var(--font-head); font-weight: 900;
	font-size: clamp(38px, 11vw, 74px); line-height: 1.02; letter-spacing: -1px;
	color: var(--navy);
}
.kicker {
	font-family: var(--font-head); font-weight: 900;
	font-size: clamp(20px, 5.5vw, 26px); line-height: 1.1;
	color: var(--blue); margin-bottom: -6px;
}
.hero__lede { font-size: 17px; line-height: 1.6; color: var(--body); }
.hero__actions { display: flex; flex-direction: column; gap: 10px; align-items: stretch; margin-top: 4px; }
.hero__small { font-size: 14px; color: var(--muted); }
.link-play {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 48px; font-weight: 700; color: var(--navy); text-decoration: none;
}

.hero__media { display: flex; gap: 14px; align-items: flex-end; }
.hero__img, .hero__video { border-radius: var(--radius-lg); overflow: hidden; background: var(--mist-2); }
.hero__img { flex: 1 1 auto; aspect-ratio: 4 / 5; }
.hero__img img { width: 100%; height: 100%; object-fit: cover; }
.hero__img--empty { display: flex; align-items: center; justify-content: center; padding: 15%; }
.hero__img--empty img { height: auto; object-fit: contain; }
.hero__video { flex: 1 1 auto; aspect-ratio: 9 / 16; max-height: 78vh; background: var(--navy); }
.hero__video video { width: 100%; height: 100%; object-fit: cover; }
/* On phones, if there's a video, lead with it — it's what stops the scroll. */
.hero__media--both .hero__img { display: none; }
.hero__media--both .hero__video { margin: 0 auto; width: min(100%, 360px); }

/* ==================================================================
   Creator videos
   ================================================================== */
.videos { background: var(--navy); color: var(--white); padding: var(--section) 0; }
.videos .h2 { color: var(--white); }
.videos .section-head__aside { color: #C8DCE7; opacity: 1; }
.videos__rail, .reviews__rail {
	display: flex; gap: 12px;
	overflow-x: auto; overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory; scroll-padding: 0 var(--gutter);
	padding: 4px var(--gutter) 16px;
	-webkit-overflow-scrolling: touch; scrollbar-width: none;
	position: relative; /* keeps hidden screen-reader text inside the rail, not off the side of the page */
	max-width: 100vw;
}
.videos__rail::-webkit-scrollbar, .reviews__rail::-webkit-scrollbar { display: none; }
.videos .btn { margin-top: 12px; width: 100%; }

.vcard { margin: 0; flex: 0 0 min(68vw, 260px); scroll-snap-align: start; }
.vcard__frame {
	position: relative; aspect-ratio: 9 / 16; border-radius: 20px; overflow: hidden;
	background: #20406A;
}
.vcard__frame video { width: 100%; height: 100%; object-fit: cover; }
.vcard__play {
	position: absolute; inset: 0; width: 100%; height: 100%;
	display: flex; align-items: center; justify-content: center;
	background: linear-gradient(to top, rgba(10,22,42,.45), rgba(10,22,42,0) 45%);
	border: 0; color: var(--white); cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}
.vcard__play .icon { filter: drop-shadow(0 2px 8px rgba(0,0,0,.4)); }
.vcard.is-playing .vcard__play { background: transparent; }
.vcard.is-playing .vcard__play .icon { opacity: 0; }
.vcard__handle { margin-top: 8px; font-size: 14px; font-weight: 700; }

/* ==================================================================
   Story
   ================================================================== */
.story { background: var(--mist-2); padding: var(--section) 0; }
.story__inner { display: flex; flex-direction: column; gap: 14px; text-align: center; align-items: center; }
.story p.eyebrow { margin-bottom: 0; font-size: 13px; line-height: 1.4; color: var(--blue); }
.story__accent { color: var(--blue); }
.story__lede { font-family: var(--font-head); font-weight: 800; font-size: clamp(20px, 5.4vw, 26px); line-height: 1.35; color: var(--navy); max-width: 620px; }
.story p { font-size: 17px; line-height: 1.65; color: var(--body); max-width: 620px; }
.story p.story__lede { color: var(--navy); }

/* ==================================================================
   Why hybrid
   ================================================================== */
.why { padding: var(--section) 0; }
.whyform__inner { display: flex; flex-direction: column; gap: 36px; }
.whyform__copy { display: flex; flex-direction: column; gap: 16px; }
.benefits { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 12px; }
.benefit { background: var(--mist-2); border-radius: var(--radius); padding: 18px; display: grid; grid-template-columns: 28px 1fr; gap: 4px 14px; color: var(--navy-2); }
.benefit .icon { grid-row: span 2; margin-top: 2px; }
.benefit h3 { font-size: 17px; font-weight: 700; color: var(--navy); }
.benefit p { font-size: 15px; line-height: 1.55; color: var(--body); }

.layers { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.layer {
	display: flex; align-items: center; gap: 14px;
	border-radius: 14px; padding: 14px 18px; border: 1px solid #C8DCE7;
	font-size: 14px; line-height: 1.4;
}
.layer strong { display: block; font-size: 16px; }
.layer__n { font-size: 13px; font-weight: 700; opacity: 0.75; min-width: 22px; }
.layer--1 { background: var(--white); color: var(--navy); min-height: 60px; }
.layer--2 { background: var(--mist); color: var(--navy); min-height: 84px; }
.layer--3 { background: var(--blue); color: var(--white); min-height: 116px; }
.layer--4 { background: var(--navy); color: var(--white); min-height: 60px; }
.layers figcaption { font-size: 14px; color: var(--muted); margin-top: 4px; }

/* ==================================================================
   Shop
   ================================================================== */
.shop { background: var(--mist-2); padding: var(--section) 0; }
.shop__inner { display: flex; flex-direction: column; gap: 28px; padding: 0; }
.gallery { padding: 0 var(--gutter); min-width: 0; }
.gallery__stage { position: relative; }
.gallery__main {
	display: flex; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
	scrollbar-width: none; -webkit-overflow-scrolling: touch;
	aspect-ratio: 1 / 1; border-radius: var(--radius-lg); background: var(--white);
}
.gallery__main::-webkit-scrollbar { display: none; }
.gallery__main:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.gallery__item { flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; user-select: none; }
.gallery__item--empty { display: flex; align-items: center; justify-content: center; padding: 18%; }
.gallery__item--empty img { height: auto; object-fit: contain; }
.gallery__arrow {
	position: absolute; top: 50%; transform: translateY(-50%);
	width: 44px; height: 44px; border-radius: 50%; border: 0;
	display: flex; align-items: center; justify-content: center;
	background: rgba(255,255,255,.92); color: var(--navy); box-shadow: 0 2px 10px rgba(21,45,82,.18); cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}
.gallery__arrow--prev { left: 10px; }
.gallery__arrow--next { right: 10px; }
.gallery__arrow[disabled] { opacity: 0; pointer-events: none; }
.gallery__count {
	position: absolute; right: 12px; bottom: 12px; padding: 4px 10px; border-radius: 999px;
	background: rgba(21,45,82,.75); color: var(--white); font-size: 13px; font-weight: 700;
}
.gallery__thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.gallery__thumbs::-webkit-scrollbar { display: none; }
.gallery__thumb {
	flex: 0 0 64px; width: 64px; height: 64px; padding: 0; border: 2px solid transparent; border-radius: 12px;
	overflow: hidden; background: var(--white); cursor: pointer; opacity: .7; transition: opacity .15s ease, border-color .15s ease;
	-webkit-tap-highlight-color: transparent;
}
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery__thumb.is-active { border-color: var(--navy-2); opacity: 1; }
.gallery__thumb:hover { opacity: 1; }

.buy { display: flex; flex-direction: column; gap: 18px; padding: 0 var(--gutter); }
.buy .h2 { margin-top: -6px; }
.buy__spec { color: var(--body); font-size: 15px; margin-top: -8px; }

.sizes { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sizes__legend { font-weight: 700; margin-bottom: 10px; padding: 0; }
.size { position: relative; display: block; }
.size:last-of-type:nth-of-type(odd) { grid-column: 1 / -1; }
.size__input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.size__card {
	display: flex; flex-direction: column; gap: 2px;
	min-height: 92px; height: 100%; padding: 14px;
	background: var(--white); border: 2px solid var(--line); border-radius: 16px;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.size__name { font-weight: 700; font-size: 16px; line-height: 1.3; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; }
.size__ft { display: inline-block; padding: 1px 7px; border-radius: 999px; background: var(--mist); color: var(--navy); font-size: 12px; font-weight: 800; line-height: 18px; vertical-align: 2px; white-space: nowrap; }
.size__dims { font-size: 13px; color: var(--muted); }
.size__price { font-weight: 700; font-size: 15px; margin-top: auto; padding-top: 4px; }
.size__price s { font-weight: 400; color: var(--muted); margin-left: 4px; }
.size__stock { font-size: 12px; font-weight: 700; color: #9A3B1E; }
.size__input:checked + .size__card { border-color: var(--navy-2); box-shadow: 0 0 0 3px #C8DCE7; }
.size__input:focus-visible + .size__card { outline: 3px solid var(--blue); outline-offset: 2px; }
.size--out .size__card { opacity: 0.55; }
.size--out .size__input { cursor: not-allowed; }

.summary { background: var(--white); border-radius: 20px; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.summary__row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.summary__name { font-weight: 700; font-size: 16px; line-height: 1.3; }
.summary__dims { display: block; font-weight: 400; font-size: 14px; color: var(--muted); }
.summary__save { font-size: 14px; font-weight: 700; color: var(--save); margin-top: 2px; }
.summary__price { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.summary__price s { font-size: 16px; color: var(--muted); }
.summary__price span { font-family: var(--font-head); font-weight: 900; font-size: 34px; line-height: 1; color: var(--navy); }
.summary__note { font-size: 14px; color: var(--body); text-align: center; }

.ticks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 8px; font-size: 15px; color: var(--body); }
.ticks li { display: flex; align-items: center; gap: 10px; }
.ticks .icon { color: var(--navy-2); }

/* ==================================================================
   Reviews
   ================================================================== */
.reviews { padding: var(--section) 0; }
.score { display: inline-flex; align-items: center; gap: 12px; background: var(--mist-2); border-radius: var(--radius); padding: 12px 18px; align-self: flex-start; }
.score__n { font-family: var(--font-head); font-weight: 900; font-size: 36px; color: var(--navy); line-height: 1; }
.score__count { display: block; font-size: 14px; color: var(--body); }
.review {
	flex: 0 0 min(84vw, 340px); scroll-snap-align: start;
	background: var(--white); border: 1px solid var(--line); border-radius: 22px;
	padding: 22px; display: flex; flex-direction: column; gap: 10px;
	position: relative;
}
.review__body { font-size: 15px; line-height: 1.6; color: var(--body); }
.review__body p + p { margin-top: 8px; }
.review__who { margin-top: auto; font-size: 14px; font-weight: 600; color: var(--muted); }
.reviews--admin { padding: 24px 0; }
.admin-hint { background: #FFF6E0; border: 1px dashed #D9A93B; border-radius: 12px; padding: 14px; font-size: 14px; }

/* ==================================================================
   Steps
   ================================================================== */
.steps { background: var(--mist-2); padding: var(--section) 0; }
.steps__list { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 12px; }
.step { background: var(--white); border-radius: 22px; padding: 22px; display: grid; grid-template-columns: 44px 1fr; gap: 2px 14px; }
.step__n { grid-row: span 2; font-family: var(--font-head); font-weight: 900; font-size: 38px; line-height: 1; color: var(--blue); }
.step h3 { font-size: 18px; font-weight: 700; color: var(--navy); }
.step p { font-size: 15px; color: var(--body); }

/* ==================================================================
   FAQ
   ================================================================== */
.faq { padding: var(--section) 0; }
.faq__list { display: flex; flex-direction: column; gap: 10px; }
.eyebrow--center { text-align: center; }
.faq__group { font-family: var(--font-head); font-weight: 800; font-size: 19px; color: var(--navy); margin: 32px 0 12px; }
.qa__a ul { margin: 0 0 8px; padding-left: 20px; }
.qa__a li + li { margin-top: 4px; }
.qa__a p { margin: 0 0 10px; }
.qa__a p:last-child { margin-bottom: 0; }
.qa__credit { background: var(--white); border-radius: 10px; padding: 12px 14px; font-size: 15px; }
.faq__cta { margin-top: 32px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.faq__cta .btn { width: 100%; max-width: 420px; }
.qa { background: var(--mist-2); border-radius: 16px; }
.qa summary {
	list-style: none; cursor: pointer;
	display: flex; justify-content: space-between; align-items: center; gap: 16px;
	min-height: 56px; padding: 16px 18px;
	font-weight: 700; font-size: 16px; color: var(--navy);
	-webkit-tap-highlight-color: transparent;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; font-size: 26px; font-weight: 400; line-height: 1; color: var(--navy-2); flex: none; }
.qa[open] summary::after { content: "−"; }
.qa__a { padding: 0 18px 18px; font-size: 15px; line-height: 1.65; color: var(--body); }
.qa__a p + p { margin-top: 8px; }

/* ==================================================================
   Final CTA + footer
   ================================================================== */
.final { background: var(--navy); color: var(--white); text-align: center; padding: var(--section) 0; }
.final .wrap { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.final__title { font-family: var(--font-head); font-weight: 900; font-size: clamp(32px, 9vw, 60px); line-height: 1.05; letter-spacing: -0.5px; }
.final p { color: #C8DCE7; font-size: 17px; }
.final .btn { width: 100%; max-width: 420px; }

.site-footer { background: var(--foot); color: #A9BED0; padding: 36px 0 calc(36px + var(--bar-h) + env(safe-area-inset-bottom)); font-size: 14px; }
.site-footer__top { display: flex; flex-direction: column; gap: 20px; }
.site-footer__logo { width: 110px !important; max-width: 110px !important; height: auto !important; flex: none; }
.site-footer__nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.site-footer__nav a { color: #DCE8F0; display: inline-flex; align-items: center; min-height: 44px; }
.site-footer__legal { margin-top: 20px; padding-top: 18px; border-top: 1px solid #2A3F63; font-size: 13px; line-height: 1.6; }

/* ==================================================================
   Sticky buy bar (phones)
   ================================================================== */
.buybar {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	min-height: var(--bar-h);
	padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
	background: rgba(255,255,255,.97);
	-webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px);
	border-top: 1px solid var(--line);
	box-shadow: 0 -6px 20px rgba(21,45,82,.08);
	transform: translateY(110%); transition: transform .25s ease;
}
.buybar.is-visible { transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .buybar { transition: none; } }
.buybar__info { display: flex; flex-direction: column; min-width: 0; }
.buybar__label { font-weight: 800; font-size: 16px; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.buybar__sub { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.buybar__btn { flex: none; min-height: 48px; padding: 12px 22px; }
.buybar__btn[hidden] { display: none; }

/* ==================================================================
   Big Lie-In promo
   ================================================================== */
.promo-band { background: var(--mist); color: var(--navy); }
.promo-band__inner { display: flex; flex-direction: column; gap: 10px; padding-top: 12px; padding-bottom: 12px; }
.promo-band__text { font-size: 15px; line-height: 1.45; }
.promo-band__text strong { display: block; font-family: var(--font-head); font-weight: 900; font-size: 18px; }
.promo-band__btn { align-self: stretch; }
.summary__code { font-size: 14px; font-weight: 700; color: var(--save); text-align: center; }

.spin {
	width: 100%; max-width: 440px; max-height: 100dvh; margin: auto auto 0;
	border: 0; border-radius: 24px 24px 0 0; padding: 22px var(--gutter) calc(18px + env(safe-area-inset-bottom));
	background: var(--white); color: var(--ink); overflow-y: auto; overscroll-behavior: contain;
}
.spin::backdrop { background: rgba(10, 22, 42, .6); }
.spin[open] { animation: spin-up .25s ease-out; }
@keyframes spin-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .spin[open] { animation: none; } }
.spin__close {
	position: absolute; top: 8px; right: 8px; width: 44px; height: 44px;
	border: 0; background: transparent; font-size: 30px; line-height: 1; color: var(--navy); cursor: pointer; border-radius: 50%;
}
.spin__head { text-align: center; padding: 0 28px; }
.spin__head .eyebrow { margin-bottom: 4px; }
.spin__title:focus { outline: none; }
.spin__title { font-family: var(--font-head); font-weight: 900; font-size: clamp(21px, 6vw, 26px); line-height: 1.1; color: var(--navy); }
.spin__sub { font-size: 14px; line-height: 1.45; color: var(--body); margin-top: 4px; }

.wheel { position: relative; width: min(60vw, 240px, 30dvh); aspect-ratio: 1; margin: 12px auto 10px; }
.wheel__spinner { width: 100%; height: 100%; will-change: transform; }
.wheel__svg { width: 100%; height: 100%; }
.wheel__pointer {
	position: absolute; top: -6px; left: 50%; z-index: 1; transform: translateX(-50%);
	width: 0; height: 0; border-left: 13px solid transparent; border-right: 13px solid transparent; border-top: 22px solid #C2562B;
	filter: drop-shadow(0 2px 2px rgba(0,0,0,.25));
}

.wheel__hub {
	position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
	width: 18%; aspect-ratio: 1; border-radius: 50%; background: var(--white); border: 3px solid var(--navy);
	display: flex; align-items: center; justify-content: center;
	font-family: var(--font-head); font-weight: 900; font-size: 11px; color: var(--navy);
}
@media (max-height: 600px) { .spin__sub { display: none; } .spin { padding-top: 16px; } }
.spin__form { display: flex; flex-direction: column; gap: 8px; }
.spin__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.spin__input {
	width: 100%; min-height: 52px; padding: 12px 14px;
	border: 2px solid var(--line); border-radius: 14px; font-size: 16px; color: var(--ink); background: var(--white);
}
.spin__input:focus { border-color: var(--navy-2); outline: none; box-shadow: 0 0 0 3px #C8DCE7; }
.spin__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.spin__check { display: flex; gap: 10px; align-items: center; font-size: 14px; line-height: 1.4; color: var(--body); min-height: 44px; cursor: pointer; }
.spin__check input { width: 22px; height: 22px; flex: none; margin: 0; accent-color: var(--navy-2); }
.spin__error { background: #FDECEA; color: #8A2A12; border-radius: 10px; padding: 10px 12px; font-size: 14px; font-weight: 600; }

.spin__result { display: flex; flex-direction: column; gap: 10px; text-align: center; }
.spin__won { font-family: var(--font-head); font-weight: 900; font-size: 24px; color: var(--navy); }
.spin__codewrap { display: flex; justify-content: center; align-items: center; gap: 8px; flex-wrap: wrap; }
.spin__code { font-family: var(--font-head); font-weight: 900; font-size: 24px; letter-spacing: 2px; color: var(--navy); border: 2px dashed var(--blue); border-radius: 12px; padding: 8px 14px; }
.spin__copy { min-height: 44px; padding: 8px 16px; border: 2px solid var(--navy-2); border-radius: 999px; background: var(--white); color: var(--navy-2); font-weight: 700; cursor: pointer; }
.spin__small { font-size: 14px; color: var(--body); }
.spin__odds { margin-top: 12px; font-size: 12px; line-height: 1.5; color: var(--muted); text-align: center; }
.spin__odds a { color: var(--muted); }

@media (min-width: 768px) {
	.promo-band__inner { flex-direction: row; align-items: center; justify-content: space-between; gap: 24px; }
	.promo-band__btn { align-self: center; flex: none; }
	.spin { margin: auto; border-radius: 24px; padding: 28px; }
}

.policy { max-width: 760px; font-size: 16px; line-height: 1.65; color: var(--body); }
.policy h2 { font-family: var(--font-head); font-weight: 800; font-size: 22px; line-height: 1.25; color: var(--navy); margin: 32px 0 10px; }
.policy p, .policy ul, .policy blockquote { margin: 0 0 14px; }
.policy ul { padding-left: 22px; }
.policy li + li { margin-top: 6px; }
.policy strong { color: var(--ink); }
.policy__updated { color: var(--muted); font-size: 14px; }
.policy__table { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 16px; border: 1px solid var(--line); border-radius: 12px; }
.policy__table table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 14px; line-height: 1.5; }
.policy__table th, .policy__table td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.policy__table thead th { background: var(--mist-2); color: var(--navy); font-weight: 700; }
.policy__table tbody th { font-weight: 600; color: var(--ink); }
.policy__table tr:last-child th, .policy__table tr:last-child td { border-bottom: 0; }
.policy blockquote { border-left: 4px solid var(--mist); background: var(--mist-2); border-radius: 0 12px 12px 0; padding: 14px 16px; }
/* Phones: each row becomes a card, every value labelled — nothing hidden off-screen. */
@media (max-width: 599px) {
	.policy__table { border: 0; overflow: visible; }
	.policy__table table, .policy__table tbody, .policy__table tr, .policy__table th, .policy__table td { display: block; width: 100%; min-width: 0; }
	.policy__table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
	.policy__table tr { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; background: var(--white); }
	.policy__table tr:last-child th, .policy__table tbody th { padding: 0 0 6px; border: 0; font-size: 15px; color: var(--navy); }
	.policy__table td, .policy__table tr:last-child td { padding: 4px 0 0; border: 0; }
	.policy__table td::before { content: attr(data-label); display: block; font-size: 12px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; color: var(--blue); }
	.policy__table td + td { margin-top: 8px; }
}
.promo-terms { scroll-margin-top: 16px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
.promo-terms ol { padding-left: 22px; }
.promo-terms li + li { margin-top: 6px; }
.promo-terms h3 { margin-top: 24px; color: var(--navy); }

/* ==================================================================
   Checkout notice + "What stopped you?" page
   ================================================================== */
.sleeply-save-notice { margin: 4px 0 12px; font-size: 13px; line-height: 1.45; color: var(--muted); }
.sleeply-save-notice a { color: var(--muted); }

/* Address lookup suggestions */
.sleeply-ac { position: absolute; z-index: 99999; background: #fff; border: 1px solid #d5dbe3; border-radius: 10px; box-shadow: 0 10px 30px rgba(21,45,82,.15); overflow: hidden; max-width: calc(100vw - 16px); }
.sleeply-ac[hidden] { display: none; }
.sleeply-ac__item { display: flex; flex-direction: column; justify-content: center; min-height: 48px; padding: 8px 14px; cursor: pointer; border-bottom: 1px solid #eef1f5; font-size: 15px; line-height: 1.3; }
.sleeply-ac__item strong { color: var(--navy, #152D52); font-weight: 600; }
.sleeply-ac__item span { color: var(--muted, #5b6675); font-size: 13px; }
.sleeply-ac__item:hover, .sleeply-ac__item.is-active { background: #f2f6fa; }
.sleeply-ac__foot { padding: 6px 14px; font-size: 11px; color: #70757a; text-align: right; }
.whyform { max-width: 640px; }
.whyform__lede { font-size: 17px; line-height: 1.6; color: var(--body); margin-bottom: 20px; }
.whyform__reasons { display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 24px; }
.whyform__reason {
	display: flex; align-items: center; min-height: 52px; padding: 12px 16px;
	background: var(--white); border: 2px solid var(--line); border-radius: 14px;
	color: var(--ink); font-weight: 700; text-decoration: none;
}
.whyform__reason:hover { border-color: var(--navy-2); color: var(--ink); }
.whyform__reason.is-picked { border-color: var(--navy-2); box-shadow: 0 0 0 3px #C8DCE7; }
.whyform__form { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.whyform__form label { font-weight: 700; color: var(--navy); }
.whyform__form label span { font-weight: 400; color: var(--muted); }
.whyform__form textarea { width: 100%; padding: 12px 14px; border: 2px solid var(--line); border-radius: 14px; font-size: 16px; }
.whyform__form .btn { align-self: flex-start; }
.whyform__finish { margin-top: 8px; }
@media (min-width: 600px) { .whyform__reasons { grid-template-columns: 1fr 1fr; } }

/* ==================================================================
   Basket / checkout / other pages
   ================================================================== */
.page__title { font-family: var(--font-head); font-weight: 900; font-size: clamp(28px, 7vw, 44px); color: var(--navy); margin-bottom: 20px; }
.page__content { font-size: 16px; }
.page__content > * + * { margin-top: 16px; }
.woocommerce .button, .woocommerce button.button, .woocommerce a.button,
.wc-block-components-button:not(.is-link) {
	background: var(--navy-2) !important; color: var(--white) !important;
	border-radius: 999px !important; min-height: 48px; font-weight: 700 !important;
}
.woocommerce .button:hover, .wc-block-components-button:not(.is-link):hover { background: var(--navy) !important; }
.woocommerce input.input-text, .woocommerce select, .woocommerce textarea { font-size: 16px; min-height: 48px; }

/* ==================================================================
   Tablet and up
   ================================================================== */
@media (min-width: 768px) {
	:root { --gutter: 24px; --section: 88px; }
	.site-header__logo img { width: 118px !important; max-width: 118px !important; }
	.hero { padding-top: 40px; }
	.hero__actions { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 18px; }
	.benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.benefit { display: flex; flex-direction: column; gap: 8px; }
	.ticks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.steps__list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
	.step { display: flex; flex-direction: column; gap: 10px; padding: 26px; }
	.sizes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.size:last-of-type:nth-of-type(odd) { grid-column: auto; }
	.section-head--split { flex-direction: row; justify-content: space-between; align-items: flex-end; gap: 24px; }
	.videos .btn { width: auto; }
	.final .btn { width: auto; }
	.site-footer { padding-bottom: 40px; }
	.site-footer__top { flex-direction: row; justify-content: space-between; align-items: center; }
	.buybar { display: none; }
	.videos__rail, .reviews__rail { padding-left: max(var(--gutter), calc((100vw - 1200px) / 2 + var(--gutter))); scroll-padding-left: max(var(--gutter), calc((100vw - 1200px) / 2 + var(--gutter))); }
}

/* ==================================================================
   Desktop
   ================================================================== */
@media (min-width: 1024px) {
	.site-header__nav { display: flex; gap: 28px; font-size: 15px; font-weight: 600; }
	.site-header__nav a { color: var(--body); text-decoration: none; }
	.site-header__nav a:hover { color: var(--navy); }

	.hero__inner { flex-direction: row; align-items: center; gap: 56px; }
	.hero__copy { flex: 1 1 0; gap: 22px; }
	.hero__media { flex: 1 1 0; }
	.hero__media--both .hero__img { display: block; flex: 3 1 0; }
	.hero__media--both .hero__video { flex: 2 1 0; width: auto; margin: 0; }
	.hero__video { max-height: none; }
	.hero__lede { font-size: 19px; max-width: 520px; }

	.whyform__inner { flex-direction: row; align-items: center; gap: 56px; }
	.whyform__copy { flex: 1.15 1 0; }
	.layers { flex: 1 1 0; }

	.shop__inner { flex-direction: row; align-items: flex-start; gap: 56px; padding: 0 var(--gutter); }
	.gallery { flex: 1 1 0; padding: 0; position: sticky; top: 24px; }
	.gallery__thumb { flex-basis: 76px; width: 76px; height: 76px; }
	.buy { flex: 1 1 0; padding: 0; }

	.reviews__rail { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; overflow: visible; max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
	.review { flex: none; }
}

/* ==================================================================
   Cookie consent banner
   ================================================================== */
/* A slim bar along the bottom, so visitors arriving from TikTok and Snapchat see the page, not a box. */
.consent {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
	background: var(--navy); color: var(--white);
	box-shadow: 0 -4px 20px rgba(21,45,82,.18);
	padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
}
.consent__inner {
	max-width: 1100px; margin: 0 auto;
	display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px;
}
.consent__text { flex: 1 1 200px; margin: 0; font-size: 13px; line-height: 1.35; color: rgba(255,255,255,.9); }
.consent__text a { color: var(--white); font-weight: 700; text-decoration: underline; white-space: nowrap; }
.consent__actions { display: flex; gap: 8px; flex: 0 0 auto; margin-left: auto; }
.consent__btn {
	min-height: 40px; padding: 0 14px; border-radius: 999px;
	font: 700 14px/1 var(--font-body); white-space: nowrap; cursor: pointer;
	background: var(--white); color: var(--navy); border: 2px solid var(--white);
}
.consent__btn--ghost { background: transparent; color: var(--white); border-color: rgba(255,255,255,.55); }
.consent__btn:focus-visible { outline: 3px solid var(--white); outline-offset: 2px; }
/* Keep the sticky buy bar out of the way until the banner is answered. */
.consent-open .buybar { transform: translateY(110%) !important; }

.linklike {
	background: none; border: 0; padding: 0; margin: 0;
	color: inherit; font: inherit; text-decoration: inherit; cursor: pointer;
}
