/* ============================================================
   birchivy — WordPress overrides
   The prototype used a custom <image-slot> web component for every
   image area. In production those become native <img> tags; these
   rules give the images the same object-fit cover behaviour the
   <image-slot> component provided.
   ============================================================ */

/* Generic slot images fill their container and crop to cover. */
.hero__media img,
.card__media img,
.story__media img,
.spotlight__media img,
.post__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Card image link should fill the media box. */
.card__media .card__link {
  position: absolute;
  inset: 0;
  display: block;
}
.card__media .card__link img { width: 100%; height: 100%; object-fit: cover; }

/* Category cards used an absolutely-positioned background image. */
.cat img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

/* Journal hover zoom (was applied to <image-slot>). */
.post .post__media img { transition: transform .6s var(--ease); }
.post:hover .post__media img { transform: scale(1.04); }

/* Hero media keeps a sensible height on its own (grid stretch handles desktop). */
.hero__media { min-height: 100%; background: var(--paper-2); }

/* Neutralise any base-theme body spacing that could leak through wp_head. */
body.home { margin: 0; }

/* Hero (mobile): restore right padding so the CTAs/copy aren't clipped. On desktop
   the hero grid uses padding-right:0 to bleed the image flush to the edge; on mobile
   that left the buttons running off-screen. Padding the copy fixes it without
   affecting the full-bleed image. */
@media (max-width: 760px) {
  .hero__copy { padding-right: 22px; }
}

/* <picture> wrapper should be transparent so the existing ".X img" sizing rules
   (hero, cards, collection tiles, story, journal) apply to the <img> directly. */
picture { display: block; }
picture img { width: 100%; height: auto; }

/* Card subtitle never balloons the card (clamp to 2 lines). */
.card__scent {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; max-height: 3em;
}

/* Product cards: stack name above price at all widths. The design assumed short names
   ("Birch Grove No. 1"); real titles ("Utopia Hand-Painted Abstract Oil Canvas Art") fought
   the price on one row and wrapped into a tall, uneven column. Stacking keeps cards even. */
.card__row { flex-direction: column; align-items: flex-start; gap: 3px; }
.card__price { white-space: normal; }
@media (max-width: 760px) {
  .card__price { font-size: 0.95rem; }
  .card__name { font-size: 1rem; line-height: 1.2; }
}

/* ============================================================
   Editorial pages (About / Contact)
   ============================================================ */
.about-hero { padding-top: clamp(3rem, 6vh, 5rem); }
.about-hero__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.about-hero__copy h1 { margin: 1rem 0 1.4rem; }
.about-hero__cta { margin-top: 2rem; }
.about-hero__media { aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; background: var(--paper-2); }
.about-hero__media img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 900px) {
  .about-hero__grid { grid-template-columns: 1fr; gap: 2.4rem; }
  .about-hero__media { max-width: 560px; aspect-ratio: 4 / 3; }
}

/* Contact */
.contact__grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.contact__methods { display: flex; flex-direction: column; gap: 1.6rem; margin: 2rem 0; }
.contact__method { display: flex; gap: 1rem; align-items: flex-start; }
.contact__method svg { width: 24px; height: 24px; color: var(--accent-ink); flex: none; margin-top: 3px; }
.contact__method h4 { margin: 0 0 3px; font-size: 1rem; font-weight: 600; }
.contact__method p, .contact__method a { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }
.contact__method a { text-decoration: underline; text-underline-offset: 2px; }
.contact__method a:hover { color: var(--accent-ink); }
.contact__form { background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: clamp(1.6rem, 3vw, 2.4rem); }
.contact__form label { display: block; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 0.5rem; }
.contact__form .row { margin-bottom: 1.2rem; }
.contact__form input, .contact__form textarea, .contact__form select {
  width: 100%; padding: 0.9em 1.1em; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper); font-family: inherit; font-size: 0.98rem; color: var(--ink);
}
.contact__form input:focus, .contact__form textarea:focus, .contact__form select:focus { outline: none; border-color: var(--accent); }
.contact__form textarea { min-height: 130px; resize: vertical; }
.contact__form .wpcf7-submit, .contact__form button { width: 100%; }
@media (max-width: 900px) { .contact__grid { grid-template-columns: 1fr; gap: 2.4rem; } }

/* Contact form submit — on-brand dark pill (CF7 outputs an <input type=submit>). */
.contact__form .wpcf7-submit, .contact__form button[type="submit"] {
  width: 100%; padding: 1em 1.5em; border: none; border-radius: 100px;
  background: var(--ink); color: var(--paper); cursor: pointer;
  font-family: inherit; font-size: 0.84rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; transition: background .35s var(--ease);
}
.contact__form .wpcf7-submit:hover, .contact__form button[type="submit"]:hover { background: var(--accent); }
.contact__form .wpcf7-spinner { margin: 12px auto 0; display: block; }
.contact__form .wpcf7-response-output { margin: 1rem 0 0 !important; border-radius: var(--radius); font-size: 0.9rem; }

/* ============================================================
   Shop archive
   ============================================================ */
