/* ==========================================================================
   Bobbler - Cart v2 (fully custom cart UI)
   Scope : .bob-cart-v2 only. Nothing here can affect the real /cart/ page.
   ========================================================================== */

/* hide the theme page title (e.g. "Cart 2"); the cart has its own heading */
.bob-cart-test .entry-header {
	display: none !important;
}

.bob-cart-v2 {
	--bob-border: #e9e9ec;
	--bob-text: #191919;
	--bob-muted: #6b7280;
	--bob-soft: #f7f7f8;
	--bob-accent: #9c4a4c;
	--bob-accent-dark: #7f3b3d;
	--bob-radius: 16px;
	--bob-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 12px 28px -12px rgba(16, 24, 40, .14);
	position: relative;
	color: var(--bob-text);
	font-family: Montserrat, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	transition: opacity .15s ease;
}

.bob-cart-v2.is-busy {
	opacity: .55;
	pointer-events: none;
}

.bob-cart-v2 * {
	box-sizing: border-box;
}

/* ---------- notices ---------- */
.bob-cart-v2__notices {
	margin-bottom: 20px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.bob-notice {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 13px 16px;
	border-radius: 12px;
	font-size: 14px;
	line-height: 1.45;
}

.bob-notice--error {
	background: #fef2f2;
	border: 1px solid #fecaca;
	color: #991b1b;
}

.bob-notice__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	border-radius: 999px;
	background: #dc2626;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	flex: none;
}

/* ---------- layout ---------- */
.bob-cart-v2__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 400px;
	gap: 40px;
	align-items: start;
}

.bob-cart-v2__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 4px;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--bob-border);
}

.bob-cart-v2 .bob-cart-v2__title {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--bob-text);
}

.bob-cart-v2__count {
	font-size: 13.5px;
	color: var(--bob-muted);
}

.bob-cart-v2__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

/* ---------- item ---------- */
.bob-item {
	display: grid;
	grid-template-columns: 128px minmax(0, 1fr) auto 110px auto;
	grid-template-areas: "media info qty total actions";
	column-gap: 20px;
	align-items: center;
	padding: 22px 0;
	border-bottom: 1px solid var(--bob-border);
}

.bob-item:last-child {
	border-bottom: 0;
}

.bob-item__media {
	grid-area: media;
	display: block;
	width: 128px;
	height: 128px;
	overflow: hidden;
	background: #fff;
	border: 1px solid #ececf0;
	border-radius: 14px;
	box-shadow: 0 1px 3px rgba(16, 24, 40, .05);
}

.bob-item__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	transition: transform .3s ease;
}

.bob-item__media:hover img {
	transform: scale(1.05);
}

.bob-item__noimg {
	display: block;
	width: 100%;
	height: 100%;
	background: var(--bob-soft);
}

.bob-item__info {
	grid-area: info;
	min-width: 0;
}

.bob-item__name {
	display: inline-block;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.45;
	color: var(--bob-text);
	text-decoration: none;
}

.bob-item__name:hover {
	color: var(--bob-accent);
	text-decoration: underline;
}

.bob-item__meta {
	list-style: none;
	margin: 8px 0 0;
	padding: 0;
	font-size: 13px;
	line-height: 1.55;
	color: var(--bob-muted);
}

.bob-item__meta li {
	margin: 0 0 2px;
}

.bob-item__meta li.bob-item__meta-row--media .bob-item__meta-k,
.bob-item__meta li.bob-item__meta-row--media .bob-item__meta-v {
	display: block;
}

.bob-item__meta li.bob-item__meta-row--media .bob-item__meta-k {
	margin-bottom: 4px;
}

.bob-item__meta-k {
	color: #9aa0a6;
}

.bob-item__meta-v {
	color: #444;
}

/* PPOM 选项：颜色 / 图片缩略图等 display HTML */
.bob-item__meta-v table {
	display: inline-table;
	width: auto;
	max-width: 100%;
	margin: 0;
	border: 0;
	border-collapse: collapse;
	font-size: inherit;
	line-height: inherit;
}

.bob-item__meta-v table td {
	border: 0;
	padding: 0 6px 0 0;
	vertical-align: middle;
}

.bob-item__meta-v img {
	display: inline-block;
	width: 26px !important;
	height: 26px !important;
	max-width: 26px !important;
	object-fit: cover;
	border-radius: 6px;
	vertical-align: middle;
}

.bob-item__meta-v a {
	display: inline-block;
	line-height: 0;
	cursor: zoom-in;
}

.bob-item__meta-v .ppom-option-label-price {
	color: var(--bob-accent);
	font-weight: 600;
	white-space: nowrap;
}

