/* ==========================================================================
   Nocturne Editions — Homepage stylesheet
   One file, no frameworks. Used by mockup.html and later by the plugin.
   ========================================================================== */

:root {
  --ink: #16130f;
  --ink-soft: #3a352e;
  --muted: #6f685e;
  --paper: #faf7f2;
  --paper-deep: #f3eee5;
  --line: #e3dcd0;
  --accent: #8e2f2a;
  --accent-dark: #6e211d;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --maxw: 1200px;
  --radius: 3px;                  /* subtle rounding; set to 0 for fully sharp */
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

/* Break out of any boxed parent (Elementor container, theme content area):
   the page always spans the full viewport width. */
.ne-page {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}
body:has(.ne-page) { overflow-x: clip; }

/* Elementor wraps the shortcode in a container with default 10px padding,
   which made the sticky header start 10px down and visibly jump when it
   pinned on scroll. Zero out any wrapper padding around our pages. */
.e-con:has(.ne-page),
.e-con-inner:has(.ne-page),
.elementor-widget-wrap:has(.ne-page),
.elementor-widget-shortcode:has(.ne-page) {
  padding: 0;
}

.ne-page {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

.ne-wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

img { display: block; max-width: 100%; height: auto; }

/* Scoped hard: the Hello Elementor theme paints links #CC3366 and borders
   tables; these higher-specificity rules keep our design in charge. */
div.ne-page a { color: inherit; text-decoration: none; }
div.ne-page h1, div.ne-page h2, div.ne-page h3,
div.ne-page h4, div.ne-page h5, div.ne-page h6 { color: inherit; }
div.ne-page table, div.ne-page th, div.ne-page td { border: 0; }

/* ---- Accessibility ---- */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.ne-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 18px;
  font-size: 13px;
}
.ne-skip:focus { left: 0; }

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

/* ---- Type helpers ---- */
.ne-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

.ne-h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(32px, 4vw, 44px);
  line-height: 1.1;
  margin-top: 10px;
}

/* ---- Buttons ---- */
.ne-btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 14px 28px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  transition: background 0.2s ease, color 0.2s ease;
  cursor: pointer;
  border-radius: var(--radius);
}
.ne-btn:hover { background: transparent; color: var(--ink); }

.ne-btn--ghost { background: transparent; color: var(--ink); }
.ne-btn--ghost:hover { background: var(--ink); color: var(--paper); }

/* ==========================================================================
   HEADER  (separable block — delete between NE-HEADER START/END when an
   Elementor header replaces it)
   ========================================================================== */
