/*
Theme Name: Neil Maclean Hair
Theme URI: https://neilmacleanhair.com
Author: Neil Maclean Hair
Description: Lightweight theme for the Neil Maclean Hair rebuild. No page builder required.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Text Domain: neil-maclean
*/

:root {
  --nm-black: #0e0e0e;
  --nm-grey: #888;
  --nm-silver: #b0b0b0;
  --nm-serif: "Cormorant Garamond", Georgia, serif;
  --nm-sans: "Outfit", system-ui, -apple-system, sans-serif;
}

html {
  box-sizing: border-box;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

body {
  margin: 0;
  font-family: var(--nm-sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.5;
  color: #1a1a1a;
  background: #fff;
}

body.nm-nav-open {
  overflow: hidden;
}

/* Line icons (inline SVG, Lucide-style) */
.nm-icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

/* Fixed header — matches signed-off template */
.nm-site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  font-family: var(--nm-sans);
}

body.admin-bar .nm-site-header {
  top: 32px;
}

@media screen and (max-width: 782px) {
  body.admin-bar .nm-site-header {
    top: 46px;
  }
}

.nm-site-header__bar {
  background: rgba(14, 14, 14, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nm-site-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nm-nav-logo {
  color: #fff;
  text-decoration: none;
  line-height: 1.15;
  flex-shrink: 0;
}

.nm-nav-logo:hover,
.nm-nav-logo:focus {
  color: #fff;
  opacity: 0.92;
}

.nm-nav-logo__primary {
  display: block;
  font-family: var(--nm-serif);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.nm-nav-logo__secondary {
  display: block;
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--nm-silver);
  margin-top: 1px;
}

.nm-nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nm-btn-book {
  background: #fff;
  color: var(--nm-black);
  font-family: var(--nm-sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 8px 14px;
  text-decoration: none;
  white-space: nowrap;
}

.nm-btn-book:hover,
.nm-btn-book:focus {
  color: var(--nm-black);
  opacity: 0.9;
}

.nm-nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 4px;
  margin: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  color: #fff;
}

.nm-nav-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: currentColor;
}

.nm-nav-toggle:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* Full-screen overlay menu */
.nm-nav-drawer {
  position: fixed;
  inset: 0;
  z-index: 1001;
  background: rgba(14, 14, 14, 0.6);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.nm-nav-drawer.is-open {
  opacity: 1;
  visibility: visible;
}

.nm-nav-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(100%, 380px);
  height: 100%;
  background: #1a1a1a;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  padding: 5rem 1.5rem 2rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.nm-nav-drawer.is-open .nm-nav-drawer__panel {
  transform: translateX(0);
}

.nm-nav-drawer__close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  color: var(--nm-silver);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nm-nav-drawer__close:hover,
.nm-nav-drawer__close:focus {
  color: #fff;
}

.nm-nav-drawer__close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.nm-nav-drawer__menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nm-nav-drawer__menu li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nm-nav-drawer__menu > li > a {
  display: block;
  padding: 1rem 0;
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nm-nav-drawer__menu .sub-menu li {
  border-bottom: none;
}

.nm-nav-drawer__menu .sub-menu {
  list-style: none;
  margin: 0;
  padding: 0 0 0.35rem;
  display: none;
}

.nm-nav-drawer__menu li.is-expanded > .sub-menu {
  display: block;
}

.nm-nav-drawer__menu .sub-menu a {
  display: block;
  padding: 0.75rem 0 0.75rem 0.5rem;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.78);
}

.nm-nav-drawer__menu .sub-menu a:hover,
.nm-nav-drawer__menu .sub-menu a:focus {
  color: #fff;
}

.nm-nav-drawer__menu .sub-menu .current-menu-item > a,
.nm-nav-drawer__menu .sub-menu .current_page_item > a {
  color: #fff;
}

.nm-nav-drawer__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  padding: 1rem 0;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.88);
  font-family: var(--nm-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: left;
  cursor: pointer;
}

.nm-nav-drawer__toggle:hover,
.nm-nav-drawer__toggle:focus {
  color: #fff;
}

.nm-nav-drawer__toggle:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.nm-nav-drawer__toggle-icon {
  font-size: 1rem;
  line-height: 1;
  color: var(--nm-silver);
  transition: transform 0.2s ease;
}

.nm-nav-drawer__menu li.is-expanded > .nm-nav-drawer__toggle .nm-nav-drawer__toggle-icon {
  transform: rotate(45deg);
}

.nm-nav-drawer__menu li.menu-item-has-children > a {
  display: none;
}

.nm-nav-drawer__menu a:hover,
.nm-nav-drawer__menu a:focus {
  color: #fff;
}

.nm-nav-drawer__menu .current-menu-item > a,
.nm-nav-drawer__menu .current_page_item > a {
  color: #fff;
}

.nm-nav-drawer__footer {
  margin-top: auto;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.nm-nav-drawer__socials {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.nm-nav-drawer__social {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.88);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.nm-nav-drawer__social svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.nm-nav-drawer__social:hover,
.nm-nav-drawer__social:focus {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.06);
}

.nm-nav-drawer__call-btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 0.9rem 1rem;
  background: #fff;
  color: #111;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
  font-weight: 600;
}

.nm-nav-drawer__call-btn:hover,
.nm-nav-drawer__call-btn:focus {
  color: #111;
  opacity: 0.9;
}

/* wp_page_menu fallback */
.nm-nav-drawer__nav .menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nm-nav-drawer__nav .menu li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nm-nav-drawer__nav .menu a {
  display: block;
  padding: 1rem 0;
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* Main content offset below fixed header (default pages only) */
.site-main {
  display: block;
  padding-top: 4.5rem;
}

body.admin-bar .site-main {
  padding-top: 6rem;
}

/* Full-bleed templates handle their own header offset in hero/page-header */
.site-main:has(> .nm-subpage),
.site-main:has(> .nm-homepage) {
  padding-top: 0;
}

body.admin-bar .site-main:has(> .nm-subpage),
body.admin-bar .site-main:has(> .nm-homepage) {
  padding-top: 0;
}

/* Footer — signed-off template */
.nm-site-footer {
  background: var(--nm-black);
  color: #fff;
  padding: 48px 24px;
  font-family: var(--nm-sans);
  font-weight: 300;
}

/* Clearance so fixed sticky CTAs don't cover footer legal links */
body:has(.sticky-book) .nm-site-footer {
  padding-bottom: calc(48px + 3.25rem + env(safe-area-inset-bottom, 0px));
}

.nm-site-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
}

.nm-footer-logo {
  font-family: var(--nm-serif);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: #fff;
  margin: 0 0 4px;
  line-height: 1.2;
}

.nm-footer-tagline {
  margin: 0 0 28px;
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--nm-grey);
  font-weight: 400;
}

