/**
 * Prosforakias commerce visual foundation — shared primitives and tokens.
 *
 * Loaded before cart-page.css / checkout-page.css.
 * Page layout, sticky columns, and checkout-only geometry live in those files.
 */

.pfk-commerce {
	--pfk-commerce-font-family: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--pfk-commerce-bg: #f8fafc;
	--pfk-commerce-surface: #ffffff;
	--pfk-commerce-surface-muted: #f8fafc;
	--pfk-commerce-text: #0f172a;
	--pfk-commerce-text-muted: #64748b;
	--pfk-commerce-border: #e2e8f0;
	--pfk-commerce-border-strong: #0f172a;

	--pfk-commerce-primary: #0f172a;
	--pfk-commerce-primary-hover: #1e293b;

	--pfk-commerce-success: #15803d;
	--pfk-commerce-success-bg: #f0fdf4;
	--pfk-commerce-success-border: #bbf7d0;

	--pfk-commerce-danger: #b91c1c;
	--pfk-commerce-warning: #b45309;

	--pfk-commerce-radius-sm: 8px;
	--pfk-commerce-radius: 12px;
	--pfk-commerce-radius-lg: 14px;

	--pfk-commerce-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
	--pfk-commerce-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);

	--pfk-commerce-control-height: 44px;
	--pfk-commerce-mark-width: 72px;
	--pfk-commerce-mark-height: 40px;
	--pfk-commerce-payment-mark-width: 52px;
	--pfk-commerce-payment-mark-height: 40px;
	--pfk-commerce-option-gap: 12px;

	--pfk-commerce-text-xs: 13px;
	--pfk-commerce-text-sm: 14px;
	--pfk-commerce-text-md: 15px;
	--pfk-commerce-text-lg: 16px;
	--pfk-commerce-text-xl: 18px;
	--pfk-commerce-text-total: 22px;

	font-family: var(--pfk-commerce-font-family);
}

.pfk-commerce button,
.pfk-commerce input,
.pfk-commerce select,
.pfk-commerce textarea,
.pfk-commerce label {
	font-family: inherit;
}

/* ----- Panel ----- */

.pfk-commerce-panel {
	box-sizing: border-box;
	background: var(--pfk-commerce-surface);
	border: 1px solid var(--pfk-commerce-border);
	border-radius: var(--pfk-commerce-radius-lg);
	box-shadow: var(--pfk-commerce-shadow-sm);
}

/* ----- Section heading ----- */

.pfk-commerce-section-heading {
	margin: 0 0 4px;
	color: var(--pfk-commerce-text);
	font-size: var(--pfk-commerce-text-xl);
	font-weight: 700;
	line-height: 1.3;
}

/* ----- Option card family (shipping + payment) ----- */

.pfk-commerce-option-card-wrap {
	margin: 0;
	padding: 0;
	border: 1px solid var(--pfk-commerce-border);
	border-radius: var(--pfk-commerce-radius);
	background: var(--pfk-commerce-surface);
	box-shadow: none;
	overflow: visible;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.pfk-commerce-option-card {
	display: flex;
	align-items: flex-start;
	gap: var(--pfk-commerce-option-gap);
	width: 100%;
	min-width: 0;
	margin: 0;
	padding: 14px 16px;
	box-sizing: border-box;
	border: 0;
	border-radius: var(--pfk-commerce-radius);
	background: transparent;
	color: var(--pfk-commerce-text);
	cursor: pointer;
	box-shadow: none;
}

.pfk-commerce-option-card-wrap:hover {
	border-color: #cbd5e1;
}

.pfk-commerce-option-card-wrap:has(input:checked),
.pfk-commerce-option-card-wrap:has(.is-selected),
.pfk-commerce-option-card.is-selected,
.pfk-commerce-option-card--selected,
.pfk-commerce-option-card:has(input:checked) {
	border-width: 1px;
	border-color: var(--pfk-commerce-border-strong);
	box-shadow: none;
}

.pfk-commerce-option-card-wrap:has(input:checked),
.pfk-commerce-option-card-wrap:has(.is-selected) {
	background: var(--pfk-commerce-surface-muted);
}

.pfk-commerce-option-card-wrap:has(input:checked) .pfk-commerce-option-card__title,
.pfk-commerce-option-card.is-selected .pfk-commerce-option-card__title,
.pfk-commerce-option-card:has(input:checked) .pfk-commerce-option-card__title {
	font-weight: 700;
}

.pfk-commerce-option-card--disabled,
.pfk-commerce-option-card-wrap--disabled {
	opacity: 0.55;
	pointer-events: none;
}

.pfk-commerce-option-card:focus-within {
	outline: none;
}

.pfk-commerce-option-card-wrap:focus-within {
	border-color: var(--pfk-commerce-border-strong);
	box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.08);
}

.pfk-commerce-option-card input[type="radio"] {
	appearance: none;
	-webkit-appearance: none;
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	margin: 11px 0 0;
	padding: 0;
	border: 1.5px solid #cbd5e1;
	border-radius: 999px;
	background: #fff;
	accent-color: var(--pfk-commerce-primary);
	cursor: pointer;
}