.bob-item__unit {
	margin-top: 8px;
	font-size: 13px;
	color: var(--bob-muted);
}

.bob-item__unit span {
	color: #9aa0a6;
}

/* quantity stepper */
.bob-item__qty {
	grid-area: qty;
	justify-self: center;
	display: inline-flex;
	align-items: center;
	height: 40px;
	overflow: hidden;
	background: #fff;
	border: 1px solid #dcdce1;
	border-radius: 999px;
}

.bob-qty__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 40px;
	padding: 0;
	background: transparent;
	border: 0;
	font-size: 17px;
	line-height: 1;
	color: #4b5563;
	cursor: pointer;
	-webkit-user-select: none;
	user-select: none;
}

.bob-qty__btn:hover:not(:disabled) {
	background: #f3f4f6;
	color: #111;
}

.bob-qty__btn:disabled {
	opacity: .35;
	cursor: default;
}

.bob-cart-v2 .bob-qty__input {
	width: 46px !important;
	height: 40px !important;
	padding: 0 !important;
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	text-align: center;
	font-size: 15px;
	font-weight: 600;
	color: var(--bob-text);
	-moz-appearance: textfield;
	appearance: textfield;
}

.bob-qty__input::-webkit-outer-spin-button,
.bob-qty__input::-webkit-inner-spin-button {
	margin: 0;
	-webkit-appearance: none;
}

.bob-item__total {
	grid-area: total;
	text-align: right;
	font-size: 16px;
	font-weight: 700;
	white-space: nowrap;
	color: var(--bob-text);
}

.bob-item__actions {
	grid-area: actions;
	justify-self: end;
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.bob-item__action {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	padding: 0;
	background: transparent;
	border: 0;
	border-radius: 999px;
	color: #9ca3af;
	font-size: 0;
	line-height: 1;
	cursor: pointer;
	text-decoration: none;
	transition: background .15s ease, color .15s ease;
}

.bob-item__action svg {
	width: 17px;
	height: 17px;
	display: block;
}

.bob-item__edit:hover {
	background: #f3f4f6;
	color: #191919;
}

.bob-item__remove:hover {
	background: #fef2f2;
	color: #dc2626;
}

/* ---------- summary ---------- */
.bob-cart-v2__summary {
	position: sticky;
	top: 24px;
	padding: 28px;
	background: #fff;
	border: 1px solid var(--bob-border);
	border-radius: var(--bob-radius);
	box-shadow: var(--bob-shadow);
}

.bob-cart-v2 .bob-summary__title {
	margin: 0 0 12px;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--bob-text);
}

.bob-summary__rows {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.bob-summary__row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	padding: 11px 0;
	font-size: 15px;
	line-height: 1.5;
	color: var(--bob-text);
}

.bob-summary__row > span:first-child {
	color: var(--bob-muted);
	font-weight: 500;
}

.bob-summary__row > span:last-child {
	font-weight: 600;
	white-space: nowrap;
}

.bob-summary__row--discount > span:last-child {
	color: #15803d;
}

.bob-summary__row--total {
	margin-top: 8px;
	padding-top: 18px;
	border-top: 1px solid var(--bob-border);
	font-size: 17px;
	font-weight: 700;
}

.bob-summary__row--total > span:last-child {
	font-size: 20px;
	font-weight: 700;
}

.bob-summary__block {
	margin: 6px 0 4px;
}

.bob-summary__block-title {
	margin-bottom: 10px;
	font-size: 14px;
	font-weight: 600;
	color: var(--bob-text);
}

.bob-summary__muted {
	margin: 0;
	font-size: 13.5px;
	color: var(--bob-muted);
}

/* shipping options */
.bob-shipping {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: 1fr;
	gap: 10px;
}

.bob-shipping__option {
	display: block;
}

.bob-shipping__label {
	display: flex;
	align-items: flex-start;
	gap: 9px;
	height: 100%;
	padding: 12px 13px;
	background: #fafafa;
	border: 1px solid var(--bob-border);
	border-radius: 12px;
	cursor: pointer;
	transition: border-color .15s ease, background .15s ease;
}

.bob-shipping__option.is-selected .bob-shipping__label {
	background: #fdf5f5;
	border-color: var(--bob-accent);
}

.bob-shipping__label input[type="radio"] {
	flex: none;
	display: inline-grid;
	place-content: center;
	width: 16px;
	height: 16px;
	margin: 1px 0 0;
	appearance: none;
	-webkit-appearance: none;
	background: #fff;
	border: 1.5px solid #c9c9d1;
	border-radius: 999px;
	cursor: pointer;
}

