/* Shared pieces (order drawer, options dialog, back-to-hub pill, toast).
   Each design sets the --cf-* variables to make these match its look. */
:root {
  --cf-panel: #fff;
  --cf-ink: #14213d;
  --cf-muted: #5b6577;
  --cf-line: #dfe5ee;
  --cf-accent: #0a57a4;
  --cf-accent-ink: #fff;
  --cf-soft: #eef4fb;
  --cf-radius: 14px;
  --cf-font: system-ui, sans-serif;
  --cf-head: inherit;
  --cf-meander: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M0 36H40M32 36V4H8V26H22V14' fill='none' stroke='%23000' stroke-width='4'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html.cf-lock { overflow: hidden; }
body { margin: 0; }
img { max-width: 100%; height: auto; }
[hidden] { display: none !important; }

/* Greek key strip: colour it with `color`. */
.cf-meander { display: block; height: 20px; background: currentColor; -webkit-mask: var(--cf-meander) repeat-x left center / 20px 20px; mask: var(--cf-meander) repeat-x left center / 20px 20px; }

/* Scroll reveal (only when JS is running, and never for reduced motion). */
.js [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.js [data-reveal="left"] { transform: translateX(-40px); }
.js [data-reveal="right"] { transform: translateX(40px); }
.js [data-reveal="zoom"] { transform: scale(.9); }
.js [data-reveal].in { opacity: 1; transform: none; }

.cf-offline { margin: 0; padding: 12px 16px; background: #b00020; color: #fff; text-align: center; font: 600 15px/1.4 system-ui, sans-serif; }

.cf-back { position: fixed; left: 14px; bottom: 14px; z-index: 60; display: inline-flex; gap: 8px; align-items: center; padding: 10px 16px; border-radius: 999px; background: rgba(15, 20, 30, .86); color: #fff; font: 600 13px/1 system-ui, sans-serif; text-decoration: none; letter-spacing: .02em; box-shadow: 0 6px 20px rgba(0,0,0,.3); backdrop-filter: blur(8px); transition: transform .2s, background .2s; }
.cf-back:hover { transform: translateY(-2px); background: #000; }

.cf-fab { position: fixed; right: 14px; bottom: 14px; z-index: 60; display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px 12px 12px; border: 0; border-radius: 999px; background: var(--cf-accent); color: var(--cf-accent-ink); font: 700 15px/1 var(--cf-font); cursor: pointer; box-shadow: 0 10px 30px rgba(0,0,0,.3); }
.cf-fab-n { display: grid; place-items: center; min-width: 28px; height: 28px; padding: 0 6px; border-radius: 999px; background: var(--cf-accent-ink); color: var(--cf-accent); font-weight: 800; }
.cf-fab.bump { animation: cf-bump .35s; }
@keyframes cf-bump { 40% { transform: scale(1.1); } }

.cf-toast { position: fixed; left: 50%; bottom: 76px; z-index: 90; transform: translate(-50%, 20px); padding: 10px 18px; border-radius: 999px; background: #111; color: #fff; font: 600 14px/1.2 system-ui, sans-serif; opacity: 0; pointer-events: none; transition: .25s; white-space: nowrap; }
.cf-toast.show { opacity: 1; transform: translate(-50%, 0); }

.cf-scrim { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.5); backdrop-filter: blur(2px); }
.cf-drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 80; width: min(430px, 100%); display: flex; flex-direction: column; background: var(--cf-panel); color: var(--cf-ink); font: 15px/1.45 var(--cf-font); transform: translateX(105%); visibility: hidden; transition: transform .35s cubic-bezier(.2,.8,.2,1), visibility 0s .35s; box-shadow: -20px 0 60px rgba(0,0,0,.3); outline: 0; }
.cf-drawer.open { transform: none; visibility: visible; transition-delay: 0s; }
.cf-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--cf-line); }
.cf-drawer-head h2 { margin: 0; font: 700 22px/1 var(--cf-head); }
.cf-x { width: 38px; height: 38px; border: 0; border-radius: 50%; background: var(--cf-soft); color: var(--cf-ink); font-size: 24px; line-height: 1; cursor: pointer; }
.cf-drawer-body { flex: 1; overflow: auto; padding: 8px 20px 28px; }
.cf-lines, .cf-receipt { list-style: none; margin: 0; padding: 0; }
.cf-lines li { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--cf-line); }
.cf-line-main b { display: block; }
.cf-line-main small { color: var(--cf-muted); }
.cf-line-price { min-width: 62px; text-align: right; }
.cf-qty { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--cf-line); border-radius: 999px; padding: 2px; }
.cf-qty button { width: 30px; height: 30px; border: 0; border-radius: 50%; background: var(--cf-soft); color: var(--cf-ink); font-size: 18px; line-height: 1; cursor: pointer; }
.cf-qty span { min-width: 22px; text-align: center; font-weight: 700; }
.cf-empty { padding: 40px 0; text-align: center; color: var(--cf-muted); }
.cf-checkout { display: grid; gap: 12px; padding-top: 16px; }
.cf-total-row { display: flex; justify-content: space-between; font-size: 20px; font-weight: 800; }
.cf-checkout label, .cf-form label { display: grid; gap: 5px; font-weight: 600; font-size: 13px; }
.cf-checkout small { font-weight: 400; color: var(--cf-muted); }
.cf-checkout input, .cf-checkout select, .cf-checkout textarea { width: 100%; padding: 11px 12px; border: 1px solid var(--cf-line); border-radius: calc(var(--cf-radius) * .6); background: var(--cf-panel); color: var(--cf-ink); font: 16px/1.3 var(--cf-font); }
.cf-checkout :focus-visible, .cf-dialog :focus-visible { outline: 3px solid var(--cf-accent); outline-offset: 2px; }
.cf-msg { margin: 0; color: #c1121f; font-weight: 600; min-height: 1em; }
.cf-btn { display: inline-flex; justify-content: center; align-items: center; gap: 8px; padding: 14px 20px; border: 0; border-radius: var(--cf-radius); background: var(--cf-accent); color: var(--cf-accent-ink); font: 700 16px/1 var(--cf-font); cursor: pointer; transition: transform .15s, filter .15s; }
.cf-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.cf-btn:disabled { opacity: .6; cursor: wait; }
.cf-fine { margin: 0; font-size: 13px; color: var(--cf-muted); }
.cf-fine a { color: var(--cf-accent); font-weight: 700; }
.cf-done { text-align: center; padding-top: 24px; display: grid; gap: 10px; justify-items: center; }
.cf-done h3 { margin: 0; font: 700 26px/1.1 var(--cf-head); }
.cf-done p { margin: 0; }
.cf-receipt { width: 100%; text-align: left; margin: 8px 0; }
.cf-receipt li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--cf-line); }
.cf-receipt-total { font-weight: 800; border-bottom: 0 !important; }

