/* PepGG Slide Cart 1.3.0 — brand: deep teal ink #0A463E, mint #A4F8F2 (brand-spec.md). */
#pepgg-cart {
	--sc-ink: #0a463e;
	--sc-mint: #a4f8f2;
	--sc-mint-soft: #ebfefd;
	--sc-line: rgba(10, 70, 62, 0.12);
	--sc-dim: rgba(10, 70, 62, 0.65);
	--sc-bg: #ffffff;
	--sc-error: #b3412f;
}

/* ── Header icon ─────────────────────────────────────────────── */
.pepgg-cart-li { list-style: none; }
/* min-* only: the theme's .carticon sets the real width/height per breakpoint. */
.pepgg-cart-link { display: inline-block; min-width: 20px; min-height: 20px; }
.pepgg-cart-link.carticon {
	position: relative;
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
}
.pepgg-cart-badge {
	position: absolute;
	top: -9px;
	right: -11px;
	min-width: 19px;
	height: 19px;
	padding: 0 5px;
	border-radius: 999px;
	background: #a4f8f2;
	color: #0a463e;
	font-size: 11px;
	font-weight: 800;
	line-height: 19px;
	text-align: center;
}
.pepgg-cart-badge:empty { display: none; }

/* ── Overlay + panel ─────────────────────────────────────────── */
html.pepgg-cart-lock, html.pepgg-cart-lock body { overflow: hidden; }
#pepgg-cart-overlay {
	position: fixed;
	inset: 0;
	z-index: 2147483600;
	background: rgba(3, 26, 23, 0.55);
	opacity: 0;
	transition: opacity 0.25s ease;
}
#pepgg-cart-overlay.is-visible { opacity: 1; }
#pepgg-cart {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	z-index: 2147483601;
	width: 440px;
	max-width: 100%;
	display: flex;
	flex-direction: column;
	background: var(--sc-bg);
	color: var(--sc-ink);
	font-size: 15px;
	line-height: 1.4;
	box-shadow: -12px 0 40px rgba(3, 26, 23, 0.25);
	transform: translateX(105%);
	visibility: hidden;
	transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 0.3s;
}
#pepgg-cart.is-open {
	transform: translateX(0);
	visibility: visible;
	transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
#pepgg-cart *, #pepgg-cart *::before, #pepgg-cart *::after { box-sizing: border-box; }
#pepgg-cart p, #pepgg-cart dl, #pepgg-cart dd { margin: 0; }
#pepgg-cart button { font-family: inherit; cursor: pointer; }
#pepgg-cart button:focus-visible, #pepgg-cart a:focus-visible { outline: 3px solid var(--sc-mint); outline-offset: 2px; }
/* Focus moves to × when the drawer opens: the theme's purple :focus ring only for keyboard users. */
#pepgg-cart button:focus:not(:focus-visible) { outline: none; }

.pepgg-cart-header {
	flex: none;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 16px 20px;
	background: var(--sc-ink);
	color: #fff;
}
.pepgg-cart-title { font-size: 20px; font-weight: 700; }
.pepgg-cart-header-count { font-size: 13px; color: var(--sc-mint); }
#pepgg-cart .pepgg-cart-close {
	margin-left: auto;
	display: flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 36px;
	height: 36px;
	min-width: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	font-size: 26px;
	line-height: 1;
}
#pepgg-cart .pepgg-cart-close:hover { background: rgba(255, 255, 255, 0.22); }

