/* ---------- Layout reset: beat theme flex/grid rules that are applied to form.cart ---------- */
.woocommerce div.product form.cart.wccb-form,
form.cart.wccb-form {
	display: block !important;
	width: 100% !important;
	max-width: 100% !important;
	float: none !important;
	margin: 0 0 1.5em !important;
	box-sizing: border-box;
	container-type: inline-size;
	--wccb-accent: #1d1d1f;
	--wccb-border: rgba(0, 0, 0, .14);
}
form.cart.wccb-form *,
form.cart.wccb-form *::before,
form.cart.wccb-form *::after { box-sizing: border-box; }
form.cart.wccb-form > * { width: 100%; max-width: 100%; margin-left: 0; margin-right: 0; }

/* ---------- Component list / grid ---------- */
.wccb-components { display: grid; gap: 12px; margin: 0 0 16px; padding: 0; }
.wccb-layout-list .wccb-components { grid-template-columns: minmax(0, 1fr); }
.wccb-layout-grid .wccb-components { grid-template-columns: repeat(var(--wccb-cols, 3), minmax(0, 1fr)); }

@container (max-width: 560px) {
	.wccb-layout-grid .wccb-components { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container (max-width: 260px) {
	.wccb-layout-grid .wccb-components { grid-template-columns: minmax(0, 1fr); }
}
@supports not (container-type: inline-size) {
	@media (max-width: 700px) { .wccb-layout-grid .wccb-components { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
	@media (max-width: 340px) { .wccb-layout-grid .wccb-components { grid-template-columns: minmax(0, 1fr); } }
}

.wccb-component {
	position: relative;
	min-width: 0;
	padding: 12px;
	border: 1px solid var(--wccb-border);
	border-radius: 10px;
	background: #fff;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.wccb-component.wccb-optional:not(.is-off) { border-color: var(--wccb-accent); box-shadow: 0 0 0 1px var(--wccb-accent); }
.wccb-component.is-off .wccb-body { display: none; }
.wccb-component.is-off .wccb-thumb { opacity: .6; }

/* Card header (list layout) */
.wccb-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.wccb-pick { flex: 0 0 auto; display: flex; align-items: center; }
.wccb-pick input.wccb-check { width: 20px; height: 20px; margin: 0; cursor: pointer; accent-color: var(--wccb-accent); }
.wccb-thumb { flex: 0 0 60px; width: 60px; height: 60px; display: block; margin: 0; border-radius: 8px; overflow: hidden; background: #f1f1f1; }
label.wccb-thumb { cursor: pointer; }
.wccb-thumb img { display: block; width: 100%; height: 100%; margin: 0; object-fit: cover; }
.wccb-info { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; overflow-wrap: anywhere; }
.wccb-title { font-weight: 600; line-height: 1.3; margin: 0; }
label.wccb-title { cursor: pointer; }
.wccb-sub { font-size: .85em; line-height: 1.3; opacity: .7; }
.wccb-badge { display: inline-block; font-size: .68em; font-weight: 600; line-height: 1; text-transform: uppercase; letter-spacing: .05em; padding: 4px 9px; border-radius: 999px; border: 1px solid transparent; }
.wccb-badge--required { background: var(--wccb-accent); color: #fff; }
.wccb-badge--optional { background: transparent; color: var(--wccb-accent); border-color: var(--wccb-accent); }
.wccb-price { flex: 0 0 auto; margin-left: auto; font-weight: 600; text-align: right; white-space: nowrap; }
.wccb-price del { opacity: .55; font-weight: 400; }

@container (max-width: 380px) {
	.wccb-layout-list .wccb-head { flex-wrap: wrap; }
	.wccb-layout-list .wccb-price { flex-basis: 100%; margin-left: 0; text-align: left; }
}

/* Grid layout: vertical product cards */
.wccb-layout-grid .wccb-head { flex-direction: column; align-items: stretch; gap: 10px; }
.wccb-layout-grid .wccb-thumb { flex: none; width: 100%; height: auto; aspect-ratio: 1 / 1; }
.wccb-layout-grid .wccb-pick { position: absolute; top: 18px; left: 18px; z-index: 2; padding: 4px; border-radius: 6px; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); }
.wccb-layout-grid .wccb-price { margin-left: 0; text-align: left; white-space: normal; }

/* Variation dropdowns + quantity row */
.wccb-body { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--wccb-border); display: grid; gap: 8px; }
.wccb-attr-row { display: grid; grid-template-columns: 110px minmax(0, 1fr); align-items: center; gap: 8px; }
.wccb-attr-row label { margin: 0; font-size: .9em; font-weight: 600; }
.wccb-attr-row select { width: 100%; max-width: 100%; margin: 0; }
.wccb-attr-row--solo { grid-template-columns: minmax(0, 1fr); }
.wccb-attr-row--solo > label { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.wccb-attr-row--solo select { width: 100% !important; max-width: 100% !important; }
.wccb-layout-grid .wccb-attr-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
@container (max-width: 380px) {
	.wccb-attr-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}
.wccb-note { display: none; margin: 8px 0 0; font-size: .85em; color: #b32d2e; }
.wccb-show-errors .wccb-note:not(:empty) { display: block; }
.wccb-show-errors .wccb-component.has-error { border-color: #b32d2e; box-shadow: 0 0 0 1px #b32d2e; }

/* Component quantity stepper */
.wccb-stepper { display: inline-flex; align-items: stretch; width: max-content; border: 1px solid rgba(0, 0, 0, .25); border-radius: 8px; overflow: hidden; background: #fff; }
.wccb-stepper .wccb-qbtn {
	width: 36px; min-height: 36px; margin: 0 !important; padding: 0 !important;
	border: 0 !important; border-radius: 0 !important; box-shadow: none !important;
	background: #f1f1f1 !important; color: #1d1d1f !important;
	font-size: 18px; line-height: 1; cursor: pointer;
}
.wccb-stepper .wccb-qbtn:hover { background: #e4e4e4 !important; }
.wccb-stepper input.wccb-qty-input {
	width: 54px; min-height: 36px; height: auto; margin: 0 !important; padding: 4px !important;
	border: 0 !important; border-left: 1px solid rgba(0, 0, 0, .15) !important; border-right: 1px solid rgba(0, 0, 0, .15) !important; border-radius: 0 !important;
	background: transparent !important; box-shadow: none !important; text-align: center; -moz-appearance: textfield; appearance: textfield;
}
.wccb-stepper input.wccb-qty-input::-webkit-outer-spin-button,
.wccb-stepper input.wccb-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Size dropdown (above the components) */
.wccb-sizebox { margin: 0 0 14px; padding: 12px; border: 1px solid var(--wccb-border); border-radius: 10px; background: #fff; }
.wccb-sizebox label { display: block; margin: 0 0 6px; font-weight: 600; }
.wccb-sizebox .wccb-req { color: #b32d2e; }
.wccb-sizebox select { width: 100%; max-width: 100%; margin: 0; }
.wccb-show-errors .wccb-sizebox.has-error { border-color: #b32d2e; box-shadow: 0 0 0 1px #b32d2e; }

/* ---------- Summary ---------- */
.wccb-summary { margin: 0 0 16px; padding: 14px; border-radius: 10px; background: rgba(0, 0, 0, .04); }
.wccb-lines { list-style: none; margin: 0 0 8px; padding: 0; font-size: .9em; }
.wccb-lines li { display: flex; justify-content: space-between; gap: 12px; margin: 0; padding: 3px 0; }
.wccb-line-name { min-width: 0; overflow-wrap: anywhere; }
.wccb-line-price { flex: 0 0 auto; white-space: nowrap; }
.wccb-total { display: flex; justify-content: space-between; gap: 12px; padding-top: 10px; border-top: 1px solid var(--wccb-border); font-size: 1.15em; font-weight: 700; }
.wccb-msg { display: none; margin: 8px 0 0; font-size: .85em; color: #b32d2e; }
.wccb-show-errors .wccb-msg:not(:empty) { display: block; }

/* ---------- Quantity + Add to cart ---------- */
.wccb-buy { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.wccb-buy .wccb-qty { width: auto; flex: 0 0 auto; display: flex; flex-direction: column; gap: 4px; }
.wccb-qty-label { font-size: .85em; font-weight: 600; }
.wccb-buy .quantity { float: none !important; margin: 0 !important; }
.wccb-buy .quantity input.qty { width: 88px !important; min-height: 46px; height: 46px; margin: 0; text-align: center; border-radius: 8px; }
.wccb-buy .wccb-add { flex: 1 1 180px; width: auto; min-height: 46px; margin: 0 !important; float: none !important; }
.wccb-add.disabled, .wccb-add:disabled { opacity: .5; cursor: not-allowed; }

/* Player name field (above the components) */
.wccb-playerbox { margin: 0 0 14px; padding: 12px; border: 1px solid var(--wccb-border); border-radius: 10px; background: #fff; }
.wccb-playerbox label { display: block; margin: 0 0 6px; font-weight: 600; }
.wccb-playerbox .wccb-req { color: #b32d2e; }
.wccb-playerbox input[type="text"] { width: 100%; max-width: 100%; margin: 0; box-sizing: border-box; }
.wccb-show-errors .wccb-playerbox.has-error { border-color: #b32d2e; box-shadow: 0 0 0 1px #b32d2e; }
