/* Base layout. Every color, font and corner shape is a variable.
   The three POC designs in themes.css only change these variables plus a few extra rules.
   The admin page uses these neutral defaults. */
:root {
  --bg: #ffffff;
  --surface: #f7f7f7;
  --text: #222222;
  --muted: #666666;
  --accent: #555555;
  --accent-text: #ffffff;
  --border: #dddddd;
  --font-body: system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: var(--font-body);
  --head-weight: 700;
  --head-spacing: normal;
  --radius: 6px;
  --btn-radius: 4px;
  --shadow: none;
  --hero-bg: var(--surface);
  --hero-text: var(--text);
  --hero-overlay: rgba(255, 255, 255, .6);
  --hero-height: 320px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font-body); color: var(--text); background: var(--bg); line-height: 1.6; }
img { max-width: 100%; display: block; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--font-head); font-weight: var(--head-weight); letter-spacing: var(--head-spacing); line-height: 1.15; }
h1 { font-size: clamp(2rem, 4vw, 2.75rem); margin: .5rem 0 1.25rem; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 2rem 0 1rem; }

/* header and footer */
.site-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.5rem; border-bottom: 1px solid var(--border); background: var(--bg); }
.brand { font-family: var(--font-head); font-size: 1.4rem; font-weight: var(--head-weight); text-decoration: none; color: var(--text); }
.site-header nav { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.site-header nav a { text-decoration: none; color: var(--text); }
.site-header nav a[aria-current] { font-weight: 700; text-decoration: underline; text-underline-offset: 6px; }
.site-footer { text-align: center; padding: 2rem 1.5rem 4.5rem; border-top: 1px solid var(--border); color: var(--muted); margin-top: 3rem; }
.site-footer p { margin: .25rem 0; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 0; background: #fff; padding: .5rem; z-index: 100; }

main { max-width: 1100px; margin: 0 auto; padding: 1.5rem; }

/* hero */
.hero { position: relative; min-height: var(--hero-height); background: var(--hero-bg); background-size: cover; background-position: center; color: var(--hero-text);
  display: flex; align-items: center; justify-content: center; text-align: center; padding: 3rem 1.5rem; overflow: hidden; }
.hero.has-img::before { content: ""; position: absolute; inset: 0; background: var(--hero-overlay); }
.hero-inner { position: relative; max-width: 760px; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4rem); margin: .25rem 0 1.5rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .2em; font-size: .8rem; margin: 0; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; margin: 0; }

/* buttons */
button, .btn { display: inline-block; font: inherit; font-size: .95rem; padding: .6rem 1.3rem; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-text);
  border-radius: var(--btn-radius); cursor: pointer; text-decoration: none; transition: background .2s, color .2s, transform .2s; }
button:hover, .btn:hover { filter: brightness(1.08); }
.secondary, button.secondary, .btn.secondary { background: transparent; color: var(--accent); }
.secondary:hover { background: var(--accent); color: var(--accent-text); }
button.danger { background: #a33; border-color: #a33; color: #fff; }
button.active { background: var(--accent); color: var(--accent-text); }
button:disabled { opacity: .6; cursor: default; }

/* cards and grids */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.25rem; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; }
.card { border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.card img, .card .ph { width: 100%; aspect-ratio: 4/3; object-fit: cover; background: var(--border); display: block; }
.card .body { padding: 1rem; }
.card h3 { margin: 0 0 .35rem; font-size: 1.2rem; }
.card .btn, .card button { margin-top: .5rem; }
.price { font-weight: 700; }
.muted { color: var(--muted); font-size: .9rem; }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.25rem; }
.pkg ul { padding-left: 1.2rem; margin: .75rem 0; }
.badge { display: inline-block; font-size: .8rem; padding: .15rem .6rem; border-radius: 99px; background: var(--border); color: var(--text); }
blockquote { margin: 0; padding: 1.25rem; border-left: 4px solid var(--accent); background: var(--surface); border-radius: var(--radius); }
blockquote footer { margin-top: .75rem; font-size: .9rem; color: var(--muted); }
.prose p { white-space: pre-line; }
.about-img { max-width: 360px; width: 100%; margin-bottom: 1.25rem; border-radius: var(--radius); }