.pepgg-cart-notices:empty { display: none; }
.pepgg-cart-notices { flex: none; padding: 10px 20px 0; }
.pepgg-cart-notice { padding: 10px 12px; border-radius: 8px; font-size: 14px; }
.pepgg-cart-notice + .pepgg-cart-notice { margin-top: 6px; }
.pepgg-cart-notice.is-error { background: #fdecea; color: var(--sc-error); }
.pepgg-cart-notice.is-notice { background: var(--sc-mint-soft); color: var(--sc-ink); }

/* ── Items ───────────────────────────────────────────────────── */
.pepgg-cart-body {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	padding: 6px 20px 12px;
	transition: opacity 0.2s;
}
#pepgg-cart.is-loading .pepgg-cart-body, #pepgg-cart.is-loading .pepgg-cart-summary { opacity: 0.55; pointer-events: none; }
.pepgg-cart-item {
	display: flex;
	gap: 12px;
	padding: 14px 0;
	border-bottom: 1px solid var(--sc-line);
	transition: opacity 0.2s;
}
.pepgg-cart-item.is-removing { opacity: 0.3; pointer-events: none; }
.pepgg-cart-item-img { flex: none; width: 68px; }
.pepgg-cart-item-img img { display: block; width: 68px; height: 68px; object-fit: contain; border-radius: 10px; background: #f3faf9; }
.pepgg-cart-item-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.pepgg-cart-item-top { display: flex; align-items: flex-start; gap: 8px; }
.pepgg-cart-item-name { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; }
.pepgg-cart-item-name a { color: var(--sc-ink); text-decoration: none; }
.pepgg-cart-item-name .variation-item, .pepgg-cart-item-name small, .pepgg-cart-item-name dl.variation { display: block; margin-top: 2px; font-size: 13px; font-weight: 400; color: var(--sc-dim); }
.pepgg-cart-item-name dl.variation dt, .pepgg-cart-item-name dl.variation dd { display: inline; margin: 0; }
.pepgg-cart-item-name dl.variation p { display: inline; }
.pepgg-cart-remove {
	flex: none;
	width: 28px;
	height: 28px;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--sc-dim);
	font-size: 20px;
	line-height: 1;
}
.pepgg-cart-remove:hover { background: var(--sc-mint-soft); color: var(--sc-ink); }
.pepgg-cart-item-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pepgg-cart-qty { display: inline-flex; align-items: center; border: 1px solid var(--sc-line); border-radius: 999px; }
.pepgg-cart-qty button {
	width: 34px;
	height: 32px;
	border: 0;
	background: transparent;
	color: var(--sc-ink);
	font-size: 18px;
	line-height: 1;
}
.pepgg-cart-qty button:disabled { opacity: 0.3; cursor: default; }
.pepgg-qty-val { min-width: 24px; text-align: center; font-weight: 700; }
.pepgg-cart-qty-fixed { font-size: 13px; color: var(--sc-dim); }
.pepgg-cart-item-price { font-weight: 700; white-space: nowrap; }

.pepgg-cart-b2g1 {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 8px 10px;
	border: 1px solid var(--sc-mint);
	border-radius: 10px;
	background: var(--sc-mint-soft);
	font-size: 13px;
	font-weight: 600;
}
.pepgg-cart-b2g1-add {
	flex: none;
	border: 0;
	border-radius: 999px;
	padding: 7px 12px;
	background: var(--sc-ink);
	color: #fff;
	font-size: 13px;
	font-weight: 600;
}
.pepgg-cart-b2g1-add.is-adding { opacity: 0.6; pointer-events: none; }

.pepgg-cart-xsell {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 14px;
	padding: 10px 12px;
	border: 1px dashed var(--sc-line);
	border-radius: 12px;
}
.pepgg-cart-xsell-img img { display: block; width: 46px; height: 46px; object-fit: contain; }
.pepgg-cart-xsell-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pepgg-cart-xsell-kicker { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sc-dim); }
.pepgg-cart-xsell-name { font-size: 14px; font-weight: 600; }
.pepgg-cart-xsell-price { font-size: 13px; color: var(--sc-dim); }
.pepgg-cart-xsell-add {
	flex: none;
	border: 1.5px solid var(--sc-ink);
	border-radius: 999px;
	padding: 7px 14px;
	background: #fff;
	color: var(--sc-ink);
	font-size: 13px;
	font-weight: 700;
}
.pepgg-cart-xsell-add:hover { background: var(--sc-ink); color: #fff; }
.pepgg-cart-xsell-add.is-adding { opacity: 0.6; pointer-events: none; }

.pepgg-cart-empty { padding: 56px 10px; text-align: center; color: var(--sc-dim); }
.pepgg-cart-empty p { margin: 12px 0 20px; font-size: 16px; }
.pepgg-cart-shop {
	display: inline-block;
	padding: 12px 28px;
	border-radius: 999px;
	background: var(--sc-mint);
	color: var(--sc-ink) !important;
	font-weight: 700;
	text-decoration: none;
}

/* ── Footer: bar, totals, actions ────────────────────────────── */
.pepgg-cart-footer { flex: none; padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--sc-line); background: #fff; }
#pepgg-cart.is-empty .pepgg-cart-footer { display: none; }
.pepgg-cart-freeship { margin-bottom: 10px; font-size: 13px; }
.pepgg-cart-freeship strong, .pepgg-cart-freeship .woocommerce-Price-amount { font-weight: 700; color: var(--sc-ink); }
.pepgg-cart-freeship-bars { display: flex; gap: 6px; margin-top: 6px; }
.pepgg-cart-freeship-track { flex: 1; height: 6px; border-radius: 999px; background: var(--sc-line); overflow: hidden; }
.pepgg-cart-freeship-fill { height: 100%; border-radius: 999px; background: var(--sc-ink); transition: width 0.4s ease; }
.pepgg-cart-freeship-fill.is-full { background: #1baf8e; }
.pepgg-cart-totals { margin: 0 0 12px; font-size: 14px; }
.pepgg-cart-row { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; }
.pepgg-cart-row dt { color: var(--sc-dim); font-weight: 400; }
.pepgg-cart-row dd { text-align: right; }
.pepgg-cart-row.is-discount dd { color: #1b8f74; }
.pepgg-cart-row.is-total { margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--sc-line); font-size: 17px; font-weight: 800; }
.pepgg-cart-row.is-total dt { color: var(--sc-ink); font-weight: 800; }
#pepgg-cart .pepgg-cart-saving { margin: -4px 0 10px; padding: 7px 10px; border-radius: 8px; background: #e6f7f1; color: #157a62; font-size: 14px; text-align: right; }
#pepgg-cart .pepgg-cart-saving strong { font-weight: 800; }
#pepgg-cart .pepgg-cart-spin { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; padding: 8px 10px; border: 1px solid #f0c46b; border-radius: 10px; background: linear-gradient(90deg, #fff6da, #fffdf5); color: #073a32; font-size: 13px; line-height: 1.35; }
#pepgg-cart .pepgg-cart-spin strong, #pepgg-cart .pepgg-cart-spin .woocommerce-Price-amount { font-weight: 700; }
.pepgg-cart-spin-wheel { flex: none; width: 18px; height: 18px; border-radius: 50%; box-shadow: 0 0 0 2px #c99a3f; background: conic-gradient(#ffd166 0 60deg, #0a463e 60deg 120deg, #a4f8f2 120deg 180deg, #ffd166 180deg 240deg, #0a463e 240deg 300deg, #a4f8f2 300deg); }
#pepgg-cart .pepgg-cart-problem { margin: 0 0 10px; padding: 10px 12px; border-radius: 8px; background: #fdecea; color: var(--sc-error); font-size: 14px; }
#pepgg-cart .pepgg-cart-problem .woocommerce-Price-amount { font-weight: 700; }
.pepgg-cart-buttons { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.pepgg-cart-checkout {
	display: block;
	width: 100%;
	padding: 15px 20px;
	border-radius: 12px;
	background: var(--sc-mint);
	color: var(--sc-ink) !important;
	font-size: 17px;
	font-weight: 800;
	letter-spacing: 0.02em;
	text-align: center;
	text-decoration: none;
}
.pepgg-cart-checkout:hover { background: #8ff0e9; }
.pepgg-cart-viewcart { font-size: 13px; color: var(--sc-dim) !important; text-decoration: underline !important; }
.pepgg-cart-cards { display: block; width: 100%; max-width: 300px; height: auto; margin: 10px auto 0; }
#pepgg-cart .pepgg-ap-mini { padding: 0 0 10px; }

/* ── Product page add ────────────────────────────────────────── */
.single_add_to_cart_button.is-adding { opacity: 0.7; pointer-events: none; }
.pepgg-atc-msg { margin: 10px 0 0; font-size: 14px; color: #b3412f; }

@media (max-width: 480px) {
	#pepgg-cart { width: 100%; }
	.pepgg-cart-header { padding: 12px 16px; }
	.pepgg-cart-body { padding: 4px 16px 10px; }
	.pepgg-cart-footer { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
	.pepgg-cart-cards { margin-top: 8px; }
}
/* Short phones (iPhone SE/mini): the totals area grew (two-step bar, saving, Spin & Win, Apple Pay); the card-logo
   strip goes so the items keep room. Checkout and the pay buttons stay. */
@media (max-height: 740px) {
	.pepgg-cart-cards { display: none; }
	.pepgg-cart-footer { padding-top: 10px; }
}
/* Short screens (a phone held sideways): the whole panel scrolls, so Checkout is always reachable. */
@media (max-height: 520px) {
	#pepgg-cart { overflow-y: auto; }
	#pepgg-cart .pepgg-cart-body { flex: none; overflow: visible; }
}
@media (prefers-reduced-motion: reduce) {
	#pepgg-cart, #pepgg-cart.is-open, #pepgg-cart-overlay { transition: none; }
}
