/**
 * Shop (archive-product.php) + Single Product (single-product.php)
 *
 * Hand-authored plain CSS (not Tailwind-compiled) — safe to edit directly.
 * Brand: blue #009fc6 (hover #007a99), ink #161721, surface #f8f9fb.
 */

/* ══ Shop ═══════════════════════════════════════════════════════════════ */
.nism-shop-section {
	background: #f8f9fb;
	padding: 3rem 0 5rem;
}
.nism-shop-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 1rem;
}
@media (min-width: 768px) {
	.nism-shop-inner { padding: 0 2rem; }
}

/* Category pill filter bar */
.nism-filter-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 2rem;
}
.nism-filter-label {
	font-size: 0.85rem;
	font-weight: 700;
	color: #6b7280;
	margin-right: 0.35rem;
}
.nism-pill {
	appearance: none;
	border: 1px solid #e6e8ee;
	background: #fff;
	color: #374151;
	font-size: 0.85rem;
	font-weight: 600;
	padding: 0.45rem 1rem;
	border-radius: 999px;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.nism-pill:hover { border-color: #009fc6; color: #009fc6; }
.nism-pill.is-active {
	background: #009fc6;
	border-color: #009fc6;
	color: #fff;
}

/* Grid */
.nism-shop-grid-wrap { transition: opacity 0.15s ease; }
.nism-shop-grid-wrap.is-loading { opacity: 0.45; pointer-events: none; }

.nism-product-grid {
	display: grid;
	grid-template-columns: repeat(1, minmax(0, 1fr));
	gap: 1.25rem;
	align-items: stretch;
}
@media (min-width: 640px) { .nism-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .nism-product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.75rem; } }

.nism-product-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid #eef0f3;
	border-radius: 16px;
	overflow: hidden;
	text-decoration: none;
	box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 4px 14px rgba(16, 24, 40, 0.04);
	transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}