.ne-header {
  position: sticky;
  top: 0;
}
/* Logged-in admins: keep the sticky header below the WP admin bar */
body.admin-bar .ne-header { top: 32px; }
@media screen and (max-width: 782px) {
  body.admin-bar .ne-header { top: 46px; }
}
.ne-header {
  z-index: 50;
  background: rgba(250, 247, 242, 0.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.ne-header__bar {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 18px 24px;
  max-width: var(--maxw);
  margin: 0 auto;
}

.ne-header__logo img { width: 139px; height: 63px; object-fit: contain; }

.ne-nav {
  display: flex;
  gap: 28px;
  font-size: 15.5px;
  font-weight: 500;
  margin-left: auto;
}
.ne-nav a { padding: 6px 0; border-bottom: 1px solid transparent; }
.ne-nav a:hover { border-bottom-color: var(--ink); }

.ne-header__tools { display: flex; align-items: center; gap: 18px; }

.ne-search {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
}
.ne-search input {
  border: 0;
  outline: none;
  font-family: var(--sans);
  font-size: 13px;
  padding: 9px 12px;
  width: 150px;
  background: transparent;
}
.ne-search button {
  border: 0;
  background: transparent;
  padding: 8px 10px;
  cursor: pointer;
  display: flex;
}

.ne-icon { width: 20px; height: 20px; stroke: var(--ink); fill: none; stroke-width: 1.5; }
.ne-header__tools > a { display: flex; }
.ne-header__tools > a:hover .ne-icon { stroke: var(--accent); }

/* Category strip under the header */
.ne-catstrip {
  border-top: 1px solid var(--line);
  background: var(--ink);
}
.ne-catstrip > ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 36px;
  padding: 0 24px;
  max-width: var(--maxw);
  margin: 0 auto;
}
.ne-catstrip > ul > li { position: relative; padding: 12px 0; }
.ne-catstrip > ul > li > a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--paper);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.85;
}
.ne-catstrip > ul > li > a:hover { opacity: 1; color: #fff; }
.ne-caret { width: 11px; height: 11px; stroke: currentColor; fill: none; stroke-width: 2; flex: none; }

/* Dropdown submenu — pure CSS, opens on hover and on keyboard focus */
.ne-catstrip__sub {
  list-style: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 210px;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 18px 32px -16px rgba(22, 19, 15, 0.45);
  border-radius: var(--radius);
  padding: 8px 0;
  display: none;
  z-index: 60;
}
.ne-catstrip > ul > li:hover > .ne-catstrip__sub,
.ne-catstrip > ul > li:focus-within > .ne-catstrip__sub { display: block; }
.ne-catstrip__sub a {
  display: block;
  padding: 9px 20px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.ne-catstrip__sub a:hover { background: var(--paper-deep); color: var(--accent); }

/* ==========================================================================
   HERO
   ========================================================================== */
.ne-hero {
  position: relative;
  background-color: var(--paper-deep);
  background-size: cover;
  background-position: center;
  min-height: 520px;
  display: flex;
  align-items: center;
}
.ne-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(250,247,242,0.96) 0%, rgba(250,247,242,0.82) 45%, rgba(250,247,242,0.35) 100%);
}
.ne-hero__inner {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 90px 24px;
  width: 100%;
}
.ne-hero h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(44px, 6vw, 72px);
  line-height: 1.05;
  max-width: 13ch;
}
.ne-hero p {
  margin-top: 22px;
  max-width: 46ch;
  font-size: 17px;
  color: var(--ink-soft);
}
.ne-hero__cta { margin-top: 36px; display: flex; gap: 16px; flex-wrap: wrap; }

/* ==========================================================================
   SECTIONS — shared rhythm
   ========================================================================== */
.ne-section { padding: 88px 0; }
.ne-section--deep { background: var(--paper-deep); }

.ne-section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 48px;
}
.ne-viewall {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 3px;
  white-space: nowrap;
}
.ne-viewall:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ==========================================================================
   PRODUCT GRID — fixed aspect ratio, zero layout shift
   ========================================================================== */
.ne-products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 260px));
  justify-content: center;
  gap: 48px 32px;
}

.ne-card { display: flex; flex-direction: column; }

.ne-card__media {
  position: relative;
  aspect-ratio: 3 / 4;            /* reserves space before the image loads */
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 18px 35px -24px rgba(22, 19, 15, 0.35);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border-radius: var(--radius);
}
.ne-card__media img { width: 100%; height: 100%; object-fit: cover; }
.ne-card:hover .ne-card__media {
  transform: translateY(-5px);
  box-shadow: 0 26px 45px -24px rgba(22, 19, 15, 0.45);
}

.ne-card__composer {
  margin-top: 18px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.ne-card__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 24px;
  line-height: 1.15;
  margin-top: 4px;
}
.ne-card__title a:hover { color: var(--accent); }

.ne-card__meta {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--muted);
}
.ne-card__meta a { color: var(--accent); }
.ne-card__meta a:hover { text-decoration: underline; }

.ne-card__foot {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.ne-card__price { font-size: 17px; font-weight: 600; }
.ne-card__btn {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 10px 16px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  transition: background 0.2s ease, color 0.2s ease;
  border-radius: var(--radius);
}
.ne-card__btn:hover { background: transparent; color: var(--ink); }

/* Centered call-to-action under a product grid */
.ne-grid-cta { text-align: center; margin-top: 56px; }

/* ==========================================================================
   VALUES STRIP
   ========================================================================== */
.ne-values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.ne-values div { border-top: 2px solid var(--ink); padding-top: 22px; }
.ne-values h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 23px;
}
.ne-values p { margin-top: 8px; font-size: 14.5px; color: var(--muted); }

