/*
Theme Name: Embrinora
Theme URI: https://embrinora.com
Author: Embrinora Studio
Author URI: https://embrinora.com
Description: A refined, conversion-focused storefront theme for premium intimate-wellness brands. Built for WooCommerce with a customisable editorial homepage, mega-menu navigation, discreet-shipping messaging and an optional 18+ gate.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: embrinora
Tags: e-commerce, custom-logo, custom-menu, featured-images, translation-ready, block-styles, wide-blocks
*/

/* ---------------------------------------------------------------
   1. Tokens
--------------------------------------------------------------- */
:root {
  --plum: #2f0526;
  --plum-deep: #1b0316;
  --plum-soft: #460739;
  --cream: #faf5f2;
  --sand: #f4ebe5;
  --blush: #f7e9e4;
  --coral: #e5574a;
  --ink: #221c20;
  --muted: #6f6367;
  --line: rgba(47, 5, 38, 0.14);
  --line-soft: rgba(47, 5, 38, 0.08);
  --font-display: "Fraunces", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --container: 1280px;
  --pad: 24px;
  --radius: 4px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --shadow: 0 24px 60px -32px rgba(47, 5, 38, 0.45);
}

/* ---------------------------------------------------------------
   2. Reset & base
--------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; text-decoration: none; }
a:hover { color: var(--plum-soft); }

p { margin: 0 0 1.1em; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
  color: var(--plum);
}

h1 { font-size: clamp(2.6rem, 5.4vw, 4.4rem); }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.9rem); }
h3 { font-size: clamp(1.25rem, 1.8vw, 1.55rem); }

em { font-style: italic; }

ul, ol { margin: 0; padding: 0; list-style: none; }

button, input, select, textarea { font: inherit; color: inherit; }

button { cursor: pointer; background: none; border: 0; padding: 0; }

::selection { background: var(--plum); color: var(--cream); }

:focus-visible {
  outline: 2px solid var(--plum-soft);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------------------------------------------------------------
   3. Utilities
--------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.section { padding-block: 92px; }
.section--sand { background: var(--sand); }
.section--plum { background: var(--plum); color: #f4e7e0; }
.section--plum h2, .section--plum h3 { color: var(--cream); }

.eyebrow {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--coral);
  margin: 0 0 18px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 40px;
}

.section-head h2 { margin: 0; }
.section-head .eyebrow { margin-bottom: 10px; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-bottom: 1px solid currentColor;
  padding-bottom: 3px;
  transition: gap 0.3s var(--ease), color 0.3s var(--ease);
}
.link-arrow:hover { gap: 14px; }
.link-arrow::after { content: "→"; font-size: 14px; line-height: 1; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 30px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  border: 1px solid transparent;
  transition: background 0.35s var(--ease), color 0.35s var(--ease),
              border-color 0.35s var(--ease), transform 0.35s var(--ease);
}
.btn:hover { transform: translateY(-1px); }

.btn--primary { background: var(--plum); color: var(--cream); }
.btn--primary:hover { background: var(--plum-soft); color: #fff; }

.btn--light { background: var(--cream); color: var(--plum); }
.btn--light:hover { background: #fff; color: var(--plum-deep); }

.btn--ghost { border-color: var(--plum); color: var(--plum); background: transparent; }
.btn--ghost:hover { background: var(--plum); color: var(--cream); }

.btn--block { width: 100%; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 12px 20px;
  background: var(--plum);
  color: var(--cream);
}
.skip-link:focus { left: 12px; top: 12px; }

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  word-wrap: normal !important;
}

/* ---------------------------------------------------------------
   4. Announcement + header
--------------------------------------------------------------- */
.announce {
  background: var(--plum);
  color: #f2e3dd;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-align: center;
  padding: 9px 16px;
}
.announce p { margin: 0; }
.announce a { border-bottom: 1px solid rgba(242, 227, 221, 0.4); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(250, 245, 242, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
  transition: box-shadow 0.3s var(--ease);
}
.site-header.is-scrolled { box-shadow: 0 10px 30px -24px rgba(47, 5, 38, 0.6); }

.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 40px;
  min-height: 78px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--plum);
  white-space: nowrap;
}
.brand:hover { color: var(--plum); opacity: 0.75; }
.brand img { max-height: 40px; width: auto; }

.custom-logo-link { display: inline-flex; }

