/* =============================================
   AMINO PLUG — Shop styles (built on global.css tokens)
   Product cards, category tags, COA badge, product
   detail, and cart. Design ported from the finished
   Amino Plug static build.
   ============================================= */

.shop-wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 118px var(--pad) 90px;
}
.shop-header {
  text-align: center;
  margin-bottom: 40px;
}
.shop-header .eyebrow { justify-content: center; margin-bottom: 14px; }
.shop-header h1 {
  font-family: var(--serif);
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  color: var(--ink);
  margin: 0 0 14px;
}
.shop-header p {
  color: var(--muted);
  max-width: 62ch;
  margin: 0 auto;
  font-size: 1.05rem;
}

/* ===== Category color system (mirrors homepage tiles + tags) ===== */
.cat--regenerative  { --cat: var(--cat-regenerative); }
.cat--metabolic     { --cat: var(--cat-metabolic); }
.cat--mitochondrial { --cat: var(--cat-mitochondrial); }
.cat--neuropeptide  { --cat: var(--cat-neuropeptide); }

/* ===== Category filter pills ===== */
.filters {
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 8px 0 46px;
}
.filters button {
  border: 1.5px solid var(--line-strong); background: transparent; color: var(--ink-soft);
  font-family: var(--sans); font-weight: 600; font-size: 13px; padding: 9px 18px;
  border-radius: var(--radius-pill); cursor: pointer; transition: .28s var(--ease);
}
.filters button.cat--regenerative, .filters button.cat--metabolic,
.filters button.cat--mitochondrial, .filters button.cat--neuropeptide,
.filters button.cat--coa {
  color: var(--cat); border-color: color-mix(in srgb, var(--cat) 48%, transparent);
}
.filters button.cat--coa { --cat: var(--accent-deep); }
.filters button:hover { border-color: var(--cat, var(--black)); }
.filters button.active { background: var(--cat, var(--black)); color: #fff; border-color: var(--cat, var(--black)); }

/* ===== Product grid + cards ===== */
.product-grid, .prod-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.product-card, .card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .4s var(--ease), box-shadow .4s, border-color .4s;
  text-decoration: none;
  position: relative;
}
.product-card:hover, .card:hover {
  transform: translateY(-7px);
  box-shadow: var(--shadow-lift);
  border-color: transparent;
}
.product-card .img, .card-media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: linear-gradient(170deg, var(--bg-2), var(--surface));
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted-2); font-size: .85rem;
}
.product-card .img img, .card-media img {
  width: 100%; height: 100%; object-fit: contain; padding: 14px;
  transition: transform .55s var(--ease);
}
.product-card:hover .img img, .card:hover .card-media img { transform: scale(1.06); }

/* Category tag (top-left) */
.tag {
  position: absolute; top: 13px; left: 13px; z-index: 2;
  font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  padding: 6px 11px; border-radius: var(--radius-pill); color: #fff;
  background: var(--cat, var(--primary)); box-shadow: 0 4px 12px rgba(0,0,0,.12);
}
/* COA Certified badge (top-right) */
.coa-badge {
  position: absolute; top: 13px; right: 13px; z-index: 2;
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 9.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  padding: 5px 10px; border-radius: var(--radius-pill);
  color: var(--accent-deep); background: rgba(255,255,255,.94);
  border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  box-shadow: 0 4px 12px rgba(0,0,0,.10);
}
.coa-badge svg { width: 11px; height: 11px; }

