/**
 * Matezex Cart & Checkout styles.
 * All selectors prefixed with .matezex-cart to override WP/Hello Elementor theme.
 *
 * Colors: #004cfe (blue), #0a0d0f (dark), #ecf0f3 (bg), #d9e1e7 (header bg),
 *         #c2cdd6 (border/btn), #52697a (secondary text), #eff2f5 (light)
 *
 * @package Matezex_Catalog_Mode
 */

/* =========================================================================
   Cart table
   ========================================================================= */

.matezex-cart .matezex-cart-table {
	width: 100% !important;
	border-collapse: collapse !important;
	border-spacing: 0 !important;
	font-size: 14px !important;
}

/* --- Blue title row --- */
.matezex-cart .matezex-cart-title-row th {
	background: #004cfe !important;
	background-color: #004cfe !important;
	color: #fff !important;
	font-size: 18px !important;
	font-weight: 500 !important;
	padding: 8px 16px !important;
	text-align: left !important;
	line-height: 40px !important;
	border: none !important;
	border-radius: 16px 16px 0 0 !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
}

/* --- Column header row --- */
.matezex-cart .matezex-cart-columns-row th {
	background: #d9e1e7 !important;
	background-color: #d9e1e7 !important;
	color: #000f26 !important;
	font-size: 14px !important;
	font-weight: 500 !important;
	padding: 16px 24px !important;
	text-align: left !important;
	border: none !important;
	border-bottom: 1px solid #fff !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
}

/* --- Body cells --- */
.matezex-cart .matezex-cart-row td {
	padding: 16px 24px !important;
	border: none !important;
	border-bottom: 1px solid #fff !important;
	vertical-align: middle !important;
	background: #ecf0f3 !important;
	background-color: #ecf0f3 !important;
}

.matezex-cart .matezex-cart-row:hover td {
	background: #e4eaf0 !important;
	background-color: #e4eaf0 !important;
}

/* --- Column sizing --- */
.matezex-cart .matezex-cart-col-product {
	min-width: 200px !important;
}

.matezex-cart .matezex-cart-col-qty {
	width: 1% !important;
	white-space: nowrap !important;
}

.matezex-cart .matezex-cart-col-remove {
	width: 1% !important;
	white-space: nowrap !important;
	text-align: right !important;
}

/* --- Product name + SKU --- */
.matezex-cart .matezex-cart-product-name {
	display: block !important;
	font-size: 14px !important;
	font-weight: 500 !important;
	color: #0a0d0f !important;
	line-height: 1.4 !important;
	text-decoration: none !important;
}

.matezex-cart .matezex-cart-sku {
	display: block !important;
	font-size: 16px !important;
	font-weight: 400 !important;
	color: #000f26 !important;
	margin-top: 4px !important;
}

/* =========================================================================
   Quantity control  —  [−] [qty] [+]
   ========================================================================= */

.matezex-cart .matezex-cart-qty-control {
	display: inline-flex !important;
	align-items: center !important;
	flex-direction: row !important;
	flex-wrap: nowrap !important;
	background: #fff !important;
	background-color: #fff !important;
	border-radius: 9999px !important;
	height: 36px !important;
	gap: 0 !important;
	width: auto !important;
}

.matezex-cart button.matezex-cart-qty-minus,
.matezex-cart button.matezex-cart-qty-plus {
	width: 36px !important;
	height: 36px !important;
	min-width: 36px !important;
	min-height: 36px !important;
	max-width: 36px !important;
	max-height: 36px !important;
	padding: 0 !important;
	margin: 0 !important;
	border: none !important;
	cursor: pointer !important;
	font-size: 0 !important;
	line-height: 1 !important;
	border-radius: 9999px !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	flex-shrink: 0 !important;
	box-shadow: none !important;
	outline: none !important;
	transition: background 0.15s ease !important;
	box-sizing: border-box !important;
}

.matezex-cart button.matezex-cart-qty-minus {
	background: #c2cdd6 !important;
	background-color: #c2cdd6 !important;
	color: #0a0d0f !important;
}

.matezex-cart button.matezex-cart-qty-minus:hover,
.matezex-cart button.matezex-cart-qty-minus:focus {
	background: #a8b8c5 !important;
	background-color: #a8b8c5 !important;
	color: #0a0d0f !important;
}