.cf-dialog { width: min(460px, calc(100% - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: calc(var(--cf-radius) * 1.4); background: var(--cf-panel); color: var(--cf-ink); font: 15px/1.45 var(--cf-font); box-shadow: 0 30px 80px rgba(0,0,0,.45); overflow: auto; }
.cf-dialog::backdrop { background: rgba(0,0,0,.55); backdrop-filter: blur(3px); }
.cf-dialog[open] { animation: cf-pop .28s cubic-bezier(.2,.9,.3,1.2); }
@keyframes cf-pop { from { opacity: 0; transform: translateY(20px) scale(.96); } }
.cf-dialog-form { position: relative; display: grid; gap: 14px; padding: 24px; }
.cf-dialog-form > .cf-x { position: absolute; top: 12px; right: 12px; }
.cf-dialog-img { justify-self: center; max-height: 150px; width: auto; filter: drop-shadow(0 10px 14px rgba(0,0,0,.25)); }
.cf-dialog h3 { margin: 0; padding-right: 40px; font: 700 24px/1.1 var(--cf-head); }
.cf-dialog-desc { margin: -6px 0 0; color: var(--cf-muted); }
.cf-dialog fieldset { margin: 0; padding: 0; border: 0; }
.cf-dialog legend { padding: 0; margin-bottom: 8px; font-weight: 800; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--cf-muted); }
.cf-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.cf-opt { flex: 1 1 100px; cursor: pointer; }
.cf-opt-wide { flex-basis: 100%; }
.cf-opt input { position: absolute; opacity: 0; }
.cf-opt span { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; padding: 11px 14px; border: 2px solid var(--cf-line); border-radius: var(--cf-radius); font-weight: 700; transition: .15s; }
.cf-opt small { order: 3; flex-basis: 100%; font-weight: 400; color: var(--cf-muted); }
.cf-opt em { margin-left: auto; font-style: normal; color: var(--cf-accent); }
.cf-opt input:checked + span { border-color: var(--cf-accent); background: var(--cf-soft); }
.cf-opt input:focus-visible + span { outline: 3px solid var(--cf-accent); outline-offset: 2px; }
.cf-dialog-foot { display: flex; gap: 12px; align-items: center; margin-top: 4px; }
.cf-dialog-foot .cf-btn { flex: 1; }

@media (max-width: 520px) {
  .cf-back { padding: 9px 12px; font-size: 12px; }
  .cf-fab span:not(.cf-fab-n) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

main section[id] { scroll-margin-top: 70px; }

/* the real homepage is not a concept page, so it has no "All designs" pill */
html[data-home] .cf-back { display: none; }
