/* Plant page (taxonomy-florae_plant.php), v0.4.0. Versioned file name: a change ships as a new file.
   Colors and type follow the Florae Brand Guidelines: Blueberry for headings, prices and
   selection; Amsonia for backgrounds; Mentha as the accent; Poaceae for sale prices; the
   theme's brand fonts (ITC Avant Garde Gothic Pro for headlines, Graphie for body text). */

.florae-plant {
	--fp-blueberry: #062a73;
	--fp-mentha: #8aeb85;
	--fp-amsonia: #ecf2fe;
	--fp-poaceae: #49ab52;
	--fp-musa: #ffb248;
	--fp-ink: #14281d;
	--fp-muted: rgba(20, 40, 29, 0.7);
	--fp-line: rgba(6, 42, 115, 0.18);
	--fp-heading: "florae heading demi", "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
}

.florae-plant { padding-block: 1.5rem 3rem; }
.florae-plant .main { max-width: 76rem; }

.fp-crumbs { font-size: 0.85rem; color: var(--fp-muted); margin-bottom: 1rem; display: flex; gap: 0.5rem; }
.fp-crumbs a { color: inherit; }

.fp-header { margin-bottom: 1.5rem; }
.fp-name { font-family: var(--fp-heading); color: var(--fp-blueberry); font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.15; margin: 0 0 0.5rem; }
.fp-lede { font-size: 1.05rem; color: var(--fp-ink); margin: 0; }

/* Top: gallery left, chooser + cart + epithet story right. Stacks on phones. */
.fp-top { display: grid; gap: 2rem; grid-template-columns: minmax(0, 1fr); margin-bottom: 2.5rem; align-items: start; }
@media (min-width: 64em) { .fp-top { grid-template-columns: minmax(0, 11fr) minmax(20rem, 9fr); } }

.fp-stage { position: relative; min-width: 0; }
.fp-slides { background: var(--fp-amsonia); border-radius: 8px; overflow: hidden; touch-action: pan-y; }
.fp-slide { margin: 0; }
.fp-slide img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; }
.fp-slide figcaption { font-size: 0.85rem; padding: 0.6rem 0.8rem; color: var(--fp-ink); }
.fp-step { position: absolute; top: 40%; transform: translateY(-50%); width: 2.5rem; height: 2.5rem; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.9); color: var(--fp-blueberry); font-size: 1.6rem; line-height: 1; cursor: pointer; }
.fp-step--prev { left: 0.6rem; }
.fp-step--next { right: 0.6rem; }
.fp-thumbs { list-style: none; margin: 0.75rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.fp-thumbs button { padding: 0; border: 2px solid transparent; border-radius: 4px; background: none; cursor: pointer; line-height: 0; }
.fp-thumbs button.is-sibling { border-color: var(--fp-mentha); }
.fp-thumbs button.is-current { border-color: var(--fp-blueberry); }
.fp-thumbs img { width: 3.5rem; height: 3.5rem; object-fit: cover; border-radius: 2px; }

.fp-example { margin: 0; }
.fp-example img { width: 100%; height: auto; border-radius: 8px; }
.fp-example figcaption { font-size: 0.85rem; color: var(--fp-muted); margin-top: 0.4rem; }

.fp-panel { min-width: 0; display: grid; gap: 1.5rem; align-content: start; }
.fp-cart { display: grid; gap: 1rem; margin: 0; }
.fp-out { margin: 0; }

/* Chooser: radio list; with JavaScript, folded behind a toggle like a dropdown. */
.fp-choice { position: relative; border: 0; padding: 0; margin: 0; min-width: 0; }
/* color and appearance are set explicitly: iOS otherwise draws button text in its own blue. */
.fp-choice__toggle { width: 100%; text-align: left; padding: 0.7rem 2.5rem 0.7rem 0.9rem; border: 1px solid var(--fp-line); border-radius: 6px; background: #fff; color: var(--fp-ink); -webkit-appearance: none; appearance: none; cursor: pointer; position: relative; font: inherit; }
.fp-choice__toggle::after { content: "▾"; color: var(--fp-blueberry); position: absolute; right: 0.9rem; top: 50%; transform: translateY(-50%); }
.fp-choice__list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--fp-line); border-radius: 6px; background: #fff; }
.fp-choice.is-enhanced .fp-choice__list { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 0.25rem); max-height: 22rem; overflow-y: auto; box-shadow: 0 8px 24px rgba(6, 42, 115, 0.15); }
.fp-choice__list li + li { border-top: 1px solid var(--fp-amsonia); }
.fp-option { display: flex; gap: 0.7rem; align-items: center; padding: 0.6rem 0.9rem; cursor: pointer; margin: 0; color: var(--fp-ink); }
.fp-option:hover, .fp-option:focus-within { background: #f5f8fe; }
.fp-option input { margin: 0; flex: none; }
.fp-choice.is-enhanced .fp-option input { position: absolute; opacity: 0; pointer-events: none; }
.fp-option:has(input:checked) { background: var(--fp-amsonia); }

/* Information order: size, price, clone, breeder. */
.fp-option__text, .fp-choice__toggle [data-fp-current] { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.15rem 0.6rem; }
.fp-option__size { font-weight: 600; color: var(--fp-blueberry); }
.fp-option__price { font-weight: 600; color: var(--fp-blueberry); }
.fp-option__clone { color: var(--fp-ink); }
.fp-option__breeder { color: var(--fp-muted); font-size: 0.85em; }
.fp-option__specimen { color: var(--fp-muted); font-size: 0.85em; }
.florae-plant del { color: var(--fp-muted); font-weight: 400; }
.florae-plant ins { text-decoration: none; color: var(--fp-poaceae); }

.fp-price { font-size: 1.5rem; font-weight: 600; margin: 0; color: var(--fp-blueberry); }
.fp-facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.3rem 1rem; margin: 0; }
.fp-facts dt { font-weight: 600; color: var(--fp-blueberry); }
.fp-facts dd { margin: 0; }
.fp-add { width: 100%; margin: 0; }