.primary-nav { justify-self: center; }
.primary-nav > ul {
  display: flex;
  align-items: center;
  gap: 32px;
}
.primary-nav > ul > li { position: relative; }
.primary-nav > ul > li > a {
  display: inline-block;
  padding: 8px 0;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--plum);
}
.primary-nav > ul > li > a::after {
  content: "";
  display: block;
  height: 1px;
  width: 0;
  background: var(--plum);
  transition: width 0.35s var(--ease);
}
.primary-nav > ul > li:hover > a::after,
.primary-nav > ul > li.current-menu-item > a::after { width: 100%; }

.primary-nav .menu-item-sale > a { color: var(--coral); }
.primary-nav .menu-item-sale > a::after { background: var(--coral); }

/* Dropdown / mega panel */
.sub-menu {
  position: absolute;
  top: calc(100% + 18px);
  left: -24px;
  min-width: 250px;
  background: var(--cream);
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow);
  padding: 22px 26px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.28s var(--ease), transform 0.28s var(--ease), visibility 0.28s;
  z-index: 20;
}
.sub-menu::before {
  content: "";
  position: absolute;
  top: -20px;
  left: 0;
  right: 0;
  height: 20px;
}
.menu-item-has-children:hover > .sub-menu,
.menu-item-has-children:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.sub-menu li { margin-bottom: 11px; }
.sub-menu li:last-child { margin-bottom: 0; }
.sub-menu a {
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--ink);
  transition: color 0.2s var(--ease), padding-left 0.2s var(--ease);
  display: inline-block;
}
.sub-menu a:hover { color: var(--coral); padding-left: 4px; }

@media (min-width: 981px) {
  .sub-menu:has(> li:nth-child(5)) {
    width: 520px;
    column-count: 2;
    column-gap: 36px;
    left: -80px;
  }
  .sub-menu:has(> li:nth-child(5)) li { break-inside: avoid; }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-self: end;
}

.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--plum);
  transition: background 0.25s var(--ease);
}
.icon-btn:hover { background: var(--sand); color: var(--plum); }
.icon-btn svg { width: 19px; height: 19px; stroke-width: 1.4; }

.cart-count {
  position: absolute;
  top: 2px;
  right: 0;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--coral);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  line-height: 17px;
  text-align: center;
}
.cart-count[hidden] { display: none; }

.nav-toggle { display: none; }

/* Search drawer */
.search-panel {
  border-top: 1px solid var(--line-soft);
  background: var(--cream);
  padding: 22px 0;
}
.search-panel[hidden] { display: none; }
.search-form {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}
.search-form input[type="search"] {
  flex: 1;
  border: 0;
  background: transparent;
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--plum);
  padding: 6px 0;
}
.search-form input[type="search"]:focus { outline: none; }
.search-form input::placeholder { color: rgba(47, 5, 38, 0.35); }
.search-form button {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--plum);
}

/* ---------------------------------------------------------------
   5. Footer
--------------------------------------------------------------- */
.site-footer {
  background: var(--plum);
  color: #e9d8d2;
  padding: 76px 0 30px;
  font-size: 14px;
}
.site-footer h2,
.site-footer h3,
.site-footer h4 {
  color: var(--cream);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin: 0 0 20px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 48px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(244, 235, 229, 0.16);
}
.footer-brand .brand {
  color: var(--cream);
  font-size: 24px;
  margin-bottom: 18px;
}
.footer-brand p { color: rgba(233, 216, 210, 0.72); max-width: 34ch; font-size: 14px; }
.footer-list li { margin-bottom: 11px; }
.footer-list a { color: rgba(233, 216, 210, 0.8); }
.footer-list a:hover { color: #fff; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 26px;
  font-size: 12px;
  color: rgba(233, 216, 210, 0.62);
}
.footer-bottom a { color: rgba(233, 216, 210, 0.62); }
.footer-pay { display: flex; gap: 8px; }
.footer-pay span {
  border: 1px solid rgba(244, 235, 229, 0.25);
  border-radius: 3px;
  padding: 3px 7px;
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(233, 216, 210, 0.7);
}
.age-note {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: rgba(233, 216, 210, 0.5);
}