.nism-product-card:hover {
	transform: translateY(-3px);
	border-color: #d7dbe0;
	box-shadow: 0 10px 28px rgba(16, 24, 40, 0.1);
}
.nism-product-thumb {
	position: relative;
	aspect-ratio: 1 / 1;
	background: #f3f4f6;
	overflow: hidden;
}
.nism-product-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.nism-product-sale {
	position: absolute;
	top: 0.6rem;
	right: 0.6rem;
	background: #e69b3e;
	color: #fff;
	font-size: 0.68rem;
	font-weight: 700;
	padding: 0.2em 0.6em;
	border-radius: 999px;
}
.nism-product-body {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	padding: 1rem 1.1rem 1.25rem;
	flex: 1 1 auto;
}
.nism-product-title {
	margin: 0;
	font-size: 0.95rem;
	font-weight: 700;
	line-height: 1.35;
	color: #161721;
}
.nism-product-price {
	margin-top: auto;
	font-size: 1.05rem;
	font-weight: 800;
	color: #161721;
}
.nism-product-price del { color: #9ca3af; font-weight: 500; margin-right: 0.35rem; }
.nism-product-price ins { text-decoration: none; }

.nism-no-products {
	text-align: center;
	color: #6b7280;
	padding: 3rem 0;
}

/* Pagination */
.nism-pagination {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin-top: 2.5rem;
}
.nism-page {
	appearance: none;
	min-width: 40px;
	border: 1px solid #e6e8ee;
	background: #fff;
	color: #374151;
	font-size: 0.9rem;
	font-weight: 600;
	padding: 0.5rem 0.75rem;
	border-radius: 10px;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.nism-page:hover { border-color: #009fc6; color: #009fc6; }
.nism-page.is-current {
	background: #009fc6;
	border-color: #009fc6;
	color: #fff;
	cursor: default;
}

/* ══ Single product ════════════════════════════════════════════════════ */
.nism-single-product {
	background: #f8f9fb;
	/* Cover the collapsed-header spacer band (see single-job note). */
	margin-top: -40px;
	padding-top: 40px;
}
.nism-sp-wrap {
	max-width: 1120px;
	margin: 0 auto;
	padding: 1.5rem 1rem 4rem;
}
@media (min-width: 768px) {
	.nism-sp-wrap { padding: 2rem 2rem 5rem; }
}
.nism-sp-back {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	color: #6b7280;
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: none;
	margin-bottom: 1.5rem;
}
.nism-sp-back:hover { color: #009fc6; }

.nism-sp-top {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
	align-items: start;
}
@media (min-width: 900px) {
	.nism-sp-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3rem; }
}

.nism-sp-media {
	background: #fff;
	border: 1px solid #e6e8ee;
	border-radius: 20px;
	overflow: hidden;
	box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 24px rgba(16, 24, 40, 0.05);
}
.nism-sp-media img,
.nism-sp-image { width: 100%; height: auto; display: block; }

.nism-sp-title {
	margin: 0 0 0.85rem;
	font-size: 1.9rem;
	line-height: 1.15;
	font-weight: 800;
	color: #161721;
}
.nism-sp-short {
	color: #4b5563;
	font-size: 0.98rem;
	line-height: 1.65;
	margin-bottom: 1.25rem;
}
.nism-sp-short ul { margin: 0.5rem 0; padding-left: 1.25rem; }
.nism-sp-short li { margin: 0.3rem 0; }
.nism-sp-short p { margin: 0 0 0.6rem; }
.nism-sp-price {
	font-size: 1.9rem;
	font-weight: 800;
	color: #161721;
	margin-bottom: 1.25rem;
}
.nism-sp-price del { color: #9ca3af; font-weight: 500; font-size: 1.2rem; margin-right: 0.5rem; }
.nism-sp-price ins { text-decoration: none; }

/* Bundle contents */
.nism-sp-bundle {
	background: #fff;
	border: 1px solid #eef0f3;
	border-radius: 14px;
	padding: 1rem 1.25rem;
	margin-bottom: 1.25rem;
	box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}
.nism-sp-bundle-title {
	margin: 0 0 0.6rem;
	font-size: 0.85rem;
	font-weight: 700;
	color: #6b7280;
}
.nism-sp-bundle-row {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.5rem 0;
	border-top: 1px solid #f1f2f5;
}
.nism-sp-bundle-row:first-of-type { border-top: none; }
.nism-sp-bundle-thumb img { width: 34px; height: 34px; border-radius: 6px; object-fit: cover; display: block; }
.nism-sp-bundle-name { flex: 1 1 auto; font-size: 0.88rem; color: #374151; }
.nism-sp-bundle-price { font-size: 0.82rem; color: #9ca3af; white-space: nowrap; }

/* Add to cart (WooCommerce output, restyled) */
.nism-sp-cart .cart { margin: 0; display: block; }
.nism-sp-cart .quantity {
	display: inline-flex;
	align-items: center;
	margin: 0 0 0.85rem;
}
.nism-sp-cart .quantity input.qty {
	width: 80px;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	padding: 0.65rem 0.5rem;
	text-align: center;
	font-size: 1rem;
	color: #161721;
}
/* Hide the plugin's own bundle item list + running price — our clean
   "This Bundle Includes" list and the summary price replace them. The inputs
   stay in the DOM (display:none) so the bundle still adds to the cart. */
.nism-sp-cart .bundled_products,
.nism-sp-cart .bundle_price,
.nism-sp-cart .bundle_error,
.nism-sp-cart .woosb-wrap,
.nism-sp-cart .woosb-products,
.nism-sp-cart .woosb-total-wrap,
.nism-sp-cart .yith-wcpb-product-bundled-items,
.nism-sp-cart [class*="yith-wcpb-product-bundle"] { display: none !important; }
.nism-sp-cart button.single_add_to_cart_button,
.nism-sp-cart .single_add_to_cart_button.button,
.nism-sp-cart .cart button[type="submit"],
.nism-sp-cart .cart .button,
.nism-sp-cart .woosb-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	width: 100%;
	background: #009fc6;
	color: #fff;
	border: none;
	border-radius: 12px;
	padding: 0.9rem 1.25rem;
	font-weight: 700;
	font-size: 1rem;
	cursor: pointer;
	transition: background-color 0.15s ease;
}
.nism-sp-cart button.single_add_to_cart_button:hover,
.nism-sp-cart .single_add_to_cart_button.button:hover,
.nism-sp-cart .cart button[type="submit"]:hover,
.nism-sp-cart .cart .button:hover,
.nism-sp-cart .woosb-btn:hover { background: #007a99; }
.nism-sp-cart button.single_add_to_cart_button::before {
	content: "";
	width: 18px;
	height: 18px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8' cy='21' r='1'/%3E%3Ccircle cx='19' cy='21' r='1'/%3E%3Cpath d='M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12'/%3E%3C/svg%3E") no-repeat center / contain;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8' cy='21' r='1'/%3E%3Ccircle cx='19' cy='21' r='1'/%3E%3Cpath d='M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12'/%3E%3C/svg%3E") no-repeat center / contain;
}
/* Grouped-product add-to-cart table, if present */
.nism-sp-cart table.group_table { width: 100%; margin-bottom: 1rem; font-size: 0.9rem; }
.nism-sp-cart table.group_table td { padding: 0.4rem 0.5rem; border-top: 1px solid #f1f2f5; }

/* ══ Tabs (WooCommerce output, restyled) ═══════════════════════════════ */
.nism-sp-tabs { margin-top: 3rem; }
.nism-sp-tabs .woocommerce-tabs ul.tabs {
	display: flex;
	gap: 1.5rem;
	list-style: none;
	margin: 0 0 1.5rem;
	padding: 0 0 0;
	border-bottom: 1px solid #e6e8ee;
}
.nism-sp-tabs .woocommerce-tabs ul.tabs li {
	margin: 0;
	padding: 0;
	list-style: none;
}
.nism-sp-tabs .woocommerce-tabs ul.tabs li a {
	display: inline-block;
	padding: 0.6rem 0.15rem;
	font-weight: 700;
	font-size: 0.95rem;
	color: #6b7280;
	text-decoration: none;
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
}
.nism-sp-tabs .woocommerce-tabs ul.tabs li.active a,
.nism-sp-tabs .woocommerce-tabs ul.tabs li a:hover {
	color: #009fc6;
	border-bottom-color: #009fc6;
}
.nism-sp-tabs .woocommerce-Tabs-panel {
	color: #374151;
	line-height: 1.75;
	font-size: 0.96rem;
}
.nism-sp-tabs .woocommerce-Tabs-panel h2 { font-size: 1.15rem; font-weight: 700; color: #161721; margin: 1.5rem 0 0.75rem; }
.nism-sp-tabs .woocommerce-Tabs-panel p { margin: 0 0 1rem; }
.nism-sp-tabs .woocommerce-Tabs-panel strong { color: #161721; }
.nism-sp-tabs .woocommerce-Tabs-panel ul { margin: 0 0 1rem; padding-left: 1.25rem; }
.nism-sp-tabs .woocommerce-Tabs-panel li { margin: 0.3rem 0; }
.nism-sp-tabs .woocommerce-Tabs-panel a { color: #009fc6; text-decoration: none; }
.nism-sp-tabs .woocommerce-Tabs-panel a:hover { text-decoration: underline; }

/* ══ Reviews (WooCommerce output, restyled; star font from woocommerce-general) ══ */
.nism-sp-tabs #reviews h2 {
	font-size: 1.2rem;
	font-weight: 700;
	color: #161721;
	margin: 0 0 1.25rem;
}
.nism-sp-tabs .commentlist {
	list-style: none;
	margin: 0 0 2rem;
	padding: 0;
}
.nism-sp-tabs .commentlist li.review,
.nism-sp-tabs .commentlist li.comment {
	list-style: none;
	padding: 1.25rem 0;
	border-top: 1px solid #eef0f3;
}
.nism-sp-tabs .commentlist li:first-child { border-top: none; padding-top: 0; }
.nism-sp-tabs .comment_container {
	display: flex;
	gap: 1rem;
	align-items: flex-start;
}
.nism-sp-tabs .comment_container img.avatar {
	width: 46px;
	height: 46px;
	border-radius: 50%;
	margin: 0;
	flex-shrink: 0;
	background: #f3f4f6;
}
.nism-sp-tabs .comment-text { flex: 1 1 auto; min-width: 0; }
.nism-sp-tabs .comment-text .star-rating { margin: 0 0 0.4rem; font-size: 0.9rem; }
.nism-sp-tabs .comment-text p.meta {
	font-size: 0.9rem;
	color: #6b7280;
	margin: 0 0 0.5rem;
}
.nism-sp-tabs .comment-text .woocommerce-review__author { color: #161721; font-weight: 700; }
.nism-sp-tabs .comment-text .description { color: #374151; line-height: 1.7; }
.nism-sp-tabs .comment-text .description p { margin: 0 0 0.75rem; }

/* Review form */
.nism-sp-tabs #review_form_wrapper { max-width: 680px; }
.nism-sp-tabs .comment-reply-title {
	display: block;
	font-size: 1.05rem;
	font-weight: 700;
	color: #161721;
	margin: 0 0 1rem;
}
.nism-sp-tabs .comment-form { display: block; }
.nism-sp-tabs .comment-form label {
	display: inline-block;
	font-weight: 600;
	color: #374151;
	margin-bottom: 0.35rem;
}
.nism-sp-tabs .comment-form-rating { margin-bottom: 1rem; }
.nism-sp-tabs .comment-form textarea,
.nism-sp-tabs .comment-form input[type="text"],
.nism-sp-tabs .comment-form input[type="email"] {
	width: 100%;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	padding: 0.75rem 0.9rem;
	font-size: 0.95rem;
	color: #161721;
	margin-top: 0.25rem;
}
.nism-sp-tabs .comment-form textarea { min-height: 140px; resize: vertical; }
.nism-sp-tabs .comment-form textarea:focus,
.nism-sp-tabs .comment-form input:focus {
	outline: none;
	border-color: #009fc6;
	box-shadow: 0 0 0 3px rgba(0, 159, 198, 0.15);
}
.nism-sp-tabs .comment-form .form-submit { margin-top: 1rem; }
.nism-sp-tabs .comment-form .form-submit input.submit,
.nism-sp-tabs .comment-form input#submit {
	background: #009fc6;
	color: #fff;
	border: none;
	border-radius: 999px;
	padding: 0.75rem 1.85rem;
	font-weight: 700;
	font-size: 0.95rem;
	cursor: pointer;
	transition: background-color 0.15s ease;
}
.nism-sp-tabs .comment-form .form-submit input.submit:hover,
.nism-sp-tabs .comment-form input#submit:hover { background: #007a99; }

/* ══ WooCommerce notices ("… added to your cart", errors, info) ═══════════ */
.woocommerce-notices-wrapper:empty { margin: 0; }
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	list-style: none;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
	border-radius: 12px;
	padding: 0.85rem 1.15rem;
	margin: 0 0 1rem;
	font-size: 0.92rem;
	line-height: 1.4;
}
.woocommerce-message { background: #e6f5f8; border: 1px solid #b3e0ec; color: #007a99; }
.woocommerce-info    { background: #e8f5fa; border: 1px solid #bfe6f2; color: #0a7fa0; }
.woocommerce-error   { background: #fdecea; border: 1px solid #f5c2bd; color: #b3261e; }
/* Drop WooCommerce's absolutely-positioned ::before icon (it overlapped our text). */
.woocommerce-message::before,
.woocommerce-info::before,
.woocommerce-error::before { display: none !important; }
.woocommerce-error li { list-style: none; margin: 0; }
.woocommerce-message .button,
.woocommerce-info .button,
.woocommerce-message a.wc-forward {
	margin-left: auto;
	background: #009fc6;
	color: #fff;
	border-radius: 999px;
	padding: 0.4rem 1.1rem;
	font-weight: 700;
	font-size: 0.82rem;
	text-decoration: none;
	white-space: nowrap;
}
.woocommerce-message .button:hover,
.woocommerce-message a.wc-forward:hover { background: #007a99; color: #fff; }
/* Kill the default blue focus ring the notice/link gets after an AJAX add-to-cart.
   The message box is a programmatic-focus live region (no ring needed); the
   View-cart link gets a subtle on-brand ring for keyboard users instead. */
.woocommerce-message:focus { outline: none; }
.woocommerce-message .button:focus,
.woocommerce-message a.wc-forward:focus { outline: none; }
.woocommerce-message .button:focus-visible,
.woocommerce-message a.wc-forward:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(0, 159, 198, 0.35); }

/* ══ Cart: proceed-to-checkout button ════════════════════════════════════ */
.wc-proceed-to-checkout { margin-top: 1rem; }
.wc-proceed-to-checkout a.checkout-button,
a.checkout-button.button {
	display: block;
	width: 100%;
	text-align: center;
	background: #009fc6;
	color: #fff;
	border: none;
	border-radius: 999px;
	padding: 0.9rem 1.25rem;
	font-weight: 700;
	font-size: 1rem;
	text-decoration: none;
	transition: background-color 0.15s ease;
}
.wc-proceed-to-checkout a.checkout-button:hover { background: #007a99; color: #fff; }

/* ══ Cart page (cart.php) ═══════════════════════════════════════════════ */
.nism-cartpage {
	background: #f8f9fb;
	margin-top: -40px;   /* cover the collapsed-header spacer band */
	padding-top: 40px;
	min-height: 60vh;
}
.nism-cart-container {
	max-width: 1120px;
	margin: 0 auto;
	padding: 2rem 1rem 4rem;
}
@media (min-width: 768px) { .nism-cart-container { padding: 2.5rem 2rem 5rem; } }

.nism-cart-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1.5rem;
	flex-wrap: wrap;
}
.nism-cart-back {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	color: #6b7280;
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: none;
}
.nism-cart-back:hover { color: #009fc6; }
.nism-cart-title { margin: 0.35rem 0 0; font-size: 2rem; font-weight: 800; color: #161721; }
.nism-cart-clear {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	background: #fff;
	border: 1px solid #e6e8ee;
	border-radius: 999px;
	padding: 0.55rem 1.1rem;
	color: #4b5563;
	font-size: 0.85rem;
	font-weight: 600;
	text-decoration: none;
}
.nism-cart-clear:hover { color: #b3261e; border-color: #f5c2bd; }

.nism-cart-grid {
	display: grid;
	/* minmax(0,...) so the column can't be forced wider than the viewport by the
	   cart row's fixed-width children (which pushed the whole cart off-screen on mobile). */
	grid-template-columns: minmax(0, 1fr);
	gap: 1.5rem;
	align-items: start;
	margin: 0;
}
@media (min-width: 900px) {
	.nism-cart-grid { grid-template-columns: minmax(0, 1fr) 360px; gap: 2rem; }
}

/* Items card */
.nism-cart-items {
	background: #fff;
	border: 1px solid #eef0f3;
	border-radius: 20px;
	box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 24px rgba(16, 24, 40, 0.05);
	padding: 0.5rem 1.5rem;
}
.nism-cart-item {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 1.25rem 0;
	border-top: 1px solid #f1f2f5;
}
.nism-cart-item:first-of-type { border-top: none; }
.nism-cart-thumb { flex-shrink: 0; width: 64px; height: 64px; border-radius: 12px; overflow: hidden; background: #f3f4f6; }
.nism-cart-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nism-cart-info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 0.15rem; }
.nism-cart-name { margin: 0; font-size: 1rem; font-weight: 700; color: #161721; line-height: 1.3; }
.nism-cart-name a { color: inherit; text-decoration: none; }
.nism-cart-name a:hover { color: #009fc6; }
.nism-cart-type { font-size: 0.82rem; color: #9ca3af; }
.nism-cart-unit { font-size: 0.9rem; font-weight: 700; color: #374151; margin-top: 0.1rem; }

/* Quantity stepper */
.nism-cart-qty { flex-shrink: 0; }
.nism-stepper {
	display: inline-flex;
	align-items: center;
	border: 1px solid #e6e8ee;
	border-radius: 999px;
	overflow: hidden;
}
.nism-step {
	appearance: none;
	border: none;
	background: #fff;
	width: 34px;
	height: 36px;
	font-size: 1.1rem;
	line-height: 1;
	color: #374151;
	cursor: pointer;
}
.nism-step:hover { background: #f3f4f6; color: #009fc6; }
.nism-step-input {
	width: 40px;
	height: 36px;
	border: none;
	border-left: 1px solid #eef0f3;
	border-right: 1px solid #eef0f3;
	text-align: center;
	font-size: 0.95rem;
	color: #161721;
	-moz-appearance: textfield;
}
.nism-step-input::-webkit-outer-spin-button,
.nism-step-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.nism-qty-fixed { font-size: 0.95rem; font-weight: 600; color: #6b7280; }

/* Price + remove */
.nism-cart-line { flex-shrink: 0; display: flex; align-items: center; gap: 1rem; }
.nism-cart-line-price { font-size: 1rem; font-weight: 800; color: #161721; white-space: nowrap; }
.nism-cart-remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 8px;
	color: #ef4444;
	transition: background-color 0.15s ease;
}
.nism-cart-remove:hover { background: #fdecea; }

/* Mobile: wrap the cart line so it never runs off-screen — thumbnail + name/price
   on the first row, then the quantity stepper (left) and line total + remove
   (right) drop to a second row. */
@media (max-width: 640px) {
	.nism-cart-items { padding: 0.5rem 1rem; }
	.nism-cart-item { flex-wrap: wrap; }
	.nism-cart-line { margin-left: auto; }
}

/* Order summary */
.nism-cart-summary { position: sticky; top: 120px; }
.nism-summary-card {
	background: #fff;
	border: 1px solid #eef0f3;
	border-radius: 20px;
	box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 24px rgba(16, 24, 40, 0.05);
	padding: 1.75rem;
}
.nism-summary-title { margin: 0 0 1.25rem; font-size: 1.25rem; font-weight: 800; color: #161721; }
.nism-coupon { display: flex; gap: 0.5rem; margin-bottom: 1.25rem; }
.nism-coupon-input {
	flex: 1 1 auto;
	min-width: 0;
	border: 1px solid #e5e7eb;
	border-radius: 999px;
	padding: 0.6rem 1rem;
	font-size: 0.9rem;
	color: #161721;
}
.nism-coupon-input:focus { outline: none; border-color: #009fc6; box-shadow: 0 0 0 3px rgba(0, 159, 198, 0.15); }
.nism-coupon-apply {
	flex-shrink: 0;
	appearance: none;
	border: 1px solid #e6e8ee;
	background: #f8f9fb;
	border-radius: 999px;
	padding: 0.6rem 1.1rem;
	font-size: 0.85rem;
	font-weight: 700;
	color: #374151;
	cursor: pointer;
}
.nism-coupon-apply:hover { border-color: #009fc6; color: #009fc6; }
.nism-summary-row {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	font-size: 0.92rem;
	color: #6b7280;
	padding: 0.5rem 0;
}
.nism-summary-row span:last-child { color: #161721; font-weight: 600; }
.nism-summary-coupon span:last-child { color: #1a9c5b; }
.nism-summary-total {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	margin: 0.75rem 0 1.25rem;
	padding-top: 1rem;
	border-top: 1px solid #eef0f3;
	font-size: 1.15rem;
	font-weight: 800;
	color: #161721;
}
/* Proceed to checkout (WooCommerce button, restyled with arrow) */
.nism-summary-card .checkout-button,
.nism-summary-card a.checkout-button.button {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	width: 100%;
	background: #009fc6;
	color: #fff;
	border: none;
	border-radius: 999px;
	padding: 0.9rem 1.25rem;
	font-weight: 700;
	font-size: 1rem;
	text-decoration: none;
	transition: background-color 0.15s ease;
}
.nism-summary-card .checkout-button:hover { background: #007a99; color: #fff; }
.nism-summary-card .checkout-button::after { content: "\2192"; font-size: 1.1em; line-height: 1; }
.nism-summary-note { margin: 0.85rem 0 0; text-align: center; font-size: 0.8rem; color: #9ca3af; }

/* ══ Checkout (re-skin of the WooCommerce checkout) ═══════════════════════ */
.nism-checkout-back {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	color: #6b7280;
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: none;
	margin-bottom: 1.5rem;
}
.nism-checkout-back:hover { color: #009fc6; }

.nism-checkout-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.5rem;
	align-items: start;
}
@media (min-width: 900px) {
	.nism-checkout-grid { grid-template-columns: minmax(0, 1fr) 405px; gap: 2rem; }
}
/* Undo WooCommerce layout floats on the columns. */
.nism-checkout #customer_details,
.nism-checkout #order_review,
.nism-checkout .nism-checkout-side { float: none !important; width: auto !important; }
.nism-checkout-side { position: sticky; top: 120px; }

.nism-checkout-card,
.nism-order-card,
.nism-payment-card {
	background: #fff;
	border: 1px solid #eef0f3;
	border-radius: 20px;
	box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 24px rgba(16, 24, 40, 0.05);
	padding: 1.75rem;
	margin-bottom: 1.5rem;
}
#order_review { background: transparent; border: none; box-shadow: none; padding: 0; margin: 0; }
.nism-checkout-card h3,
.nism-order-title {
	margin: 0 0 1.25rem;
	font-size: 1.2rem;
	font-weight: 800;
	color: #161721;
}

/* Fields */
.nism-checkout .form-row { margin: 0 0 1rem; display: block; }
.nism-checkout .form-row label {
	display: block;
	font-size: 0.85rem;
	font-weight: 600;
	color: #374151;
	margin-bottom: 0.35rem;
}
.nism-checkout .form-row .required { color: #e11d48; border: 0; text-decoration: none; }
.nism-checkout .input-text,
.nism-checkout select,
.nism-checkout textarea {
	width: 100%;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	padding: 0.7rem 0.9rem;
	font-size: 0.95rem;
	color: #161721;
	background: #fff;
	box-sizing: border-box;
}
.nism-checkout .input-text:focus,
.nism-checkout select:focus,
.nism-checkout textarea:focus {
	outline: none;
	border-color: #009fc6;
	box-shadow: 0 0 0 3px rgba(0, 159, 198, 0.15);
}
@media (min-width: 560px) {
	.nism-checkout .form-row-first { float: left; width: 48%; }
	.nism-checkout .form-row-last { float: right; width: 48%; }
	.nism-checkout .woocommerce-billing-fields__field-wrapper::after,
	.nism-checkout .woocommerce-shipping-fields__field-wrapper::after,
	.nism-checkout .woocommerce-account-fields::after { content: ""; display: table; clear: both; }
	.nism-checkout .form-row-wide { clear: both; }
}
.nism-checkout #ship-to-different-address {
	font-size: 1.2rem;
	font-weight: 800;
	color: #161721;
	margin: 0 0 1rem;
}
.nism-checkout #ship-to-different-address label {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-weight: 800;
	margin: 0;
}

/* Order review table */
.woocommerce-checkout-review-order-table { border-collapse: collapse; width: 100%; font-size: 0.9rem; }
.woocommerce-checkout-review-order-table th,
.woocommerce-checkout-review-order-table td { padding: 0.55rem 0; text-align: left; border: none; }
.woocommerce-checkout-review-order-table tbody tr,
.woocommerce-checkout-review-order-table .cart-subtotal { border-bottom: 1px solid #f1f2f5; }
.woocommerce-checkout-review-order-table .product-total,
.woocommerce-checkout-review-order-table td { text-align: right; }
.woocommerce-checkout-review-order-table .product-name { text-align: left; color: #374151; }
.woocommerce-checkout-review-order-table .order-total th,
.woocommerce-checkout-review-order-table .order-total td {
	padding-top: 0.85rem;
	font-size: 1.1rem;
	font-weight: 800;
	color: #161721;
}

/* Payment card */
/* Payment now lives in its own card with an <h3> heading, so drop the pseudo-title. */
#payment::before { display: none !important; }
.nism-payment-card #payment {
	background: transparent !important;
	border: none;
	box-shadow: none;
	padding: 0;
	margin: 0;
}
#payment .wc_payment_methods { list-style: none; margin: 0 0 1rem; padding: 0; }
#payment .wc_payment_methods li { list-style: none; margin: 0 0 0.5rem; }
#payment .wc_payment_method > label { font-weight: 600; color: #161721; }
#payment .payment_box {
	background: #f8f9fb;
	border-radius: 12px;
	padding: 1rem;
	margin-top: 0.5rem;
	font-size: 0.88rem;
	color: #4b5563;
}
#payment .place-order { margin-top: 1rem; padding: 0; }
.nism-checkout #place_order,
#payment #place_order {
	width: 100%;
	background: #009fc6 !important;
	color: #fff !important;
	border: none !important;
	border-radius: 12px !important;
	padding: 0.95rem 1.25rem !important;
	font-weight: 700 !important;
	font-size: 1rem !important;
	cursor: pointer;
	float: none !important;
}
.nism-checkout #place_order:hover { background: #007a99 !important; }

/* Coupon — a compact inline field rendered as a row in the order-review table,
   between the last product and the subtotal. */
.nism-coupon-row td { padding: 0.85rem 0 0.35rem !important; border: 0 !important; }
.nism-checkout-coupon { display: flex; gap: 0.4rem; margin: 0; }
.nism-checkout-coupon .nism-coupon-input { padding: 0.45rem 0.85rem; font-size: 0.82rem; }
.nism-checkout-coupon .nism-coupon-apply { padding: 0.45rem 1.05rem; font-size: 0.82rem; }

/* ══ Checkout refinements ════════════════════════════════════════════════ */
/* Payment sits inside the Order Summary card as a divided section. */
.nism-checkout #order_review #payment {
	background: transparent !important;
	border: none;
	box-shadow: none;
	padding: 1.5rem 0 0;
	margin: 1.5rem 0 0;
	border-top: 1px solid #eef0f3;
}
.woocommerce-checkout-review-order-table { margin-bottom: 0; }

/* Lighter field borders (override WooCommerce core, which was darker). */
.nism-checkout .input-text,
.nism-checkout select,
.nism-checkout textarea { border-color: #eef0f3 !important; }
.nism-checkout .select2-container--default .select2-selection--single {
	border: 1px solid #eef0f3 !important;
	border-radius: 12px !important;
	height: auto !important;
	min-height: 44px;
	padding: 0.35rem 0.4rem !important;
	display: flex;
	align-items: center;
}

/* Neutralise WooCommerce's purple payment styling. */
.nism-checkout #payment .payment_box {
	background: #f8f9fb !important;
	border: 1px solid #eef0f3 !important;
	color: #4b5563;
}
.nism-checkout #payment .payment_box::before { display: none !important; }
.nism-checkout #payment ul.payment_methods { border: none !important; }
.nism-checkout #payment .wc_payment_method > label { color: #161721; }
.nism-checkout input[type="radio"],
.nism-checkout input[type="checkbox"] { accent-color: #009fc6; }
.nism-checkout a { color: #009fc6; }

/* ══ Cart: blocking overlay while a quantity update is in flight ══════════ */
.nism-cart { position: relative; }
.nism-cart.is-updating::before {
	content: "";
	position: absolute;
	inset: -8px;
	z-index: 30;
	background: rgba(248, 249, 251, 0.6);
	cursor: wait;
	border-radius: 20px;
}
.nism-cart.is-updating::after {
	content: "";
	position: fixed;
	/* Offset-centered (not transform-centered) so the rotate animation doesn't
	   fight the centering — that caused the diagonal glitch. */
	top: calc(50% - 18px);
	left: calc(50% - 18px);
	z-index: 31;
	width: 36px;
	height: 36px;
	border: 3px solid rgba(0, 159, 198, 0.25);
	border-top-color: #009fc6;
	border-radius: 50%;
	animation: nism-spin 0.6s linear infinite;
	pointer-events: none;
}
@keyframes nism-spin { to { transform: rotate(360deg); } }

/* ══ Checkout Order Summary — match design (no table headers, clean rows) ══ */
.woocommerce-checkout-review-order-table thead { display: none; }
.woocommerce-checkout-review-order-table,
.woocommerce-checkout-review-order-table td,
.woocommerce-checkout-review-order-table th {
	border: none !important;
	background: transparent !important;
}
.woocommerce-checkout-review-order-table td,
.woocommerce-checkout-review-order-table th { padding: 0.4rem 0 !important; }
.woocommerce-checkout-review-order-table .product-name { color: #4b5563; text-align: left; font-weight: 500; }
.woocommerce-checkout-review-order-table .product-quantity { color: #6b7280; font-weight: 500; }
.woocommerce-checkout-review-order-table .product-total { color: #161721; font-weight: 700; text-align: right; }
.woocommerce-checkout-review-order-table tfoot th { text-align: left; color: #6b7280; font-weight: 500; }
.woocommerce-checkout-review-order-table tfoot td { text-align: right; color: #161721; font-weight: 600; }
.woocommerce-checkout-review-order-table tfoot .cart-subtotal th,
.woocommerce-checkout-review-order-table tfoot .cart-subtotal td { border-top: 1px solid #eef0f3 !important; padding-top: 0.9rem !important; }
.woocommerce-checkout-review-order-table tfoot .order-total th,
.woocommerce-checkout-review-order-table tfoot .order-total td {
	border-top: 1px solid #eef0f3 !important;
	padding-top: 0.9rem !important;
	font-size: 1.15rem;
	font-weight: 800;
	color: #161721;
}

/* ══ Payment card — all white, Stripe fields bordered like billing ════════ */
.nism-payment-card .nism-order-title { display: inline-flex; align-items: center; gap: 0.5rem; }
.nism-payment-card #payment,
.nism-payment-card #payment .payment_box {
	background: #fff !important;
	border: none !important;
	box-shadow: none !important;
	padding: 0 !important;
	margin: 0 !important;
}
.nism-payment-card #payment .payment_box::before { display: none !important; }
.nism-payment-card #payment ul.payment_methods { border: none !important; margin: 0 0 0.5rem; padding: 0; }
.nism-payment-card .wc-stripe-elements-field,
.nism-payment-card .wc-stripe-iban-element-field,
.nism-payment-card .StripeElement,
.nism-payment-card #wc-stripe-card-element,
.nism-payment-card #wc-stripe-exp-element,
.nism-payment-card #wc-stripe-cvc-element,
.nism-payment-card #payment .wc-credit-card-form .input-text {
	background: #fff !important;
	border: 1px solid #eef0f3 !important;
	border-radius: 12px !important;
	padding: 0.85rem 0.9rem !important;
	box-shadow: none !important;
}

/* Place Order button — lock icon + brand blue + helper line */
.nism-checkout #place_order {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
}
.nism-checkout #place_order::before {
	content: "";
	width: 16px;
	height: 16px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E") no-repeat center / contain;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E") no-repeat center / contain;
}
.nism-checkout-helper { text-align: center; font-size: 0.85rem; color: #9ca3af; margin: 1rem 0 0; }

/* Newer Stripe "Payment Element" (UPE) — keep its container white (no tint).
   Stripe styles the field internals itself; we only ensure the surround is clean. */
.nism-payment-card .wc-stripe-upe-element,
.nism-payment-card #wc-stripe-upe-element,
.nism-payment-card .wc-stripe-payment-element,
.nism-payment-card .payment_method_stripe .payment_box { background: #fff !important; }

/* Edu-partner landing page: the products sit on a WHITE section (so the
   partner's white-background logo above them blends cleanly), so give each card
   a stronger drop shadow to keep it from looking flat. Scoped to this page. */
.nism-edu-landing .nism-product-card {
	box-shadow: 0 2px 6px rgba(16, 24, 40, 0.06), 0 10px 28px rgba(16, 24, 40, 0.10);
}
.nism-edu-landing .nism-product-card:hover {
	box-shadow: 0 14px 36px rgba(16, 24, 40, 0.16);
}
