/* ============================================================
   LUNCHBOX.KIDS — TOOLS / RECOMMENDATIONS
   Loads AFTER styles.css + home.css
   ============================================================ */

/* The whole content column sits on navy; sidebar stays cream */
.tools-main { background: var(--navy); }
.tools-main section { position: relative; }

/* ============ HERO ============ */
.tools-hero {
  padding-bottom: 64px;
  overflow: hidden;
}
.tools-hero .hero-grid {
  display: block;
  max-width: 1120px;
  margin: 0 auto;
}
.tools-hero .eyebrow { color: var(--teal); margin-bottom: 22px; }
.tools-hero .eyebrow .dash { background: var(--teal); }
.tools-hero-main { max-width: 760px; }
.tools-hero-lead {
  font-family: var(--serif);
  font-style: normal;
  font-weight: 400;
  font-size: clamp(36px, 7vw, 60px);
  line-height: 1.12;
  letter-spacing: -1.2px;
  color: var(--cream);
  margin: 22px 0 26px;
  text-wrap: pretty;
}
.tools-hero-lead .up { font-style: normal; }
.tools-hero-lead .alt { color: var(--peri); }
.tools-hero-body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  color: rgba(248,244,236,.82);
  max-width: 520px;
  margin-bottom: 26px;
}
.tools-disclaimer {
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.7;
  letter-spacing: .3px;
  color: rgba(248,244,236,.5);
  max-width: 480px;
  padding-left: 16px;
  border-left: 2px solid rgba(197,204,253,.4);
}

/* hero left column — sticky intro label */
.tools-hero-aside .eyebrow { margin-bottom: 0; }
@media (max-width: 900px) {
  .tools-hero-main { max-width: 100%; }
}

/* ============ FILTER BAR ============ */
.tools-filter {
  border-top: 1px solid rgba(248,244,236,.14);
  border-bottom: 1px solid rgba(248,244,236,.14);
  padding-top: 30px;
  padding-bottom: 30px;
}
.filter-row {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.filter-pill {
  appearance: none;
  background: transparent;
  border: 1.5px solid rgba(248,244,236,.28);
  color: var(--cream);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 13px 26px;
  border-radius: 100px;
  cursor: pointer;
  transition: background .18s, border-color .18s, color .18s, transform .18s;
  white-space: nowrap;
}
.filter-pill:hover {
  border-color: var(--teal);
  color: var(--mint);
  transform: translateY(-2px);
}
.filter-pill[aria-pressed="true"] {
  background: var(--mint);
  border-color: var(--mint);
  color: var(--navy);
}
.filter-pill .pill-count {
  opacity: .55;
  margin-left: 8px;
  font-weight: 400;
}

/* ============ PRODUCT GRID ============ */
.tools-grid-section { padding-top: 56px; padding-bottom: 96px; }
.product-grid {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.product-card {
  display: flex;
  flex-direction: column;
  background: rgba(248,244,236,.045);
  border: 1px solid rgba(248,244,236,.14);
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  transition: transform .25s cubic-bezier(.4,.2,.2,1), border-color .2s, background .2s, box-shadow .25s;
}
.product-card:hover {
  transform: translateY(-6px);
  border-color: var(--peri);
  background: rgba(197,204,253,.07);
  box-shadow: 0 26px 50px -28px rgba(0,0,0,.6);
}
.product-card.featured { border-color: var(--peri); box-shadow: 0 0 0 1px var(--peri) inset; }

.product-media {
  position: relative;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  padding: 26px;
  background:
    radial-gradient(120% 120% at 50% 30%, rgba(197,204,253,.16), rgba(197,204,253,0) 60%);
  border-bottom: 1px solid rgba(248,244,236,.1);
}
.product-media img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 16px 24px rgba(0,0,0,.4));
  transition: transform .3s;
}
.product-card:hover .product-media img { transform: scale(1.04); }

