
/* ==========================================================
   Aafiyora v3.8 Product Trust + SEO/GEO/AEO Engine
   Clean trust, schema, quick view, sticky ATC, ingredient library.
   ========================================================== */

:root{
  --v38-ink:#1C281D;
  --v38-forest:#263728;
  --v38-text:#52604F;
  --v38-muted:#6E7868;
  --v38-cream:#FFF8EC;
  --v38-paper:#FFFFFF;
  --v38-sage:#EAF1E6;
  --v38-gold:#C9A45C;
  --v38-line:rgba(38,55,40,.12);
  --v38-shadow:0 24px 70px rgba(38,55,40,.12);
  --v38-shadow-strong:0 38px 100px rgba(38,55,40,.18);
}

.aafi-v38-trust-bar{
  padding:52px 0;
  background:
    radial-gradient(circle at 8% 0%,rgba(201,164,92,.12),transparent 22rem),
    linear-gradient(180deg,#FFF8EC,#EEF4E9);
  border-top:1px solid var(--v38-line);
}

.aafi-v38-trust-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
}

.aafi-v38-trust-grid article{
  padding:20px;
  border-radius:24px;
  background:rgba(255,255,255,.78);
  border:1px solid var(--v38-line);
  box-shadow:0 18px 56px rgba(38,55,40,.08);
}

.aafi-v38-trust-grid span,
.aafi-v38-card-trust span,
.aafi-v38-ingredient-grid article > span,
.aafi-v38-bundle-grid article > span{
  display:inline-flex;
  width:max-content;
  padding:.42rem .62rem;
  border-radius:999px;
  background:rgba(201,164,92,.15);
  color:var(--v38-forest)!important;
  font-size:.72rem;
  line-height:1;
  font-weight:950;
  text-transform:uppercase;
  letter-spacing:.08em;
}

.aafi-v38-trust-grid strong{
  display:block;
  margin:12px 0 8px;
  color:var(--v38-forest);
  font-weight:950;
  font-size:1.1rem;
}

.aafi-v38-trust-grid p{
  margin:0;
  color:var(--v38-text)!important;
  line-height:1.62!important;
}

/* Product card trust chips */
.aafi-v38-card-trust{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin:10px 0 8px;
}
.aafi-v38-card-trust span{
  font-size:.66rem;
  padding:.38rem .55rem;
  background:rgba(127,148,116,.13);
}

