:root {
    --ink: #1d1d1f;
    --muted: #6c6c72;
    --line: #e3e1dc;
    --paper: #faf9f7;
    --card: #ffffff;
    --accent: #1f3a5f;
    --accent-dark: #162b47;
    --good: #2e7d4f;
    --warn: #b7791f;
    --bad: #b42318;
    --radius: 12px;
}

html, body { background: var(--paper); color: var(--ink); }
body { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1 0 auto; }
h1, h2, h3 { font-weight: 600; letter-spacing: -.01em; }
a { color: var(--accent); }

/* ---- header / footer ---- */
.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.brand { font-size: 1.25rem; font-weight: 700; letter-spacing: -.02em; color: var(--ink); text-decoration: none; }
.nav-link-plain { color: var(--ink); text-decoration: none; font-weight: 500; }
.nav-link-plain:hover { color: var(--accent); }
.cart-badge { display: inline-block; min-width: 1.4rem; padding: 0 .4rem; border-radius: 999px; background: var(--accent); color: #fff; font-size: .75rem; text-align: center; }
.brand-logo { height: 40px; width: auto; display: block; }   /* logo in the header: change the height in custom.css */
.breadcrumbs { font-size: .875rem; color: var(--muted, #6b7280); margin-bottom: 1.25rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.breadcrumbs .sep { opacity: .5; }
.site-footer { border-top: 1px solid var(--line); background: #fff; }
.footer-links { display: flex; flex-wrap: wrap; gap: .5rem 1.75rem; font-size: .95rem; }
.footer-links a { color: inherit; text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }

/* ---- text pages (terms, delivery, FAQ, about us) ---- */
.info-page { max-width: 46rem; }
.info-page h2 { font-size: 1.25rem; margin-top: 2rem; }

/* ---- price table on the product page ---- */
.price-table th, .price-table td { padding: .6rem 1rem; }
.price-table tbody th { text-transform: none; letter-spacing: 0; font-size: inherit; color: inherit; }
.price-table tbody th .small { margin-left: .5rem; }

/* ---- Our clients: logos in a grid ---- */
.client-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 1rem; margin-top: 2rem; }
.client-tile { display: flex; align-items: center; justify-content: center; height: 7.5rem; padding: 1.25rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); font-weight: 600; text-align: center; transition: border-color .15s, transform .15s; }
.client-tile:hover { border-color: var(--accent); transform: translateY(-2px); }
.client-tile img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* ---- buttons ---- */
.btn-ink { background: var(--accent); color: #fff; border: 0; border-radius: 10px; padding: .7rem 1.2rem; font-weight: 600; }
.btn-ink:hover, .btn-ink:focus { background: var(--accent-dark); color: #fff; }
.btn-ink:disabled, .btn-ink.disabled { background: #9aa6b5; color: #fff; }
.btn-line { background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: .5rem .9rem; font-weight: 500; }
.btn-line:hover { border-color: var(--accent); color: var(--accent); }
a.btn-link-plain { display: inline-block; text-decoration: none; }   /* a link that looks like a button */

/* ---- cards ---- */
.card-plain { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.summary-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; position: sticky; top: 1rem; }
.section-label { text-transform: uppercase; letter-spacing: .06em; font-size: .75rem; color: var(--muted); margin: 1.5rem 0 .6rem; }
.price-big { font-size: 1.9rem; font-weight: 700; letter-spacing: -.02em; }

/* ---- home page ---- */
.hero { padding: 2.5rem 0 1.5rem; }
.hero h1 { font-size: clamp(2rem, 4vw, 3rem); max-width: 18ch; }
.product-tile { display: block; overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; text-decoration: none; color: inherit; height: 100%; transition: border-color .15s, transform .15s; }
.product-tile:hover { border-color: var(--accent); transform: translateY(-2px); }
/* product picture: on top of the card, and next to the title on the product page (3:2) */
.product-tile-img { display: block; width: calc(100% + 3rem); max-width: none; margin: -1.5rem -1.5rem 1.25rem; aspect-ratio: 3 / 2; object-fit: cover; }
.product-head { display: flex; gap: 1.5rem; align-items: center; margin-bottom: 1rem; }
.product-head-img { width: 17rem; max-width: 45%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); flex: none; }
@media (max-width: 575.98px) {
    .product-head { flex-direction: column; align-items: stretch; }
    .product-head-img { width: 100%; max-width: 100%; }
}

/* ---- choice buttons (sizes, papers) ---- */
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .6rem; }
.choice { position: relative; margin: 0; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice > span { display: block; padding: .7rem .5rem; text-align: center; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-weight: 500; font-size: .92rem; }
.choice > input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.choice > input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.choice-list { display: grid; gap: .6rem; }
.choice-wide > span { text-align: left; padding: .8rem 1rem; }
.choice-wide small { display: block; font-weight: 400; opacity: .75; margin-top: .15rem; }
.custom-size { margin-top: .9rem; padding: 1rem; background: #fff; border: 1px dashed var(--line); border-radius: 10px; }
.custom-size input { max-width: 8rem; }

/* ---- editor ---- */
.editor-toolbar { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .75rem; }
#stage { position: relative; height: min(66vh, 640px); min-height: 340px; background: #e4e4e7; border-radius: var(--radius); overflow: hidden; }
#editorCanvas { width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; outline: none; }
#editorCanvas:active { cursor: grabbing; }
#stage.drag-over { outline: 3px dashed var(--accent); outline-offset: -8px; }
.stage-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .75rem; text-align: center; padding: 1rem; pointer-events: none; }
.stage-empty .btn-ink { pointer-events: auto; }
.slider-row { display: grid; grid-template-columns: 5.5rem 1fr 4rem; gap: .75rem; align-items: center; margin-top: .75rem; }
.slider-row label { font-size: .85rem; color: var(--muted); margin: 0; }
.slider-row output { font-variant-numeric: tabular-nums; text-align: right; font-size: .85rem; }
.badge-dpi { display: inline-block; padding: .25rem .6rem; border-radius: 999px; font-size: .8rem; font-weight: 600; }
.badge-dpi.good { background: #e3f4ea; color: var(--good); }
.badge-dpi.fair { background: #fdf1da; color: var(--warn); }
.badge-dpi.low { background: #fde4e1; color: var(--bad); }
.notice { border-radius: 10px; padding: .6rem .8rem; font-size: .88rem; margin-top: .75rem; }
.notice-warn { background: #fdf1da; color: #7a5212; }
.notice-bad { background: #fde4e1; color: #8a1b12; }

/* ---- cart ---- */
.cart-thumb { width: 96px; height: 96px; object-fit: contain; background: #ececef; border-radius: 8px; }
.qty-input { max-width: 5rem; }

/* ---- admin ---- */
.admin-shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.admin-nav { background: #14171c; color: #cfd3da; padding: 1.25rem 1rem; }
.admin-nav a { display: block; color: #cfd3da; text-decoration: none; padding: .5rem .75rem; border-radius: 8px; margin-bottom: .15rem; }
.admin-nav a:hover, .admin-nav a.active { background: #232831; color: #fff; }
.admin-nav .brand { color: #fff; display: block; margin-bottom: 1.25rem; }
.admin-main { padding: 1.75rem; background: var(--paper); min-width: 0; }
.table-plain th { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.price-matrix input { width: 6rem; }
@media (max-width: 800px) { .admin-shell { grid-template-columns: 1fr; } .admin-nav { padding: .75rem; } }

/* ---- editor: strip of uploaded photos ---- */
.photo-strip { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.photo-thumb { position: relative; width: 76px; height: 76px; padding: 0; border: 2px solid var(--line); border-radius: 10px; background: #ececef; overflow: hidden; cursor: pointer; }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-thumb.active { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(31,58,95,.25); }
.photo-thumb .thumb-qty { position: absolute; left: 3px; bottom: 3px; background: rgba(20,23,28,.8); color: #fff; font-size: .7rem; padding: 0 .35rem; border-radius: 999px; }
.photo-thumb .thumb-warn { position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; line-height: 18px; text-align: center; border-radius: 50%; background: var(--warn); color: #fff; font-size: .7rem; font-weight: 700; }
.photo-thumb .thumb-remove { position: absolute; right: 2px; top: 2px; width: 20px; height: 20px; line-height: 18px; text-align: center; border-radius: 50%; border: 0; background: rgba(20,23,28,.75); color: #fff; font-size: .85rem; padding: 0; cursor: pointer; }
.photo-thumb .thumb-remove:hover { background: var(--bad); }
.photo-add { width: 76px; height: 76px; border: 2px dashed var(--line); border-radius: 10px; background: #fff; color: var(--muted); font-size: .75rem; line-height: 1.15; cursor: pointer; }
.photo-add:hover { border-color: var(--accent); color: var(--accent); }

.btn-line.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-line:disabled { opacity: .45; cursor: not-allowed; }
.btn-line:disabled:hover { border-color: var(--line); color: var(--ink); }

/* ---- discount code box in the cart ---- */
.discount-box { border-top: 1px solid var(--line); padding-top: 1rem; }

/* ---- cookie banner (fixed to the bottom of the window) ---- */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1050; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -6px 24px rgba(0,0,0,.08); padding: 1.25rem 0; }
.cookie-banner[hidden] { display: none; }
.cookie-title { font-weight: 700; font-size: 1.05rem; margin-bottom: .4rem; }
.cookie-text { font-size: .9rem; margin-bottom: 1rem; }
.cookie-actions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; align-items: center; }
.cookie-actions .btn-line { border-radius: 0; border-color: var(--ink); text-align: center; }
.cookie-manage { background: none; border: 0; text-decoration: underline; color: var(--ink); font-size: .9rem; }
.cookie-prefs { display: grid; gap: .5rem; font-size: .9rem; margin-bottom: 1rem; }
.cookie-prefs[hidden] { display: none; }
.cookie-prefs label { display: flex; gap: .6rem; align-items: flex-start; }
.cookie-prefs input { margin-top: .25rem; }
.cookie-prefs .btn-line { justify-self: start; }
@media (max-width: 575.98px) { .cookie-actions { grid-template-columns: 1fr 1fr; } .cookie-manage { grid-column: 1 / -1; } }

/* ---- admin: boxes for code (HTML blocks) ---- */
.code-box { font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; font-size: .85rem; white-space: pre; overflow-x: auto; }