/* ==========================================================================
   ABOUT
   ========================================================================== */
.ne-about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
  align-items: center;
}
.ne-about__media {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border: 1px solid var(--line);
}
.ne-about__media img { width: 100%; height: 100%; object-fit: cover; }
.ne-about__text p { margin-top: 18px; color: var(--ink-soft); }
.ne-about__text .ne-btn { margin-top: 30px; }

/* ==========================================================================
   SHOP BY INSTRUMENT — typographic tiles
   ========================================================================== */
.ne-cats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.ne-cat-tile {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
  padding: 26px 30px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.ne-cat-tile:hover {
  border-color: var(--ink);
  box-shadow: 0 14px 28px -20px rgba(22, 19, 15, 0.4);
}
.ne-cat-tile__main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.ne-cat-tile__main span {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 25px;
  line-height: 1.15;
}
.ne-cat-tile__main:hover span { color: var(--accent); }
.ne-cat-tile__main svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.5; flex: none; }
.ne-cat-tile__subs { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.ne-cat-tile__subs a { font-size: 13.5px; color: var(--muted); }
.ne-cat-tile__subs a:hover { color: var(--accent); text-decoration: underline; }

/* ==========================================================================
   BROWSE BY COMPOSER — auto-generated chips
   ========================================================================== */
.ne-composers { display: flex; flex-wrap: wrap; gap: 14px; }
.ne-composer-chip {
  display: flex;
  align-items: baseline;
  gap: 14px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
  padding: 20px 28px;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.ne-composer-chip__name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.1;
}
.ne-composer-chip__count { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.ne-composer-chip:hover { background: var(--ink); border-color: var(--ink); }
.ne-composer-chip:hover .ne-composer-chip__name { color: var(--paper); }
.ne-composer-chip:hover .ne-composer-chip__count { color: rgba(250, 247, 242, 0.7); }

/* ==========================================================================
   NEWSLETTER
   ========================================================================== */
.ne-news { text-align: center; max-width: 620px; margin: 0 auto; }
.ne-news p { margin-top: 14px; color: var(--ink-soft); }
.ne-news form {
  margin-top: 30px;
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.ne-news input[type="email"] {
  font-family: var(--sans);
  font-size: 14px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
  min-width: 280px;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.ne-footer { background: var(--ink); color: rgba(250, 247, 242, 0.78); }
.ne-footer__main {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 60px;
  padding: 70px 24px 50px;
  max-width: var(--maxw);
  margin: 0 auto;
}
.ne-footer__logo { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.ne-footer__logo img { width: 54px; height: 54px; filter: invert(1); opacity: 0.95; }
.ne-footer__logo span {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--paper);
  line-height: 1.3;
}
.ne-footer__brand p { margin-top: 18px; font-size: 14px; max-width: 38ch; }
.ne-footer h4 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--paper);
  margin-bottom: 18px;
}
.ne-footer ul { list-style: none; }
.ne-footer li { margin-bottom: 10px; font-size: 14px; }
.ne-footer a:hover { color: #fff; text-decoration: underline; }
.ne-footer__bottom {
  border-top: 1px solid rgba(250, 247, 242, 0.15);
  font-size: 12.5px;
}
.ne-footer__bottom .ne-wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 22px;
  padding-bottom: 22px;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 980px) {
  .ne-about { grid-template-columns: 1fr; gap: 36px; }
  .ne-cats { grid-template-columns: repeat(2, 1fr); }
  .ne-values { grid-template-columns: 1fr; gap: 26px; }
  .ne-footer__main { grid-template-columns: 1fr 1fr; gap: 40px; }
}

@media (max-width: 760px) {
  .ne-header__bar { flex-wrap: wrap; gap: 14px; padding: 14px 20px; }
  .ne-nav { margin-left: 0; gap: 18px; order: 3; width: 100%; justify-content: center; }
  .ne-header__tools { margin-left: auto; }
  .ne-search input { width: 110px; }
  .ne-hero { min-height: 440px; }
  .ne-hero__inner { padding: 64px 24px; }
  .ne-section { padding: 60px 0; }
  .ne-cats { grid-template-columns: 1fr; }
  .ne-footer__main { grid-template-columns: 1fr; gap: 36px; }

  /* Product rows become swipeable strips on phones — pure CSS, no JavaScript */
  .ne-products {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 20px;
    padding-bottom: 14px;
    -webkit-overflow-scrolling: touch;
  }
  .ne-card {
    flex: 0 0 72%;
    max-width: 280px;
    scroll-snap-align: center;
  }
  .ne-news input[type="email"] { min-width: 0; width: 100%; }
}


/* ==========================================================================
   CART BADGE + MINI-CART DRAWER (v1.3.0)
   ========================================================================== */
.ne-cart-toggle { position: relative; }
.ne-cart-count {
  position: absolute;
  top: -7px;
  right: -9px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 17px;
  text-align: center;
}
.ne-cart-count.is-empty { display: none; }

.ne-minicart { position: fixed; inset: 0; z-index: 300; pointer-events: none; }
.ne-minicart__overlay {
  position: absolute;
  inset: 0;
  background: rgba(22, 19, 15, 0.45);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.ne-minicart__panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(400px, 92vw);
  background: var(--paper);
  box-shadow: -24px 0 60px -30px rgba(22, 19, 15, 0.5);
  transform: translateX(105%);
  transition: transform 0.28s ease;
  display: flex;
  flex-direction: column;
}
.ne-minicart.is-open { pointer-events: auto; }
.ne-minicart.is-open .ne-minicart__overlay { opacity: 1; }
.ne-minicart.is-open .ne-minicart__panel { transform: translateX(0); }
body.ne-minicart-open { overflow: hidden; }

.ne-minicart__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}
.ne-minicart__head h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 24px;
}
.ne-minicart__close {
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 6px;
  display: flex;
}
.ne-minicart__close svg { width: 20px; height: 20px; stroke: var(--ink); fill: none; stroke-width: 1.6; }
.ne-minicart__close:hover svg { stroke: var(--accent); }