.bob-shipping__label input[type="radio"]::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 999px;
	background: #fff;
	transform: scale(0);
	transition: transform .12s ease;
}

.bob-shipping__label input[type="radio"]:checked {
	background: var(--bob-accent);
	border-color: var(--bob-accent);
}

.bob-shipping__label input[type="radio"]:checked::before {
	transform: scale(1);
}

.bob-shipping__name {
	flex: 1 1 auto;
	min-width: 0;
	font-size: 12.5px;
	line-height: 1.4;
	color: var(--bob-text);
}

.bob-shipping__price {
	flex: none;
	font-size: 12.5px;
	font-weight: 700;
	white-space: nowrap;
	color: var(--bob-text);
}

/* coupons */
.bob-coupons {
	list-style: none;
	margin: 14px 0 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.bob-coupon-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 8px 6px 12px;
	background: #fdf5f5;
	border: 1px dashed var(--bob-accent);
	border-radius: 999px;
	font-size: 13px;
	font-weight: 600;
	color: var(--bob-accent);
}

.bob-coupon-chip__remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	padding: 0;
	background: transparent;
	border: 0;
	border-radius: 999px;
	color: var(--bob-accent);
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
}

.bob-coupon {
	display: flex;
	gap: 10px;
	margin-top: 14px;
}

.bob-cart-v2 .bob-coupon__input {
	flex: 1 1 auto;
	min-width: 0;
	height: 46px;
	padding: 0 16px;
	background: #fff !important;
	border: 1px solid #dcdce1 !important;
	border-radius: 10px !important;
	font-size: 14px;
	color: var(--bob-text);
	box-shadow: none !important;
}

.bob-cart-v2 .bob-coupon__input:focus {
	outline: none;
	border-color: var(--bob-accent);
	box-shadow: 0 0 0 3px rgba(156, 74, 76, .12);
}

.bob-cart-v2 .bob-coupon__btn {
	flex: none;
	height: 46px;
	padding: 0 20px;
	background: #fff;
	border: 1px solid #dcdce1;
	border-radius: 10px;
	font-size: 14px;
	font-weight: 600;
	color: var(--bob-text);
	cursor: pointer;
	white-space: nowrap;
}

.bob-cart-v2 .bob-coupon__btn:hover {
	background: #f5f5f6;
}

.bob-checkout {
	display: block;
	width: 100%;
	margin-top: 22px;
	padding: 17px 22px;
	background: var(--bob-accent);
	border-radius: 12px;
	color: #fff;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	box-shadow: 0 6px 16px -6px rgba(156, 74, 76, .6);
	transition: background .15s ease, transform .15s ease;
}

.bob-checkout:hover {
	background: var(--bob-accent-dark);
	transform: translateY(-1px);
	color: #fff;
}

.bob-summary__note {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin: 14px 0 0;
	font-size: 12.5px;
	line-height: 1.5;
	color: var(--bob-muted);
}

.bob-summary__note-icon {
	display: inline-flex;
	flex: none;
	color: #15803d;
}

.bob-summary__note-icon svg {
	display: block;
	width: 16px;
	height: 16px;
}

/* ---------- guarantees / trust strip ---------- */
.bob-cart-v2__assurance {
	margin-top: 18px;
	padding: 15px 16px;
	background: linear-gradient(180deg, #fffafa 0%, #fbf2f2 100%);
	border: 1px solid #efdede;
	border-radius: 14px;
	box-shadow: 0 1px 2px rgba(16, 24, 40, .03);
}

.bob-assurance {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 12px 14px;
}

.bob-assurance__item {
	display: flex;
	align-items: center;
	gap: 9px;
	min-width: 0;
	margin: 0;
	padding: 0;
	font-size: 12.5px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--bob-text);
}

.bob-assurance__icon {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	background: #fff;
	border: 1px solid #f1dcdc;
	border-radius: 999px;
	color: var(--bob-accent);
	box-shadow: 0 1px 2px rgba(156, 74, 76, .07);
}

.bob-assurance__icon svg {
	display: block;
	width: 14px;
	height: 14px;
}

.bob-assurance__text {
	min-width: 0;
	overflow-wrap: break-word;
}

@media (min-width: 1201px) {
	.bob-assurance__item {
		flex-direction: column;
		align-items: center;
		text-align: center;
		gap: 8px;
	}
}