.product-card .body, .card-body {
  padding: 18px 18px 20px;
  display: flex; flex-direction: column; gap: 5px; flex: 1;
}
.product-card .name, .card-body .ttl {
  font-family: var(--serif); font-size: 1.18rem; font-weight: 600; color: var(--ink);
}
.card-body .size { font-size: 12.5px; color: var(--muted-2); letter-spacing: .02em; }
.product-card .desc, .card-body .tagline {
  font-size: 13.5px; color: var(--muted); margin-top: 2px; flex: 1; line-height: 1.5;
}
.card-foot, .product-card .foot {
  display: flex; align-items: center; justify-content: space-between; margin-top: 14px;
}
.price {
  font-family: var(--serif); font-size: 1.3rem; color: var(--primary);
}
.price small { font-size: .7em; opacity: .7; }
.soldout-tag {
  color: var(--accent-deep); font-size: .78rem; text-transform: uppercase;
  letter-spacing: .08em; font-weight: 700;
}
/* small "Add" button on cards */
.add {
  border: 1.5px solid var(--line-strong); background: transparent; color: var(--ink);
  font-family: var(--sans); font-weight: 600; font-size: 13px; padding: 9px 15px;
  border-radius: var(--radius-pill); cursor: pointer; transition: .28s var(--ease);
}
.add:hover { background: var(--black); color: #fff; border-color: var(--black); }

/* ===== Buttons (shop-scoped) ===== */
.shop-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 14px 26px; border: 1.5px solid transparent; border-radius: var(--radius-pill);
  background: var(--primary); color: #fff; font-family: var(--sans); font-size: 14.5px;
  font-weight: 600; cursor: pointer; text-decoration: none; text-align: center;
  transition: transform .3s var(--ease), background .3s var(--ease), box-shadow .3s var(--ease), color .3s;
  box-shadow: var(--shadow-soft);
}
.shop-btn:hover { background: var(--primary-deep); transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.shop-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.shop-btn.secondary {
  background: transparent; border: 1.5px solid var(--line-strong); color: var(--ink); box-shadow: none;
}
.shop-btn.secondary:hover { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ===== Product detail ===== */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(30px, 5vw, 64px);
  align-items: start;
}
.product-detail .gallery img,
.product-detail .gallery .placeholder {
  width: 100%; border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: linear-gradient(170deg, var(--bg-2), var(--surface));
}
.product-detail .gallery .placeholder {
  aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center; color: var(--muted-2);
}
.product-detail h1 {
  font-family: var(--serif); font-size: clamp(2.1rem, 3.4vw, 3rem);
  color: var(--ink); margin: 14px 0 6px;
}
.product-detail .size { color: var(--muted-2); letter-spacing: .04em; font-size: 14px; }
.product-detail .price { font-family: var(--serif); font-size: 2rem; color: var(--primary); margin: 18px 0; }
.product-detail .desc { color: var(--ink-soft); line-height: 1.7; margin: 18px 0 28px; font-size: 16px; }
.product-detail .desc p { margin: 0 0 14px; }
.product-detail .desc h3, .product-detail .desc h4 {
  font-family: var(--serif); color: var(--primary); letter-spacing: .01em;
  font-size: 1.1rem; margin: 22px 0 10px;
}
.product-detail .desc ul, .product-detail .desc ol { margin: 0 0 16px; padding-left: 0; list-style: none; }
.product-detail .desc li { padding: 7px 0; border-bottom: 1px solid var(--line); }
.product-detail .desc li:last-child { border-bottom: none; }
.product-detail .desc strong, .product-detail .desc b { color: var(--ink); font-weight: 700; }

/* Category tag + COA on the product page (inline, static position) */
.pdp-tag {
  display: inline-block; margin-top: 4px; font-size: 10.5px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; padding: 6px 12px;
  border-radius: var(--radius-pill); color: #fff; background: var(--cat, var(--primary));
}
.pdp-coa {
  display: inline-flex; align-items: center; gap: 6px; margin: 4px 0 0 8px;
  font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  padding: 6px 12px; border-radius: var(--radius-pill); color: var(--accent-deep);
  background: var(--bg-2); border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
}
.pdp-coa svg { width: 12px; height: 12px; }

.member-badge {
  display: inline-block; vertical-align: middle; margin-left: 10px;
  background: var(--bg-2); color: var(--accent-deep);
  border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  border-radius: var(--radius-pill); padding: 3px 12px; font-family: var(--sans);
  font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
}

.qty-row { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.qty-input {
  width: 72px; padding: 10px; text-align: center; background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); color: var(--ink); font-size: 1rem;
}

/* Research-use-only note block */
.ruo {
  background: var(--bg-2); border-radius: var(--radius); padding: 16px 18px;
  font-size: 12.5px; color: var(--muted); margin-top: 26px; line-height: 1.6;
}

/* ===== Cart ===== */
.cart-table { width: 100%; border-collapse: collapse; margin-bottom: 28px; }
.cart-table th {
  text-align: left; color: var(--muted-2); font-size: .75rem; text-transform: uppercase;
  letter-spacing: .08em; padding: 0 0 12px; font-weight: 600;
}
.cart-table td { padding: 16px 0; border-top: 1px solid var(--line); color: var(--ink); vertical-align: middle; }
.cart-item-name { font-family: var(--serif); font-weight: 600; }
.cart-thumb {
  width: 58px; height: 58px; border-radius: 12px; object-fit: contain;
  background: var(--surface); border: 1px solid var(--line); vertical-align: middle; margin-right: 12px;
}
.cart-remove { background: none; border: none; color: var(--muted-2); cursor: pointer; font-size: .8rem; }
.cart-remove:hover { color: var(--accent-deep); }
.cart-summary {
  max-width: 380px; margin-left: auto; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px;
}
.cart-summary .row { display: flex; justify-content: space-between; margin-bottom: 12px; color: var(--muted); }
.cart-summary .row.total {
  color: var(--ink); font-family: var(--serif); font-size: 1.3rem; font-weight: 700;
  border-top: 1px solid var(--line); padding-top: 12px;
}
.cart-summary .row.total .tot { color: var(--primary); }

/* Free-shipping progress nudge */
.free-ship-nudge {
  margin: 14px 0 18px; padding: 14px 16px; border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: var(--radius); background: var(--bg-2);
}
.free-ship-nudge .fs-msg { font-size: .9rem; color: var(--ink-soft); font-weight: 500; }
.free-ship-nudge .fs-msg strong { color: var(--accent-deep); }
.free-ship-nudge .fs-bar {
  height: 6px; border-radius: 3px; background: var(--line-strong); margin-top: 10px; overflow: hidden;
}
.free-ship-nudge .fs-fill {
  height: 100%; border-radius: 3px; background: var(--accent); width: 0; transition: width .4s var(--ease);
}

.cart-field { margin-bottom: 16px; }
.cart-field label { display: block; color: var(--muted); font-size: .8rem; margin-bottom: 6px; }
.cart-field input {
  width: 100%; padding: 12px 14px; background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); color: var(--ink); font-size: .95rem;
}
.shop-note { color: var(--muted-2); font-size: .8rem; margin-top: 10px; text-align: center; }
.shop-error { color: var(--accent-deep); font-size: .85rem; margin-top: 10px; display: none; }
.shop-empty { text-align: center; color: var(--muted); padding: 60px 0; font-size: 15px; }