.ne-minicart .widget_shopping_cart_content {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.ne-minicart ul.woocommerce-mini-cart {
  list-style: none;
  margin: 0;
  padding: 6px 24px;
  flex: 1;
}
.ne-minicart li.woocommerce-mini-cart-item {
  position: relative;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 0 16px 26px;
  border-bottom: 1px solid var(--line);
}
.ne-minicart li.woocommerce-mini-cart-item img {
  width: 52px;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 0;
}
.ne-minicart li.woocommerce-mini-cart-item > a:not(.remove) {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 17px;
  line-height: 1.3;
  color: var(--ink);
}
.ne-minicart li.woocommerce-mini-cart-item a.remove {
  position: absolute;
  left: 0;
  top: 16px;
  width: 20px;
  height: 20px;
  line-height: 18px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
}
.ne-minicart li.woocommerce-mini-cart-item a.remove:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.ne-minicart .woocommerce-mini-cart-item .quantity {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}
.ne-minicart dl.variation { font-size: 12px; color: var(--muted); margin: 4px 0 0; }
.ne-minicart dl.variation dt, .ne-minicart dl.variation dd { display: inline; margin: 0; }

.ne-minicart .woocommerce-mini-cart__total {
  display: flex;
  justify-content: space-between;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  font-weight: 600;
  margin: 0;
}
.ne-minicart .woocommerce-mini-cart__buttons {
  display: flex;
  gap: 10px;
  padding: 0 24px 24px;
  margin: 0;
}
.ne-minicart .woocommerce-mini-cart__buttons a.button {
  flex: 1;
  text-align: center;
  padding: 13px 10px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
}
.ne-minicart .woocommerce-mini-cart__buttons a.button.checkout {
  background: var(--ink);
  color: var(--paper);
}
.ne-minicart .woocommerce-mini-cart__buttons a.button:hover { background: var(--paper-deep); }
.ne-minicart .woocommerce-mini-cart__buttons a.button.checkout:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.ne-minicart .woocommerce-mini-cart__empty-message {
  padding: 40px 24px;
  text-align: center;
  color: var(--muted);
}