@media (max-width: 1200px) {
	.bob-assurance {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 560px) {
	.bob-cart-v2__assurance {
		padding: 14px;
	}

	.bob-assurance {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 11px 12px;
	}

	.bob-assurance__item {
		font-size: 12px;
	}
}

/* ---------- loading / empty ---------- */
.bob-cart-v2__loading {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 80px 20px;
	font-size: 15px;
	color: var(--bob-muted);
}

.bob-spinner {
	width: 22px;
	height: 22px;
	border: 2.5px solid #e5e5e9;
	border-top-color: var(--bob-accent);
	border-radius: 999px;
	animation: bob-spin .7s linear infinite;
}

@keyframes bob-spin {
	to { transform: rotate(360deg); }
}

.bob-empty {
	padding: 64px 20px;
	text-align: center;
	background: #fff;
	border: 1px solid var(--bob-border);
	border-radius: var(--bob-radius);
	box-shadow: var(--bob-shadow);
}

.bob-empty__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	margin-bottom: 18px;
	background: #fdf5f5;
	border-radius: 999px;
	color: var(--bob-accent);
}

.bob-empty__icon svg {
	width: 30px;
	height: 30px;
}

.bob-cart-v2 .bob-empty__title {
	margin: 0 0 8px;
	font-size: 22px;
	font-weight: 700;
	color: var(--bob-text);
}

.bob-empty__text {
	margin: 0 0 22px;
	font-size: 15px;
	color: var(--bob-muted);
}

.bob-btn {
	display: inline-block;
	padding: 14px 28px;
	border-radius: 10px;
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
	transition: background .15s ease;
}

.bob-btn--primary {
	background: #191919;
	color: #fff;
}

.bob-btn--primary:hover {
	background: #000;
	color: #fff;
}

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
	.bob-cart-v2__grid {
		grid-template-columns: minmax(0, 1fr) 340px;
		gap: 28px;
	}
}

@media (max-width: 860px) {
	.bob-cart-v2__grid {
		grid-template-columns: 1fr;
		gap: 24px;
	}

	.bob-cart-v2__summary {
		position: static;
		padding: 22px;
	}

	.bob-item {
		grid-template-columns: 96px minmax(0, 1fr) auto auto;
		grid-template-areas:
			"media info actions actions"
			"media qty  total   total";
		column-gap: 14px;
		row-gap: 12px;
		align-items: center;
	}

	.bob-item__total {
		text-align: right;
	}

	.bob-item__media {
		width: 96px;
		height: 96px;
		border-radius: 12px;
		align-self: start;
	}

	.bob-item__info {
		align-self: start;
	}

	.bob-item__qty {
		justify-self: start;
		height: 36px;
	}

	.bob-qty__btn {
		width: 34px;
		height: 36px;
	}

	.bob-cart-v2 .bob-qty__input {
		width: 40px;
		height: 36px;
	}

	.bob-item__total {
		align-self: center;
	}

	.bob-item__actions {
		align-self: start;
	}
}

@media (max-width: 560px) {
	.bob-shipping {
		grid-template-columns: 1fr;
	}

	.bob-coupon {
		flex-direction: column;
	}

	.bob-cart-v2 .bob-coupon__btn {
		width: 100%;
	}
}

/* 免运费（达到包邮门槛时只显示这一行） */
.bob-shipping-free {
margin: 0;
font-size: 14px;
font-weight: 600;
color: var(--bob-text);
}

/* PayPal smart buttons on the custom cart summary. */
.bob-cart-v2__summary .ppc-button-wrapper {
margin-top: 14px;
}

.bob-cart-v2__summary #ppc-button-ppcp-gateway {
line-height: 0;
}



/* ==========================================================================
   Lightbox for user-uploaded PPOM images
   ========================================================================== */
body.bob-lightbox-open {
	overflow: hidden;
}

.bob-lightbox {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 2147483647;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(0, 0, 0, .86);
	-webkit-tap-highlight-color: transparent;
}

.bob-lightbox.is-open {
	display: flex;
}

.bob-lightbox__img {
	display: block;
	max-width: min(92vw, 900px);
	max-height: 88vh;
	width: auto;
	height: auto;
	object-fit: contain;
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
}

.bob-lightbox__close {
	position: absolute;
	top: 12px;
	right: 14px;
	display: grid;
	place-items: center;
	box-sizing: border-box;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, .14);
	color: #fff;
	font-size: 0;
	line-height: 1;
	cursor: pointer;
}

.bob-lightbox__close svg {
	display: block;
	width: 18px;
	height: 18px;
}

.bob-lightbox__close:hover,
.bob-lightbox__close:focus-visible {
	background: rgba(255, 255, 255, .28);
	outline: none;
}