/* ===== Payment method picker (cart) ===== */
.pay-methods { display: flex; gap: 8px; flex-wrap: wrap; }
.pay-opt {
  flex: 1; min-width: 84px; padding: 11px 12px; text-align: center;
  border: 1.5px solid var(--line-strong); background: var(--surface);
  border-radius: var(--radius-sm); color: var(--ink-soft);
  font-family: var(--sans); font-weight: 600; font-size: 13px; cursor: pointer;
  transition: .2s var(--ease);
}
.pay-opt:hover { border-color: var(--primary); }
.pay-opt.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ===== Order confirmation (in cart) ===== */
.cart-confirm { max-width: 560px; margin: 0 auto; text-align: center; }
.cart-confirm .check {
  width: 64px; height: 64px; border-radius: 50%; background: var(--bg-2);
  color: var(--accent-deep); display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px; font-size: 2rem;
}
.cart-confirm h2 { font-family: var(--serif); font-size: 2rem; color: var(--ink); margin-bottom: 10px; }
.confirm-order { color: var(--ink); font-size: 1.05rem; margin-bottom: 6px; }
.confirm-total { color: var(--primary); font-family: var(--serif); font-weight: 700; font-size: 1.3rem; }
.confirm-ship { font-family: var(--sans); font-weight: 500; font-size: .85rem; color: var(--muted); }
.payment-instructions {
  text-align: left; margin: 22px auto 0; max-width: 460px; padding: 20px;
  background: var(--bg-2); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: var(--radius);
}
.payment-instructions .pi-title {
  font-family: var(--serif); font-weight: 600; color: var(--accent-deep);
  font-size: 1.05rem; margin-bottom: 10px;
}
.payment-instructions .pi-text { font-size: .92rem; color: var(--ink-soft); line-height: 1.6; margin-bottom: 12px; }
.pi-row { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-top: 1px solid var(--line); font-size: .9rem; }
.pi-row .pi-k { color: var(--muted); }
.pi-row .pi-v { color: var(--ink); font-weight: 600; text-align: right; display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.pi-copy-btn {
  background: var(--primary); color: #fff; border: none; border-radius: var(--radius-pill);
  font-family: var(--sans); font-weight: 600; font-size: 11px; padding: 5px 12px; cursor: pointer;
  transition: background .2s;
}
.pi-copy-btn:hover { background: var(--primary-deep); }
#copyOrderNum { margin-left: 10px; }

/* ===== Success page ===== */
.shop-success { max-width: 560px; margin: 0 auto; text-align: center; }
.shop-success .check {
  width: 64px; height: 64px; border-radius: 50%; background: var(--bg-2);
  color: var(--accent-deep); display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px; font-size: 2rem;
}

/* ===== Responsive ===== */
@media (max-width: 1000px) {
  .product-grid, .prod-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .product-detail { grid-template-columns: 1fr; gap: 28px; }
  .cart-summary { max-width: none; }
}
@media (max-width: 560px) {
  .product-grid, .prod-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
}
