.kio-store {
	margin: 24px 0;
}

/* Store intro / welcome message (fully editable from the admin) */
.kio-store__intro {
	margin-bottom: 24px;
	padding-bottom: 16px;
	border-bottom: 1px solid #ddd;
}

.kio-store__intro a {
	color: #2c5f8a;
	font-weight: 600;
}

.kio-store__intro a:hover {
	text-decoration: underline;
}

.kio-store__catalog {
	max-width: 900px;
}

.kio-store__section {
	margin-bottom: 40px;
	padding-top: 8px;
	scroll-margin-top: 20px;
}

.kio-store__section-header {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	border-bottom: 2px solid #eee;
	padding-bottom: 6px;
	margin-bottom: 8px;
}

.kio-store__section-title {
	margin: 0;
	border-bottom: none;
	padding-bottom: 0;
}

.kio-store__jump-to-cart {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 13px;
	font-weight: 600;
	color: #2c5f8a;
	text-decoration: none;
	white-space: nowrap;
}

.kio-store__jump-to-cart:hover {
	text-decoration: underline;
}

.kio-store__back-link {
	display: none;
	align-items: center;
	gap: 5px;
	font-size: 13px;
	font-weight: 600;
	color: #2c5f8a;
	text-decoration: none;
	margin-bottom: 10px;
}

.kio-store__back-link.kio-visible {
	display: inline-flex;
}

.kio-store__back-link:hover {
	text-decoration: underline;
}

.kio-store__section-content {
	margin-bottom: 12px;
}

.kio-store__section-content img {
	max-width: 100%;
	height: auto;
}

.kio-store__table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 8px;
}

.kio-store__table td {
	padding: 10px 6px;
	border-bottom: 1px solid #eee;
	vertical-align: middle;
}

.kio-store__name {
	position: relative;
}

.kio-store__in-cart-hint {
	min-height: 22px;
	margin-top: 4px;
}

.kio-cart-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: #3B6D11;
	color: #ffffff;
	font-size: 12px;
	font-weight: 600;
	padding: 3px 10px;
	border-radius: 999px;
}

/* Quantity stepper (catalog rows and cart rows) */
.kio-store__stepper {
	display: inline-flex;
	align-items: center;
	border: 1px solid #ccc;
	border-radius: 4px;
	overflow: hidden;
	width: fit-content;
}

.kio-store__stepper-btn {
	background: #f0f0f0;
	border: none;
	width: 28px;
	height: 28px;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	color: #333;
}

.kio-store__stepper-btn:hover {
	background: #e2e2e2;
}

.kio-store__qty-input {
	width: 44px;
	border: none;
	text-align: center;
	-moz-appearance: textfield;
	height: 28px;
}

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

/* Add to cart button + "Added" feedback state */
.kio-store__add-btn {
	background: #2c5f8a;
	color: #fff;
	border: none;
	border-radius: 4px;
	padding: 7px 16px;
	cursor: pointer;
	font-weight: 600;
	min-width: 110px;
	transition: background-color 0.2s ease, transform 0.15s ease;
}

.kio-store__add-btn:hover {
	background: #1f4a6d;
}

.kio-store__add-btn:disabled {
	opacity: 0.7;
	cursor: default;
}

.kio-store__add-btn.kio-added {
	background: #2e9e4f;
	transform: scale(1.04);
}

/* ===== Sidebar cart / checkout (the one true cart, lives in the theme's sidebar widget) ===== */

.kio-sidebar-cart {
	font-size: 14px;
	transition: background-color 0.3s ease;
}

.kio-sidebar-cart.kio-cart-flash {
	background-color: #e7f3ea;
}

.kio-cart-items-list {
	margin-bottom: 4px;
}

.kio-store__cart-empty {
	color: #777;
	font-style: italic;
	font-size: 14px;
	margin: 8px 0;
}

.kio-cart-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 7px 0;
	border-bottom: 1px solid #e5e5e5;
}

.kio-cart-item:last-child {
	border-bottom: none;
}

.kio-cart-item__name {
	flex: 1;
	min-width: 0;
	font-size: 12px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.kio-store__stepper--mini {
	flex-shrink: 0;
}

.kio-store__stepper--mini .kio-store__stepper-btn {
	width: 18px;
	height: 18px;
	font-size: 11px;
}

.kio-store__stepper--mini .kio-store__qty-input {
	width: 22px;
	height: 18px;
	font-size: 11px;
}

.kio-cart-item__total {
	flex-shrink: 0;
	font-weight: 600;
	font-size: 12px;
	white-space: nowrap;
	width: 52px;
	text-align: right;
}

.kio-store__cart-remove {
	flex-shrink: 0;
	background: none;
	border: none;
	color: #999;
	font-size: 12px;
	line-height: 1;
	padding: 2px;
	cursor: pointer;
}

.kio-store__cart-remove:hover {
	color: #a33;
}

.kio-store__subtotal,
.kio-store__total {
	font-weight: bold;
	margin: 12px 0 4px;
}

#kio-ship-result {
	font-weight: 600;
	color: #2c5f8a;
}