.matezex-cart button.matezex-cart-qty-plus {
	background: #0a0d0f !important;
	background-color: #0a0d0f !important;
	color: #fff !important;
}

.matezex-cart button.matezex-cart-qty-plus:hover,
.matezex-cart button.matezex-cart-qty-plus:focus {
	background: #333 !important;
	background-color: #333 !important;
	color: #fff !important;
}

.matezex-cart button.matezex-cart-qty-minus svg,
.matezex-cart button.matezex-cart-qty-plus svg {
	width: 14px !important;
	height: 14px !important;
	flex-shrink: 0 !important;
	stroke: currentColor !important;
}

.matezex-cart .matezex-cart-qty {
	width: 40px !important;
	height: 36px !important;
	min-width: 0 !important;
	max-width: 40px !important;
	text-align: center !important;
	border: none !important;
	outline: none !important;
	background: transparent !important;
	background-color: transparent !important;
	padding: 0 4px !important;
	margin: 0 !important;
	font-size: 14px !important;
	font-weight: 500 !important;
	color: #0a0d0f !important;
	box-shadow: none !important;
	-moz-appearance: textfield !important;
	display: inline-block !important;
	flex-shrink: 0 !important;
}

.matezex-cart .matezex-cart-qty::-webkit-inner-spin-button,
.matezex-cart .matezex-cart-qty::-webkit-outer-spin-button {
	-webkit-appearance: none !important;
	margin: 0 !important;
}

/* =========================================================================
   Remove button
   ========================================================================= */

.matezex-cart button.matezex-cart-remove {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 32px !important;
	height: 32px !important;
	min-width: 32px !important;
	background: transparent !important;
	background-color: transparent !important;
	border: 1.5px solid #c2cdd6 !important;
	border-radius: 9999px !important;
	color: #52697a !important;
	cursor: pointer !important;
	padding: 0 !important;
	margin: 0 !important;
	box-shadow: none !important;
	transition: border-color 0.15s, color 0.15s, background 0.15s !important;
}

.matezex-cart button.matezex-cart-remove:hover,
.matezex-cart button.matezex-cart-remove:focus {
	border-color: #e53e3e !important;
	color: #e53e3e !important;
	background: #fff5f5 !important;
	background-color: #fff5f5 !important;
}

.matezex-cart button.matezex-cart-remove svg {
	width: 14px !important;
	height: 14px !important;
	stroke: currentColor !important;
	flex-shrink: 0 !important;
}

/* =========================================================================
   Cart actions
   ========================================================================= */

.matezex-cart .matezex-cart-actions {
	display: flex !important;
	align-items: center !important;
	justify-content: space-between !important;
	margin-top: 20px !important;
	gap: 12px !important;
}

.matezex-cart a.matezex-cart-back-btn {
	display: inline-flex !important;
	align-items: center !important;
	padding: 10px 20px !important;
	font-size: 14px !important;
	font-weight: 500 !important;
	color: #0a0d0f !important;
	background: transparent !important;
	background-color: transparent !important;
	border: 1.5px solid #0a0d0f !important;
	border-radius: 9999px !important;
	text-decoration: none !important;
	transition: background 0.15s, color 0.15s !important;
	cursor: pointer !important;
	box-shadow: none !important;
	line-height: 1.4 !important;
}

.matezex-cart a.matezex-cart-back-btn:hover,
.matezex-cart a.matezex-cart-back-btn:focus {
	background: #0a0d0f !important;
	background-color: #0a0d0f !important;
	color: #fff !important;
	text-decoration: none !important;
}

.matezex-cart a.matezex-cart-submit-btn {
	display: inline-flex !important;
	align-items: center !important;
	padding: 10px 24px !important;
	font-size: 14px !important;
	font-weight: 500 !important;
	color: #eff2f5 !important;
	background: #004cfe !important;
	background-color: #004cfe !important;
	border: 1.5px solid #004cfe !important;
	border-radius: 9999px !important;
	text-decoration: none !important;
	transition: background 0.15s, border-color 0.15s !important;
	cursor: pointer !important;
	box-shadow: none !important;
	line-height: 1.4 !important;
}

.matezex-cart a.matezex-cart-submit-btn:hover,
.matezex-cart a.matezex-cart-submit-btn:focus {
	background: #0040d6 !important;
	background-color: #0040d6 !important;
	border-color: #0040d6 !important;
	color: #eff2f5 !important;
	text-decoration: none !important;
}