.aafi-v38-quick-view-btn{
  width:100%;
  margin-top:9px;
  border:1px solid var(--v38-line);
  border-radius:999px;
  padding:.72rem .9rem;
  background:#fff;
  color:var(--v38-forest);
  font-weight:950;
  cursor:pointer;
  transition:transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.aafi-v38-quick-view-btn:hover{
  transform:translateY(-2px);
  background:var(--v38-forest);
  color:var(--v38-cream);
  box-shadow:0 14px 42px rgba(38,55,40,.16);
}

/* Quick view modal */
.aafi-v38-qv-modal{
  position:fixed;
  inset:0;
  z-index:99999;
  display:grid;
  place-items:center;
  padding:20px;
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:opacity .22s ease, visibility .22s ease;
}

.aafi-v38-qv-modal.is-visible{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
}

.aafi-v38-qv-backdrop{
  position:absolute;
  inset:0;
  background:rgba(28,40,29,.42);
  backdrop-filter:blur(12px);
}

.aafi-v38-qv-dialog{
  position:relative;
  width:min(980px,100%);
  max-height:calc(100vh - 42px);
  overflow:auto;
  border-radius:34px;
  background:
    radial-gradient(circle at 14% 0%,rgba(201,164,92,.15),transparent 22rem),
    linear-gradient(145deg,#FFF8EC,#EEF4E9);
  border:1px solid var(--v38-line);
  box-shadow:var(--v38-shadow-strong);
  padding:clamp(20px,3vw,32px);
  transform:translateY(12px) scale(.98);
  transition:transform .24s ease;
}

.aafi-v38-qv-modal.is-visible .aafi-v38-qv-dialog{
  transform:translateY(0) scale(1);
}

.aafi-v38-qv-close{
  position:absolute;
  top:16px;
  right:16px;
  width:42px;
  height:42px;
  border:0;
  border-radius:50%;
  background:var(--v38-forest);
  color:var(--v38-cream);
  font-size:1.45rem;
  cursor:pointer;
  z-index:2;
}

.aafi-v38-qv-layout{
  display:grid;
  grid-template-columns:.9fr 1.1fr;
  gap:28px;
  align-items:center;
}

.aafi-v38-qv-image{
  border-radius:28px;
  overflow:hidden;
  background:linear-gradient(145deg,#EEF4E9,#FFF8EC);
  box-shadow:0 18px 56px rgba(38,55,40,.10);
}

.aafi-v38-qv-image img{
  width:100%;
  aspect-ratio:1/1;
  object-fit:cover;
  display:block;
}

.aafi-v38-qv-content h3{
  color:var(--v38-forest);
  font-family:var(--font-heading, Georgia, serif);
  font-size:clamp(2.2rem,4vw,4rem);
  line-height:1.02;
  letter-spacing:-.045em;
  margin:.5rem 0 .8rem;
}

.aafi-v38-qv-price{
  color:var(--v38-forest);
  font-weight:950;
  font-size:1.2rem;
  margin-bottom:10px;
}

.aafi-v38-qv-content ul{
  margin:16px 0;
  padding:0;
  list-style:none;
  display:grid;
  gap:8px;
}
.aafi-v38-qv-content li{
  position:relative;
  padding-left:24px;
  color:var(--v38-text)!important;
}
.aafi-v38-qv-content li::before{
  content:"";
  width:9px;
  height:9px;
  border-radius:50%;
  background:var(--v38-gold);
  position:absolute;
  left:4px;
  top:.65em;
}
.aafi-v38-qv-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.aafi-v38-qv-loading{
  padding:40px;
  text-align:center;
  color:var(--v38-forest);
  font-weight:900;
}

/* Sticky add to cart */
.aafi-v38-sticky-atc{
  position:fixed;
  left:50%;
  bottom:18px;
  transform:translate(-50%,120%);
  z-index:9991;
  width:min(980px,calc(100% - 32px));
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:12px;
  border-radius:24px;
  background:rgba(255,248,236,.96);
  border:1px solid var(--v38-line);
  box-shadow:var(--v38-shadow-strong);
  backdrop-filter:blur(16px);
  transition:transform .28s ease;
}

.aafi-v38-sticky-atc.is-visible{
  transform:translate(-50%,0);
}

.aafi-v38-sticky-product{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}
.aafi-v38-sticky-product img{
  width:54px;
  height:54px;
  object-fit:cover;
  border-radius:16px;
  background:var(--v38-sage);
}
.aafi-v38-sticky-product strong{
  color:var(--v38-forest);
  display:block;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:320px;
}
.aafi-v38-sticky-product span{
  color:var(--v38-text);
  font-size:.9rem;
  font-weight:800;
}
.aafi-v38-sticky-actions{
  display:flex;
  align-items:center;
  gap:12px;
}
.aafi-v38-sticky-actions > span{
  color:var(--v38-muted);
  font-size:.82rem;
  max-width:360px;
  line-height:1.35;
}

/* Answer Engine and Ingredient Library */
.aafi-v38-answer-engine,
.aafi-v38-ingredient-library,
.aafi-v38-bundle-builder{
  padding:74px 0;
  background:
    radial-gradient(circle at 88% 12%,rgba(127,148,116,.14),transparent 24rem),
    linear-gradient(180deg,#FFF8EC,#F8EEDC);
  border-top:1px solid var(--v38-line);
}

.aafi-v38-answer-grid,
.aafi-v38-ingredient-grid,
.aafi-v38-bundle-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
  margin-top:24px;
}

.aafi-v38-answer-grid article,
.aafi-v38-ingredient-grid article,
.aafi-v38-bundle-grid article{
  padding:22px;
  border-radius:28px;
  background:rgba(255,255,255,.82);
  border:1px solid var(--v38-line);
  box-shadow:var(--v38-shadow);
  transition:transform .18s ease, box-shadow .18s ease;
}

.aafi-v38-answer-grid article:hover,
.aafi-v38-ingredient-grid article:hover,
.aafi-v38-bundle-grid article:hover{
  transform:translateY(-5px);
  box-shadow:var(--v38-shadow-strong);
}

.aafi-v38-answer-grid span{
  color:var(--v38-gold);
  font-weight:950;
  font-size:.72rem;
  text-transform:uppercase;
  letter-spacing:.12em;
}

.aafi-v38-answer-grid h3,
.aafi-v38-ingredient-grid h3,
.aafi-v38-bundle-grid h3{
  color:var(--v38-forest);
  font-family:var(--font-body, Inter, sans-serif);
  font-weight:950;
  font-size:1.22rem;
  line-height:1.2;
  margin:12px 0 8px;
}

.aafi-v38-ingredient-grid strong,
.aafi-v38-ingredient-grid small{
  display:block;
  margin-top:10px;
}
.aafi-v38-ingredient-grid strong{
  color:var(--v38-forest);
}
.aafi-v38-ingredient-grid small{
  color:var(--v38-muted);
  line-height:1.5;
}

.aafi-v38-bundle-grid img{
  width:100%;
  aspect-ratio:1.08/1;
  object-fit:cover;
  border-radius:20px;
  background:var(--v38-sage);
  margin-bottom:12px;
}

.aafi-v38-bundle-grid button{
  width:100%;
  margin-top:12px;
  border:1px solid var(--v38-line);
  border-radius:999px;
  padding:.78rem 1rem;
  background:#fff;
  color:var(--v38-forest);
  font-weight:950;
  cursor:pointer;
}

.aafi-v38-bundle-grid article.is-selected{
  border-color:rgba(201,164,92,.65);
  box-shadow:0 26px 80px rgba(201,164,92,.18);
}
.aafi-v38-bundle-grid article.is-selected button{
  background:var(--v38-forest);
  color:var(--v38-cream);
}

.aafi-v38-bundle-summary{
  padding:12px 16px;
  border-radius:20px;
  background:#fff;
  border:1px solid var(--v38-line);
  box-shadow:0 14px 40px rgba(38,55,40,.08);
}
.aafi-v38-bundle-summary strong,
.aafi-v38-bundle-summary span{
  display:block;
}
.aafi-v38-bundle-summary strong{
  color:var(--v38-forest);
}
.aafi-v38-bundle-summary span{
  color:var(--v38-muted);
  font-size:.85rem;
}

.aafi-v38-bundle-result{
  margin-top:18px;
  padding:18px;
  border-radius:24px;
  background:rgba(38,55,40,.95);
  color:var(--v38-cream);
}
.aafi-v38-bundle-result strong,
.aafi-v38-bundle-result p{
  color:var(--v38-cream)!important;
}

@media(max-width:980px){
  .aafi-v38-trust-grid,
  .aafi-v38-answer-grid,
  .aafi-v38-ingredient-grid,
  .aafi-v38-bundle-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .aafi-v38-qv-layout{
    grid-template-columns:1fr;
  }
  .aafi-v38-sticky-atc{
    align-items:stretch;
    flex-direction:column;
  }
  .aafi-v38-sticky-actions{
    justify-content:space-between;
  }
}

@media(max-width:760px){
  .aafi-v38-trust-grid,
  .aafi-v38-answer-grid,
  .aafi-v38-ingredient-grid,
  .aafi-v38-bundle-grid{
    grid-template-columns:1fr;
  }
  .aafi-v38-qv-dialog{
    border-radius:24px;
  }
  .aafi-v38-sticky-atc{
    bottom:10px;
    width:calc(100% - 20px);
    border-radius:20px;
  }
  .aafi-v38-sticky-actions > span{
    display:none;
  }
  .aafi-v38-sticky-actions .btn{
    width:100%;
    text-align:center;
  }
}
