/* ==========================================================================
   peptidebio — theme stylesheet
   Written for this store. No third-party theme code.

   Everything the pages share lives here, in one cached file, so a section
   only ever emits the handful of declarations that depend on its own
   settings. Sections are addressed by class, never by element, so markup can
   change without chasing selectors.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  --pb-ink: #2b2b2b;
  --pb-ink-2: #6f6f6f;
  --pb-ink-3: #8a8a8a;
  --pb-ink-4: #bdbdbd;

  --pb-canvas: #e9e9e9;
  --pb-surface: #ffffff;
  --pb-fill: #f4f4f4;
  --pb-fill-2: #f2f2f2;
  --pb-dark: #2b2b2b;
  --pb-dark-2: #1f2b3a;
  --pb-on-dark: #ffffff;

  --pb-line: #e1e1e1;
  --pb-line-soft: #eeeeee;
  --pb-accent: #e6d44a;

  --pb-radius-pill: 999px;
  --pb-radius-xl: clamp(26px, 3vw, 44px);
  --pb-radius-lg: clamp(22px, 2.6vw, 38px);
  --pb-radius-md: 26px;
  --pb-radius-sm: 18px;

  --pb-shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.08);
  --pb-shadow-md: 0 8px 26px rgba(0, 0, 0, 0.08);
  --pb-shadow-lg: 0 30px 60px rgba(0, 0, 0, 0.12);

  --pb-page: 1180px;
  --pb-gutter: clamp(8px, 1.4vw, 18px);
  --pb-bleed-gutter: clamp(8px, 1.4vw, 18px);
  --pb-gap: clamp(20px, 4vw, 56px);
  --pb-pad: clamp(24px, 2.6vw, 36px);

  --pb-font: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --pb-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* --------------------------------------------------------------------------
   2. Reset — scoped to the theme so nothing outside it is touched
   -------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  /* The hero's header is positioned against the page, not the viewport. */
  position: relative;
  background: var(--pb-canvas);
  color: var(--pb-ink);
  font-family: var(--pb-font);
  font-weight: 300;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }
a:hover { color: inherit; }

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

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1.08;
  text-wrap: balance;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

:focus-visible { outline: 2px solid var(--pb-ink); outline-offset: 3px; }

.pb-sr {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.pb-skip {
  position: absolute;
  top: -60px; left: 12px;
  z-index: 99;
  background: var(--pb-surface);
  border-radius: var(--pb-radius-pill);
  padding: 12px 22px;
  box-shadow: var(--pb-shadow-md);
}
.pb-skip:focus { top: 12px; }

/* --------------------------------------------------------------------------
   3. Layout primitives
   -------------------------------------------------------------------------- */
/*
 * Two widths, and the difference matters.
 *
 * `pb-shell` is the reading column every content section sits in. `pb-bleed`
 * is edge to edge with only a hairline gutter — the hero and the header that
 * floats on it are meant to span the window, and capping them at the reading
 * column made the whole page look narrow and squeezed the navigation until it
 * clipped mid-word.
 */
.pb-shell {
  width: 100%;
  max-width: calc(var(--pb-page) + 2 * var(--pb-gutter));
  margin-inline: auto;
  padding-inline: var(--pb-gutter);
}

.pb-bleed {
  width: 100%;
  padding-inline: var(--pb-bleed-gutter);
}

.pb-section { display: block; }
.pb-section + .pb-section { margin-top: var(--pb-gap); }

/* The band every content section sits on: a white card on the grey canvas. */
.pb-panel {
  background: var(--pb-surface);
  border-radius: var(--pb-radius-xl);
  padding: clamp(26px, 3.4vw, 54px);
}
.pb-panel--flush { padding: clamp(6px, 0.7vw, 10px); }
.pb-panel--dark { background: var(--pb-dark-2); color: var(--pb-on-dark); }

.pb-stack { display: flex; flex-direction: column; gap: var(--pb-gap); }

.pb-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: clamp(22px, 2.6vw, 38px);
}
.pb-head__text { display: flex; flex-direction: column; gap: 10px; max-width: 46ch; }

.pb-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--pb-ink-2);
}
.pb-eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

.pb-title { font-size: clamp(28px, 3.4vw, 46px); }
.pb-title--xl { font-size: clamp(46px, 6.2vw, 96px); line-height: 1; letter-spacing: -0.045em; }
.pb-title--sm { font-size: clamp(22px, 2.2vw, 30px); }

.pb-lede { color: var(--pb-ink-2); font-size: 15px; max-width: 60ch; }

