/*
 * buy-modal.css — "Où acheter" retailer picker, in Naturela's own visual language.
 *
 * Brand DNA pulled straight from the site: warm kraft-paper cream (like the bulle.png
 * emblem), the hand-drawn brushy display font 'Bocadillo' (the site's h1/h2 + logo wordmark),
 * the green sprout #4cb051 and kraft tan #c7a876, dark-brown ink #3a3a3a. All three theme
 * fonts (Bocadillo, Hand Of Sean Pro, Gotham Condensed) are already loaded by custom_seo.css
 * on every product page, so the modal can use them directly. Everything is namespaced
 * .ntrl-buy-* and carries a local box-sizing reset so theme CSS can't distort it.
 */

.ntrl-buy-overlay,
.ntrl-buy-overlay *,
.ntrl-buy-overlay *::before,
.ntrl-buy-overlay *::after { box-sizing: border-box; }

/* ---- trigger button: leave the theme's authentic tan Gotham pill alone; add only a
        keyboard-focus ring (a. specificity so it applies over the theme) ---- */
a.btn-find-product { cursor: pointer; }
a.btn-find-product:focus-visible {
  outline: 3px solid rgba(76, 176, 81, .55);
  outline-offset: 3px;
}

/* ---- overlay ---- */
.ntrl-buy-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(38, 34, 26, .60);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s ease, visibility .22s ease;
}
.ntrl-buy-overlay.is-open { opacity: 1; visibility: visible; }

/* ---- dialog: kraft-paper cream with a faint vertical ribbing like the brand's paper ---- */
.ntrl-buy-modal {
  position: relative;
  width: 100%;
  max-width: 430px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  overflow-x: hidden;
  background-color: #f7f0e0;
  background-image:
    repeating-linear-gradient(90deg, rgba(148, 128, 90, .05) 0 1px, transparent 1px 4px),
    radial-gradient(120% 80% at 50% 0%, #fbf6ea 0%, #f6efdd 55%, #f1e8d2 100%);
  border-radius: 20px;
  border: 1px solid #e6dbc0;
  box-shadow: 0 26px 70px rgba(46, 38, 22, .40);
  font-family: "Open Sans", "Helvetica Neue", Arial, sans-serif;
  transform: translateY(16px) scale(.975);
  transition: transform .26s cubic-bezier(.2, .8, .2, 1);
}
.ntrl-buy-overlay.is-open .ntrl-buy-modal { transform: none; }

/* ---- header ---- */
.ntrl-buy-head { padding: 30px 30px 20px; text-align: center; }
.ntrl-buy-logo-img {
  display: block;
  width: 132px;
  height: auto;
  margin: 0 auto 14px;
}
.ntrl-buy-head h2 {
  margin: 0;
  font-family: "Bocadillo", "Hand Of Sean Pro", "Segoe Script", cursive;
  font-size: 34px;
  font-weight: 400;
  line-height: 1;
  color: #3a3a3a;
  letter-spacing: .5px;
}
.ntrl-buy-head p {
  margin: 9px auto 0;
  max-width: 300px;
  font-size: 13.5px;
  line-height: 1.55;
  color: #8f8776;
}
/* little sprout + rule under the title, echoing the logo's green leaf */
.ntrl-buy-sprout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 14px auto 0;
  color: #cdbf9d;
}
.ntrl-buy-sprout::before,
.ntrl-buy-sprout::after {
  content: "";
  width: 46px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #d8cba8);
}
.ntrl-buy-sprout::after { transform: scaleX(-1); }
.ntrl-buy-sprout svg { display: block; }

.ntrl-buy-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: rgba(199, 168, 118, .18);
  color: #7c6f52;
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.ntrl-buy-close:hover { background: rgba(199, 168, 118, .34); color: #3a3a3a; transform: rotate(90deg); }
.ntrl-buy-close:focus-visible { outline: 3px solid rgba(76, 176, 81, .5); outline-offset: 2px; }

/* ---- retailer list ---- */
.ntrl-buy-list { padding: 6px 18px 8px; display: flex; flex-direction: column; gap: 12px; }

.ntrl-buy-card {
  --accent: #4cb051;
  position: relative;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 16px;
  border: 1px solid #e7dcc3;
  border-radius: 14px;
  background: #fffdf8;
  text-decoration: none;
  overflow: hidden;
  transition: border-color .18s ease, box-shadow .18s ease, transform .12s ease;
}
/* a soft accent bar that grows on hover — organic, not corporate */
.ntrl-buy-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: center;
  transition: transform .2s ease;
}
.ntrl-buy-card:hover,
.ntrl-buy-card:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 10px 24px rgba(60, 48, 24, .10);
  transform: translateY(-1px);
  outline: none;
}
.ntrl-buy-card:hover::before,
.ntrl-buy-card:focus-visible::before { transform: scaleY(1); }
.ntrl-buy-card:focus-visible { box-shadow: 0 0 0 3px rgba(76, 176, 81, .35); }

.ntrl-buy-logo {
  flex: 0 0 74px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ntrl-buy-logo img { max-width: 100%; max-height: 26px; width: auto; height: auto; display: block; }

.ntrl-buy-text { flex: 1 1 auto; min-width: 0; }
.ntrl-buy-name {
  display: block;
  font-family: "Gotham Condensed", "Open Sans", sans-serif;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .3px;
  color: #3a3a3a;
  line-height: 1.15;
}
.ntrl-buy-desc {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: #9c9482;
  line-height: 1.35;
}
.ntrl-buy-arrow {
  flex: 0 0 auto;
  color: #cdbf9d;
  transition: color .18s ease, transform .18s ease;
}
.ntrl-buy-card:hover .ntrl-buy-arrow { color: var(--accent); transform: translateX(3px); }

/* ---- footer note with a small sprout ---- */
.ntrl-buy-note {
  padding: 12px 26px 24px;
  text-align: center;
  font-size: 11.5px;
  color: #a89f8b;
  line-height: 1.5;
}
.ntrl-buy-note svg { vertical-align: -2px; margin-right: 4px; }

@media (max-width: 460px) {
  .ntrl-buy-modal { max-width: 100%; border-radius: 16px; }
  .ntrl-buy-head { padding: 26px 22px 16px; }
  .ntrl-buy-head h2 { font-size: 30px; }
  .ntrl-buy-logo { flex-basis: 60px; }
}

@media (prefers-reduced-motion: reduce) {
  .ntrl-buy-overlay, .ntrl-buy-modal, .ntrl-buy-card,
  .ntrl-buy-card::before, .ntrl-buy-arrow, .ntrl-buy-close { transition: none; }
}
