/* PAGE DESIGN ROLL — Packet Desk (product)
   Layout: asymmetric split — wide gallery left · seed-packet buy panel right
   Cards: seed-packet label buy panel (kraft notch, dashed wheat edge)
   Dividers: grass-blade field line between buy / facts / notes
   Motion: image zoom on hover / focus-within
   Signature: house-fact icon row — HSN · SKU · pack · stock (real fields only)
   Sticky buy on desktop; fixed add bar above mobile tabs
   Family: Trellis Span · not A113 foil label · A108 soil spec · A110 blotter
   Scoped: body.page-a114-packetdesk */

.page-a114-packetdesk {
  background:
    radial-gradient(ellipse 42% 28% at 8% 0%, rgba(47, 163, 107, 0.08), transparent 55%),
    var(--bf-wash);
}

.tl-main {
  padding-top: clamp(0.85rem, 2vw, 1.35rem);
}

.page-a114-packetdesk .pg-breadcrumb {
  margin-bottom: 0.85rem;
}

.page-a114-packetdesk .pg-breadcrumb span {
  color: var(--bf-mute);
}

/* —— Asymmetric split —— */
.tl-split {
  display: grid;
  gap: clamp(1rem, 2.4vw, 1.5rem);
  align-items: start;
}

.tl-gallery {
  margin: 0;
  border-radius: var(--bf-radius);
  overflow: hidden;
  background: #0a1a12;
  box-shadow: var(--bf-shadow);
  border: 2px solid rgba(24, 74, 50, 0.12);
}

.tl-gallery img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  transition: transform 280ms var(--bf-ease);
}

.tl-gallery:hover img,
.tl-gallery:focus-within img {
  transform: scale(1.04);
}

/* —— Seed-packet label buy panel —— */
.tl-buy {
  position: relative;
  background: var(--bf-paper);
  border: 2px dashed var(--bf-wheat);
  border-radius: 0.35rem 0.85rem 0.35rem 0.85rem;
  padding: clamp(1rem, 2.4vw, 1.35rem);
  box-shadow: var(--bf-shadow);
}

.tl-buy::before {
  content: "";
  display: block;
  height: 0.4rem;
  margin: -0.05rem -0.05rem 0.75rem;
  border-radius: 0.25rem 0.75rem 0 0;
  background: linear-gradient(90deg, var(--bf-kraft), var(--bf-kraft-deep));
}

.tl-buy h1 {
  margin: 0 0 0.55rem;
  font-size: clamp(1.55rem, 3.8vw, 2.15rem);
  line-height: 1.12;
}

.tl-head {
  display: grid;
  gap: 0.45rem;
}

.tl-badge {
  align-self: flex-start;
  padding: 0.18rem 0.55rem;
  border-radius: var(--bf-pill);
  background: var(--bf-wheat);
  color: var(--bf-ink);
  font-family: var(--bf-display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.tl-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  margin-bottom: 0.15rem;
}

.tl-meta {
  margin: 0;
  color: var(--bf-mute);
  font-size: 0.88rem;
}

.tl-cat {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0.2rem 0.65rem;
  border-radius: var(--bf-pill);
  border: 1px solid var(--bf-line);
  background: var(--bf-pith);
  color: var(--bf-forest);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}

.tl-cat:hover,
.tl-cat:focus-visible {
  background: var(--bf-wheat);
  border-color: var(--bf-wheat);
  color: var(--bf-ink);
}

.tl-stock {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0.2rem 0.65rem;
  border-radius: var(--bf-pill);
  background: rgba(47, 163, 107, 0.14);
  color: var(--bf-forest);
  font-size: 0.78rem;
  font-weight: 700;
}

.tl-stock.is-out {
  background: rgba(196, 0, 42, 0.1);
  color: #8a1028;
}

.tl-rating {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.5rem;
}

.tl-rating-count {
  font-size: 0.88rem;
  color: var(--bf-mute);
  font-weight: 600;
}

.tl-price {
  margin: 0 0 0.75rem;
  font-family: var(--bf-display);
  font-size: clamp(1.55rem, 3.4vw, 2.15rem);
  font-weight: 700;
  color: var(--bf-forest);
}

.tl-copy,
.tl-ship {
  margin: 0 0 0.65rem;
  color: var(--bf-mute);
  font-size: 0.94rem;
  line-height: 1.55;
}

.tl-ship {
  padding: 0.65rem 0.75rem;
  border-radius: var(--bf-radius-sm);
  background: rgba(201, 146, 18, 0.1);
  border: 1px solid rgba(201, 146, 18, 0.22);
  color: var(--bf-ink);
  font-size: 0.86rem;
}

.tl-buy .a114-notice {
  margin-bottom: 0.85rem;
}

.tl-form {
  display: grid;
  gap: 0.85rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--bf-line);
}