/* forms */
label { display: block; margin: .9rem 0 .3rem; font-weight: 600; font-size: .95rem; }
input, textarea, select { font: inherit; width: 100%; padding: .6rem .7rem; border: 1px solid var(--border); border-radius: min(var(--radius), 12px); background: #fff; color: #222; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.form { max-width: 600px; }
.msg { margin-top: 1rem; padding: .75rem 1rem; border-radius: var(--radius); }
.msg.ok { background: #e6f4ea; color: #1d4d2b; } .msg.err { background: #fde8e8; color: #7a1d1d; }
.hp { position: absolute; left: -9999px; }

/* logo emblem: hidden by default; an uploaded logo shows in the header in every design,
   and the Woven Vow design shows the emblem everywhere (see themes.css) */
.emblem { display: none; }
.emblem svg, .emblem img { display: block; width: 100%; height: auto; }
.emblem img { border-radius: 50%; }
.brand { display: inline-flex; align-items: center; gap: .6rem; }
.brand .emblem.has-logo { display: block; width: 44px; }
.date-bar { display: flex; flex-wrap: wrap; gap: .75rem; align-items: end; margin-bottom: 1.25rem; }
.date-bar > div { min-width: 200px; }
.date-bar label { margin-top: 0; }

/* quote table */
table.cart { width: 100%; border-collapse: collapse; margin: 1rem 0; }
table.cart th, table.cart td { text-align: left; padding: .6rem; border-bottom: 1px solid var(--border); }
table.cart input[type=number] { width: 5rem; }

/* admin */
.tabs { display: flex; gap: .5rem; margin: 1rem 0; flex-wrap: wrap; }
.row { display: grid; grid-template-columns: 90px 1fr; gap: 1rem; padding: 1rem; border: 1px solid var(--border); border-radius: 6px; margin-bottom: 1rem; }
.row img { width: 90px; height: 90px; object-fit: cover; background: var(--border); }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .5rem; }
.fields .wide { grid-column: 1 / -1; }
.fields label { margin: 0 0 .15rem; font-size: .85rem; }
.savebar { position: sticky; bottom: 0; background: var(--bg); border-top: 1px solid var(--border); padding: .75rem 0; display: flex; gap: 1rem; align-items: center; }
.chips { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .25rem; }
.chip { font-size: .8rem; padding: .1rem .5rem; border: 1px solid var(--border); border-radius: 99px; background: none; color: var(--text); }

/* POC design switcher (fixed in the corner, styled independently of the themes) */
.theme-switch { position: fixed; right: 1rem; bottom: 1rem; z-index: 50; display: flex; align-items: center; gap: .25rem; padding: .35rem .35rem .35rem .9rem;
  background: #fff; color: #222; border: 1px solid #ccc; border-radius: 999px; box-shadow: 0 6px 20px rgba(0, 0, 0, .18); font: 14px/1 system-ui, sans-serif; }
.theme-switch span { margin-right: .25rem; color: #666; }
:root .theme-switch button { all: unset; font: 14px/1 system-ui, sans-serif; letter-spacing: normal; text-transform: none; cursor: pointer; padding: .5rem .8rem; border-radius: 999px; color: #222; }
:root .theme-switch button:hover { background: #eee; }
:root .theme-switch button[aria-pressed="true"] { background: #222; color: #fff; }
:root .theme-switch button:focus-visible { outline: 2px solid #4a7cff; }

@media (max-width: 640px) {
  .site-header { justify-content: center; text-align: center; }
  .site-header nav { justify-content: center; }
  .theme-switch { left: .5rem; right: .5rem; justify-content: center; }
  .theme-switch span { display: none; }
}
