/* Ugly Christmas Jumpers UK - theme styles */

:root {
    --berry: #b3202a;
    --berry-deep: #8a141d;
    --berry-ink: #5e0d13;
    --pine: #1f5c3a;
    --pine-deep: #143f27;
    --gold: #f2c14e;
    --gold-deep: #d9a227;
    --cream: #fbf6ec;
    --paper: #ffffff;
    --ink: #2b1d18;
    --muted: #6d5d55;
    --line: #eadfcd;
    --radius: 16px;
    --shadow: 0 1px 2px rgba(43, 29, 24, .06), 0 8px 24px -12px rgba(43, 29, 24, .25);
    --wrap: 1180px;
    --font-display: 'Fredoka', 'Trebuchet MS', system-ui, sans-serif;
    --font-body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;

    /* Fair Isle knit band */
    --knit: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='24' viewBox='0 0 32 24'%3E%3Crect width='32' height='24' fill='%23b3202a'/%3E%3Cpath d='M0 3h32M0 21h32' stroke='%23fbf6ec' stroke-width='2' stroke-dasharray='2 2'/%3E%3Cpath d='M8 7l5 5-5 5-5-5zM24 7l5 5-5 5-5-5z' fill='%23fbf6ec'/%3E%3Cpath d='M8 10l2 2-2 2-2-2z' fill='%23b3202a'/%3E%3Cpath d='M24 10l2 2-2 2-2-2z' fill='%23b3202a'/%3E%3Cpath d='M16 9v6M13 12h6' stroke='%231f5c3a' stroke-width='2'/%3E%3C/svg%3E");
    /* Snowflakes for the hero */
    --snow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.14' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M20 12v16M13 16l14 8M13 24l14-8'/%3E%3Cpath d='M86 64v12M81 67l10 6M81 73l10-6'/%3E%3Cpath d='M48 92v20M40 97l16 10M40 107l16-10'/%3E%3C/g%3E%3Cg fill='%23ffffff' fill-opacity='.18'%3E%3Ccircle cx='100' cy='20' r='2'/%3E%3Ccircle cx='60' cy='40' r='1.5'/%3E%3Ccircle cx='10' cy='70' r='1.5'/%3E%3Ccircle cx='108' cy='104' r='2'/%3E%3C/g%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
    margin: 0;
    background: var(--cream);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.6;
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--berry); text-underline-offset: .18em; }
a:hover { color: var(--berry-deep); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 .5em; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 5vw + 1rem, 3.6rem); }
h2 { font-size: clamp(1.5rem, 2vw + 1rem, 2.1rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }

.visually-hidden {
    position: absolute !important; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--paper); padding: 8px 14px; z-index: 50; border-radius: 8px; }
.skip-link:focus { left: 8px; }

/* ---------- Header ---------- */
.site-header { background: var(--paper); position: sticky; top: 0; z-index: 20; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: none; }
.brand:hover { color: var(--ink); }
.brand-mark { width: 40px; height: 40px; flex: none; }
.brand-text { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; line-height: 1; }
.brand-text strong { color: var(--berry); font-weight: 700; }
.brand-tld { color: var(--pine); font-weight: 500; }