.shop-archive { padding-top: clamp(2rem, 5vh, 3.5rem); }
.shop-archive__head { display: flex; flex-direction: column; align-items: flex-start; gap: 0.6rem; margin-bottom: 1.6rem; max-width: 660px; }
.shop-archive__head h1 { margin: 0.4rem 0 0.2rem; }
.shop-archive__bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.6rem 0 1.4rem; border-bottom: 1px solid var(--line-soft); margin-bottom: 2.2rem; flex-wrap: wrap; }
.shop-archive__count, .woocommerce-result-count { color: var(--muted); font-size: 0.9rem; margin: 0 !important; }
.woocommerce-ordering { margin: 0; }
.woocommerce-ordering select.orderby {
  padding: 0.62em 2.6em 0.62em 1.1em; border: 1px solid var(--line); border-radius: 100px;
  background-color: var(--paper); font-family: inherit; font-size: 0.9rem; color: var(--ink); cursor: pointer;
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%2354564B' stroke-width='1.6'%3E%3Cpath d='m2 4 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1.1em center;
}
.shop-archive__pages { margin: 3rem 0 0; display: flex; justify-content: center; }
.shop-archive__pages .page-numbers { display: inline-flex; gap: 0.4rem; list-style: none; padding: 0; margin: 0; }
.shop-archive__pages .page-numbers li a, .shop-archive__pages .page-numbers li span {
  display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px;
  padding: 0 0.6em; border: 1px solid var(--line); border-radius: 100px; color: var(--ink); text-decoration: none; font-size: 0.92rem;
  transition: background .3s var(--ease), color .3s var(--ease);
}
.shop-archive__pages .page-numbers li a:hover { background: var(--paper-2); }
.shop-archive__pages .page-numbers li span.current { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.shop-archive__empty { padding: 3rem 0; color: var(--ink-soft); font-size: 1.05rem; }
.shop-archive__empty a { color: var(--accent-ink); text-decoration: underline; }
.shop-archive__trust { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; justify-content: center; margin: 3.5rem 0 0; padding: 1.8rem; border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--paper-2); }
.shop-archive__trust span { display: inline-flex; align-items: center; gap: 0.6rem; font-size: 0.9rem; font-weight: 500; color: var(--ink-soft); }
.shop-archive__trust svg { width: 20px; height: 20px; color: var(--accent-ink); flex: none; }
@media (max-width: 600px) { .shop-archive__trust { gap: 0.7rem 1.4rem; } .shop-archive__trust span { font-size: 0.8rem; } }

/* ============================================================
   Generic content pages (policies, FAQ, etc.)
   ============================================================ */
.wrap--narrow { max-width: 820px; }
.page-doc { padding-top: clamp(2.5rem, 6vh, 4rem); }
.page-doc__head { margin-bottom: 2.4rem; }
.page-doc__head h1 { margin: 0.6rem 0 0.7rem; }
.page-content { font-size: 1.05rem; color: var(--ink-soft); line-height: 1.75; }
.page-content > * + * { margin-top: 1.15rem; }
.page-content h2 { font-family: var(--display); font-weight: 500; font-size: 1.7rem; color: var(--ink); margin-top: 2.6rem; margin-bottom: 0.3rem; }
.page-content h3 { font-size: 1.12rem; font-weight: 600; color: var(--ink); margin-top: 1.7rem; }
.page-content a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; }
.page-content ul, .page-content ol { padding-left: 1.3rem; }
.page-content li { margin: 0.4rem 0; }
.page-content strong, .page-content b { color: var(--ink); }
.page-content hr { border: none; border-top: 1px solid var(--line-soft); margin: 2.4rem 0; }
/* FAQ accordion (native <details>, no JS) */
.page-content details { border-bottom: 1px solid var(--line-soft); }
.page-content details > summary { cursor: pointer; list-style: none; padding: 1.25rem 2.4rem 1.25rem 0; position: relative; font-weight: 600; color: var(--ink); font-size: 1.05rem; }
.page-content details > summary::-webkit-details-marker { display: none; }
.page-content details > summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-size: 1.4rem; line-height: 1; color: var(--accent-ink); transition: transform .3s var(--ease); }
.page-content details[open] > summary::after { content: "\2212"; }
.page-content details p { margin-top: 0; padding: 0 0 1.3rem; }
.page-doc__foot { margin-top: 3rem; padding-top: 1.6rem; border-top: 1px solid var(--line-soft); color: var(--ink-soft); }
.page-doc__foot a { color: var(--accent-ink); text-decoration: underline; }

/* ============================================================
   Journal — single post
   ============================================================ */
.journal-single__head { text-align: center; margin-bottom: 1.2rem; }
.journal-single__head .link-underline { display: inline-block; margin-bottom: 1.1rem; }
.journal-single__head .eyebrow { display: block; margin-bottom: 0.5rem; }
.journal-single__cover { aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; margin: 1.2rem auto 2.4rem; max-width: 1000px; background: var(--paper-2); }
.journal-single__cover img { width: 100%; height: 100%; object-fit: cover; }
.journal-single__foot { margin-top: 2.6rem; padding-top: 1.6rem; border-top: 1px solid var(--line-soft); color: var(--ink-soft); }
.journal-single__foot a { color: var(--accent-ink); text-decoration: underline; }
