/* =====================================================================
   OptiBelly — Cart drawer + cart page + thank-you styles.
   Tokens only (brand-tokens.css). Reuses page-kit classes (.ob-btn,
   .ob-grid-3, .ob-section__title, .ob-center, .ob-input) where possible.
   Premium slide/fade; honours prefers-reduced-motion.
   ===================================================================== */

/* ---- shared local vars (derive from brand tokens; no new hex outside set) -- */
:root {
	--ob-line: #E2E8F0;            /* hairline border (spec) */
	--ob-line-soft: #E3EBEF;       /* matches main.css cards */
	--ob-drawer-w: 420px;
	--ob-scrim: rgba(22, 58, 95, .40);   /* 40% navy scrim (navy = #163A5F) */
}

/* lock scroll when drawer open */
html.ob-drawer-lock { overflow: hidden; }

/* =====================================================================
   PART A — SLIDE-OUT DRAWER
   ===================================================================== */
.ob-drawer-root { position: fixed; inset: 0; z-index: 1000; }
.ob-drawer-root[hidden] { display: none; }

.ob-drawer__overlay {
	position: absolute; inset: 0; background: var(--ob-scrim);
	opacity: 0; transition: opacity .3s var(--ob-ease, ease);
}
.ob-drawer-root.is-open .ob-drawer__overlay { opacity: 1; }

.ob-drawer__panel {
	position: absolute; top: 0; right: 0; height: 100%;
	width: var(--ob-drawer-w); max-width: 100vw;
	background: var(--color-white); color: var(--color-charcoal);
	display: flex; flex-direction: column;
	box-shadow: -18px 0 50px rgba(22, 58, 95, .18);
	transform: translateX(100%);
	transition: transform .38s var(--ob-ease-out, cubic-bezier(.16, 1, .3, 1));
	will-change: transform;
}
.ob-drawer-root.is-open .ob-drawer__panel { transform: translateX(0); }

/* mobile = bottom sheet, full-height */
@media (max-width: 560px) {
	.ob-drawer__panel {
		top: auto; bottom: 0; right: 0; left: 0;
		width: 100%; height: 92%; border-radius: 18px 18px 0 0;
		transform: translateY(100%);
	}
	.ob-drawer-root.is-open .ob-drawer__panel { transform: translateY(0); }
}

/* header */
.ob-drawer__head {
	display: flex; align-items: center; justify-content: space-between;
	padding: 18px 20px; border-bottom: 1px solid var(--ob-line); flex: 0 0 auto;
}
.ob-drawer__title {
	font-family: Manrope, sans-serif; font-weight: 700; font-size: 1.25rem;
	color: var(--color-navy); margin: 0;
}
.ob-drawer__count { color: var(--color-charcoal); font-weight: 600; font-size: 1rem; margin-left: 4px; }
.ob-drawer__close {
	border: 0; background: transparent; color: var(--color-charcoal);
	font-size: 1.9rem; line-height: 1; cursor: pointer;
	min-width: 44px; min-height: 44px; border-radius: 12px;
}
.ob-drawer__close:hover { background: var(--color-mint); }

/* scrollable body */
.ob-drawer__body {
	flex: 1 1 auto; overflow-y: auto; padding: 0 20px 20px;
	-webkit-overflow-scrolling: touch;
}