.pfk-commerce-option-card input[type="radio"]:checked {
	border-color: var(--pfk-commerce-primary);
	background: radial-gradient(circle at center, var(--pfk-commerce-primary) 0 5px, #fff 6px 100%);
}

.pfk-commerce-option-card input[type="radio"]:focus-visible {
	outline: 2px solid var(--pfk-commerce-primary);
	outline-offset: 2px;
}

.pfk-commerce-option-card__inner {
	display: flex;
	align-items: center;
	gap: 12px;
	flex: 1;
	min-width: 0;
}

.pfk-commerce-option-card__copy {
	display: flex;
	flex-direction: column;
	gap: 2px;
	flex: 1;
	min-width: 0;
}

.pfk-commerce-option-card__title {
	margin: 0;
	color: var(--pfk-commerce-text);
	font-family: var(--pfk-commerce-font-family);
	font-size: var(--pfk-commerce-text-lg);
	font-weight: 600;
	line-height: 1.35;
	letter-spacing: normal;
}

.pfk-commerce-option-card__help {
	margin: 0;
	color: var(--pfk-commerce-text-muted);
	font-family: var(--pfk-commerce-font-family);
	font-size: var(--pfk-commerce-text-sm);
	font-weight: 400;
	line-height: 1.4;
}

.pfk-commerce-option-card__meta {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 2px;
	flex: 0 0 auto;
	margin-left: auto;
	text-align: right;
}

.pfk-commerce-option-card__networks {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin-top: 4px;
}

/* Theme-owned secondary network marks. Independent of .pfk-commerce-provider-mark. */
.pfk-commerce-network-logo {
	display: block;
	flex: 0 0 auto;
	width: auto;
	height: 18px;
	max-width: 38px;
	object-fit: contain;
	object-position: center;
}

/* ----- Provider mark ----- */

.pfk-commerce-provider-mark {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: var(--pfk-commerce-mark-width);
	height: var(--pfk-commerce-mark-height);
	padding: 0;
	box-sizing: border-box;
	border-radius: var(--pfk-commerce-radius-sm);
	background: #fff;
	overflow: hidden;
}

.pfk-commerce-provider-logo,
.pfk-commerce-provider-mark img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	object-position: center;
}

.pfk-commerce-provider-mark .pfk-lucide,
.pfk-commerce-provider-mark .lucide {
	width: 22px;
	height: 22px;
	color: var(--pfk-commerce-text);
	stroke-width: 1.75;
}

.pfk-commerce-provider-mark--pickup,
.pfk-commerce-provider-mark--generic,
.pfk-commerce-provider-mark--bank,
.pfk-commerce-provider-mark--card,
.pfk-commerce-provider-mark--cod {
	background: var(--pfk-commerce-surface-muted);
}

.pfk-commerce-provider-mark--text {
	padding: 4px 6px;
	background: var(--pfk-commerce-surface);
}

.pfk-checkout-payment-card .pfk-commerce-provider-mark,
.pfk-commerce-provider-mark--payment {
	width: var(--pfk-commerce-payment-mark-width);
	height: var(--pfk-commerce-payment-mark-height);
}

.pfk-commerce-provider-mark__text {
	display: block;
	max-width: 100%;
	overflow: hidden;
	color: var(--pfk-commerce-text);
	font-family: var(--pfk-commerce-font-family);
	font-size: var(--pfk-commerce-text-xs);
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.01em;
	text-align: center;
	white-space: nowrap;
	text-overflow: ellipsis;
}

/* ----- Info / success ----- */

.pfk-commerce-info-card {
	padding: 12px 14px;
	border: 1px solid var(--pfk-commerce-border);
	border-radius: var(--pfk-commerce-radius);
	background: var(--pfk-commerce-surface-muted);
}

.pfk-commerce-success-panel {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 12px 14px;
	border: 1px solid var(--pfk-commerce-success-border);
	border-radius: var(--pfk-commerce-radius-sm);
	background: var(--pfk-commerce-success-bg);
	color: var(--pfk-commerce-text);
}

.pfk-commerce-success-panel__row {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
}

.pfk-commerce-success-panel__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	color: var(--pfk-commerce-success);
	font-size: 12px;
	font-weight: 600;
	line-height: 1.3;
}

.pfk-commerce-success-panel__eyebrow .pfk-lucide,
.pfk-commerce-success-panel__eyebrow .lucide {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
}

/* ----- Price ----- */

