/* ── Wrapper ───────────────────────────────────────────────────────── */
.cct-os-wrap {
	width: 100%;
	display: flex;
	flex-direction: column;
}

.cct-os-header {
	display: flex;
	align-items: center;
	flex-shrink: 0;
	padding: 18px 20px;
	margin-bottom: 16px;
}

.cct-os-heading-wrap {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.cct-os-heading-icon {
	display: inline-flex;
	align-items: center;
	line-height: 1;
}

.cct-os-heading-icon svg {
	display: block;
	fill: currentColor;
}

.cct-os-heading {
	margin: 0;
	font-size: 1.1rem;
	font-weight: 600;
}

/* ── Items (mirrors cart-widget.css's .cct-item rules under .cct-os-*) ── */
.cct-os-items {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	scrollbar-width: none; /* Firefox */
	-ms-overflow-style: none; /* IE/legacy Edge */
}

.cct-os-items::-webkit-scrollbar {
	display: none; /* Chrome, Safari, WebKit Edge */
}

.cct-os-item {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 16px 20px;
	border-bottom: 1px solid #f0f0f0;
	position: relative;
	transition: opacity 0.2s;
}

.cct-os-item:last-child {
	border-bottom: none;
}

.cct-os-item.cct-os-item--loading {
	opacity: 0.4;
	pointer-events: none;
}

.cct-os-item-image {
	flex-shrink: 0;
}

.cct-os-item-image img {
	width: 70px;
	height: 70px;
	object-fit: cover;
	border-radius: 4px;
	display: block;
}

.cct-os-item-details {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.cct-os-item-name {
	font-size: 0.9rem;
	font-weight: 500;
	color: inherit;
	text-decoration: none;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.cct-os-item-name:hover {
	text-decoration: underline;
}

.cct-os-name-nowrap .cct-os-item-name {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	display: block;
	-webkit-line-clamp: unset;
	-webkit-box-orient: unset;
}

.cct-os-item-price-row {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.cct-os-item-price {
	font-size: 0.85rem;
	font-weight: 600;
}

.cct-os-item-price-old {
	font-size: 0.8rem;
	font-weight: 500;
	color: #999;
	text-decoration: line-through;
}

.cct-os-item-discount {
	display: inline-flex;
	align-items: center;
	font-size: 0.8rem;
	font-weight: 600;
	color: #2a9d5c;
	background-color: #e7f4e7;
	padding: 2px 8px;
	border-radius: 4px;
}

/* ── Quantity Controls ─────────────────────────────────────────────── */
.cct-os-qty-wrap {
	display: inline-flex;
	align-items: center;
	border: 1px solid #ddd;
	border-radius: 4px;
	overflow: hidden;
	background: #f7f7f7;
}

.cct-os-qty-btn {
	background: transparent;
	border: none;
	cursor: pointer;
	box-sizing: border-box;
	width: 28px;
	height: 28px;
	font-size: 1rem;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	color: inherit;
	transition: background 0.15s, color 0.15s, border-color 0.15s;
	padding: 0;
	flex-shrink: 0;
}

.cct-os-qty-btn svg {
	width: 1em;
	height: 1em;
	display: block;
	fill: currentColor;
}

.cct-os-qty-btn:hover {
	background: rgba( 0, 0, 0, 0.08 );
}

.cct-os-qty-input {
	width: 36px;
	border: 0;
	text-align: center;
	font-size: 0.85rem;
	background: transparent;
	height: 28px;
	-moz-appearance: textfield;
	padding: 0;
	color: inherit;
	outline: none;
}

.cct-os-qty-input::-webkit-outer-spin-button,
.cct-os-qty-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
}

/* ── Item Category ─────────────────────────────────────────────────── */
.cct-os-item-category {
	font-size: 0.75rem;
	color: #999;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

/* ── Quantity Row (beside_qty layout) ──────────────────────────────── */
.cct-os-qty-row {
	display: flex;
	align-items: center;
	gap: 8px;
}

/* ── Remove Button ─────────────────────────────────────────────────── */
.cct-os-remove {
	background: none;
	border: none;
	cursor: pointer;
	color: #999;
	padding: 4px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	flex-shrink: 0;
	transition: color 0.2s, background-color 0.2s, border-color 0.2s;
}

.cct-os-remove:hover {
	color: #e44;
}

.cct-os-remove-top_right > .cct-os-remove {
	align-self: flex-start;
}

.cct-os-remove-bottom_right > .cct-os-remove {
	align-self: flex-end;
}

.cct-os-empty {
	padding: 40px 20px;
	text-align: center;
	color: #999;
}

/* ── Footer Totals ─────────────────────────────────────────────────── */
.cct-os-footer {
	flex-shrink: 0;
}

.cct-os-footer-totals {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 16px 20px;
}

.cct-os-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 0.9rem;
}

.cct-os-subtotal-price-row {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.cct-os-subtotal-old {
	font-size: 0.8rem;
	font-weight: 500;
	color: #999;
	text-decoration: line-through;
}

.cct-os-discount-value {
	color: #2a9d5c;
	font-weight: 600;
}

.cct-os-total {
	font-size: 1.05rem;
	font-weight: 700;
	padding-top: 6px;
}