/* Age gate */
.age-gate {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(27, 3, 22, 0.94);
  backdrop-filter: blur(6px);
  text-align: center;
  color: var(--cream);
}
.age-gate[hidden] { display: none; }
.age-gate__card { max-width: 460px; }
.age-gate__logo {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.24em;
  margin-bottom: 28px;
}
.age-gate h2 { color: var(--cream); font-size: 32px; margin-bottom: 14px; }
.age-gate p { color: rgba(244, 235, 229, 0.72); font-size: 14px; margin-bottom: 26px; }
.age-gate__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.age-gate .btn--light { background: var(--cream); color: var(--plum); }
.age-gate .btn--ghost { border-color: rgba(244, 235, 229, 0.45); color: var(--cream); }
.age-gate .btn--ghost:hover { background: rgba(244, 235, 229, 0.12); color: #fff; }
.age-gate__fine { font-size: 11px; margin-top: 22px; color: rgba(244, 235, 229, 0.45); }

/* ---------------------------------------------------------------
   6. WordPress core bits
--------------------------------------------------------------- */
.alignwide { margin-inline: calc(var(--pad) * -1); max-width: 1100px; }
.alignfull { width: 100vw; margin-left: calc(50% - 50vw); max-width: none; }
.aligncenter { margin-inline: auto; }
.alignleft { float: left; margin: 0 24px 18px 0; }
.alignright { float: right; margin: 0 0 18px 24px; }

.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 12px; color: var(--muted); margin-top: 8px; }

.sticky .entry-title::after { content: " ★"; color: var(--coral); }
.bypostauthor > .comment-body { border-left: 2px solid var(--coral); padding-left: 16px; }

.entry-content h2,
.entry-content h3 { margin-top: 1.4em; }
.entry-content a { border-bottom: 1px solid var(--line); }
.entry-content a:hover { border-color: var(--coral); }
.entry-content blockquote {
  margin: 32px 0;
  padding-left: 24px;
  border-left: 2px solid var(--coral);
  font-family: var(--font-display);
  font-size: 1.35em;
  line-height: 1.4;
  color: var(--plum);
}
.entry-content ul { list-style: disc; padding-left: 22px; margin-bottom: 1.2em; }
.entry-content ol { list-style: decimal; padding-left: 22px; margin-bottom: 1.2em; }
.entry-content li { margin-bottom: 0.4em; }

.pagination,
.nav-links {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 56px 0 0;
  font-size: 13px;
}
.nav-links .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--plum);
}
.nav-links .page-numbers.current,
.nav-links .page-numbers:hover { background: var(--plum); color: var(--cream); border-color: var(--plum); }

.post-navigation { margin-top: 56px; border-top: 1px solid var(--line-soft); padding-top: 24px; }

/* ---------------------------------------------------------------
   7. Responsive
--------------------------------------------------------------- */
@media (max-width: 980px) {
  .header-inner { grid-template-columns: auto 1fr auto; gap: 16px; min-height: 64px; }
  .brand { font-size: 17px; letter-spacing: 0.18em; }
  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
  }
  .nav-toggle span {
    display: block;
    height: 1.5px;
    width: 20px;
    background: var(--plum);
    transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
  }
  .nav-open .nav-toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

  .primary-nav {
    position: fixed;
    inset: 64px 0 0 auto;
    width: min(380px, 88vw);
    background: var(--cream);
    border-left: 1px solid var(--line-soft);
    padding: 28px 26px 60px;
    transform: translateX(100%);
    transition: transform 0.4s var(--ease);
    overflow-y: auto;
    z-index: 95;
  }
  .nav-open .primary-nav { transform: translateX(0); }
  .primary-nav > ul { flex-direction: column; align-items: stretch; gap: 0; }
  .primary-nav > ul > li { border-bottom: 1px solid var(--line-soft); }
  .primary-nav > ul > li > a { display: block; padding: 16px 0; font-size: 13px; }
  .primary-nav > ul > li > a::after { display: none; }
  .sub-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: 0;
    padding: 0 0 14px 12px;
    width: auto !important;
    column-count: 1 !important;
    min-width: 0;
  }
  .sub-menu a { font-size: 13px; color: var(--muted); }
  .header-actions .icon-btn.account-link { display: none; }

  .section { padding-block: 60px; }
  .section-head { margin-bottom: 28px; align-items: baseline; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  :root { --pad: 18px; }
  body { font-size: 15px; }
  .announce { font-size: 9.5px; letter-spacing: 0.12em; }
  .footer-grid { grid-template-columns: 1fr; }
  .section { padding-block: 48px; }
}
