/* Mr Ben Barber Shop --------------------------------------------------------- */

:root {
  --red: #e1352b;
  --red-deep: #b8271f;
  --red-ink: #7d1a15;
  --cream: #f7f0e2;
  --paper: #fffaf0;
  --ink: #191512;
  --ink-soft: #4a4441;
  --blue: #2f6db3;
  --line: rgba(25, 21, 18, 0.14);
  --shadow: 0 18px 45px -20px rgba(25, 21, 18, 0.45);
  --radius: 14px;
  --maxw: 1080px;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Oswald", var(--font-body);
  --font-script: "Yellowtail", "Segoe Script", cursive;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-head); font-weight: 600; line-height: 1.1; letter-spacing: 0.01em; margin: 0 0 0.5em; }
h2 { font-size: clamp(1.7rem, 1rem + 2.4vw, 2.6rem); text-transform: uppercase; }
p { margin: 0 0 1rem; }
a { color: var(--red-deep); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2.5rem); }
.section { padding: clamp(3rem, 8vw, 5.5rem) 0; }
.section--tight { padding: clamp(2rem, 5vw, 3rem) 0; }
.section-head { text-align: center; max-width: 40ch; margin: 0 auto 2.5rem; }
.section-head p { color: var(--ink-soft); margin: 0; }

.eyebrow {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.78rem;
  color: var(--red-deep);
  margin: 0 0 0.6rem;
}

