/* Pentalor side cart drawer — v1.0.2
   Tokens: navy #0F172A / hover #1E293B, slate #64748B, muted #94A3B8,
   border #E2E8F0, ice #F0F9FF, light #F1F5F9, mint #2DD4BF, chip #CCFBF1+#0F766E,
   green #16A34A, error #DC2626, shadow 0 10px 24px rgba(15,23,42,.12),
   radii 999/16/12/10, Inter only. */

#ptl-drawer-overlay {
	position: fixed;
	inset: 0;
	background: rgba(15, 23, 42, .5);
	opacity: 0;
	pointer-events: none;
	transition: opacity .25s ease-out;
	z-index: 99990;
}
#ptl-drawer-overlay.is-open {
	opacity: 1;
	pointer-events: auto;
}

#ptl-cart-drawer {
	position: fixed;
	top: 0;
	right: 0;
	height: 100dvh;
	width: min(420px, 100vw);
	background: #fff;
	transform: translateX(105%);
	transition: transform .25s ease-out;
	z-index: 99991;
	display: flex;
	flex-direction: column;
	box-shadow: -10px 0 24px rgba(15, 23, 42, .12);
	font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
#ptl-cart-drawer.is-open {
	transform: translateX(0);
}
@media (prefers-reduced-motion: reduce) {
	#ptl-cart-drawer, #ptl-drawer-overlay { transition: none; }
}
html.ptl-drawer-lock, html.ptl-drawer-lock body {
	overflow: hidden;
}

/* Header */
.ptl-drawer-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 20px;
	border-bottom: 1px solid #E2E8F0;
	flex: 0 0 auto;
}
.ptl-drawer-title {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	color: #0F172A;
}
#ptl-drawer-close {
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 999px;
	background: #F1F5F9 !important;
	color: #0F172A !important;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	padding: 0 !important;
}
#ptl-drawer-close:hover {
	background: #2DD4BF !important;
}

/* Body wrapper (fragment target) fills remaining height */
#ptl-drawer-main {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
}

/* Free-gift progress (renders only when a real promo is configured) */
.ptl-drawer-progress {
	background: #F0F9FF;
	padding: 14px 20px;
	flex: 0 0 auto;
}
.ptl-progress-label {
	margin: 0 0 8px;
	font-size: 14px;
	color: #0F172A;
	text-align: center;
}
.ptl-progress-label .woocommerce-Price-amount {
	font-weight: 700;
}
.ptl-progress-label.is-done {
	font-weight: 600;
	color: #0F766E;
}
.ptl-progress-track {
	height: 8px;
	border-radius: 999px;
	background: #E2E8F0;
	overflow: hidden;
}
.ptl-progress-fill {
	height: 100%;
	border-radius: 999px;
	background: #2DD4BF;
	transition: width .25s ease-out;
}

/* Items */
ul.ptl-drawer-items {
	list-style: none;
	margin: 0;
	padding: 0 20px;
	overflow-y: auto;
	flex: 1 1 auto;
	min-height: 0;
}
.ptl-drawer-item {
	display: grid;
	grid-template-columns: 72px 1fr auto;
	gap: 14px;
	padding: 16px 0;
	border-bottom: 1px solid #E2E8F0;
}
.ptl-drawer-item.is-busy {
	opacity: .45;
	pointer-events: none;
}
.ptl-item-thumb img {
	width: 72px;
	height: 72px;
	object-fit: cover;
	border-radius: 10px;
	border: 1px solid #E2E8F0;
	display: block;
}
.ptl-item-info {
	min-width: 0;
}
.ptl-item-title {
	margin: 0 0 2px;
	font-size: 15px;
	font-weight: 600;
	color: #0F172A;
	line-height: 1.35;
}
.ptl-item-meta {
	margin: 0 0 10px;
	font-size: 13px;
	color: #64748B;
}
.ptl-item-actions {
	display: flex;
	align-items: center;
	gap: 10px;
}
.ptl-item-qty {
	display: inline-flex;
	align-items: center;
	border: 1px solid #E2E8F0;
	border-radius: 999px;
	overflow: hidden;
}
.ptl-dqty-btn {
	width: 30px;
	height: 30px;
	border: 0;
	background: #F1F5F9 !important;
	color: #0F172A !important;
	font-size: 15px;
	line-height: 1;
	cursor: pointer;
	padding: 0 !important;
}
.ptl-dqty-btn:hover {
	background: #2DD4BF !important;
}
.ptl-dqty-input {
	width: 34px;
	height: 30px;
	border: 0 !important;
	background: #fff !important;
	text-align: center;
	font-size: 14px;
	font-weight: 600;
	color: #0F172A;
	-moz-appearance: textfield;
	appearance: textfield;
	padding: 0 !important;
}
.ptl-dqty-input::-webkit-outer-spin-button,
.ptl-dqty-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}
.ptl-item-remove {
	border: 0;
	background: none !important;
	color: #64748B !important;
	cursor: pointer;
	padding: 4px !important;
	line-height: 0;
}
.ptl-item-remove:hover {
	color: #DC2626 !important;
}
.ptl-item-chip {
	display: inline-block;
	margin-top: 10px;
	background: #CCFBF1;
	color: #0F766E;
	font-size: 12px;
	font-weight: 600;
	padding: 3px 10px;
	border-radius: 999px;
}
.ptl-item-prices {
	text-align: right;
	white-space: nowrap;
}
.ptl-item-prices del.ptl-price-was {
	display: block;
	font-size: 13px;
	color: #94A3B8;
}
.ptl-item-prices del.ptl-price-was .woocommerce-Price-amount {
	color: #94A3B8;
}
.ptl-price-now {
	display: block;
	font-size: 15px;
	font-weight: 600;
	color: #0F172A;
}
.ptl-price-save {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: #16A34A;
}

/* Empty state */
.ptl-drawer-empty {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 16px;
	padding: 40px 20px;
}
.ptl-drawer-empty p {
	margin: 0;
	font-size: 15px;
	color: #64748B;
}
.ptl-drawer-continue {
	display: inline-block;
	background: #0F172A;
	color: #fff !important;
	font-size: 15px;
	font-weight: 600;
	padding: 12px 28px;
	border-radius: 999px;
	text-decoration: none;
}
.ptl-drawer-continue:hover {
	background: #2DD4BF;
	color: #0F172A !important;
}

/* Footer */
.ptl-drawer-footer {
	flex: 0 0 auto;
	border-top: 1px solid #E2E8F0;
	padding: 16px 20px calc(16px + env(safe-area-inset-bottom));
	background: #fff;
}
a.ptl-drawer-checkout {
	display: block;
	width: 100%;
	background: #0F172A;
	color: #fff !important;
	font-size: 16px;
	font-weight: 700;
	letter-spacing: .02em;
	text-align: center;
	text-decoration: none;
	padding: 16px;
	border-radius: 999px;
	transition: background .15s;
}
a.ptl-drawer-checkout:hover {
	background: #2DD4BF;
	color: #0F172A !important;
}
.ptl-drawer-paychips {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 12px;
	flex-wrap: wrap;
}
.ptl-drawer-paychips span {
	font-size: 11px;
	font-weight: 700;
	color: #0F172A;
	border: 1px solid #E2E8F0;
	border-radius: 6px;
	padding: 3px 8px;
	letter-spacing: .02em;
}

/* Mobile: full-screen drawer */
@media (max-width: 767px) {
	#ptl-cart-drawer {
		width: 100vw;
	}
}
