/* Cumbria Handmade. Brand colours from the Maker's Stamp logo: lake blue (--green), heather (--accent). */
:root {
  --green: #1f3a5f;
  --green-dark: #162b47;
  --accent: #7b5a8e;
  --cream: #f7f5f2;
  --paper: #ffffff;
  --ink: #23272a;
  --muted: #666d70;
  --line: #e3dfe6;
  --good: #256b3f;
  --warn: #8a5a00;
  --bad: #a3271f;
  --radius: 10px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif; color: var(--ink); background: var(--cream); line-height: 1.5; }
h1, h2 { font-family: Georgia, "Times New Roman", serif; line-height: 1.2; color: var(--green-dark); }
h1 { font-size: 1.9rem; margin: 0 0 .6rem; }
h2 { font-size: 1.3rem; margin: 1.8rem 0 .8rem; }
a { color: var(--green); }
a:hover { color: var(--accent); }
img { max-width: 100%; }
small, .muted { color: var(--muted); }
address { font-style: normal; margin-bottom: 1rem; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
main.wrap { padding-top: 24px; padding-bottom: 56px; min-height: 60vh; }
.narrow { max-width: 620px; margin: 0 auto; }
.center { text-align: center; }
.empty { color: var(--muted); padding: 20px 0; }
.pre { white-space: pre-wrap; }
.clip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Header */
.demo-bar { background: #fff3c4; color: #5c4400; text-align: center; font-size: .85rem; padding: 5px 10px; }
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 20px; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--green-dark); }
.brand-mark { width: 44px; height: 44px; display: block; }
.brand-name { font-family: Georgia, serif; font-size: 1.25rem; white-space: nowrap; }
.search { flex: 1 1 260px; display: flex; }
.search input { flex: 1; min-width: 0; padding: 10px 14px; border: 1px solid #b9b3a3; border-right: 0; border-radius: 999px 0 0 999px; font: inherit; }
.search button { padding: 10px 18px; border: 1px solid var(--green); background: var(--green); color: #fff; border-radius: 0 999px 999px 0; font: inherit; cursor: pointer; }
.user-nav { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.user-nav a { text-decoration: none; color: var(--ink); font-weight: 600; font-size: .95rem; }
.user-nav a:hover { color: var(--accent); }
.badge { background: var(--accent); color: #fff; border-radius: 999px; font-size: .75rem; padding: 1px 7px; margin-left: 5px; font-weight: 700; }
.cat-nav { border-top: 1px solid var(--line); background: var(--paper); }
.cat-nav .wrap { display: flex; gap: 22px; overflow-x: auto; padding-top: 9px; padding-bottom: 9px; }
.cat-nav a { text-decoration: none; color: var(--muted); font-size: .92rem; white-space: nowrap; }
.cat-nav a:hover { color: var(--green); }

/* Buttons and forms */
.btn { display: inline-block; background: var(--green); color: #fff; border: 2px solid var(--green); border-radius: 999px; padding: 10px 22px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; text-align: center; }
.btn:hover { background: var(--green-dark); border-color: var(--green-dark); color: #fff; }
.btn.ghost { background: transparent; color: var(--green); }
.btn.ghost:hover { background: var(--green); color: #fff; }
.btn.small { padding: 5px 14px; font-size: .88rem; }
.btn.block { display: block; width: 100%; margin-top: 14px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
button.link { background: none; border: 0; padding: 0; font: inherit; color: var(--green); text-decoration: underline; cursor: pointer; }
button.link.danger, .danger { color: var(--bad); }
.danger-zone { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); }
:focus-visible { outline: 3px solid #e0a03a; outline-offset: 2px; }
.form { display: grid; gap: 14px; max-width: 620px; }
.form.panel { max-width: none; }
.field { display: grid; gap: 5px; }
.field > span { font-weight: 600; font-size: .93rem; }
input, select, textarea { font: inherit; padding: 9px 11px; border: 1px solid #b9b3a3; border-radius: 8px; background: #fff; color: var(--ink); width: 100%; }
input[type="checkbox"], input[type="radio"] { width: auto; }
input[type="file"] { padding: 7px; }
select { width: auto; max-width: 100%; }
.field select { width: 100%; }
textarea { resize: vertical; }
.check { display: flex; gap: 8px; align-items: flex-start; }
.check input { margin-top: 5px; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline input { width: auto; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0; }
.actions.center { justify-content: center; }
.flash { padding: 11px 15px; border-radius: 8px; margin-bottom: 18px; border: 1px solid; }
.flash.ok { background: #e7f3ea; border-color: #b5d8be; color: #17482a; }
.flash.err { background: #fbeae8; border-color: #eabcb7; color: #7a1c15; }
.tag { display: inline-block; font-size: .76rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: #eee; color: #444; font-family: "Segoe UI", system-ui, sans-serif; vertical-align: middle; white-space: nowrap; }
.tag.good { background: #dff0e4; color: var(--good); }
.tag.warn { background: #fdeecb; color: var(--warn); }
.tag.bad { background: #f9dedb; color: var(--bad); }
.tag.muted { background: #e8e6e0; color: #555; }

/* Home */
.hero { background: linear-gradient(120deg, var(--green-dark), #4d3a66); color: #fff; border-radius: 16px; padding: 48px 40px; margin-bottom: 8px; }
.hero h1 { color: #fff; font-size: 2.5rem; }
.hero p { max-width: 520px; font-size: 1.1rem; margin: 0 0 8px; }
.hero .btn { background: #fff; color: var(--green-dark); border-color: #fff; }
.hero .btn.ghost { background: transparent; color: #fff; }
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.cat-tile { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 14px; text-align: center; text-decoration: none; font-weight: 600; color: var(--green-dark); }
.cat-tile:hover { border-color: var(--green); }

/* Listing grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; }
.card:hover { box-shadow: 0 4px 14px rgba(0, 0, 0, .1); color: var(--ink); }
.card-img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.noimg { background: #e9e4ee; color: #7d748a; display: grid; place-items: center; font-size: .85rem; }
.noimg.card-img, .noimg.main-img { aspect-ratio: 1; }
.card-body { padding: 11px 13px 14px; display: grid; gap: 3px; }
.card-title { font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-shop { color: var(--muted); font-size: .87rem; }
.price b { font-size: 1.05rem; }
.price .sale { color: var(--accent); }
.price s { color: var(--muted); font-size: .9rem; }
.stars { color: #d4901a; letter-spacing: 1px; font-size: .95rem; }
.stars i { color: #d9d4c7; font-style: normal; }
.stars small { letter-spacing: 0; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h1 { margin: 0; }
.pager { display: flex; gap: 10px; justify-content: center; margin-top: 28px; }

/* Item page */
.item { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 36px; }
.main-img { width: 100%; border-radius: var(--radius); aspect-ratio: 1; object-fit: cover; display: block; }
.thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.thumbs img { width: 76px; height: 76px; object-fit: cover; border-radius: 8px; display: block; }
.thumbs.edit label { display: grid; gap: 4px; font-size: .85rem; }
.crumb { font-size: .88rem; }
.by { margin: 0 0 12px; color: var(--muted); }
.big-price .price b { font-size: 1.7rem; }
.buy { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 14px 0; }
.prose p { margin: 0 0 1em; white-space: pre-line; }
.prose.narrow h1 { margin-top: 10px; }
.ticks { padding-left: 1.2em; }
.ticks li { margin-bottom: .5em; }
.review { border-top: 1px solid var(--line); padding: 12px 0; }
.review p { margin: 4px 0 0; }

/* Shops */
.shop-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.shop-tile { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; text-decoration: none; color: var(--ink); display: grid; gap: 4px; justify-items: start; }
.shop-tile:hover { border-color: var(--green); color: var(--ink); }
.avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-family: Georgia, serif; font-size: 1.3rem; flex: none; }
.avatar.big { width: 78px; height: 78px; font-size: 2.2rem; }
.shop-head { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.shop-head > div { flex: 1; min-width: 220px; }
.shop-head p { margin: 2px 0; }

/* Panels, rows, basket */
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 18px; }
.panel h2 { margin-top: 0; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.line { display: flex; gap: 14px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.line-img { width: 60px; height: 60px; object-fit: cover; border-radius: 8px; flex: none; }
.noimg.line-img span { display: none; }
.line-main { flex: 1; min-width: 150px; display: grid; }
.discount { padding-top: 12px; border-top: 1px solid var(--line); }
.summary { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.summary h2 { margin-top: 0; }
.sum-group { padding: 8px 0; border-bottom: 1px solid var(--line); }
.sum-group div, .sum-total { display: flex; justify-content: space-between; gap: 12px; }
.sum-group div { color: var(--muted); font-size: .93rem; }
.sum-total { font-weight: 700; font-size: 1.15rem; padding-top: 12px; }
.row-link { display: flex; gap: 14px; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 8px; text-decoration: none; color: var(--ink); flex-wrap: wrap; }
a.row-link:hover { border-color: var(--green); color: var(--ink); }
.grow { flex: 1; min-width: 140px; }
a.grow { text-decoration: none; color: var(--ink); }

/* Dashboards */
.dash { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 32px; align-items: start; }
.side { display: grid; gap: 2px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.side b { padding: 4px 10px 8px; font-family: Georgia, serif; }
.side a, .side button.link { padding: 7px 10px; border-radius: 7px; text-decoration: none; color: var(--ink); text-align: left; }
.side a.on { background: var(--green); color: #fff; }
.side a:hover:not(.on) { background: var(--cream); }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin: 16px 0; }
.step { background: var(--paper); border: 1px solid var(--line); border-left: 5px solid #e0a03a; border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 8px; align-content: start; justify-items: start; }
.step.done { border-left-color: var(--good); }
.step span { color: var(--muted); font-size: .92rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 18px 0; }
.stats div { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: grid; }
.stats b { font-size: 1.5rem; font-family: Georgia, serif; }
.stats span { color: var(--muted); font-size: .88rem; }

/* Messages */
.thread { display: grid; gap: 10px; margin: 16px 0 22px; }
.msg { background: var(--paper); border: 1px solid var(--line); border-radius: 14px 14px 14px 2px; padding: 10px 14px; max-width: 78%; justify-self: start; }
.msg.mine { background: #e6eaf2; border-color: #c9d2e2; border-radius: 14px 14px 2px 14px; justify-self: end; }
.msg p { margin: 0 0 3px; white-space: pre-line; overflow-wrap: anywhere; }
.review-form summary { cursor: pointer; color: var(--green); font-weight: 600; margin: 4px 0 10px; }
.order-item { border-top: 1px solid var(--line); padding-bottom: 6px; }
.order-item .line { border-top: 0; }

.auth { max-width: 420px; margin: 20px auto; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }

/* Footer */
.site-footer { background: var(--green-dark); color: #d8e2da; padding: 36px 0; font-size: .93rem; }
.footer-row { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 28px; }
.footer-row div { display: grid; gap: 6px; align-content: start; }
.footer-row b { color: #fff; }
.footer-row p { margin: 0; max-width: 34ch; }
.footer-row a { color: #d8e2da; text-decoration: none; }
.footer-row a:hover { color: #fff; text-decoration: underline; }

@media (max-width: 800px) {
  .item, .two-col, .dash { grid-template-columns: 1fr; }
  .footer-row { grid-template-columns: 1fr 1fr; }
  .hero { padding: 32px 22px; }
  .hero h1 { font-size: 1.9rem; }
  .side { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
  .side b { grid-column: 1 / -1; }
  .msg { max-width: 92%; }
}