.pfk-commerce-price {
	color: var(--pfk-commerce-text);
	font-family: var(--pfk-commerce-font-family);
	font-size: var(--pfk-commerce-text-sm);
	font-weight: 700;
	line-height: 1.3;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.pfk-commerce-price--free {
	color: var(--pfk-commerce-success);
}

.pfk-commerce-cod-fee {
	color: var(--pfk-commerce-text);
	font-size: var(--pfk-commerce-text-sm);
	font-weight: 700;
}

/* ----- Summary primitives (not page layout) ----- */

.pfk-commerce-summary {
	background: var(--pfk-commerce-surface);
	border: 1px solid var(--pfk-commerce-border);
	border-radius: var(--pfk-commerce-radius-lg);
	box-shadow: var(--pfk-commerce-shadow);
}

.pfk-commerce-summary__head {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 0;
	margin: 0;
	min-height: 0;
}

.pfk-commerce-summary__toggle {
	display: none;
	flex-direction: column;
	align-items: stretch;
	gap: 4px;
	width: 100%;
	min-height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: var(--pfk-commerce-radius-sm, 8px);
	background: transparent;
	color: var(--pfk-commerce-text);
	font-family: inherit;
	text-align: left;
	cursor: pointer;
}

.pfk-commerce-summary__toggle-main {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}

.pfk-commerce-summary__toggle-count {
	flex: 1 1 auto;
	min-width: 0;
	color: var(--pfk-commerce-text);
	font-size: var(--pfk-commerce-text-md, 15px);
	font-weight: 700;
	line-height: 1.3;
}

.pfk-commerce-summary__toggle-total {
	flex: 0 0 auto;
	color: var(--pfk-commerce-text);
	font-size: 17px;
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: -0.02em;
	white-space: nowrap;
}

.pfk-commerce-summary__toggle-delivery {
	display: -webkit-box;
	min-width: 0;
	overflow: hidden;
	color: var(--pfk-commerce-text-muted);
	font-size: var(--pfk-commerce-text-sm, 14px);
	font-weight: 500;
	line-height: 1.35;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.pfk-commerce-summary__toggle-delivery[hidden] {
	display: none;
}

.pfk-commerce-summary__toggle-icon {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	color: var(--pfk-commerce-text-muted);
}

.pfk-commerce-summary__toggle .pfk-lucide,
.pfk-commerce-summary__toggle .lucide {
	width: 18px;
	height: 18px;
	transition: transform 0.15s ease;
}

.pfk-commerce-summary.is-summary-expanded .pfk-commerce-summary__toggle .pfk-lucide,
.pfk-commerce-summary.is-summary-expanded .pfk-commerce-summary__toggle .lucide {
	transform: rotate(180deg);
}

.pfk-commerce-summary__toggle:focus-visible {
	outline: 2px solid var(--pfk-commerce-primary);
	outline-offset: 2px;
}

/* ----- Action bar ----- */

.pfk-commerce-action-bar {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 12px;
}

.pfk-commerce-action-bar .pfk-lucide,
.pfk-commerce-action-bar .lucide {
	width: 16px;
	height: 16px;
	margin: 0;
	flex-shrink: 0;
}

@media (prefers-reduced-motion: reduce) {
	.pfk-commerce-option-card-wrap,
	.pfk-commerce-summary__toggle .pfk-lucide,
	.pfk-commerce-summary__toggle .lucide {
		transition: none;
	}
}

/* ========== Global shell bits (moved from commerce-completion, 0.6.6.123.1.6) ========== */
@media (max-width: 1023px) {
	body.pfk-catalog-layer-open {
		overflow: hidden;
	}

	#pfk-mobile-nav .pfk-mobile-nav-item.is-active {
		color: #0f172a;
		font-weight: 600;
	}

	#pfk-mobile-nav .pfk-mobile-nav-item.is-active svg {
		color: #0f172a;
	}

	#pfk-header,
	#pfk-header .pfk-header-inner {
		max-width: 100%;
		overflow-x: hidden;
	}
}

/* Guest account modal — needed wherever mobile bottom nav mounts */
#pfk-mobile-account-modal .pfk-mobile-account-modal-header__spacer {
	flex: 1;
}

#pfk-mobile-account-modal .pfk-mobile-account-guest {
	padding: 4px 16px 18px;
}

#pfk-mobile-account-modal .pfk-mobile-account-guest__hero {
	display: flex;
	justify-content: center;
	margin-bottom: 12px;
}

#pfk-mobile-account-modal .pfk-mobile-account-guest__icon-ring {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: linear-gradient(145deg, #f1f5f9 0%, #e2e8f0 100%);
	color: #0f172a;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

#pfk-mobile-account-modal .pfk-mobile-account-guest__icon-ring .pfk-lucide,
#pfk-mobile-account-modal .pfk-mobile-account-guest__icon-ring .lucide,
#pfk-mobile-account-modal .pfk-mobile-account-guest__icon-ring svg {
	width: 28px;
	height: 28px;
}

#pfk-mobile-account-modal .pfk-mobile-account-guest__kicker {
	margin: 0 0 8px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-align: center;
	color: #64748b;
}

#pfk-mobile-account-modal .pfk-mobile-account-guest__text {
	margin: 0 0 16px;
	font-size: 14px;
	line-height: 1.55;
	text-align: center;
	color: #475569;
}

#pfk-mobile-account-modal .pfk-mobile-account-guest__actions {
	display: grid;
	gap: 10px;
}