/* Checkout page: card-based sections instead of one long padded form */
.kio-checkout-card {
	background: #fff;
	border: 1px solid #e2e2e2;
	border-radius: 10px;
	padding: 16px 18px;
	margin-bottom: 14px;
}

.kio-checkout-card h4 {
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: #888;
	margin: 0 0 12px;
}

.kio-checkout-card label {
	display: block;
	font-size: 12px;
	color: #555;
	margin: 10px 0 4px;
}

.kio-checkout-card label:first-of-type {
	margin-top: 0;
}

.kio-checkout-card select,
.kio-checkout-card input[type="text"],
.kio-checkout-card input[type="email"] {
	width: 100%;
	box-sizing: border-box;
	padding: 8px 10px;
	font-size: 14px;
	border: 1px solid #ccc;
	border-radius: 6px;
}

.kio-checkout-field-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 12px;
}

.kio-checkout-field-grid > div {
	min-width: 0;
}

/* Read-only order summary rows — a report, not an editable list */
.kio-checkout-summary-list {
	margin-bottom: 4px;
}

.kio-checkout-summary-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
	padding: 8px 0;
	border-bottom: 1px solid #eee;
}

.kio-checkout-summary-row:last-child {
	border-bottom: none;
}

.kio-checkout-summary-row__name {
	font-size: 14px;
	display: block;
}

.kio-checkout-summary-row__meta {
	font-size: 12px;
	color: #888;
	display: block;
	margin-top: 1px;
}

.kio-checkout-summary-row__total {
	font-size: 14px;
	font-weight: 600;
	white-space: nowrap;
}

.kio-checkout-totals-row {
	display: flex;
	justify-content: space-between;
	font-size: 13px;
	color: #555;
	padding-top: 8px;
}

.kio-checkout-totals-row:first-of-type {
	border-top: 1px solid #e2e2e2;
	margin-top: 6px;
}

.kio-checkout-total-row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	font-weight: 600;
	font-size: 18px;
	padding: 4px 2px 6px;
}

.kio-checkout-errors {
	background: #fdecea;
	border: 1px solid #f2b8b5;
	color: #7a2a26;
	font-size: 12px;
	padding: 8px 10px;
	border-radius: 4px;
	margin-top: 10px;
	transition: box-shadow 0.2s ease;
}

.kio-checkout-errors--flash {
	box-shadow: 0 0 0 3px rgba(210, 60, 60, 0.35);
}

.kio-checkout-pay-btn {
	display: block;
	width: 100%;
	background: #2c5f8a;
	color: #fff;
	border: none;
	border-radius: 4px;
	padding: 10px 14px;
	font-weight: 600;
	font-size: 14px;
	cursor: pointer;
	margin-top: 14px;
}

.kio-checkout-pay-btn:hover {
	background: #1f4a6d;
}

.kio-checkout-pay-btn:disabled {
	opacity: 0.7;
	cursor: default;
}

#kio-paypal-button-container {
	margin-top: 10px;
	min-height: 45px;
	transition: opacity 0.15s ease;
}

#kio-checkout-payment-hint {
	font-size: 12px;
	color: #888;
	font-style: italic;
	margin-top: 8px;
}

#kio-checkout-status {
	font-size: 12px;
	color: #666;
	margin-top: 6px;
}

.kio-order-confirmation {
	text-align: center;
	background: #eaf3de;
	border: 1px solid #c0dd97;
	border-radius: 8px;
	padding: 32px 24px;
}

.kio-order-confirmation__icon {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: #3B6D11;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 16px;
}

.kio-order-confirmation__heading {
	font-size: 22px;
	font-weight: 700;
	color: #173404;
	margin: 0 0 6px;
}

.kio-order-confirmation__order-number {
	font-size: 15px;
	font-weight: 600;
	color: #27500A;
	margin: 0 0 4px;
}

.kio-order-confirmation__total {
	font-size: 14px;
	color: #27500A;
	margin: 0 0 14px;
}

.kio-order-confirmation__note {
	font-size: 13px;
	color: #3B6D11;
	margin: 0;
}

/* Dedicated checkout page ([kio_checkout]) */
.kio-checkout-page {
	max-width: 480px;
	margin: 24px 0;
}

.kio-checkout-page h2 {
	margin-top: 0;
}

@media (max-width: 420px) {
	.kio-checkout-field-grid {
		grid-template-columns: 1fr;
	}
}