/* =========================================================================
   Empty state
   ========================================================================= */

.matezex-cart-empty-state {
	display: flex !important;
	flex-direction: column !important;
	align-items: center !important;
	gap: 16px !important;
	padding: 60px 20px !important;
	color: #52697a !important;
	text-align: center !important;
}

.matezex-cart-empty-state svg {
	opacity: 0.4 !important;
	stroke: #52697a !important;
}

.matezex-cart-empty-state p {
	font-size: 16px !important;
	font-weight: 500 !important;
	color: #52697a !important;
	margin: 0 !important;
}

.matezex-cart-empty-state a.matezex-cart-back-btn {
	display: inline-flex !important;
	align-items: center !important;
	padding: 10px 20px !important;
	font-size: 14px !important;
	font-weight: 500 !important;
	color: #0a0d0f !important;
	background: transparent !important;
	background-color: transparent !important;
	border: 1.5px solid #0a0d0f !important;
	border-radius: 9999px !important;
	text-decoration: none !important;
	cursor: pointer !important;
}

.matezex-cart-empty-state a.matezex-cart-back-btn:hover,
.matezex-cart-empty-state a.matezex-cart-back-btn:focus {
	background: #0a0d0f !important;
	background-color: #0a0d0f !important;
	color: #fff !important;
	text-decoration: none !important;
}

/* =========================================================================
   Mini cart (nav counts)
   ========================================================================= */

.matezex-mini-cart {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	text-decoration: none;
	color: inherit;
	font-size: 14px;
}

.matezex-inquiry-count,
.matezex-order-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 20px;
	height: 20px;
	background: #004cfe;
	color: #fff;
	border-radius: 10px;
	font-size: 11px;
	font-weight: 700;
	padding: 0 5px;
}

/* =========================================================================
   Cart page: Two-column layout (form left, products right)
   ========================================================================= */

.matezex-cart-page--has-checkout {
	display: grid !important;
	grid-template-columns: 1fr 1fr !important;
	gap: 32px !important;
	align-items: start !important;
}

.matezex-cart-page-main {
	min-width: 0 !important;
}

.matezex-cart-page-side {
	position: sticky !important;
	top: 24px !important;
}

.matezex-checkout h2 {
	font-size: 20px !important;
	font-weight: 600 !important;
	color: #0a0d0f !important;
	margin: 0 0 20px 0 !important;
	padding: 0 !important;
}

/* =========================================================================
   Checkout form fields
   ========================================================================= */

.matezex-checkout-form .matezex-form-row {
	margin-bottom: 14px;
}

.matezex-checkout-form label {
	display: block;
	font-weight: 600;
	font-size: 13px;
	margin-bottom: 4px;
}

.matezex-checkout-form input[type="text"],
.matezex-checkout-form input[type="email"],
.matezex-checkout-form input[type="tel"],
.matezex-checkout-form textarea {
	width: 100%;
	padding: 8px 12px;
	border: 1.5px solid #c2cdd6;
	border-radius: 8px;
	font-size: 14px;
	background: #fff;
	color: #0a0d0f;
	transition: border-color 0.15s;
	box-sizing: border-box;
}

.matezex-checkout-form input[type="text"]:focus,
.matezex-checkout-form input[type="email"]:focus,
.matezex-checkout-form input[type="tel"]:focus,
.matezex-checkout-form textarea:focus {
	border-color: #004cfe;
	outline: none;
}

.matezex-checkout-form textarea {
	resize: vertical;
}

.matezex-form-row-half {
	display: flex;
	gap: 12px;
}

.matezex-form-row-half > div {
	flex: 1;
}

.matezex-fieldset {
	border: 1.5px solid #d9e1e7;
	border-radius: 12px;
	padding: 16px;
	margin-bottom: 16px;
	background: #ecf0f3;
}

.matezex-fieldset legend {
	font-weight: 600;
	font-size: 14px;
	padding: 0 8px;
	color: #0a0d0f;
}

.matezex-submit-btn {
	width: 100%;
	padding: 12px !important;
	font-size: 16px !important;
	background: #004cfe !important;
	background-color: #004cfe !important;
	border-color: #004cfe !important;
	color: #eff2f5 !important;
	border-radius: 9999px !important;
	font-weight: 500 !important;
	transition: background 0.15s !important;
}

