/*
Theme Name:   Instatides Child
Template:     astra
Version:      1.0.0
Description:  Instatides child theme — peptide research compound store
Author:       Tim Elliott
*/

/* ── Design tokens ─────────────────────────────────────────────── */
:root {
  --ist-bg:       #f7f9fc;
  --ist-surface:  #ffffff;
  --ist-text:     #17212b;
  --ist-muted:    #5b6878;
  --ist-line:     #dbe4ee;
  --ist-accent:   #163a63;
  --ist-accent-2: #274f7d;
  --ist-accent-3: #5f86b3;
  --ist-soft:     #eef4fa;
  --ist-radius:   14px;
  --ist-shadow:   0 6px 20px rgba(17,34,68,.07);
  --ist-shadow-md:0 14px 36px rgba(17,34,68,.10);
  --ist-max:      1200px;
}

/* ── Full-width page reset ─────────────────────────────────────── */
body.ist-page #primary,
body.ist-page #main,
body.ist-page .entry-content {
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
}
body.ist-page #primary > .ast-container,
body.ist-page #main > .ast-container {
  max-width: 100% !important;
  padding: 0 !important;
  width: 100% !important;
}
body.ist-page .entry-header,
body.ist-page .post-thumbnail { display: none !important; }
body.ist-page .site-content    { padding: 0 !important; }

/* ── RUO disclaimer bar ────────────────────────────────────────── */
.ist-ruo-bar {
  background: var(--ist-accent);
  color: rgba(255,255,255,.9);
  font-size: .78rem;
  text-align: center;
  padding: 7px 16px;
  line-height: 1.4;
  position: relative;
  z-index: 9999;
  letter-spacing: .01em;
}
.ist-ruo-bar strong { color: #fff; font-weight: 700; }
.ist-ruo-bar a      { color: rgba(255,255,255,.78); text-decoration: underline; }

/* ── Shared layout helpers ─────────────────────────────────────── */
.ist-container {
  width: min(var(--ist-max), calc(100% - 40px));
  margin-inline: auto;
}

.ist-eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--ist-soft);
  border: 1px solid var(--ist-line);
  color: var(--ist-accent);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.ist-section { padding: 64px 0; }

.ist-section + .ist-section {
  border-top: 1px solid var(--ist-line);
}

.ist-card {
  background: var(--ist-surface);
  border: 1px solid var(--ist-line);
  border-radius: var(--ist-radius);
  padding: 24px;
  box-shadow: var(--ist-shadow);
  height: 100%;
  box-sizing: border-box;
}

.ist-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: .95rem;
  border: 1px solid transparent;
  text-decoration: none !important;
  transition: .18s ease;
  cursor: pointer;
}
.ist-btn-primary {
  background: var(--ist-accent);
  color: #fff !important;
  box-shadow: 0 8px 20px rgba(22,58,99,.22);
}
.ist-btn-primary:hover { background: var(--ist-accent-2); color: #fff !important; }
.ist-btn-secondary {
  background: #fff;
  color: var(--ist-accent) !important;
  border-color: var(--ist-line);
  box-shadow: var(--ist-shadow);
}
.ist-btn-secondary:hover { background: var(--ist-soft); }

.ist-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.ist-list li {
  position: relative;
  padding-left: 16px;
  margin-bottom: 10px;
  color: var(--ist-muted);
  line-height: 1.7;
}
.ist-list li:last-child { margin-bottom: 0; }
.ist-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: .65em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ist-accent);
}

/* ── COA page ──────────────────────────────────────────────────── */
.ist-coa-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
  margin-top: 32px;
}

.ist-coa-card {
  background: var(--ist-surface);
  border: 1px solid var(--ist-line);
  border-radius: var(--ist-radius);
  overflow: hidden;
  box-shadow: var(--ist-shadow);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}
.ist-coa-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--ist-shadow-md);
}
.ist-coa-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}
.ist-coa-card-body {
  padding: 16px 18px;
}
.ist-coa-card-body h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  color: var(--ist-text);
}
.ist-coa-card-body span {
  font-size: .8rem;
  color: var(--ist-muted);
}

/* COA lightbox */
.ist-lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.82);
  z-index: 99999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.ist-lightbox-overlay.active { display: flex; }
.ist-lightbox-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0,0,0,.5);
  object-fit: contain;
}
.ist-lightbox-close {
  position: fixed;
  top: 20px;
  right: 24px;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  background: none;
  border: none;
  padding: 0;
  z-index: 100000;
}

/* ── WooCommerce product card tweaks on home ───────────────────── */
.ist-products-wrap .products {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 20px !important;
  margin: 0 !important;
}
.ist-products-wrap .products li.product {
  background: var(--ist-surface);
  border: 1px solid var(--ist-line);
  border-radius: var(--ist-radius);
  padding: 20px !important;
  box-shadow: var(--ist-shadow);
  margin: 0 !important;
  float: none !important;
  width: auto !important;
}
.ist-products-wrap .products li.product .woocommerce-loop-product__title {
  font-size: 1rem;
  color: var(--ist-text);
}
.ist-products-wrap .products li.product .price {
  color: var(--ist-accent);
  font-weight: 700;
}

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 980px) {
  .ist-products-wrap .products {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}
@media (max-width: 640px) {
  .ist-section { padding: 44px 0; }
  .ist-products-wrap .products {
    grid-template-columns: 1fr !important;
  }
}