.nm-footer-nav {
  display: block;
}

.nm-footer-links {
  list-style: none;
  margin: 0 0 32px;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 24px;
}

@media (min-width: 600px) {
  .nm-footer-links {
    grid-template-columns: repeat(4, 1fr);
  }
}

.nm-footer-links li {
  margin: 0;
}

.nm-footer-links a {
  display: block;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--nm-silver);
  text-decoration: none;
  text-transform: uppercase;
  font-weight: 400;
  padding: 5px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.nm-footer-links a:hover,
.nm-footer-links a:focus {
  color: #fff;
}

.nm-footer-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.nm-footer-social {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  letter-spacing: 0.05em;
  color: var(--nm-silver);
  text-decoration: none;
  font-weight: 500;
  box-sizing: border-box;
}

.nm-footer-social:hover,
.nm-footer-social:focus {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}

.nm-footer-legal {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.2);
  line-height: 1.6;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding-top: 20px;
  margin: 0;
}

.nm-footer-legal a {
  color: rgba(255, 255, 255, 0.35);
  text-decoration: none;
}

.nm-footer-legal a:hover,
.nm-footer-legal a:focus {
  color: rgba(255, 255, 255, 0.55);
}

.nm-footer-legal__sep {
  color: rgba(255, 255, 255, 0.2);
}

/* ------------------------------------------------------------------
   Promo banner (Black Friday etc.) — inc/promo-banner.php
   White strip above the dark header; body is pushed down by its height
   so nothing underneath gets covered.
------------------------------------------------------------------ */
:root {
  --nm-promo-h: 40px;
}

body.nm-has-promo {
  padding-top: var(--nm-promo-h);
}

.nm-has-promo .nm-homepage .hero {
  height: calc(100svh - var(--nm-promo-h));
}

.nm-promo {
  display: block;
  height: var(--nm-promo-h);
  background: #fff;
  color: var(--nm-black);
  text-decoration: none;
  border-bottom: 1px solid rgba(14, 14, 14, 0.12);
  overflow: hidden;
}

