/* FuturePaceMedia Custom Cart */
.fpm-cart { font-family: inherit; color: #1a1a1a; width: 100%; box-sizing: border-box; }
.fpm-cart *, .fpm-cart *::before, .fpm-cart *::after { box-sizing: border-box; }
.fpm-cart.fpm-busy { opacity: .6; pointer-events: none; }

/* Protect our controls from theme button styles bleeding in */
.fpm-cart button {
	-webkit-appearance: none !important; appearance: none !important;
	font-family: inherit !important; text-transform: none !important; letter-spacing: normal !important;
	margin: 0 !important; min-height: 0 !important; line-height: normal !important;
}
.fpm-cart-loading, .fpm-empty { padding: 40px; text-align: center; color: #999; }
.fpm-empty .fpm-browse {
	display: inline-block; margin-top: 12px; background: #f45954; color: #fff;
	text-decoration: none; font-weight: 700; padding: 10px 22px; border-radius: 25px;
}

/* REWARD BAR */
.fpm-reward { margin-bottom: 22px; }
.fpm-reward-row { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.fpm-reward-ico { font-size: 18px; }
.fpm-reward-msg { font-weight: 600; }
.fpm-reward-msg b, .fpm-reward-msg strong { color: #e63028; }
.fpm-reward-bar { height: 6px; border-radius: 4px; background: #eee; margin-top: 8px; overflow: hidden; }
.fpm-reward-bar span { display: block; height: 100%; background: #f45954; transition: width .3s; }

/* LAYOUT */
.fpm-layout { display: grid; grid-template-columns: 1fr 320px; gap: 26px; align-items: start; }
.fpm-main { min-width: 0; }

/* TABLE HEAD */
.fpm-thead {
	display: grid; grid-template-columns: 1fr 264px 120px 100px; gap: 0;
	padding: 0 16px 12px; border-bottom: 1px solid #eee;
	font-size: 11px; letter-spacing: .5px; text-transform: uppercase; color: #aaa; font-weight: 700;
}
.fpm-thead span:nth-child(2), .fpm-thead span:nth-child(3) { text-align: left; }
.fpm-thead span:nth-child(4) { text-align: right; }

/* GROUP = product on the left, one line per format on the right */
.fpm-group {
	display: flex; align-items: center; gap: 0;
	padding: 30px 16px; border-bottom: 1px solid #f3f3f3; background: #ffffff;
}
.fpm-group--alt { background: #fff7f5; }
.fpm-gp-product { flex: 1 1 auto; min-width: 0; display: flex; gap: 14px; align-items: flex-start; align-self: center; }
.fpm-gp-lines { flex: 0 0 484px; width: 484px; }

.fpm-line { display: grid; grid-template-columns: 264px 120px 100px; align-items: center; padding: 5px 0; }
.fpm-line-price { display: grid; grid-template-columns: 16px 144px auto; align-items: center; justify-items: start; column-gap: 8px; }
.fpm-line-qty { display: flex; justify-content: flex-start; }
.fpm-line-sub { text-align: right; font-size: 14px; font-weight: 700; }
.fpm-line--add { display: block; padding: 10px 0 2px 24px; }
.fpm-line--add .fpm-line-price { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fpm-line--add .fpm-line-qty, .fpm-line--add .fpm-line-sub { display: none; }

.fpm-remove {
	background: none !important; border: none !important; box-shadow: none !important;
	padding: 0 !important; width: auto !important; height: auto !important; min-width: 0 !important;
	border-radius: 0 !important; color: #e0584f !important; font-size: 14px !important; cursor: pointer; opacity: .85;
}
.fpm-remove:hover { opacity: 1; background: none !important; }

.fpm-thumb { flex: 0 0 70px; width: 70px; height: 92px; border-radius: 6px; overflow: hidden; background: #f5f5f5; display: block; }
.fpm-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fpm-gp-info { min-width: 0; }
.fpm-badge {
	display: inline-block; background: #3a9be8; color: #fff; font-size: 11px; font-weight: 700;
	padding: 4px 11px; border-radius: 5px; margin-bottom: 8px;
}
.fpm-name {
	display: block; font-size: 14px; font-weight: 700; line-height: 1.35; color: #1a1a1a; text-decoration: none;
	margin-bottom: 6px;
}
.fpm-name:hover { color: #e63028; }

/* Red "Add <format>" button (design's "Add 1 PDFs") */
.fpm-add-btn {
	display: inline-flex !important; align-items: center; gap: 4px; width: auto !important; max-width: 100%;
	cursor: pointer; font-weight: 600 !important; font-size: 11px !important; line-height: normal !important; white-space: nowrap !important;
	padding: 4px 11px !important; border-radius: 14px !important; min-height: 0 !important; height: auto !important;
	border: 1px solid #e63028 !important; background: rgba( 230, 48, 40, 0.2 ) !important; color: #c0231c !important;
	box-shadow: none !important; text-transform: none !important; text-shadow: none !important;
}
.fpm-add-btn:hover { background: rgba( 230, 48, 40, 0.32 ) !important; color: #c0231c !important; }

/* STARS */
.fpm-stars { display: inline-flex; gap: 1px; vertical-align: middle; }
.fpm-stars svg { width: 13px; height: 13px; }
.fpm-stars svg.on polygon { fill: #f5a623; }
.fpm-stars svg.off polygon { fill: #e0e0e0; }
.fpm-revcount { font-size: 11px; color: #aaa; margin-left: 4px; }

/* CHIPS + PRICE */
.fpm-chip {
	display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600;
	padding: 4px 11px; border-radius: 14px; border: 1px solid #c8e6cd; color: #1f8a3b; background: #f1faf3;
	white-space: nowrap; line-height: normal;
}
.fpm-chip.on { border-color: #c8e6cd; color: #1f8a3b; background: #f1faf3; }
button.fpm-chip.off {
	cursor: pointer; border: 1px solid #e63028 !important; color: #c0231c !important; background: rgba( 230, 48, 40, 0.2 ) !important;
	font-family: inherit; font-size: 11px !important; font-weight: 600 !important; padding: 4px 11px !important;
	border-radius: 14px !important; line-height: normal !important; height: auto !important; min-height: 0 !important;
	box-shadow: none !important; text-shadow: none !important; text-transform: none !important;
}
button.fpm-chip.off:hover { background: rgba( 230, 48, 40, 0.32 ) !important; border-color: #e63028 !important; color: #c0231c !important; }
.fpm-price { display: inline-flex; align-items: baseline; gap: 7px; }
.fpm-price-sale { font-size: 14px; font-weight: 700; color: #1a1a1a; }
.fpm-price-reg { font-size: 12px; color: #aaa; text-decoration: line-through; }

/* QTY */
.fpm-stepper {
	display: inline-flex; align-items: stretch; border: 1px solid #e4e4e4; border-radius: 8px;
	overflow: hidden; height: 38px; background: #f6f6f6;
}
.fpm-stepper button {
	display: flex !important; align-items: center; justify-content: center;
	width: 36px; height: auto; border: none !important; background: transparent !important;
	color: #999 !important; font-size: 18px !important; line-height: 1 !important; padding: 0 !important; cursor: pointer;
}
.fpm-stepper button:hover { background: #ececec !important; color: #333 !important; }
.fpm-qty {
	display: flex; align-items: center; justify-content: center; min-width: 38px;
	background: #fff; font-size: 14px; font-weight: 600; color: #222;
}

/* CROSS-SELL */
.fpm-crosssell {
	display: flex; align-items: center; justify-content: space-between; gap: 16px;
	background: #fdf2f1; border-radius: 10px; padding: 16px 18px; margin-top: 22px;
}
.fpm-cs-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.fpm-cs-left img { width: 48px; height: 60px; object-fit: cover; border-radius: 5px; flex: 0 0 auto; }
.fpm-cs-title { font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: #c0231c; font-weight: 700; }
.fpm-cs-sub { font-size: 13px; color: #555; }
.fpm-cs-right { text-align: right; flex: 0 0 auto; }
.fpm-add-all {
	border: none; cursor: pointer; background: #f45954; color: #fff; font-weight: 700; font-size: 13px;
	padding: 10px 20px; border-radius: 25px;
}
.fpm-add-all:hover { background: #c0231c; }
.fpm-cs-price { font-size: 12px; color: #999; margin-top: 6px; }

/* TOTALS */
.fpm-aside { position: sticky; top: 20px; }
.fpm-totals { border: 1px solid #eee; border-radius: 12px; padding: 22px; }
.fpm-totals h3 { margin: 0 0 16px; font-size: 18px; }
.fpm-tot-row { display: flex; justify-content: space-between; align-items: center; font-size: 14px; padding: 9px 0; }
.fpm-tot-savings { color: #1f8a3b; font-weight: 600; }
.fpm-tot-total { border-top: 1px solid #eee; margin-top: 6px; padding-top: 14px; font-size: 17px; font-weight: 700; }
.fpm-due-note { font-size: 11px; color: #aaa; margin: 6px 0 16px; line-height: 1.4; }
.fpm-checkout {
	width: 100%; border: none; cursor: pointer; background: #f45954; color: #fff; font-weight: 700;
	font-size: 14px; padding: 14px; border-radius: 25px;
}
.fpm-checkout:hover { background: #c0231c; }

/* RESPONSIVE */
@media (max-width: 900px) {
	.fpm-layout { grid-template-columns: 1fr; }
	.fpm-aside { position: static; }
}
@media (max-width: 680px) {
	.fpm-thead { display: none; }
	.fpm-group { flex-direction: column; align-items: stretch; gap: 10px; padding: 22px 14px; }
	.fpm-gp-product { align-self: stretch; }
	.fpm-gp-lines { flex: 1 1 auto; width: 100%; }

	/* Drop the fixed desktop column widths and stack each format line. */
	.fpm-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 0; border-top: 1px solid #f3eceb; }
	.fpm-line:first-child { border-top: none; }
	.fpm-line-price { display: flex; grid-template-columns: none; flex: 1 1 100%; align-items: center; gap: 8px; }
	.fpm-line-price .fpm-chip, .fpm-line-price .fpm-price { justify-self: auto; }
	.fpm-line-qty { flex: 0 0 auto; }
	.fpm-line-sub { flex: 1 1 auto; text-align: right; }

	.fpm-line--add { display: block; padding: 8px 0 2px; }
	.fpm-line--add .fpm-line-qty, .fpm-line--add .fpm-line-sub { display: none; }
}

/* ---- Loading skeleton ------------------------------------------------- */
.fpm-skel-card { display: flex; align-items: center; gap: 14px; padding: 30px 16px; border-bottom: 1px solid #f3f3f3; }
.fpm-skel-card:nth-child(odd) { background: #fff7f5; } /* thead is first child, so cards 1,3 are even -> tint matches live cart */
.fpm-skel-info { flex: 1 1 auto; display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.fpm-skel-right { flex: 0 0 484px; display: flex; align-items: center; gap: 12px; }
.fpm-skel-thumb { flex: 0 0 70px; width: 70px; height: 92px; border-radius: 6px; }
.fpm-skel-line { height: 12px; border-radius: 6px; width: 100%; }
.fpm-skel-line.w70 { width: 70%; } .fpm-skel-line.w50 { width: 50%; } .fpm-skel-line.w40 { width: 40%; }
.fpm-skel-pill { width: 150px; height: 22px; border-radius: 14px; }
.fpm-skel-box { width: 120px; height: 38px; border-radius: 8px; }
.fpm-skel-sub { width: 90px; height: 16px; border-radius: 6px; }
.fpm-skel-totals { flex: 0 0 320px; align-self: flex-start; display: flex; flex-direction: column; gap: 16px; padding: 26px; border: 1px solid #eee; border-radius: 14px; }
.fpm-skel-btn { height: 48px; border-radius: 26px; margin-top: 6px; }
.fpm-skel-thumb, .fpm-skel-line, .fpm-skel-pill, .fpm-skel-box, .fpm-skel-sub, .fpm-skel-btn {
	background: linear-gradient(90deg, #ededed 25%, #f6f6f6 37%, #ededed 63%);
	background-size: 400% 100%;
	animation: fpm-shimmer 1.4s ease infinite;
}
@keyframes fpm-shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

@media (max-width: 680px) {
	.fpm-skel .fpm-layout { display: block; }
	.fpm-skel-right { display: none; }
	.fpm-skel-totals { flex-basis: auto; margin-top: 16px; }
}
