/* ---------- PrintVibe design tokens ---------- */
:root {
    --purple: #6818B0;
    --purple-dark: #501090;
    --magenta: #E020A0;
    --ink: #181818;
    --paper: #F8F8F0;
    --white: #fff;
    --muted: #5b5665;
    --line: #e6e2ec;
    --pink-soft: #ffb3e6;
    --grad: linear-gradient(100deg, var(--purple) 0%, var(--magenta) 100%);
    --radius: 16px;
}

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

body {
    margin: 0;
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
    color: var(--ink);
    background: var(--paper);
    line-height: 1.5;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .4em; letter-spacing: -.02em; }
h1 { font-size: clamp(2rem, 6vw, 3rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.1rem); }
h1:focus { outline: none; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--magenta); outline-offset: 2px; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.wrap.narrow { max-width: 720px; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 700; color: var(--magenta); }
.small { font-size: .85rem; color: var(--muted); }
.price { font-weight: 800; color: var(--purple); }

/* ---------- Buttons ---------- */
.btn { display: inline-block; padding: 13px 22px; border-radius: 999px; font-weight: 700; border: 2px solid transparent; cursor: pointer; font-size: 1rem; font-family: inherit; }
.btn-primary { background: var(--ink); color: var(--white); }
.btn-primary:hover { background: var(--purple-dark); }
.btn-light { background: var(--white); color: var(--purple-dark); }
.btn-ghost { border-color: currentColor; }

/* ---------- Header ---------- */
.announce { background: var(--ink); color: var(--white); text-align: center; font-size: .85rem; padding: 8px 16px; }
.site-header { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.bar { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 16px; padding-top: 10px; padding-bottom: 10px; }
.brand img { height: 44px; width: auto; }
.main-nav { order: 3; width: 100%; display: flex; gap: 18px; font-weight: 600; overflow-x: auto; white-space: nowrap; padding-bottom: 2px; }
.main-nav a.active { color: var(--purple); }
.main-nav a:hover, .icons a:hover { color: var(--magenta); }
.icons { margin-left: auto; display: flex; gap: 14px; font-weight: 600; font-size: .9rem; }
@media (min-width: 960px) {
    .main-nav { order: 0; width: auto; margin-left: auto; overflow: visible; }
    .icons { margin-left: 8px; }
}

/* ---------- Hero ---------- */
.hero { background: var(--grad); color: var(--white); }
.hero .wrap { display: grid; gap: 24px; padding-top: 40px; padding-bottom: 40px; align-items: center; }
.hero h1 { font-size: clamp(2.2rem, 7vw, 3.8rem); }
.hero p { font-size: 1.1rem; max-width: 34em; margin: 0 0 22px; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero img { border-radius: var(--radius); box-shadow: 0 20px 50px rgba(0, 0, 0, .3); }
.trust { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 22px; font-size: .9rem; }
@media (min-width: 860px) { .hero .wrap { grid-template-columns: 1.05fr 1fr; padding-top: 64px; padding-bottom: 64px; } }

/* ---------- Sections and cards ---------- */
main > section { padding: 48px 0; }
main > section.tight { padding-top: 0; }
.head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 20px; }
.head > a { font-weight: 700; color: var(--purple); white-space: nowrap; }

.grid { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 700px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .grid.five { grid-template-columns: repeat(5, 1fr); } .grid.six { grid-template-columns: repeat(6, 1fr); } }

.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; }
a.card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(104, 24, 176, .15); }
.card .pic { aspect-ratio: 1; background: #efeaf6; display: grid; place-items: center; font-size: 3rem; }
.card .pic img { width: 100%; height: 100%; object-fit: cover; }
.card .body { padding: 12px 14px 14px; }
.card h3 { font-size: 1rem; margin-bottom: 2px; }

.steps { background: var(--white); border-block: 1px solid var(--line); }
.steps ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; counter-reset: s; }
.steps li { counter-increment: s; padding-left: 58px; position: relative; min-height: 42px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 42px; height: 42px; border-radius: 50%; background: var(--grad); color: var(--white); font-weight: 800; display: grid; place-items: center; }
.steps strong { display: block; font-size: 1.05rem; }
@media (min-width: 800px) { .steps ol { grid-template-columns: repeat(3, 1fr); } }

.feature { display: grid; gap: 14px; }
@media (min-width: 860px) { .feature { grid-template-columns: 1fr 1fr; } }
.panel { border-radius: var(--radius); padding: 28px; color: var(--white); min-height: 240px; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; gap: 8px; }
.panel p { margin: 0 0 10px; max-width: 30em; }
.panel.month { background: var(--purple-dark); }
.panel.box { background: var(--ink); }
.panel .eyebrow, .b2b .eyebrow { color: var(--pink-soft); }

.b2b { background: var(--ink); color: var(--white); border-radius: var(--radius); padding: 32px 24px; display: grid; gap: 18px; align-items: center; }
.b2b p { margin: 0; opacity: .85; max-width: 40em; }
@media (min-width: 860px) { .b2b { grid-template-columns: 1fr auto; padding: 40px; } }