.pb-more {
  font-size: 13px;
  font-weight: 400;
  white-space: nowrap;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.pb-more:hover { border-color: currentColor; }

/* --------------------------------------------------------------------------
   4. Buttons, pills, badges
   -------------------------------------------------------------------------- */
.pb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: var(--pb-radius-pill);
  padding: 13px 24px;
  font-size: 13px;
  font-weight: 400;
  line-height: 1;
  text-align: center;
  transition: background 0.2s, color 0.2s, border-color 0.2s, opacity 0.2s;
}
.pb-btn--solid { background: var(--pb-ink); color: var(--pb-on-dark); }
.pb-btn--solid:hover { background: #000; color: var(--pb-on-dark); }
.pb-btn--light { background: var(--pb-surface); color: var(--pb-ink); }
.pb-btn--light:hover { background: var(--pb-fill); }
.pb-btn--ghost { border-color: rgba(255, 255, 255, 0.7); color: #fff; }
.pb-btn--ghost:hover { background: rgba(255, 255, 255, 0.14); }
.pb-btn--outline { border-color: var(--pb-line); color: var(--pb-ink); }
.pb-btn--outline:hover { background: var(--pb-fill); }
.pb-btn--block { width: 100%; }
.pb-btn--lg { padding: 16px 28px; font-size: 14px; }
.pb-btn[disabled], .pb-btn[aria-disabled="true"] { opacity: 0.45; pointer-events: none; }

.pb-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--pb-fill);
  border-radius: var(--pb-radius-pill);
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 400;
}
.pb-chip--line { background: transparent; border: 1px solid var(--pb-line); }
.pb-chip--ink { background: var(--pb-ink); color: var(--pb-on-dark); }

.pb-badge {
  position: absolute;
  left: 14px; bottom: 14px;
  z-index: 2;
  background: var(--pb-ink);
  color: var(--pb-on-dark);
  border-radius: var(--pb-radius-pill);
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 400;
}
.pb-badge--soft { background: var(--pb-surface); color: var(--pb-ink); }

/* --------------------------------------------------------------------------
   5. Forms
   -------------------------------------------------------------------------- */
.pb-field { display: flex; flex-direction: column; gap: 7px; }
.pb-label { font-size: 12px; font-weight: 400; color: var(--pb-ink-2); }

.pb-input,
.pb-select,
.pb-textarea {
  width: 100%;
  background: var(--pb-surface);
  border: 1px solid var(--pb-line);
  border-radius: var(--pb-radius-pill);
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 300;
  transition: border-color 0.2s;
}
.pb-textarea { border-radius: var(--pb-radius-sm); min-height: 150px; resize: vertical; }
.pb-input:focus, .pb-select:focus, .pb-textarea:focus { border-color: var(--pb-ink); outline: none; }
.pb-input::placeholder, .pb-textarea::placeholder { color: var(--pb-ink-3); }

.pb-select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%232b2b2b' stroke-width='1.4' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  padding-right: 42px;
}

.pb-inline-form { display: flex; gap: 8px; flex-wrap: wrap; }
.pb-inline-form .pb-input { flex: 1 1 200px; }

.pb-error {
  background: #fdecec;
  border: 1px solid #f0b8b8;
  border-radius: var(--pb-radius-sm);
  padding: 14px 18px;
  font-size: 13px;
  color: #a12121;
}
.pb-note {
  background: var(--pb-fill);
  border-radius: var(--pb-radius-sm);
  padding: 14px 18px;
  font-size: 13px;
  color: var(--pb-ink-2);
}

/* Quantity stepper */
.pb-qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--pb-line);
  border-radius: var(--pb-radius-pill);
  overflow: hidden;
}
.pb-qty button {
  width: 42px; height: 46px;
  border: 0;
  background: transparent;
  font-size: 16px;
  line-height: 1;
}
.pb-qty input {
  width: 46px; height: 46px;
  border: 0;
  text-align: center;
  font-size: 14px;
  background: transparent;
  -moz-appearance: textfield;
}
.pb-qty input::-webkit-outer-spin-button,
.pb-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* --------------------------------------------------------------------------
   6. Media
   -------------------------------------------------------------------------- */
.pb-media {
  position: relative;
  overflow: hidden;
  border-radius: var(--pb-radius-md);
  background: var(--pb-fill);
}
.pb-media > img,
.pb-media > picture > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pb-media--square { aspect-ratio: 1 / 1; }
.pb-media--portrait { aspect-ratio: 4 / 5; }
.pb-media--wide { aspect-ratio: 16 / 10; }
.pb-media--contain > img { object-fit: contain; padding: 12%; }

.pb-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 24px;
  text-align: center;
  font-size: 12px;
  color: var(--pb-ink-3);
}

/* --------------------------------------------------------------------------
   7. Product card
   -------------------------------------------------------------------------- */
