/* =============================================
   PBB – Product Buy Buttons
   ============================================= */

.pbb-wrap {
	display: flex;
	flex-direction: column;
	gap: 14px;
	width: 100%;
}

.pbb-row {
	display: flex;
	align-items: center;
}

.pbb-row-main {
	gap: 12px;
}

.pbb-row-wishlist {
	justify-content: flex-start;
}

/* ── Quantity stepper ────────────────────────────────────── */
.pbb-qty {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex: 0 0 auto;
	width: 132px;
	height: 54px;
	padding: 0 6px;
	background-color: #f2f2f2;
	border-radius: 40px;
	box-sizing: border-box;
}

.pbb-qty-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	flex: 0 0 auto;
	padding: 0;
	border: none;
	background: none;
	cursor: pointer;
	border-radius: 50%;
	transition: color 200ms ease, background-color 200ms ease;
}

.pbb-qty-btn i {
	font-size: 12px;
	color: #6b6b6b;
	line-height: 1;
	transition: color 200ms ease;
}

.pbb-qty-btn svg {
	width: 12px;
	height: 12px;
	fill: #6b6b6b;
	transition: fill 200ms ease;
}

.pbb-qty-btn:hover i   { color: #1a1a1a; }
.pbb-qty-btn:hover svg { fill: #1a1a1a; }

.pbb-qty-btn:disabled {
	opacity: 0.35;
	cursor: default;
}

.pbb-qty-input {
	flex: 1 1 auto;
	width: 100%;
	min-width: 0;
	border: none;
	background: none;
	text-align: center;
	font-size: 16px;
	font-weight: 600;
	color: #1a1a1a;
	padding: 0;
	outline: none;
	-moz-appearance: textfield;
	appearance: textfield;
}

.pbb-qty-input::-webkit-outer-spin-button,
.pbb-qty-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* ── Shared button base ──────────────────────────────────── */
.pbb-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	height: 54px;
	padding: 0 24px;
	border: none;
	border-radius: 40px;
	cursor: pointer;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.02em;
	line-height: 1;
	text-align: center;
	box-sizing: border-box;
	transition: background-color 250ms ease, color 250ms ease, border-color 250ms ease, opacity 250ms ease;
}

.pbb-btn-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 0;
}

.pbb-btn-icon i   { font-size: 18px; line-height: 1; }
.pbb-btn-icon svg { width: 18px; height: 18px; }

/* ── Add to cart ─────────────────────────────────────────── */
.pbb-add-to-cart {
	flex: 1 1 auto;
	background-color: #d81e27;
	color: #ffffff;
}

.pbb-add-to-cart svg,
.pbb-add-to-cart svg path { fill: #ffffff; }

.pbb-add-to-cart:hover { background-color: #b5161e; }

.pbb-add-to-cart.pbb-disabled,
.pbb-add-to-cart:disabled {
	background-color: #c9c9c9;
	color: #ffffff;
	cursor: not-allowed;
}

/* ── Buy it now ──────────────────────────────────────────── */
.pbb-buy-now {
	width: 100%;
	background-color: #ffffff;
	color: #d81e27;
	border: 1px solid #f3b8bb;
}

.pbb-buy-now svg,
.pbb-buy-now svg path { fill: #d81e27; }

.pbb-buy-now:hover {
	background-color: #d81e27;
	color: #ffffff;
	border-color: #d81e27;
}

.pbb-buy-now:hover svg,
.pbb-buy-now:hover svg path { fill: #ffffff; }

/* ── Wishlist link ───────────────────────────────────────── */
.pbb-wishlist {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 4px 0;
	border: none;
	background: none;
	cursor: pointer;
	line-height: 1;
}

.pbb-wishlist-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 0;
}

.pbb-wishlist-icon i   { font-size: 20px; color: #d81e27; line-height: 1; }
.pbb-wishlist-icon svg { width: 20px; height: 20px; fill: #d81e27; }

.pbb-wishlist-text {
	font-size: 15px;
	font-weight: 500;
	color: #3a3a3a;
	transition: color 250ms ease;
}

/* Icon swap is driven entirely by the .pbb-added class. */
.pbb-icon-empty,
.pbb-icon-filled {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 0;
}

.pbb-wishlist .pbb-icon-filled,
.pbb-wishlist.pbb-added .pbb-icon-empty { display: none; }

.pbb-wishlist.pbb-added .pbb-icon-filled { display: inline-flex; }

/* ── Loading state ───────────────────────────────────────── */
.pbb-btn.pbb-loading,
.pbb-wishlist.pbb-loading {
	pointer-events: none;
	opacity: 0.6;
}

/* ── Editor placeholder ──────────────────────────────────── */
.pbb-notice {
	padding: 16px;
	border: 1px dashed #c3c4c7;
	border-radius: 6px;
	color: #6b6b6b;
	font-size: 14px;
	text-align: center;
}

/* ── Reduced motion ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
	.pbb-btn,
	.pbb-qty-btn,
	.pbb-qty-btn i,
	.pbb-qty-btn svg,
	.pbb-wishlist-text {
		transition: none;
	}
}

/* ── Small screens ───────────────────────────────────────── */
@media (max-width: 480px) {
	.pbb-btn {
		padding: 0 16px;
		font-size: 14px;
	}
}