/* A2 — free-shipping progress (shared with cart page) */
.ob-ship-bar {
	background: var(--color-mint); margin: 0 -20px 14px; padding: 12px 20px;
}
.ob-ship-bar__msg { margin: 0 0 8px; font-size: .94rem; color: var(--color-charcoal); display: flex; align-items: center; gap: 6px; }
.ob-ship-bar__msg strong { color: var(--color-navy); }
.ob-ship-bar.is-unlocked .ob-ship-bar__msg { color: var(--color-teal-dark); font-weight: 700; }
.ob-ship-bar__track { height: 8px; background: #cfeae6; border-radius: 6px; overflow: hidden; }
.ob-ship-bar__fill { display: block; height: 100%; background: var(--color-teal); border-radius: 6px; transition: width .4s var(--ob-ease-out, ease); }

/* A3 — line items */
.ob-drawer__items { list-style: none; margin: 0; padding: 0; }
.ob-drawer__item {
	display: grid; grid-template-columns: 64px 1fr auto; gap: 12px;
	padding: 16px 0; border-bottom: 1px solid var(--ob-line);
	transition: opacity .25s ease;
}
.ob-drawer__item.is-removing { opacity: .4; }
.ob-drawer__thumb img,
.ob-drawer__thumb .ob-photo { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; }
.ob-drawer__name { margin: 0 0 4px; font-size: 1rem; font-weight: 600; }
.ob-drawer__name a { color: var(--color-navy); text-decoration: none; }
.ob-drawer__chip {
	display: inline-flex; align-items: center; gap: 4px;
	font-size: .8rem; color: var(--color-charcoal);
	background: #F1F5F8; border-radius: 20px; padding: 2px 10px;
}
.ob-drawer__chip--sub { color: var(--color-teal-dark); background: var(--color-mint); }
.ob-drawer__controls { display: flex; align-items: center; gap: 14px; margin-top: 10px; flex-wrap: wrap; }
.ob-drawer__remove { font-size: .82rem; color: var(--color-charcoal); text-decoration: underline; }
.ob-drawer__price { font-size: 1rem; font-weight: 700; color: var(--color-navy); white-space: nowrap; }

/* qty stepper (reused on cart page too) */
.ob-qty { display: inline-flex; align-items: center; border: 1px solid var(--ob-line); border-radius: 24px; }
.ob-qty.is-busy { opacity: .55; pointer-events: none; }
.ob-qty__btn {
	min-width: 36px; min-height: 36px; border: 0; background: transparent;
	color: var(--color-navy); font-size: 1.15rem; cursor: pointer; border-radius: 24px;
}
.ob-qty__btn:hover { background: var(--color-mint); }
.ob-qty__val { min-width: 26px; text-align: center; font-weight: 700; color: var(--color-navy); }

/* A4 — order bump */
.ob-bump {
	background: var(--color-mint); border: 1px solid var(--color-navy);
	border-radius: 14px; padding: 14px; margin: 16px 0;
}
.ob-bump__label { display: grid; grid-template-columns: auto 48px 1fr; gap: 12px; align-items: center; cursor: pointer; margin: 0; }
.ob-bump__check { width: 22px; height: 22px; accent-color: var(--color-teal-dark); cursor: pointer; }
.ob-bump__thumb img,
.ob-bump__thumb .ob-photo { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; }
.ob-bump__title { display: block; font-weight: 700; color: var(--color-navy); font-size: .95rem; }
.ob-bump__desc { display: block; color: var(--color-charcoal); font-size: .82rem; margin-top: 2px; }
.ob-bump__desc strong { color: var(--color-navy); }

/* A5 — subtotal */
.ob-drawer__totals { padding: 16px 0; border-top: 1px solid var(--ob-line); }
.ob-drawer__subtotal { display: flex; justify-content: space-between; align-items: baseline; }
.ob-drawer__subtotal span:first-child { color: var(--color-charcoal); }
.ob-drawer__subtotal-val { font-size: 1.15rem; font-weight: 700; color: var(--color-navy); }
.ob-drawer__taxnote { margin: 6px 0 0; font-size: .82rem; color: var(--color-charcoal); }

/* A6 — wallets + checkout */
.ob-drawer__wallets { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.ob-wallet {
	min-height: 48px; border-radius: 10px; border: 1px solid var(--ob-line);
	font-family: Manrope, sans-serif; font-weight: 700; font-size: .95rem; cursor: pointer;
	display: flex; align-items: center; justify-content: center; gap: 6px;
}
.ob-wallet--apple { background: #000; color: #fff; border-color: #000; }
.ob-wallet--gpay { background: #fff; color: #3c4043; }
.ob-wallet--link { background: #00D66F; color: #011e0f; border-color: #00D66F; }
.ob-drawer__wallet-note { font-size: .72rem; color: var(--color-charcoal); text-align: center; margin: 2px 0 0; }
.ob-drawer__or { display: flex; align-items: center; gap: 12px; color: var(--color-charcoal); font-size: .82rem; margin: 4px 0 12px; }
.ob-drawer__or::before, .ob-drawer__or::after { content: ""; flex: 1; height: 1px; background: var(--ob-line); }
.ob-drawer__checkout { width: 100%; min-height: 52px; display: flex; align-items: center; justify-content: center; }
.ob-drawer__links { display: flex; justify-content: center; gap: 18px; margin: 12px 0; font-size: .9rem; }
.ob-drawer__links a { color: var(--color-teal-dark); text-decoration: none; }
.ob-drawer__continue { color: var(--color-charcoal) !important; }

/* A7 — trust + security */
.ob-drawer__trust { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; padding: 12px 0 0; margin: 0; border-top: 1px solid var(--ob-line); }
.ob-drawer__trust li { display: inline-flex; align-items: center; gap: 5px; font-size: .8rem; color: var(--color-charcoal); }
.ob-drawer__secure { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: .76rem; color: var(--color-charcoal); margin: 8px 0 0; }

/* A8 — FDA */
.ob-drawer__fda { font-size: .68rem; color: var(--color-charcoal); text-align: center; margin: 12px 0 0; line-height: 1.5; }

/* drawer empty state */
.ob-drawer__empty { text-align: center; padding: 48px 0; }
.ob-drawer__empty .ob-icon { opacity: .5; }
.ob-drawer__empty-title { font-family: Manrope, sans-serif; font-weight: 700; font-size: 1.25rem; color: var(--color-navy); margin: 14px 0 4px; }
.ob-drawer__empty-sub { color: var(--color-charcoal); margin: 0 0 20px; }

/* =====================================================================
   PART B — FULL CART PAGE polish (light touches; Woo renders the table)
   ===================================================================== */
.woocommerce-cart .ob-ship-bar { border-radius: 14px; margin: 0 0 22px; }
.woocommerce-cart .cart_totals,
.woocommerce-cart .wc-block-cart__sidebar {
	background: var(--color-mint); border: 1px solid var(--color-navy);
	border-radius: 18px; padding: 24px;
}
.woocommerce-cart .checkout-button,
.woocommerce-cart .wc-proceed-to-checkout .checkout-button {
	width: 100%; min-height: 52px; display: flex; align-items: center; justify-content: center;
	background: var(--color-cta-bg) !important; color: #fff !important; border-radius: 26px !important;
	font-family: Manrope, sans-serif; font-weight: 700;
}
.ob-bump--cart { max-width: 760px; }
.ob-cart-fda {
	max-width: 760px; margin: 28px auto 0; font-size: .8rem;
	color: var(--color-charcoal); line-height: 1.6;
}

/* =====================================================================
   THANK-YOU PAGE
   ===================================================================== */
.ob-ty { margin: 0 auto; }
.ob-ty > div { padding: 56px 20px; }

.ob-ty__hero { background: var(--color-mint); text-align: center; }
.ob-ty__check {
	display: inline-flex; align-items: center; justify-content: center;
	width: 64px; height: 64px; border-radius: 50%;
	background: var(--color-teal-dark); margin-bottom: 14px;
}
.ob-ty__check .ob-icon { filter: brightness(0) invert(1); }
.ob-ty__title { font-family: Manrope, sans-serif; font-weight: 800; color: var(--color-navy); font-size: 2.1rem; margin: 0 0 8px; }
.ob-ty__sub { color: var(--color-charcoal); font-size: 1.1rem; margin: 0 0 10px; }
.ob-ty__micro { display: inline-flex; align-items: center; gap: 6px; color: var(--color-charcoal); font-size: .95rem; }

.ob-ty__next { background: var(--color-white); }
.ob-ty__steps { list-style: none; margin: 28px auto 0; padding: 0; max-width: 1000px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.ob-ty__step { text-align: center; }
.ob-ty__step strong { display: block; color: var(--color-navy); font-family: Manrope, sans-serif; margin: 10px 0 4px; }
.ob-ty__step span { color: var(--color-charcoal); font-size: .95rem; }
.ob-ty__subnote { max-width: 680px; margin: 24px auto 0; background: var(--color-mint); border-radius: 14px; padding: 14px 18px; text-align: center; color: var(--color-charcoal); }

.ob-ty__account { background: var(--color-navy); color: #fff; text-align: center; }
.ob-ty__account h2 { color: #fff; font-family: Manrope, sans-serif; margin: 0 0 10px; }
.ob-ty__account p { color: rgba(255, 255, 255, .85); max-width: 620px; margin: 0 auto 20px; }
.ob-ty__account .ob-btn { background: #fff; color: var(--color-navy); }
.ob-ty__account .ob-btn:hover { background: var(--color-mint); }

.ob-ty__upsell { background: var(--color-mint); }
.ob-ty__upsell h2 { color: var(--color-navy); font-family: Manrope, sans-serif; margin: 0 0 24px; }
.ob-ty__upsell-card {
	max-width: 620px; margin: 0 auto; background: #fff; border: 1px solid var(--ob-line-soft);
	border-radius: 18px; padding: 24px; display: flex; gap: 20px; align-items: center;
}
.ob-ty__upsell-thumb img, .ob-ty__upsell-thumb .ob-photo { width: 120px; height: 120px; border-radius: 14px; object-fit: cover; }
.ob-ty__upsell-copy h3 { color: var(--color-navy); margin: 0 0 6px; font-family: Manrope, sans-serif; }
.ob-ty__upsell-line { color: var(--color-charcoal); margin: 0 0 8px; }
.ob-ty__upsell-offer { color: var(--color-navy); font-weight: 700; margin: 0 0 12px; }
.ob-ty__upsell-urgency { font-size: .82rem; color: var(--color-charcoal); margin: 8px 0 0; }

.ob-ty__sms { background: var(--color-white); }
.ob-ty__sms-card { max-width: 680px; margin: 0 auto; text-align: center; background: var(--color-mint); border-radius: 18px; padding: 32px; }
.ob-ty__sms-card h3 { color: var(--color-navy); font-family: Manrope, sans-serif; margin: 10px 0 8px; }
.ob-ty__sms-card p { color: var(--color-charcoal); margin: 0 0 16px; }
.ob-ty__sms-form { display: flex; gap: 10px; max-width: 440px; margin: 0 auto; }
.ob-ty__sms-form .ob-input { flex: 1; }
.ob-ty__sms-tcpa { font-size: .72rem; color: var(--color-charcoal); margin: 14px auto 0; max-width: 520px; line-height: 1.5; }
.ob-ty__sms-set { display: inline-flex; align-items: center; gap: 8px; color: var(--color-teal-dark); font-weight: 700; }

.ob-ty__edu { background: var(--color-white); }
.ob-ty__edu h2 { color: var(--color-navy); font-family: Manrope, sans-serif; margin: 0 0 28px; }
.ob-ty__edu-card { display: block; background: #fff; border: 1px solid var(--ob-line-soft); border-radius: 18px; padding: 24px; text-decoration: none; transition: border-color .15s, transform .2s var(--ob-ease-out, ease); }
.ob-ty__edu-card:hover { border-color: var(--color-teal-dark); transform: translateY(-3px); }
.ob-ty__edu-card h3 { color: var(--color-navy); font-size: 1.05rem; margin: 12px 0 6px; font-family: Manrope, sans-serif; }
.ob-ty__edu-card p { color: var(--color-charcoal); font-size: .92rem; margin: 0; }

.ob-ty__fda { max-width: 760px; margin: 0 auto; padding: 0 20px 48px; font-size: .8rem; color: var(--color-charcoal); line-height: 1.6; }

@media (max-width: 760px) {
	.ob-ty__title { font-size: 1.6rem; }
	.ob-ty__steps { grid-template-columns: 1fr; }
	.ob-ty__upsell-card { flex-direction: column; text-align: center; }
	.ob-ty__sms-form { flex-direction: column; }
}

/* =====================================================================
   REDUCED MOTION
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
	.ob-drawer__overlay,
	.ob-drawer__panel,
	.ob-ship-bar__fill,
	.ob-ty__edu-card { transition: none !important; }
	.ob-drawer__panel { will-change: auto; }
}