.matezex-submit-btn:hover,
.matezex-submit-btn:focus {
	background: #0040d6 !important;
	background-color: #0040d6 !important;
	border-color: #0040d6 !important;
	color: #eff2f5 !important;
}

/* =========================================================================
   Checkout message
   ========================================================================= */

.matezex-checkout-message {
	margin-top: 16px;
	padding: 12px 16px;
	border-radius: 8px;
}

.matezex-checkout-message.is-success {
	background: #f0fff4;
	color: #22543d;
	border: 1px solid #c6f6d5;
}

.matezex-checkout-message.is-error {
	background: #fff5f5;
	color: #742a2a;
	border: 1px solid #fed7d7;
}

/* =========================================================================
   Spinner + loading button
   ========================================================================= */

.matezex-spinner {
	display: inline-block !important;
	width: 16px !important;
	height: 16px !important;
	border: 2px solid rgba(255, 255, 255, 0.3) !important;
	border-top-color: #fff !important;
	border-radius: 50% !important;
	animation: matezex-spin 0.6s linear infinite !important;
	vertical-align: middle !important;
}

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

.matezex-submit-btn.is-loading {
	opacity: 0.7 !important;
	cursor: wait !important;
}

/* =========================================================================
   Success state
   ========================================================================= */

.matezex-success-state {
	display: flex !important;
	flex-direction: column !important;
	align-items: center !important;
	gap: 16px !important;
	padding: 60px 20px !important;
	text-align: center !important;
}

.matezex-success-state svg {
	opacity: 0.85 !important;
}

.matezex-success-state h2 {
	font-size: 24px !important;
	font-weight: 600 !important;
	color: #22543d !important;
	margin: 0 !important;
}

.matezex-success-state .matezex-success-message {
	font-size: 15px !important;
	color: #52697a !important;
	margin: 0 !important;
	max-width: 480px !important;
}

.matezex-success-state .matezex-success-order-number {
	font-size: 15px !important;
	color: #0a0d0f !important;
	margin: 0 !important;
}

.matezex-success-state a.matezex-cart-back-btn {
	display: inline-flex !important;
	align-items: center !important;
	padding: 10px 20px !important;
	font-size: 14px !important;
	font-weight: 500 !important;
	color: #0a0d0f !important;
	background: transparent !important;
	background-color: transparent !important;
	border: 1.5px solid #0a0d0f !important;
	border-radius: 9999px !important;
	text-decoration: none !important;
	cursor: pointer !important;
	margin-top: 8px !important;
}

.matezex-success-state a.matezex-cart-back-btn:hover,
.matezex-success-state a.matezex-cart-back-btn:focus {
	background: #0a0d0f !important;
	background-color: #0a0d0f !important;
	color: #fff !important;
	text-decoration: none !important;
}

/* =========================================================================
   Responsive
   ========================================================================= */

@media (max-width: 1200px) {
	.matezex-cart .matezex-cart-col-product {
		min-width: 160px !important;
	}
}

@media (max-width: 1024px) {
	.matezex-cart .matezex-cart-title-row th {
		padding: 8px 16px !important;
	}

	.matezex-cart .matezex-cart-columns-row th {
		padding: 14px 16px !important;
	}

	.matezex-cart .matezex-cart-row td {
		padding: 14px 16px !important;
	}
}

@media (max-width: 900px) {
	.matezex-cart-page--has-checkout {
		grid-template-columns: 1fr !important;
		gap: 24px !important;
	}

	.matezex-cart-page-side {
		position: static !important;
	}
}

@media (max-width: 768px) {
	.matezex-form-row-half {
		flex-direction: column;
	}

	.matezex-cart .matezex-cart-actions {
		flex-direction: column-reverse !important;
		align-items: stretch !important;
	}

	.matezex-cart a.matezex-cart-back-btn,
	.matezex-cart a.matezex-cart-submit-btn {
		justify-content: center !important;
		text-align: center !important;
	}

	.matezex-cart .matezex-cart-title-row th {
		font-size: 16px !important;
	}

	.matezex-cart .matezex-cart-row td {
		padding: 12px 16px !important;
	}

	.matezex-cart .matezex-cart-columns-row th {
		padding: 12px 16px !important;
	}

	.matezex-cart .matezex-cart-col-product {
		min-width: 120px !important;
	}

	.matezex-cart .matezex-cart-sku {
		font-size: 13px !important;
	}

	.matezex-checkout-summary {
		padding: 16px !important;
	}
}