.tl-qty {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}

.tl-qty-label {
  font-weight: 700;
  color: var(--bf-ink);
}

.tl-step {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.tl-nudge {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--bf-line);
  border-radius: var(--bf-pill);
  background: var(--bf-pith);
  color: var(--bf-forest);
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  font-weight: 700;
}

.tl-nudge:hover,
.tl-nudge:focus-visible {
  background: var(--bf-wheat);
  border-color: var(--bf-wheat);
  color: var(--bf-ink);
}

.tl-step input {
  width: 4.5rem;
  max-width: 4.5rem;
  flex: 0 0 4.5rem;
  text-align: center;
  font-weight: 700;
}

.tl-actions {
  display: grid;
  gap: 0.55rem;
}

.tl-actions .a114-btn {
  width: 100%;
}

/* —— Grass divider (between sections) —— */
.page-a114-packetdesk .tl-facts::before,
.page-a114-packetdesk .tl-notes::before,
.page-a114-packetdesk .tl-related::before {
  content: "";
  display: block;
  height: 12px;
  margin: 0 0 clamp(1rem, 2.4vw, 1.35rem);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 12'%3E%3Cpath d='M0 10 Q25 2 50 10 T100 10' fill='none' stroke='%23184A32' stroke-width='1.2' opacity='.35'/%3E%3Cpath d='M18 10 L20 3 L22 10M48 10 L50 2 L52 10M78 10 L80 4 L82 10' stroke='%23184A32' stroke-width='1' opacity='.5'/%3E%3C/svg%3E") repeat-x center;
  background-size: 100px 12px;
}

/* —— House-fact icon row (signature) —— */
.tl-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin: clamp(1.2rem, 2.8vw, 1.6rem) auto;
}

.tl-facts article {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.35rem;
  padding: 0.85rem 0.65rem;
  border-radius: var(--bf-radius-sm);
  background: var(--bf-paper);
  border: 1px solid var(--bf-line);
  box-shadow: 0 4px 12px rgba(14, 44, 30, 0.08);
}

.tl-facts article::before {
  content: "";
  width: 1.75rem;
  height: 1.75rem;
  background: var(--bf-pith);
  border-radius: 50%;
  border: 1px solid rgba(201, 146, 18, 0.35);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 60%;
}

.tl-facts article:nth-child(1)::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23184A32' stroke-width='2'%3E%3Cpath d='M4 6h16v12H4z'/%3E%3Cpath d='M8 10h8M8 14h5'/%3E%3C/svg%3E");
}

.tl-facts article:nth-child(2)::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23184A32' stroke-width='2'%3E%3Cpath d='M7 7h10v10H7z'/%3E%3Cpath d='M9 9h6v6H9z'/%3E%3C/svg%3E");
}

.tl-facts article:nth-child(3)::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23184A32' stroke-width='2'%3E%3Cpath d='M12 3v18M8 7l4-4 4 4M8 17l4 4 4-4'/%3E%3C/svg%3E");
}

.tl-facts article:nth-child(4)::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23184A32' stroke-width='2'%3E%3Cpath d='M4 12c2-4 6-6 8-6s6 2 8 6c-2 4-6 6-8 6s-6-2-8-6z'/%3E%3Ccircle cx='12' cy='12' r='2' fill='%232FA36B'/%3E%3C/svg%3E");
}

.tl-facts span {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bf-mute);
  font-weight: 700;
}