/* Epithet story in the right-hand column. */
.fp-panel > .fp-story { padding: 1.2rem 1.3rem; border-radius: 8px; background: var(--fp-amsonia); border-left: 0; margin: 0; }
.fp-panel > .fp-story .fp-story__title { font-size: 1.25rem; }

/* Specimens available now: plain links, so the list works without JavaScript too. */
.fp-available { margin-bottom: 2.5rem; }
.fp-available > h2, .fp-learn > h2 { font-family: var(--fp-heading); color: var(--fp-blueberry); }
.fp-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); }
.fp-card a { display: grid; gap: 0.2rem; color: inherit; text-decoration: none; }
.fp-card img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 6px; }
.fp-card__size, .fp-card__price { font-weight: 600; color: var(--fp-blueberry); }
.fp-card__meta { font-size: 0.85rem; color: var(--fp-muted); }

/* Learn more about this plant: story cards, 2 x 2 on wide screens, one column on phones.
   Collapsed by default. */
.fp-learn { margin-bottom: 2.5rem; }
.fp-story-grid { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 48em) { .fp-story-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fp-card-story { border: 1px solid var(--fp-line); border-radius: 8px; background: #fff; }
.fp-card-story > summary { cursor: pointer; list-style: none; padding: 1rem 1.2rem; display: flex; justify-content: space-between; align-items: center; }
.fp-card-story > summary::-webkit-details-marker { display: none; }
.fp-card-story > summary::after { color: var(--fp-blueberry); content: "+"; font-size: 1.4rem; line-height: 1; }
.fp-card-story[open] > summary::after { content: "−"; }
.fp-card-story > summary h3 { margin: 0; font-size: 1.2rem; font-family: var(--fp-heading); color: var(--fp-blueberry); }
.fp-card-story__content { padding: 0 1.2rem 1rem; }

/* Stories. The selected specimen's clone story is highlighted. */
.fp-story { padding: 0.8rem 0 0.8rem 1rem; border-left: 3px solid var(--fp-line); margin-bottom: 0.8rem; }
.fp-story.is-current { border-left-color: var(--fp-mentha); background: var(--fp-amsonia); }
.fp-story__title { margin: 0 0 0.4rem; font-size: 1.05rem; font-family: var(--fp-heading); color: var(--fp-blueberry); }
.fp-story__summary { font-weight: 600; margin: 0 0 0.5rem; }
.fp-story__body p:last-child { margin-bottom: 0; }
.fp-parent-link { margin: -0.4rem 0 0.8rem 1rem; font-size: 0.9rem; }
.fp-sample { display: inline-block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; background: #fff0db; color: var(--fp-ink); border: 1px solid var(--fp-musa); padding: 0.15rem 0.5rem; border-radius: 999px; margin: 0 0 0.5rem; }

/* WooCommerce's single-product link up to the plant page. */
.florae-plant-link { font-size: 0.95rem; margin: 0.5rem 0 1rem; }

/* Phones: the chooser's text a little smaller, so each option fits on fewer lines. */
@media (max-width: 40em) {
	.fp-choice__toggle, .fp-option { font-size: 0.85em; }
}