/* buttons ------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-head); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.9rem;
  padding: 0.85rem 1.5rem; border-radius: 999px;
  background: var(--paper); color: var(--ink);
  border: 2px solid var(--ink); text-decoration: none; cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease, color 0.12s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--red { background: var(--red); border-color: var(--red); color: #fff; }
.btn--red:hover { background: var(--red-deep); border-color: var(--red-deep); }
.btn--dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn--block { width: 100%; justify-content: center; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; }

/* header ------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(247, 240, 226, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; }
.site-header .brand-mini { display: flex; align-items: center; gap: 0.6rem; font-family: var(--font-script); font-size: 1.5rem; color: var(--red-deep); text-decoration: none; }
.site-header .brand-mini svg { width: 30px; height: 30px; }
.site-header nav { display: flex; align-items: center; gap: 0.5rem; }
.site-header nav a.textlink { display: none; font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.82rem; color: var(--ink); text-decoration: none; padding: 0.4rem 0.6rem; }
@media (min-width: 780px) { .site-header nav a.textlink { display: inline; } }

/* hero -------------------------------------------------------------------- */
.hero {
  position: relative;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(255,255,255,0.14), transparent 60%),
    linear-gradient(180deg, var(--red) 0%, var(--red-deep) 100%);
  color: #fff;
  text-align: center;
  overflow: hidden;
}
.hero::before, .hero::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 14px;
  background-image: repeating-linear-gradient(45deg, #fff 0 10px, var(--blue) 10px 20px, var(--red) 20px 30px);
  opacity: 0.9;
}
.hero::before { left: 0; }
.hero::after { right: 0; }
.hero .wrap { position: relative; padding-top: clamp(2.5rem, 7vw, 4.5rem); padding-bottom: clamp(3rem, 8vw, 5rem); }
.hero .logo { width: min(440px, 82vw); height: auto; margin: 0 auto 1.4rem; display: block; filter: drop-shadow(0 12px 24px rgba(0,0,0,0.25)); }
.hero .tagline { font-size: clamp(1rem, 0.8rem + 0.8vw, 1.3rem); max-width: 34ch; margin: 0 auto 0.4rem; }
.hero .est { font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.28em; font-size: 0.8rem; opacity: 0.9; margin-bottom: 1.8rem; }
.hero .cta-row { display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; }
.hero .rating-line { margin-top: 1.6rem; font-size: 0.95rem; opacity: 0.95; }
.hero .rating-line .stars { color: #ffd54a; letter-spacing: 0.12em; }
.hero .rating-line a { color: #fff; }

/* services --------------------------------------------------------------- */
.services { background: var(--paper); }
.service-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.service {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem; background: var(--cream);
  display: flex; flex-direction: column; gap: 0.35rem;
}
.service h3 { font-size: 1.1rem; margin: 0; text-transform: uppercase; letter-spacing: 0.04em; }
.service .price { margin-left: auto; font-family: var(--font-head); color: var(--red-deep); font-size: 1.15rem; }
.service .row { display: flex; align-items: baseline; gap: 0.5rem; }
.service p { margin: 0; color: var(--ink-soft); font-size: 0.92rem; }
.services .note { text-align: center; color: var(--ink-soft); font-size: 0.9rem; margin-top: 1.5rem; }

/* reviews --------------------------------------------------------------- */
.reviews { background: var(--ink); color: var(--cream); }
.reviews h2 { color: #fff; }
.reviews .rating-hero { text-align: center; margin-bottom: 2.5rem; }
.reviews .rating-hero .big { font-family: var(--font-head); font-size: clamp(3rem, 2rem + 6vw, 5rem); line-height: 1; }
.reviews .rating-hero .stars { color: #ffd54a; font-size: 1.6rem; letter-spacing: 0.15em; display: block; margin: 0.4rem 0; }
.reviews .rating-hero .meta { color: rgba(247,240,226,0.7); font-size: 0.95rem; }
.reviews .rating-hero a { color: #ffd54a; }
.review-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.review {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius); padding: 1.3rem;
}
.review .who { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.6rem; }
.review .who img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: #555; }
.review .who-fallback { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(160deg, var(--red), var(--red-deep)); flex: none; }
.review .who .name { font-weight: 600; }
.review .who .when { font-size: 0.8rem; color: rgba(247,240,226,0.6); }
.review .who .rstars { color: #ffd54a; font-size: 0.85rem; letter-spacing: 0.1em; }
.review p { margin: 0; font-size: 0.95rem; color: rgba(247,240,226,0.9); }
.review--empty { text-align: center; color: rgba(247,240,226,0.7); }

/* booking -------------------------------------------------------------- */
.booking { background: var(--paper); }
.booking-shell {
  max-width: 720px; margin: 0 auto;
  background: var(--cream); border: 1px solid var(--line);
  border-radius: 18px; box-shadow: var(--shadow); overflow: hidden;
}
.booking-shell .stepbar { display: flex; background: var(--ink); color: #fff; font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.78rem; }
.booking-shell .stepbar span { flex: 1; text-align: center; padding: 0.7rem 0.5rem; opacity: 0.5; }
.booking-shell .stepbar span.active { opacity: 1; background: var(--red); }
.booking-body { padding: clamp(1.2rem, 4vw, 2rem); }
.booking-body h3 { font-size: 1.15rem; text-transform: uppercase; }

.field { margin-bottom: 1rem; }
.field label { display: block; font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.78rem; margin-bottom: 0.35rem; }
.field input, .field textarea, .field select {
  width: 100%; padding: 0.7rem 0.8rem; font: inherit;
  border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink);
}
.field textarea { min-height: 80px; resize: vertical; }
.hint { font-size: 0.82rem; color: var(--ink-soft); margin: 0.3rem 0 0; }

.persons-pick { display: flex; gap: 0.5rem; }
.persons-pick button {
  flex: 1; padding: 0.7rem; font-family: var(--font-head); font-size: 1.1rem;
  border: 2px solid var(--line); border-radius: 10px; background: var(--paper); cursor: pointer;
}
.persons-pick button.sel { border-color: var(--red); background: var(--red); color: #fff; }
.persons-pick button.other-btn { flex: 1.4; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.05em; }

.other-persons { display: flex; align-items: center; gap: 0.7rem; margin-top: 0.7rem; }
.other-persons label { margin: 0; font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.78rem; }
.other-persons input { width: 92px; padding: 0.6rem 0.7rem; font: inherit; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); }

/* calendar */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.8rem; }
.cal-head strong { font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.05em; }
.cal-head button { border: 1px solid var(--line); background: var(--paper); border-radius: 8px; width: 36px; height: 36px; font-size: 1.1rem; cursor: pointer; }
.cal-head button[disabled] { opacity: 0.3; cursor: not-allowed; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal-grid .dow { text-align: center; font-size: 0.72rem; font-family: var(--font-head); text-transform: uppercase; color: var(--ink-soft); padding: 0.3rem 0; }
.cal-grid button {
  aspect-ratio: 1; border: 1px solid var(--line); border-radius: 9px;
  background: var(--paper); font: inherit; font-weight: 600; cursor: pointer; position: relative;
}
.cal-grid button.state-closed, .cal-grid button.state-full, .cal-grid button[disabled] { opacity: 0.32; cursor: not-allowed; }
.cal-grid button.state-full { text-decoration: line-through; }
.cal-grid button.state-open::after { content: ""; position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); width: 5px; height: 5px; border-radius: 50%; background: var(--red); }
.cal-grid button.sel { background: var(--red); border-color: var(--red); color: #fff; }
.cal-grid button.sel::after { background: #fff; }
.cal-grid .pad { visibility: hidden; }

/* time slots */
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 0.5rem; margin-top: 0.4rem; }
.slot-grid .hint { grid-column: 1 / -1; margin: 0; }
.slot-grid button {
  padding: 0.6rem 0.4rem; border: 2px solid var(--line); border-radius: 10px;
  background: var(--paper); font-family: var(--font-head); font-size: 1rem; cursor: pointer;
}
.slot-grid button:hover { border-color: var(--red); }
.slot-grid button.sel { background: var(--red); border-color: var(--red); color: #fff; }

.booking-nav { display: flex; justify-content: space-between; gap: 0.8rem; margin-top: 1.4rem; }
.msg { padding: 0.8rem 1rem; border-radius: 10px; font-size: 0.92rem; margin: 0 0 1rem; }
.msg--err { background: #fdecea; color: var(--red-ink); border: 1px solid #f3c0bb; }
.msg--ok { background: #e7f4ec; color: #1c5c38; border: 1px solid #b6ddc4; }
.muted { color: var(--ink-soft); font-size: 0.9rem; }

.booking-done { text-align: center; padding: 1rem 0; }
.booking-done .tick { width: 56px; height: 56px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; margin: 0 auto 1rem; font-size: 1.8rem; }
.booking-done dl { display: inline-grid; grid-template-columns: auto auto; gap: 0.3rem 1rem; text-align: left; margin: 1rem auto; }
.booking-done dt { font-family: var(--font-head); text-transform: uppercase; font-size: 0.78rem; color: var(--ink-soft); }
.booking-done dd { margin: 0; font-weight: 600; }

/* location ------------------------------------------------------------ */
.location .cols { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 860px) { .location .cols { grid-template-columns: 1fr 1.1fr; align-items: start; } }
.location address { font-style: normal; font-size: 1.1rem; margin-bottom: 1rem; }
.hours-table { width: 100%; border-collapse: collapse; margin: 1rem 0 1.4rem; }
.hours-table th, .hours-table td { text-align: left; padding: 0.45rem 0; border-bottom: 1px solid var(--line); font-size: 0.95rem; }
.hours-table th { font-family: var(--font-head); text-transform: uppercase; font-weight: 500; letter-spacing: 0.05em; }
.hours-table tr.today td, .hours-table tr.today th { color: var(--red-deep); font-weight: 700; }
.hours-table .closed { color: var(--ink-soft); }
.hours-note { font-size: 0.82rem; color: var(--ink-soft); margin: -0.6rem 0 1.4rem; }
.map-embed { border: 0; width: 100%; aspect-ratio: 4 / 3; border-radius: var(--radius); box-shadow: var(--shadow); }
.location .btn-row { display: flex; gap: 0.7rem; flex-wrap: wrap; margin-top: 1rem; }

/* footer ------------------------------------------------------------- */
.site-footer { background: var(--red-deep); color: rgba(255,255,255,0.9); text-align: center; padding: 2.5rem 0; }
.site-footer .brand-mini { font-family: var(--font-script); font-size: 1.8rem; color: #fff; }
.site-footer a { color: #fff; }
.site-footer .small { font-size: 0.82rem; opacity: 0.75; margin-top: 0.8rem; }

/* manage page ------------------------------------------------------- */
.manage-page { background: var(--cream); display: grid; place-items: center; min-height: 100vh; padding: 1.5rem; }
.manage-page .card { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 2rem; max-width: 460px; width: 100%; }
.manage-page h1 { font-family: var(--font-script); color: var(--red-deep); font-size: 2rem; }
.pill { display: inline-block; font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.75rem; padding: 0.3rem 0.8rem; border-radius: 999px; margin-bottom: 1rem; }
.pill--on { background: #e7f4ec; color: #1c5c38; }
.pill--off { background: #fdecea; color: var(--red-ink); }
.manage-page dl { display: grid; grid-template-columns: auto 1fr; gap: 0.35rem 1rem; margin: 1rem 0 1.5rem; }
.manage-page dt { font-family: var(--font-head); text-transform: uppercase; font-size: 0.75rem; color: var(--ink-soft); }
.manage-page dd { margin: 0; font-weight: 600; }
.manage-page form { margin-top: 1rem; }

/* admin ----------------------------------------------------------- */
.admin-body { background: var(--cream); color: var(--ink); font-family: var(--font-body); }
.admin-wrap { max-width: 900px; margin: 0 auto; padding: 1.5rem clamp(1rem, 4vw, 2rem) 4rem; }
.admin-top { display: flex; align-items: center; justify-content: space-between; padding: 1rem 0; border-bottom: 1px solid var(--line); margin-bottom: 1.5rem; }
.admin-top .brand-mini { font-family: var(--font-script); color: var(--red-deep); font-size: 1.5rem; }
.tabs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.5rem; }
.tabs button { font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.82rem; padding: 0.5rem 1rem; border: 1px solid var(--line); background: var(--paper); border-radius: 999px; cursor: pointer; }
.tabs button.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.panel { display: none; }
.panel.active { display: block; }
.panel h2 { font-size: 1.3rem; text-transform: uppercase; }
.card-box { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; margin-bottom: 1rem; }
table.data { width: 100%; border-collapse: collapse; }
table.data th, table.data td { text-align: left; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--line); font-size: 0.9rem; vertical-align: top; }
table.data th { font-family: var(--font-head); text-transform: uppercase; font-weight: 500; font-size: 0.78rem; }
.hours-row { display: grid; grid-template-columns: 1.2fr auto 1fr 1fr; gap: 0.6rem; align-items: center; padding: 0.4rem 0; }
.hours-row label { font-family: var(--font-head); text-transform: uppercase; font-size: 0.8rem; }
.inline-form { display: grid; gap: 0.8rem; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); align-items: end; }
.admin-body input, .admin-body select, .admin-body textarea { padding: 0.55rem 0.7rem; font: inherit; border: 1px solid var(--line); border-radius: 8px; background: #fff; width: 100%; }
.login-screen { display: grid; place-items: center; min-height: 100vh; padding: 1.5rem; }
.login-screen .card-box { max-width: 340px; width: 100%; }
.tag { display: inline-block; font-size: 0.72rem; font-family: var(--font-head); text-transform: uppercase; padding: 0.15rem 0.5rem; border-radius: 999px; background: var(--line); }
.tag--cancelled { background: #fdecea; color: var(--red-ink); }
.tag--admin { background: #e7eef7; color: var(--blue); }
.row-actions button { font-size: 0.78rem; padding: 0.3rem 0.6rem; border: 1px solid var(--line); background: #fff; border-radius: 6px; cursor: pointer; }

.svc-row { border: 1px solid var(--line); border-radius: 10px; padding: 1rem; margin-bottom: 0.8rem; background: #fff; }
.svc-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 620px) { .svc-grid { grid-template-columns: 1fr 220px; } }
.svc-row label { display: block; font-family: var(--font-head); text-transform: uppercase; font-size: 0.72rem; letter-spacing: 0.05em; margin: 0.5rem 0 0.25rem; color: var(--ink-soft); }
.svc-row label:first-child { margin-top: 0; }
.svc-check { display: flex !important; align-items: center; gap: 0.4rem; text-transform: none !important; font-family: var(--font-body) !important; font-size: 0.85rem !important; letter-spacing: 0 !important; margin-top: 0.7rem !important; }
.svc-check input { width: auto; }
.svc-btns { display: flex; gap: 0.3rem; margin-top: 0.7rem; }
.svc-btns button { font-size: 0.8rem; padding: 0.3rem 0.55rem; border: 1px solid var(--line); background: #fff; border-radius: 6px; cursor: pointer; }
.svc-btns button[disabled] { opacity: 0.35; cursor: not-allowed; }
.svc-btns button[data-del] { margin-left: auto; color: var(--red-deep); }
.svc-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 1rem; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto; }
}