/* placeholder state (no photo yet) */
.product-media.placeholder::after {
  content: attr(data-label);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(248,244,236,.4);
  text-align: center;
  line-height: 1.5;
}
.product-media.placeholder {
  background:
    repeating-linear-gradient(-45deg, rgba(248,244,236,.05) 0 10px, rgba(248,244,236,.02) 10px 20px),
    radial-gradient(120% 120% at 50% 30%, rgba(197,204,253,.14), rgba(197,204,253,0) 60%);
}

.product-promo {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--mint);
  color: var(--navy);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 100px;
}
.product-cat-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(18,52,87,.66);
  backdrop-filter: blur(4px);
  color: rgba(248,244,236,.7);
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 5px 9px;
  border-radius: 100px;
}

.product-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1;
}
.product-body h3 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 23px;
  line-height: 1.12;
  letter-spacing: -.4px;
  color: var(--cream);
}
.product-body p {
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.6;
  color: rgba(248,244,236,.66);
  flex: 1;
}
.product-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--mint);
}
.product-link .disc {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(183,253,196,.16);
  display: grid;
  place-items: center;
  transition: transform .3s, background .18s;
}
.product-link .disc svg { width: 10px; height: 10px; }
.product-card:hover .product-link .disc { background: var(--mint); color: var(--navy); transform: rotate(45deg); }

/* empty state when a filter has no matches (shouldn't normally show) */
.grid-empty {
  display: none;
  max-width: 1120px;
  margin: 0 auto;
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  color: rgba(248,244,236,.6);
  padding: 40px 0;
}

/* On navy, the partners strip already matches; footer stays cream */

@media (max-width: 1000px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .product-grid { grid-template-columns: 1fr; }
  .filter-pill { padding: 11px 18px; font-size: 11px; }
}

/* ============ SHOP-FROM MODAL (shared, cream panel over navy backdrop) ============ */
.shop-modal[hidden] { display: none; }
.shop-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  animation: shopFadeIn .18s ease-out;
}
.shop-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18,52,87,.62);
  backdrop-filter: blur(3px);
}
.shop-modal__panel {
  position: relative;
  width: min(520px, 100%);
  background: var(--cream);
  color: var(--navy);
  border-radius: 20px;
  padding: 28px 28px 24px;
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.5);
  animation: shopPopIn .22s cubic-bezier(.2,.9,.3,1.1);
}
.shop-modal__grabber { display: none; }
.shop-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(18,52,87,.08);
  color: var(--navy);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background .18s;
}
.shop-modal__close:hover { background: rgba(18,52,87,.16); }
.shop-modal__close svg { width: 16px; height: 16px; }

.shop-modal__head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding-right: 36px;
}
.shop-modal__heading { flex: 1; min-width: 0; }
.shop-modal__title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 26px;
  line-height: 1.1;
  color: var(--navy);
  margin: 0 0 4px;
}
.shop-modal__sub {
  font-family: var(--sans);
  font-size: 14px;
  color: rgba(18,52,87,.7);
  margin: 0;
}
.shop-modal__thumb {
  width: 70px;
  height: 70px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 6px 12px rgba(18,52,87,.18));
}

.shop-modal__options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.shop-opt {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1.5px solid rgba(18,52,87,.14);
  border-radius: 14px;
  text-decoration: none;
  color: var(--navy);
  background: transparent;
  transition: border-color .18s, background .18s, transform .18s;
}
.shop-opt:hover {
  border-color: var(--navy);
  background: rgba(197,204,253,.16);
  transform: translateY(-1px);
}
.shop-opt__flag { font-size: 22px; line-height: 1; }
.shop-opt__text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.shop-opt__name {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 15px;
  color: var(--navy);
}
.shop-opt__note {
  font-family: var(--sans);
  font-size: 12px;
  color: rgba(18,52,87,.6);
}
.shop-opt__code {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .5px;
  background: var(--navy);
  color: var(--cream);
  padding: 6px 10px;
  border-radius: 100px;
  white-space: nowrap;
}
.shop-opt__arrow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(197,204,253,.5);
  display: grid;
  place-items: center;
  color: var(--navy);
  flex-shrink: 0;
}
.shop-opt__arrow svg { width: 14px; height: 14px; }

@keyframes shopFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes shopPopIn {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