.site-nav { flex: 1 1 auto; min-width: 0; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; justify-content: flex-end; }
.site-nav a {
    display: block; padding: 7px 12px; border-radius: 999px; text-decoration: none;
    color: var(--ink); font-weight: 700; font-size: .95rem; white-space: nowrap;
}
.site-nav a:hover { background: var(--cream); color: var(--berry); }
.site-nav a.active { background: var(--berry); color: #fff; }

@media (max-width: 960px) {
    .site-nav { flex-basis: 100%; margin: 0 -16px; }
    .site-nav ul { justify-content: flex-start; overflow-x: auto; padding: 0 16px 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
    .site-nav ul::-webkit-scrollbar { display: none; }
    .site-nav a { background: var(--cream); }
}

.knit-band { height: 24px; background: var(--knit) repeat-x; background-size: 32px 24px; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 20px; border-radius: 999px; border: 2px solid transparent;
    font-family: var(--font-body); font-weight: 800; font-size: .98rem; line-height: 1.2;
    text-decoration: none; cursor: pointer; transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-gold { background: var(--gold); color: var(--berry-ink); box-shadow: 0 3px 0 var(--gold-deep); }
.btn-gold:hover { background: #f6cd6a; color: var(--berry-ink); }
.btn-light { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.55); }
.btn-light:hover { background: rgba(255,255,255,.22); color: #fff; }
.btn-amazon { background: var(--pine); color: #fff; width: 100%; box-shadow: 0 3px 0 var(--pine-deep); }
.btn-amazon:hover { background: #26704a; color: #fff; }
.btn-amazon::after { content: "↗"; font-size: .95em; }
.btn-ghost { background: var(--paper); color: var(--berry); border-color: var(--berry); }
.btn-ghost:hover { background: var(--berry); color: #fff; }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } .btn:hover { transform: none; } }

/* ---------- Hero (home) ---------- */
.hero {
    background: var(--snow), radial-gradient(1200px 500px at 85% -10%, #d43440 0%, transparent 60%), var(--berry);
    background-size: 120px 120px, auto, auto;
    color: #fff; overflow: hidden;
}
.hero-inner { display: grid; gap: 32px; align-items: center; padding-top: 48px; padding-bottom: 56px; }
@media (min-width: 900px) { .hero-inner { grid-template-columns: 1.1fr .9fr; padding-top: 72px; padding-bottom: 80px; } }
.hero h1 { color: #fff; margin-bottom: .3em; }
.hero .lede { font-size: clamp(1.05rem, .6vw + 1rem, 1.3rem); max-width: 36em; color: #fdeaea; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.sleeps {
    display: inline-block; margin-bottom: 18px; padding: 6px 14px; border-radius: 999px;
    background: var(--pine); color: #fff; font-weight: 700; font-size: .95rem;
}
.sleeps strong { color: var(--gold); font-size: 1.1em; }

.hero-stack { position: relative; height: 360px; display: none; }
@media (min-width: 900px) { .hero-stack { display: block; } }
.hero-stack img {
    position: absolute; width: 230px; height: 230px; object-fit: contain; background: #fff;
    border-radius: 20px; padding: 14px; box-shadow: 0 20px 40px -18px rgba(0,0,0,.55);
}
.hero-stack img:nth-child(1) { left: 0; top: 40px; transform: rotate(-7deg); }
.hero-stack img:nth-child(2) { left: 32%; top: 0; transform: rotate(4deg); z-index: 2; }
.hero-stack img:nth-child(3) { right: 0; top: 110px; transform: rotate(-3deg); z-index: 3; }

/* ---------- Inner page banner ---------- */
.page-banner { background: var(--snow), var(--pine); background-size: 120px 120px, auto; color: #fff; padding: 36px 0 40px; }
.page-banner h1 { color: #fff; margin-bottom: .25em; }
.page-banner .lede { max-width: 46em; margin: 0; color: #e3efe7; font-size: 1.1rem; }
.eyebrow { font-size: .9rem; font-weight: 700; margin-bottom: 10px; color: #cfe3d6; }
.eyebrow a { color: #fff; }

/* ---------- Sections ---------- */
.content-wrap { padding-top: 40px; padding-bottom: 64px; }
.section { margin-bottom: 64px; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 24px; margin-bottom: 20px; }
.section-head h2 { margin: 0; }
.section-head p { margin: 0; color: var(--muted); }

/* ---------- Category tiles ---------- */
.cat-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .cat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.cat-tile {
    display: flex; flex-direction: column; height: 100%; text-decoration: none; color: var(--ink);
    background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
    border: 2px solid transparent; transition: border-color .15s ease, transform .15s ease;
}
.cat-tile:hover { border-color: var(--berry); color: var(--ink); transform: translateY(-2px); }
.cat-img { position: relative; display: block; aspect-ratio: 1 / 1; min-height: 0; overflow: hidden; background: #fff; }
.cat-img img { position: absolute; inset: 12px; width: calc(100% - 24px); height: calc(100% - 24px); object-fit: contain; }
.cat-name { font-family: var(--font-display); font-weight: 600; font-size: 1.12rem; padding: 10px 14px 0; line-height: 1.2; }
.cat-count { padding: 2px 14px 14px; color: var(--berry); font-weight: 700; font-size: .92rem; margin-top: auto; }
/* "Search all on Amazon" tile */
.cat-tile-all { background: var(--pine); color: #fff; justify-content: center; padding: 22px 18px; gap: 6px; }
.cat-tile-all:hover { color: #fff; border-color: var(--gold); }
.cat-tile-all .cat-name { padding: 0; font-size: 1.3rem; }
.cat-tile-all .cat-count { padding: 0; margin-top: 0; color: var(--gold); }
.cat-tile-all .cat-blurb { color: #d7e8dd; font-size: .95rem; line-height: 1.45; }
.cat-tile-all .cat-flake { width: 44px; height: 44px; margin-bottom: 6px; }

/* ---------- Product grid ---------- */
.grid-meta { color: var(--muted); font-weight: 600; margin-bottom: 16px; }
.product-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 232px), 1fr)); }
@media (max-width: 520px) { .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }

.product {
    display: flex; flex-direction: column; background: var(--paper); border-radius: var(--radius);
    box-shadow: var(--shadow); overflow: hidden; border: 1px solid var(--line); min-width: 0;
}
.product-media { position: relative; display: block; aspect-ratio: 1 / 1; min-height: 0; overflow: hidden; background: #fff; border-bottom: 1px solid var(--line); }
.product-media img { position: absolute; inset: 14px; width: calc(100% - 28px); height: calc(100% - 28px); object-fit: contain; transition: transform .25s ease; }
.product:hover .product-media img { transform: scale(1.04); }
@media (prefers-reduced-motion: reduce) { .product-media img { transition: none; } .product:hover .product-media img { transform: none; } }
.product-cat {
    position: absolute; z-index: 1; left: 10px; top: 10px; background: var(--berry); color: #fff;
    font-size: .74rem; font-weight: 800; padding: 3px 9px; border-radius: 999px; letter-spacing: .02em;
}
.product-body { display: flex; flex-direction: column; flex: 1; padding: 14px 16px 16px; }
.product-brand { margin: 0 0 4px; font-size: .78rem; font-weight: 800; color: var(--pine); text-transform: uppercase; letter-spacing: .06em; }
.product-name { font-family: var(--font-display); font-size: 1.08rem; font-weight: 600; margin: 0 0 6px; }
.product-name a { color: var(--ink); text-decoration: none; }
.product-name a:hover { color: var(--berry); }
.product-blurb { color: var(--muted); font-size: .95rem; line-height: 1.5; margin-bottom: 10px; }
.product-tags { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.product-tags li { font-size: .76rem; font-weight: 700; background: var(--cream); color: var(--berry-deep); border: 1px solid var(--line); padding: 2px 8px; border-radius: 999px; }
.product .btn-amazon { margin-top: auto; font-size: .92rem; padding: 10px 14px; }

@media (max-width: 520px) {
    .product-media img { inset: 8px; width: calc(100% - 16px); height: calc(100% - 16px); }
    .product-body { padding: 10px 10px 12px; }
    .product-name { font-size: .98rem; }
    .product-blurb { font-size: .86rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
    .product .btn-amazon { font-size: .84rem; padding: 9px 8px; }
    .product .btn-amazon::after { display: none; }
}

/* ---------- More on Amazon / other categories ---------- */
.more-on-amazon {
    margin: 36px 0; padding: 22px 24px; border-radius: var(--radius); background: var(--paper);
    border: 2px dashed var(--berry); display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; justify-content: space-between;
}
.more-on-amazon h2 { font-size: 1.35rem; margin-bottom: .2em; }
.more-on-amazon p { margin: 0; color: var(--muted); }

.other-cats { margin-top: 48px; }
.other-cats h2 { font-size: 1.35rem; }
.other-cats ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.other-cats a { display: block; padding: 8px 16px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); text-decoration: none; font-weight: 700; color: var(--ink); }
.other-cats a:hover { border-color: var(--berry); color: var(--berry); }

/* ---------- Prose ---------- */
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.4em; }
.prose h3 { margin-top: 1.2em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .35em; }
.guide { margin-top: 56px; background: var(--paper); border-radius: var(--radius); padding: 28px clamp(18px, 4vw, 40px); max-width: none; box-shadow: var(--shadow); }
.guide > :first-child { margin-top: 0; }
.guide > * { max-width: 760px; }
.prose-page { background: var(--paper); border-radius: var(--radius); padding: 28px clamp(18px, 4vw, 40px); box-shadow: var(--shadow); }
.prose-page > :first-child { margin-top: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--berry-deep); color: #f6dcdc; margin-top: 24px; }
.site-footer a { color: #fff; }
.footer-inner { display: grid; gap: 28px; padding-top: 36px; padding-bottom: 24px; }
@media (min-width: 800px) { .footer-inner { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-brand { font-family: var(--font-display); font-size: 1.3rem; color: #fff; margin-bottom: .4em; }
.footer-brand strong { color: var(--gold); }
.footer-heading { font-family: var(--font-display); font-weight: 600; color: #fff; font-size: 1.05rem; margin-bottom: .5em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 6px; }
.disclosure { font-size: .92rem; background: rgba(0,0,0,.18); padding: 12px 14px; border-radius: 12px; }
.footer-base { border-top: 1px solid rgba(255,255,255,.15); padding-top: 16px; padding-bottom: 24px; font-size: .85rem; color: #e7bcbc; }
.footer-base p { margin: 0; }