.nm-promo:hover,
.nm-promo:focus {
  color: var(--nm-black);
}

.nm-promo:focus-visible {
  outline: 2px solid var(--nm-black);
  outline-offset: -4px;
}

.nm-promo__inner {
  max-width: 1200px;
  height: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  white-space: nowrap;
}

.nm-promo__tag {
  position: relative;
  overflow: hidden;
  background: var(--nm-black);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 5px 10px 5px 12px;
}

/* Slow silver sheen across the tag */
.nm-promo__tag::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.35) 50%, transparent 65%);
  transform: translateX(-120%);
  animation: nm-promo-sheen 4.5s ease-in-out 1s infinite;
}

@keyframes nm-promo-sheen {
  0%   { transform: translateX(-120%); }
  35%  { transform: translateX(120%); }
  100% { transform: translateX(120%); }
}

.nm-promo__msg {
  font-family: var(--nm-serif);
  font-style: italic;
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.nm-promo__cta {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}

.nm-promo__arrow {
  display: inline-block;
  margin-left: 6px;
  transition: transform 0.2s ease;
}

.nm-promo:hover .nm-promo__arrow,
.nm-promo:focus .nm-promo__arrow {
  transform: translateX(3px);
}

@media (max-width: 560px) {
  :root {
    --nm-promo-h: 36px;
  }

  .nm-promo__inner {
    gap: 12px;
    padding: 0 14px;
  }

  .nm-promo__msg {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nm-promo__tag::after {
    animation: none;
    display: none;
  }

  .nm-promo__arrow {
    transition: none;
  }
}

/* ==========================================================================
   Cookie banner (Cookie Notice plugin), restyled to match the site
   ========================================================================== */
#cookie-notice {
  font-family: var(--nm-sans);
  background: var(--nm-black) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.25);
}
#cookie-notice .cookie-notice-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px 28px;
  padding: 18px 24px;
  text-align: left;
}
#cookie-notice .cn-text-container {
  margin: 0;
  max-width: 560px;
  font-size: 14px;
  font-weight: 300;
  line-height: 1.55;
  color: #fff;
}
#cookie-notice .cn-buttons-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0;
}
/* Accept and Reject get equal weight (UK guidance: rejecting must be as easy) */
#cookie-notice .nm-cn-btn {
  margin: 0;
  min-height: 42px;
  padding: 0 22px;
  border: 1px solid #fff;
  border-radius: 0;
  background: #fff;
  color: var(--nm-black);
  font-family: var(--nm-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
#cookie-notice .nm-cn-btn:hover,
#cookie-notice .nm-cn-btn:focus-visible {
  background: transparent;
  color: #fff;
}
#cookie-notice .nm-cn-btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}
#cookie-notice #cn-more-info {
  min-height: 0;
  padding: 4px 2px;
  border: 0;
  background: none;
  color: var(--nm-silver);
  letter-spacing: 0.08em;
  text-decoration: underline;
  text-underline-offset: 3px;
}
#cookie-notice #cn-more-info:hover {
  color: #fff;
}
/* The plugin's close "x" counts as Accept, so it's removed */
#cookie-notice #cn-close-notice {
  display: none;
}
@media (max-width: 600px) {
  #cookie-notice .cookie-notice-container {
    padding: 16px 18px calc(16px + env(safe-area-inset-bottom));
    gap: 12px;
  }
  #cookie-notice .cn-text-container {
    font-size: 13px;
  }
  #cookie-notice .cn-buttons-container {
    width: 100%;
  }
  #cookie-notice #cn-accept-cookie,
  #cookie-notice #cn-refuse-cookie {
    flex: 1 1 0;
  }
}

/* ── Built-in Instagram feed (inc/instagram-feed.php) ─────────────── */
.nm-ig-item {
	position: relative;
	display: block;
	overflow: hidden;
	cursor: pointer;
}
.nm-ig-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.5s ease;
}
.nm-ig-item:hover img,
.nm-ig-item:focus-visible img {
	transform: scale(1.05);
}
.nm-ig-item:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: -2px;
}
.nm-ig-badge {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 0;
	height: 0;
	border-style: solid;
	border-width: 7px 0 7px 12px;
	border-color: transparent transparent transparent #fff;
	filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.5));
	pointer-events: none;
}
.nm-ig-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 2px;
}
.nm-ig-grid__item {
	aspect-ratio: 1;
}
@media (min-width: 768px) {
	.nm-ig-grid {
		grid-template-columns: repeat(6, 1fr);
	}
}