.tl-facts strong {
  display: block;
  font-family: var(--bf-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--bf-forest);
}

.tl-notes {
  margin-bottom: clamp(1.2rem, 2.8vw, 1.6rem);
}

.tl-notes details {
  background: var(--bf-paper);
  border-radius: var(--bf-radius);
  padding: 0.15rem 1rem 0.85rem;
  margin-bottom: 0.55rem;
  box-shadow: var(--bf-shadow);
  border: 1px solid rgba(24, 74, 50, 0.08);
}

.tl-notes summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: 700;
  color: var(--bf-forest);
  list-style: none;
}

.tl-notes summary::-webkit-details-marker {
  display: none;
}

.tl-notes summary::after {
  content: "+";
  margin-left: auto;
  font-size: 1.2rem;
  color: var(--bf-wheat);
  font-weight: 700;
}

.tl-notes details[open] summary::after {
  content: "−";
}

.tl-notes p {
  margin: 0;
  color: var(--bf-mute);
  line-height: 1.55;
}

.tl-related {
  margin-bottom: 0.5rem;
}

.tl-related h2 {
  margin-bottom: 0.75rem;
  font-size: clamp(1.2rem, 2.6vw, 1.55rem);
}

.tl-rel {
  display: flex;
  gap: 0.65rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.35rem;
  -webkit-overflow-scrolling: touch;
}

body.a114-body a.tl-rel-item,
.tl-rel a {
  flex: 0 0 min(58vw, 11rem);
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.5rem;
  background: var(--bf-paper);
  color: var(--bf-ink);
  text-decoration: none;
  border: 2px dashed var(--bf-wheat);
  border-radius: 0.35rem 0.75rem 0.35rem 0.75rem;
  box-shadow: var(--bf-shadow);
}

.tl-rel a::before {
  content: "";
  display: block;
  height: 0.25rem;
  margin: -0.5rem -0.5rem 0.35rem;
  border-radius: 0.2rem 0.6rem 0 0;
  background: linear-gradient(90deg, var(--bf-kraft), var(--bf-kraft-deep));
}

.tl-rel a:hover,
.tl-rel a:focus-visible {
  background: var(--bf-pith);
  transform: translateY(-2px);
  transition: transform 200ms var(--bf-ease);
}

.tl-rel img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 0.45rem;
  background: #0a1a12;
}

.tl-rel strong {
  color: var(--bf-ink);
  font-size: 0.78rem;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tl-rel em {
  font-style: normal;
  color: var(--bf-forest);
  font-weight: 700;
  font-size: 0.78rem;
}

.tl-sticky {
  display: none;
}

.tl-nudge:focus-visible,
.tl-rel a:focus-visible,
.tl-notes summary:focus-visible,
.tl-cat:focus-visible {
  outline: 2px solid var(--bf-wheat);
  outline-offset: 2px;
}

@media (min-width: 640px) {
  .tl-actions {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 880px) {
  .tl-split {
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
    gap: clamp(1.2rem, 2.8vw, 2rem);
  }

  .tl-buy {
    position: relative;
    top: auto;
  }

  .tl-facts {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 879px) {
  .tl-sticky {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.6rem;
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    z-index: auto;
    margin: 1rem clamp(0.75rem, 3vw, 1.25rem) 0;
    padding: 0.55rem 0.65rem 0.55rem 0.85rem;
    background: var(--bf-forest);
    color: var(--bf-pith);
    border-radius: var(--bf-pill);
    box-shadow: 0 12px 28px rgba(8, 22, 16, 0.32);
    border: 1px solid rgba(255, 243, 194, 0.14);
  }

  .tl-sticky span {
    min-width: 0;
    font-size: 0.82rem;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .tl-sticky .a114-btn {
    flex-shrink: 0;
    min-height: 44px;
    padding-inline: 1rem;
    font-size: 0.82rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tl-gallery img,
  .tl-rel a {
    transition: none;
  }

  .tl-gallery:hover img,
  .tl-gallery:focus-within img {
    transform: none;
  }

  .tl-rel a:hover,
  .tl-rel a:focus-visible {
    transform: none;
  }
}