.contact-cards { display: grid; gap: 14px; margin-top: 24px; }
@media (min-width: 600px) { .contact-cards { grid-template-columns: 1fr 1fr; } }
.contact-card { padding: 20px; }

/* ---------- Shop, product and theme pages ---------- */
.lead { font-size: 1.1rem; color: var(--muted); max-width: 44em; margin: 0 0 20px; }
@media (min-width: 1000px) { .grid.four { grid-template-columns: repeat(4, 1fr); } }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 20px; }
.chips a { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--white); font-weight: 600; white-space: nowrap; text-decoration: none !important; color: var(--ink) !important; }
.chips a.active { background: var(--ink); color: var(--white) !important; border-color: var(--ink); }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 16px; }

.product { display: grid; gap: 28px; }
@media (min-width: 860px) { .product { grid-template-columns: 1fr 1fr; align-items: start; } }
.main-pic { aspect-ratio: 1; background: #efeaf6; border-radius: var(--radius); overflow: hidden; display: grid; place-items: center; font-size: 6rem; }
.main-pic img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.thumbs img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.price.big { font-size: 1.8rem; margin-bottom: 12px; }
h2.sub { font-size: 1.15rem; margin-top: 28px; }
.variants { list-style: none; padding: 0; margin: 0 0 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.variants li { display: flex; justify-content: space-between; padding: 10px 14px; border-top: 1px solid var(--line); }
.variants li:first-child { border-top: 0; }
.order-box { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 20px 0; }
.order-box p { margin: 4px 0 14px; color: var(--muted); }
.order-box .btn { margin: 0 8px 8px 0; text-decoration: none; }
.ticks { list-style: none; padding: 0; margin: 0; color: var(--muted); font-size: .92rem; }
.ticks li::before { content: "✓ "; color: var(--purple); font-weight: 700; }

/* ---------- Admin ---------- */
.table-scroll { overflow-x: auto; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
table.data { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.data th, table.data td { text-align: left; padding: 12px 14px; border-top: 1px solid var(--line); white-space: nowrap; }
table.data thead th { border-top: 0; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; background: #eee9f4; }
.badge.on { background: #d9f5e3; color: #0b6b33; }
.badge.off { background: #f1f1f1; color: var(--muted); }
.field { margin-bottom: 14px; display: flex; flex-direction: column; gap: 4px; }
.field > label { font-weight: 600; font-size: .9rem; }
.field-row { display: grid; gap: 0 14px; }
@media (min-width: 600px) { .field-row { grid-template-columns: 1fr 1fr; } }
.variant-row { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
@media (min-width: 700px) { .variant-row { grid-template-columns: 1.4fr 1fr 1fr .8fr auto auto; } }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: .95rem; }
.check.publish { font-weight: 700; margin: 20px 0 6px; }
.check-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.link-button { background: none; border: 0; padding: 0; color: var(--purple); text-decoration: underline; cursor: pointer; font: inherit; }
.actions { display: flex; align-items: center; gap: 18px; margin-top: 14px; }
.image-list { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.image-list figure { margin: 0; font-size: .85rem; }
.image-list img { width: 120px; height: 120px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.alert ul { margin: 0; padding-left: 18px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--white); border-top: 1px solid var(--line); padding: 36px 0 20px; font-size: .92rem; }
.site-footer .cols { display: grid; gap: 24px; grid-template-columns: repeat(2, 1fr); }
.site-footer ul { list-style: none; padding: 0; margin: 0; color: var(--muted); }
.site-footer li { margin-bottom: 4px; }
.site-footer a:hover { color: var(--purple); }
.footer-logo { height: 40px; width: auto; margin-bottom: 10px; }
.legal { margin-top: 24px; color: var(--muted); font-size: .8rem; }
@media (min-width: 800px) { .site-footer .cols { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }

/* ---------- Account pages (Identity templates use Bootstrap class names) ---------- */
main > :not(section):not(.hero) { max-width: 720px; margin-left: auto; margin-right: auto; padding-left: 16px; padding-right: 16px; }
main > h1:first-child { margin-top: 40px; }
main > :last-child:not(section):not(.hero) { margin-bottom: 48px; }
.mb-3 { margin-bottom: 1rem; }
.form-floating { display: flex; flex-direction: column-reverse; gap: 4px; }
.form-label { font-weight: 600; font-size: .9rem; }
.form-control { width: 100%; padding: 12px 14px; border: 1px solid #b9b3c4; border-radius: 10px; font: inherit; background: var(--white); }
.form-floating .form-control::placeholder { color: transparent; }
.w-100 { width: 100%; }
.text-danger, .validation-message { color: #b00020; }
.alert { padding: 12px 14px; border-radius: 10px; background: #f1e9fb; margin-bottom: 1rem; }
.alert-danger { background: #fde7ea; color: #8a0019; }
main a:not(.btn):not(.card):not(.head > a):not(.crumbs a) { color: var(--purple); text-decoration: underline; }
main hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }

/* ---------- Validation and framework states ---------- */
.valid.modified:not([type=checkbox]) { outline: 1px solid #26b050; }
.invalid { outline: 1px solid #e50000; }

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem;
    color: white;
}

.blazor-error-boundary::after { content: "An error has occurred."; }
