/*
Theme Name: P3 Labs WooCommerce
Theme URI: https://p3labspeptides.com
Author: P3 Labs
Description: Custom WooCommerce theme matching the original P3 Labs research catalog.
Version: 1.0.0
Text Domain: p3labs
*/

:root {
  --ink: #172238;
  --muted: #647083;
  --blue: #245b91;
  --blue-dark: #183f67;
  --paper: #f4f2ed;
  --white: #ffffff;
  --line: #d9dde1;
  --black: #05080d;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Arial, Helvetica, sans-serif; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.age-gate { position: fixed; z-index: 10000; inset: 0; display: grid; place-items: center; overflow-y: auto; padding: 24px; background: rgba(16,26,44,.94); backdrop-filter: blur(8px); }
.age-gate[hidden] { display: none; }
.age-gate-card { width: min(100%,600px); padding: 34px 38px 38px; background: #f8f6f1; border: 1px solid #c9cdd2; box-shadow: 0 28px 80px rgba(0,0,0,.32); }
.age-gate-brand { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 33px; }
.age-gate-brand img { width: 122px; height: 82px; object-fit: contain; }
.age-gate-brand span { width: 62px; height: 62px; display: grid; place-items: center; border: 1px solid var(--blue); color: var(--blue); font: 700 23px Georgia,serif; }
.age-gate h2 { margin: 0 0 17px; font: 400 clamp(36px,7vw,49px)/1.02 Georgia,serif; letter-spacing: -.035em; }
.age-gate-lead { margin: 0 0 22px; color: #4f5d70; font-size: 17px; line-height: 1.55; }
.age-gate-disclaimer { padding: 18px 20px; background: #fff; border: 1px solid var(--line); }
.age-gate-disclaimer strong { display: block; margin-bottom: 7px; color: var(--blue-dark); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.age-gate-disclaimer p { margin: 0; color: #5c6776; font-size: 13px; line-height: 1.65; }
.age-gate-actions { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-top: 22px; }
.age-gate-actions button { min-height: 50px; padding: 0 20px; cursor: pointer; font-size: 13px; font-weight: 750; }
.age-confirm { background: var(--ink); border: 1px solid var(--ink); color: #fff; }
.age-decline { background: transparent; border: 1px solid #aeb7c2; color: #546174; }

.site-header { width: min(1180px,calc(100% - 48px)); min-height: 88px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 30px; border-bottom: 1px solid rgba(23,34,56,.16); }
.brand img { width: 138px; height: 60px; object-fit: contain; }
.site-nav { display: flex; gap: 30px; margin-left: auto; align-items: center; }
.site-nav a { color: #465268; font-size: 14px; font-weight: 600; }
.site-nav a:hover { color: var(--blue); }
.header-action { border: 1px solid #aeb7c2; padding: 12px 17px; font-size: 13px; font-weight: 700; }
.header-action:hover { background: var(--ink); border-color: var(--ink); color: #fff; }

.hero { width: min(1180px,calc(100% - 48px)); margin: 0 auto; padding: 74px 0 82px; display: grid; grid-template-columns: 1.02fr .98fr; align-items: center; gap: 80px; }
.eyebrow { margin: 0 0 18px; color: var(--blue); font-size: 11px; font-weight: 800; letter-spacing: .17em; line-height: 1.4; text-transform: uppercase; }
h1,h2,h3,p { margin-top: 0; }
h1,h2 { font-family: Georgia,"Times New Roman",serif; font-weight: 400; letter-spacing: -.035em; }
h1 { max-width: 620px; margin-bottom: 25px; font-size: clamp(48px,6vw,76px); line-height: .98; }
.hero-intro { max-width: 590px; margin-bottom: 34px; color: #576477; font-size: 18px; line-height: 1.7; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.button,button.button,.woocommerce a.button,.woocommerce button.button,.woocommerce input.button { display: inline-flex; min-height: 49px; align-items: center; justify-content: center; padding: 0 21px; border: 1px solid var(--ink); border-radius: 0; background: var(--ink); color: #fff; font-size: 13px; font-weight: 750; line-height: 1; }
.button:hover,.woocommerce a.button:hover,.woocommerce button.button:hover { background: var(--blue); border-color: var(--blue); color: #fff; }
.button-secondary { background: transparent; color: var(--ink); }
.hero-note { margin: 22px 0 0; color: #77818f; font-size: 12px; }
.hero-product { position: relative; justify-self: end; width: min(100%,485px); }
.hero-image-frame { aspect-ratio: 1/1; overflow: hidden; background: var(--black); border: 1px solid #222b38; }
.hero-image-frame img { width: 100%; height: 100%; object-fit: contain; }
.hero-product-meta { width: calc(100% - 34px); margin: -39px auto 0; position: relative; background: #fff; border: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 6px 20px; padding: 19px 21px; box-shadow: 0 15px 36px rgba(25,34,48,.08); }
.hero-product-meta span { grid-column: 1/-1; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.hero-product-meta strong { font: 600 19px Georgia,serif; }
.hero-product-meta b { color: var(--blue); font-size: 19px; }

.inventory-section { padding: 88px max(24px,calc((100% - 1180px)/2)) 104px; background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 40px; margin-bottom: 40px; }
.section-heading h2,.standards h2,.contact-section h2 { margin: 0; font-size: clamp(36px,4.2vw,54px); line-height: 1.05; }
.section-heading>p { max-width: 390px; margin: 0 0 6px; color: var(--muted); line-height: 1.65; }
.p3-product-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 22px; }
.p3-product-card { min-width: 0; overflow: hidden; background: #fafafa; border: 1px solid var(--line); transition: transform 180ms,box-shadow 180ms; }
.p3-product-card:hover { transform: translateY(-3px); box-shadow: 0 16px 32px rgba(24,35,52,.08); }
.p3-product-image { aspect-ratio: 1/1.05; overflow: hidden; background: var(--black); border-bottom: 1px solid #222b38; }
.p3-product-image img { width: 100%; height: 100%; object-fit: contain; background: var(--black); transition: transform 220ms; }
.p3-product-card:hover .p3-product-image img { transform: scale(1.018); }
.p3-product-details { padding: 22px; }
.p3-product-type { min-height: 17px; margin-bottom: 9px; color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
.p3-product-title-row { display: flex; justify-content: space-between; align-items: baseline; gap: 18px; }
.p3-product-title-row h3 { margin: 0; font: 500 24px/1.1 Georgia,serif; }
.p3-product-title-row span { color: var(--blue); font-size: 21px; font-weight: 800; }
.p3-product-footer { margin-top: 19px; padding-top: 17px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.p3-product-footer strong { font-size: 13px; }
.p3-cart-control { min-width: 94px; display: flex; justify-content: flex-end; }
.p3-cart-control>.button,
.woocommerce .p3-cart-control>.button { min-height: 0; padding: 4px 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; color: var(--blue-dark); font-size: 11px; font-weight: 750; line-height: 1.2; text-decoration: underline; text-underline-offset: 4px; }
.p3-cart-control>.button:hover,
.woocommerce .p3-cart-control>.button:hover { border: 0; background: transparent; color: var(--blue); }
.p3-cart-control>.button.loading { padding-right: 18px; }
.p3-cart-control>.button.added::after { display: none; }
.p3-cart-control>.added_to_cart { display: none; }
.p3-quantity-control,.p3-drawer-quantity { display: inline-grid; grid-template-columns: 30px minmax(30px,auto) 30px; align-items: center; border: 1px solid #bdc6d0; background: #fff; color: var(--ink); }
.p3-quantity-control button,.p3-drawer-quantity button { width: 30px; height: 30px; padding: 0; border: 0; background: transparent; color: var(--blue-dark); cursor: pointer; font-size: 17px; line-height: 1; }
.p3-quantity-control button:hover,.p3-drawer-quantity button:hover { background: #edf2f7; }
.p3-quantity-control button:disabled,.p3-drawer-quantity button:disabled { cursor: not-allowed; opacity: .35; }
.p3-quantity-control span,.p3-drawer-quantity span { min-width: 30px; text-align: center; font-size: 12px; font-weight: 750; }

body.p3-cart-drawer-open { overflow: hidden; }
.p3-cart-drawer { position: fixed; z-index: 9999; inset: 0; visibility: hidden; pointer-events: none; }
.p3-cart-drawer.is-open { visibility: visible; pointer-events: auto; }
.p3-cart-drawer__backdrop { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: rgba(8,15,26,.48); opacity: 0; transition: opacity 220ms ease; }
.p3-cart-drawer.is-open .p3-cart-drawer__backdrop { opacity: 1; }
.p3-cart-drawer__panel { position: absolute; top: 0; right: 0; width: min(440px,100%); height: 100%; display: flex; flex-direction: column; background: #fff; box-shadow: -20px 0 60px rgba(8,15,26,.18); outline: 0; transform: translateX(100%); transition: transform 240ms ease; }
.p3-cart-drawer.is-open .p3-cart-drawer__panel { transform: translateX(0); }
.p3-cart-drawer__header { min-height: 105px; padding: 25px 26px 22px; display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; border-bottom: 1px solid var(--line); }
.p3-cart-drawer__header p { margin: 0 0 7px; color: var(--blue); font-size: 9px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.p3-cart-drawer__header h2 { margin: 0; font: 400 27px/1.05 Georgia,serif; }
.p3-cart-drawer__close { width: 36px; height: 36px; padding: 0; border: 0; background: transparent; color: var(--ink); cursor: pointer; font-size: 31px; font-weight: 300; line-height: 1; }
.p3-cart-drawer__panel-content { min-height: 0; flex: 1; display: flex; flex-direction: column; }
.p3-cart-drawer__items { min-height: 0; padding: 6px 26px; flex: 1; overflow-y: auto; }
.p3-cart-drawer__item { padding: 20px 0; display: grid; grid-template-columns: 78px 1fr; gap: 17px; border-bottom: 1px solid var(--line); }
.p3-cart-drawer__image { width: 78px; height: 82px; overflow: hidden; background: var(--black); }
.p3-cart-drawer__image img { width: 100%; height: 100%; object-fit: contain; }
.p3-cart-drawer__item-details { min-width: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 14px; }
.p3-cart-drawer__item-heading { display: flex; justify-content: space-between; gap: 14px; font-size: 13px; font-weight: 700; }
.p3-cart-drawer__item-heading>a { min-width: 0; }
.p3-cart-drawer__item-heading>span { flex: 0 0 auto; color: var(--blue); font-weight: 800; }
.p3-drawer-quantity { align-self: flex-start; }
.p3-cart-drawer__empty { height: 100%; min-height: 280px; display: grid; place-content: center; justify-items: center; gap: 14px; color: var(--muted); }
.p3-cart-drawer__empty p { margin: 0; font: 400 24px Georgia,serif; }
.p3-cart-drawer__empty button { padding: 4px 0; border: 0; border-bottom: 1px solid currentColor; background: transparent; color: var(--blue-dark); cursor: pointer; font-size: 12px; font-weight: 700; }
.p3-cart-drawer__summary { padding: 22px 26px 25px; border-top: 1px solid var(--line); background: #fafafa; }
.p3-cart-drawer__summary>div:first-child { display: flex; justify-content: space-between; gap: 20px; font-size: 16px; }
.p3-cart-drawer__summary>div:first-child strong { color: var(--blue-dark); }
.p3-cart-drawer__summary>p { margin: 7px 0 19px; color: var(--muted); font-size: 11px; }
.p3-cart-drawer__actions { display: grid; grid-template-columns: 1fr 1.35fr; gap: 9px; }
.p3-cart-drawer__actions .button { width: 100%; }
.p3-cart-drawer__actions .button:disabled { cursor: not-allowed; opacity: .45; }
.p3-cart-drawer.is-loading .p3-cart-drawer__panel-content { opacity: .55; pointer-events: none; }

.standards { width: min(1180px,calc(100% - 48px)); margin: 0 auto; padding: 100px 0 108px; display: grid; grid-template-columns: .8fr 1.2fr; gap: 100px; }
.standards-grid { border-top: 1px solid #aeb6bf; }
.standards-grid article { display: grid; grid-template-columns: 48px 180px 1fr; gap: 25px; padding: 26px 0; border-bottom: 1px solid #bfc5cb; }
.standards-grid article>span { color: var(--blue); font-size: 11px; font-weight: 800; }
.standards-grid h3 { margin: -3px 0 0; font: 500 20px/1.25 Georgia,serif; }
.standards-grid p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
.contact-section { background: var(--ink); color: #fff; padding: 75px max(24px,calc((100% - 1180px)/2)); display: flex; justify-content: space-between; align-items: end; gap: 50px; }
.contact-section .eyebrow { color: #8bb5dd; }
.contact-links { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.contact-links a { border-bottom: 1px solid #6d7d92; padding-bottom: 5px; font-weight: 650; }

.site-main { width: min(1180px,calc(100% - 48px)); margin: 0 auto; padding: 64px 0 90px; min-height: 60vh; }
.woocommerce .products ul,.woocommerce ul.products { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px; }
.woocommerce ul.products li.product { width: auto!important; margin: 0!important; padding: 0 0 22px; background: #fff; border: 1px solid var(--line); }
.woocommerce ul.products li.product img { background: var(--black); margin: 0 0 20px; aspect-ratio: 1/1; object-fit: contain; }
.woocommerce ul.products li.product .woocommerce-loop-product__title,.woocommerce ul.products li.product .price,.woocommerce ul.products li.product .button { margin-left: 20px; margin-right: 20px; }
.woocommerce ul.products li.product .price { color: var(--blue); font-weight: 800; }
.woocommerce div.product { background: #fff; padding: 30px; border: 1px solid var(--line); }
.woocommerce div.product p.price,.woocommerce div.product span.price { color: var(--blue); }
.woocommerce-message,.woocommerce-info { border-top-color: var(--blue); }

.site-footer { padding: 38px max(24px,calc((100% - 1180px)/2)); background: #101a2c; color: #9faabb; display: grid; grid-template-columns: 190px 1fr auto; gap: 45px; align-items: start; font-size: 10px; line-height: 1.6; }
.site-footer img { width: 128px; height: 92px; object-fit: contain; }
.footer-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.footer-links a { text-decoration: underline; }

@media(max-width:920px){.site-nav{display:none}.hero{grid-template-columns:1fr .85fr;gap:38px}.p3-product-grid,.woocommerce .products ul,.woocommerce ul.products{grid-template-columns:repeat(2,minmax(0,1fr))}.standards{grid-template-columns:1fr;gap:50px}.site-footer{grid-template-columns:1fr;gap:18px}}
@media(max-width:680px){.age-gate{place-items:start center;padding:14px}.age-gate-card{margin:14px 0;padding:25px 22px 26px}.age-gate-actions{grid-template-columns:1fr}.site-header{width:min(100% - 32px,1180px);min-height:74px}.header-action{display:none}.brand img{width:118px}.hero{width:min(100% - 32px,1180px);padding:48px 0 62px;grid-template-columns:1fr;gap:44px}.hero-product{justify-self:stretch;width:100%}.section-heading{align-items:start;flex-direction:column;gap:15px}.p3-product-grid,.woocommerce .products ul,.woocommerce ul.products{grid-template-columns:1fr}.inventory-section{padding-top:68px;padding-bottom:75px}.standards{width:min(100% - 32px,1180px);padding:72px 0 78px}.standards-grid article{grid-template-columns:35px 1fr;gap:14px}.standards-grid article p{grid-column:2}.contact-section{align-items:flex-start;flex-direction:column}.contact-links{align-items:flex-start}.site-main{width:min(100% - 32px,1180px);padding-top:42px}.p3-cart-drawer__header{padding-left:20px;padding-right:20px}.p3-cart-drawer__items{padding-left:20px;padding-right:20px}.p3-cart-drawer__summary{padding:20px}.p3-cart-drawer__actions{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*{transition-duration:.01ms!important}}