.pb-grid { display: grid; gap: clamp(12px, 1.4vw, 20px); }
.pb-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pb-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pb-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.pb-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--pb-surface);
  border-radius: var(--pb-radius-md);
  padding: 12px 12px 18px;
  height: 100%;
  transition: transform 0.3s var(--pb-ease), box-shadow 0.3s var(--pb-ease);
}
.pb-card:hover { transform: translateY(-3px); box-shadow: var(--pb-shadow-md); }
.pb-card__media { position: relative; border-radius: var(--pb-radius-sm); overflow: hidden; background: var(--pb-fill); aspect-ratio: 1 / 1; }
.pb-card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--pb-ease); }
.pb-card:hover .pb-card__media img { transform: scale(1.035); }
.pb-card__body { display: flex; flex-direction: column; gap: 5px; padding-inline: 6px; }
.pb-card__title { font-size: 15px; font-weight: 400; letter-spacing: -0.01em; }
.pb-card__sub { font-size: 12px; color: var(--pb-ink-3); }
.pb-card__foot { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 4px; padding-inline: 6px; }

.pb-price { font-size: 14px; font-weight: 400; }
.pb-price__was { color: var(--pb-ink-3); text-decoration: line-through; margin-left: 7px; font-size: 12px; }
.pb-price--sale { color: #b0341f; }

/* --------------------------------------------------------------------------
   8. Carousels (scroll-snap, no library)
   -------------------------------------------------------------------------- */
.pb-rail {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--pb-gutter);
  padding-bottom: 4px;
  scrollbar-width: none;
}
.pb-rail::-webkit-scrollbar { display: none; }
.pb-rail > * { scroll-snap-align: start; flex: 0 0 var(--pb-rail-item, 76%); }

.pb-dots { display: flex; justify-content: center; gap: 6px; }
.pb-dots button {
  width: 6px; height: 6px;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: var(--pb-ink-4);
  transition: width 0.4s var(--pb-ease), background 0.4s;
}
.pb-dots button[aria-current="true"] { width: 22px; background: var(--pb-ink); }

/* --------------------------------------------------------------------------
   9. Accordion
   -------------------------------------------------------------------------- */
.pb-acc { border-top: 1px solid var(--pb-line-soft); }
.pb-acc__item { border-bottom: 1px solid var(--pb-line-soft); }
.pb-acc__btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: none;
  border: 0;
  padding: 20px 2px;
  text-align: left;
  font-size: 16px;
  font-weight: 400;
}
.pb-acc__sign { position: relative; width: 14px; height: 14px; flex: none; }
.pb-acc__sign::before,
.pb-acc__sign::after {
  content: "";
  position: absolute;
  inset: 50% 0 auto 0;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.3s var(--pb-ease);
}
.pb-acc__sign::after { transform: rotate(90deg); }
.pb-acc__btn[aria-expanded="true"] .pb-acc__sign::after { transform: rotate(0deg); }
.pb-acc__panel { display: none; padding: 0 2px 22px; font-size: 14px; color: var(--pb-ink-2); max-width: 70ch; }
.pb-acc__btn[aria-expanded="true"] + .pb-acc__panel { display: block; }

/* --------------------------------------------------------------------------
   10. Rich text coming from the admin
   -------------------------------------------------------------------------- */
.pb-rte { font-size: 15px; color: var(--pb-ink-2); }
.pb-rte > :first-child { margin-top: 0; }
.pb-rte h2 { font-size: clamp(22px, 2.4vw, 30px); margin: 1.6em 0 0.5em; color: var(--pb-ink); }
.pb-rte h3 { font-size: clamp(18px, 1.9vw, 22px); margin: 1.5em 0 0.4em; color: var(--pb-ink); }
.pb-rte ul, .pb-rte ol { margin: 0 0 1em; padding-left: 1.25em; }
.pb-rte li { margin-bottom: 0.4em; }
.pb-rte a { border-bottom: 1px solid var(--pb-line); }
.pb-rte a:hover { border-color: currentColor; }
.pb-rte img { border-radius: var(--pb-radius-sm); margin: 1.4em 0; }
.pb-rte blockquote {
  margin: 1.6em 0;
  padding: 18px 24px;
  background: var(--pb-fill);
  border-radius: var(--pb-radius-sm);
  color: var(--pb-ink);
}
.pb-rte table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pb-rte th, .pb-rte td { border-bottom: 1px solid var(--pb-line-soft); padding: 12px 8px; text-align: left; }

/* --------------------------------------------------------------------------
   11. Motion
   -------------------------------------------------------------------------- */
[data-pb-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s var(--pb-ease), transform 0.7s var(--pb-ease);
}
[data-pb-reveal].pb-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  [data-pb-reveal] { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   12. Responsive helpers
   -------------------------------------------------------------------------- */
.pb-desk { display: initial; }
.pb-mob { display: none; }

@media (max-width: 899px) {
  .pb-desk { display: none !important; }
  .pb-mob { display: initial; }
  .pb-grid--3, .pb-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pb-head { align-items: flex-start; }
}

@media (max-width: 599px) {
  .pb-grid--2, .pb-grid--3, .pb-grid--4 { grid-template-columns: minmax(0, 1fr); }
  .pb-panel { padding: 22px 18px; border-radius: var(--pb-radius-lg); }
}
