/**
 * iCango Commerce Card — product commerce UI styles.
 *
 * Design language:
 *   Background:   #f5f7fa (page-level surround)
 *   Card:          #ffffff, 16px radius, 1px border #e8ecf2
 *   Primary CTA:   #2563eb (solid blue)
 *   Outline CTA:   transparent bg, 2px solid #2563eb
 *   Text:          #111827 (primary), #4b5563 (secondary), #9ca3af (muted)
 *
 * @package iCango_Commerce
 */

/* ── Section container ──────────────────────────────────────────────── */
.icango-cc {
	margin: 24px 0;
}

/* ── Status bar ─────────────────────────────────────────────────────── */
.icango-cc__status {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 12px;
	font-size: 14px;
	font-weight: 600;
	color: #4b5563;
	padding: 0 4px;
}

.icango-cc__status-icon {
	font-size: 18px;
	line-height: 1;
}

.icango-cc__status-text {
	text-transform: none;
	letter-spacing: 0;
}

/* ── Card ───────────────────────────────────────────────────────────── */
.icango-cc__card {
	background: #ffffff;
	border: 1px solid #e8ecf2;
	border-radius: 16px;
	padding: clamp(20px, 3vw, 32px);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.03);
}

/* ── Price area ─────────────────────────────────────────────────────── */
.icango-cc__price {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 8px;
	margin-bottom: 20px;
	padding-bottom: 20px;
	border-bottom: 1px solid #f0f2f5;
}

.icango-cc__price-label {
	font-size: 13px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #9ca3af;
}

.icango-cc__price-value {
	font-size: clamp(20px, 3vw, 28px);
	font-weight: 700;
	color: #111827;
	line-height: 1.2;
}

.icango-cc__price-value del,
.icango-cc__price-value .woocommerce-Price-amount.amount:first-of-type + .amount {
	font-size: 0.7em;
	font-weight: 400;
	color: #9ca3af;
}

.icango-cc__price-value ins {
	text-decoration: none;
	color: #dc2626;
}

.icango-cc__price--hidden .icango-cc__price-value {
	color: #6b7280;
	font-size: clamp(16px, 2.5vw, 20px);
	font-weight: 600;
}

/* ── Quantity controls ──────────────────────────────────────────────── */
.icango-cc__qty {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 20px;
	padding-bottom: 20px;
	border-bottom: 1px solid #f0f2f5;
}

.icango-cc__qty-label {
	font-size: 13px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #9ca3af;
	white-space: nowrap;
}

.icango-cc__qty-controls {
	display: inline-flex;
	align-items: center;
	border: 1px solid #d1d5db;
	border-radius: 10px;
	overflow: hidden;
}

.icango-cc__qty-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 38px;
	border: none;
	background: #f9fafb;
	color: #4b5563;
	font-size: 18px;
	cursor: pointer;
	transition: background 0.15s ease;
	-webkit-user-select: none;
	user-select: none;
}

.icango-cc__qty-btn:hover {
	background: #f3f4f6;
}

.icango-cc__qty-btn:focus-visible {
	outline: 2px solid #2563eb;
	outline-offset: -1px;
	z-index: 1;
}

.icango-cc__qty-input {
	width: 56px;
	height: 38px;
	border: none;
	border-left: 1px solid #d1d5db;
	border-right: 1px solid #d1d5db;
	text-align: center;
	font-size: 15px;
	font-weight: 600;
	color: #111827;
	background: #ffffff;
	-moz-appearance: textfield;
}

.icango-cc__qty-input::-webkit-inner-spin-button,
.icango-cc__qty-input::-webkit-outer-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* ── Button area ────────────────────────────────────────────────────── */
.icango-cc__buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 24px;
	padding-bottom: 24px;
	border-bottom: 1px solid #f0f2f5;
}

/* Base button */
.icango-cc__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 24px;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.4;
	border-radius: 10px;
	border: 2px solid transparent;
	cursor: pointer;
	text-decoration: none;
	transition: all 0.15s ease;
	white-space: nowrap;
	flex: 1 1 auto;
	min-width: 140px;
}

.icango-cc__btn:focus-visible {
	outline: 2px solid #2563eb;
	outline-offset: 2px;
}

/* Cart button — solid primary */
.icango-cc__btn--cart {
	background: #2563eb;
	color: #ffffff;
	border-color: #2563eb;
}

.icango-cc__btn--cart:hover {
	background: #1d4ed8;
	border-color: #1d4ed8;
}

.icango-cc__btn--cart:active {
	background: #1e40af;
	border-color: #1e40af;
}

.icango-cc__btn--cart:disabled {
	background: #9ca3af;
	border-color: #9ca3af;
	cursor: not-allowed;
}

/* Quote button — outline style */
.icango-cc__btn--quote {
	background: transparent;
	color: #2563eb;
	border-color: #2563eb;
}

.icango-cc__btn--quote:hover {
	background: #eff6ff;
}

.icango-cc__btn--quote:active {
	background: #dbeafe;
}

.icango-cc__btn--quote-active {
	background: #eff6ff !important;
}

/* Contact Us button — subtle outline */
.icango-cc__btn--contact {
	background: transparent;
	color: #4b5563;
	border-color: #d1d5db;
}

.icango-cc__btn--contact:hover {
	background: #f9fafb;
	border-color: #9ca3af;
}

/* Cart form (wraps hidden input + submit button) */
.icango-cc__cart-form {
	display: contents;
}

/* ── Service info ───────────────────────────────────────────────────── */
.icango-cc__services {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.icango-cc__services-title {
	font-size: 13px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #9ca3af;
}

.icango-cc__services-list {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 10px;
}

.icango-cc__service-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 14px;
	background: #f9fafb;
	border-radius: 8px;
	border: 1px solid #f0f2f5;
	font-size: 13px;
	color: #4b5563;
}

.icango-cc__service-icon {
	font-size: 16px;
	line-height: 1;
	flex-shrink: 0;
}

.icango-cc__service-text {
	font-weight: 500;
}

/* ── Inquiry form section ───────────────────────────────────────────── */
.icango-cc__inquiry {
	margin-top: 16px;
	transition: all 0.3s ease;
}

.icango-cc__inquiry[aria-hidden="true"] {
	display: none;
}

.icango-cc__inquiry[aria-hidden="false"] {
	display: block;
}

.icango-cc__inquiry-inner {
	background: #ffffff;
	border: 1px solid #e8ecf2;
	border-radius: 16px;
	padding: clamp(20px, 3vw, 32px);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.03);
}

/* ── Responsive: Tablet+ ────────────────────────────────────────────── */
@media (min-width: 600px) {
	.icango-cc__buttons {
		flex-direction: row;
	}

	.icango-cc__btn {
		flex: 0 1 auto;
		min-width: 160px;
	}
}

/* ── Responsive: Desktop ────────────────────────────────────────────── */
@media (min-width: 768px) {
	.icango-cc__card {
		padding: 28px 36px;
	}

	.icango-cc__price {
		margin-bottom: 24px;
		padding-bottom: 24px;
	}

	.icango-cc__services-list {
		grid-template-columns: repeat(3, 1fr);
		gap: 12px;
	}
}

/* ── Responsive: Wide desktop ───────────────────────────────────────── */
@media (min-width: 1024px) {
	.icango-cc__card {
		padding: 32px 40px;
	}

	.icango-cc__btn {
		padding: 14px 32px;
		font-size: 16px;
	}
}

/* ── Variable product support (WooCommerce native variation UI) ─────── */
/* Variations form must render as a normal block (not display: contents
   like the simple-product cart form). */
.icango-cc__variations-form {
	display: block;
	margin: 0;
}

.icango-cc__attributes.variations {
	margin: 0 0 20px;
}

.icango-cc__attribute {
	margin-bottom: 16px;
}

.icango-cc__attribute:last-of-type {
	margin-bottom: 0;
}

.icango-cc__attribute-label {
	display: block;
	margin-bottom: 6px;
	font-size: 13px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #9ca3af;
}

/* .icango-cc prefix keeps specificity above the parent theme's generic
   `.variations select` (height: 36px) which would otherwise shrink the box. */
.icango-cc .icango-cc__attributes select,
.icango-cc .icango-cc__attribute select {
	display: block;
	width: 100%;
	max-width: 460px;
	height: 44px;
	padding: 0 14px;
	font-size: 15px;
	font-weight: 600;
	color: #111827;
	background: #ffffff;
	border: 1px solid #d1d5db;
	border-radius: 10px;
	line-height: 1.4;
	cursor: pointer;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.icango-cc__attributes select:hover {
	border-color: #9ca3af;
}

.icango-cc__attributes select:focus-visible {
	outline: 2px solid #2563eb;
	outline-offset: 1px;
	border-color: #2563eb;
}

/* .icango-cc .variations prefix keeps the Reset control a plain blue link
   instead of inheriting the parent theme's pill (.variations .reset_variations). */
.icango-cc .variations .reset_variations,
.icango-cc .variations .reset_variations.icango-cc__reset-variations {
	display: inline-block;
	margin: 12px 0 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.6;
	color: #2563eb;
	text-decoration: underline;
	text-transform: none;
	white-space: normal;
	cursor: pointer;
	visibility: hidden;
}

.icango-cc__variation-actions {
	width: 100%;
}

.icango-cc__variation-single {
	margin-bottom: 16px;
}

.icango-cc__variation-single .woocommerce-variation-price {
	margin-bottom: 6px;
}

.icango-cc__variation-single .woocommerce-variation-price .price {
	display: inline-block;
	margin: 0;
	font-size: clamp(18px, 3vw, 24px);
	font-weight: 700;
	color: #111827;
	line-height: 1.2;
}

.icango-cc__variation-single .woocommerce-variation-price .price del {
	font-size: 0.75em;
	font-weight: 400;
	color: #9ca3af;
}

.icango-cc__variation-single .woocommerce-variation-price .price ins {
	text-decoration: none;
	color: #dc2626;
}

.icango-cc__variation-single .woocommerce-variation-availability {
	margin: 6px 0 0;
	font-size: 13px;
	font-weight: 500;
	color: #16a34a;
}

.icango-cc__variation-single .woocommerce-variation-availability .out-of-stock {
	color: #dc2626;
}

/* Add to Cart — secondary (outline) CTA used for variable products */
.icango-cc__btn--add {
	background: transparent;
	color: #2563eb;
	border-color: #2563eb;
}

.icango-cc__btn--add:hover {
	background: #eff6ff;
}

.icango-cc__btn--add:active {
	background: #dbeafe;
}

/* Disabled state applied by wc-add-to-cart-variation (no valid selection) */
.icango-cc__btn.single_add_to_cart_button.disabled,
.icango-cc__btn.single_add_to_cart_button.wc-variation-selection-needed,
.icango-cc__btn.single_add_to_cart_button.wc-variation-is-unavailable {
	opacity: 0.55;
	cursor: not-allowed;
	filter: saturate(0.4);
}

.icango-cc__out-of-stock {
	margin: 0 0 20px;
	padding: 10px 14px;
	background: #fef2f2;
	border: 1px solid #fee2e2;
	border-radius: 8px;
	font-size: 14px;
	color: #b91c1c;
}

/* ── Variable UI polish: neutralise parent-theme (Woostify) collisions ── */
/*
 * Root cause: the variable form intentionally keeps WooCommerce's native
 * `.quantity` marker class on the stepper block (required by
 * wc-add-to-cart-variation), which makes the parent theme's global rules
 * apply to it:
 *
 *   .quantity { width: 170px; height: 50px; overflow: hidden; ... }
 *   .quantity .qty { padding: 0 40px; border: 0; flex-grow: 1; ... }
 *
 * That fixed 170px box (plus overflow) crushes the stepper so only the
 * "+/-" edge remains visible.  Simple-product cards are not affected
 * because they omit the `.quantity` class.  The overrides below are all
 * scoped inside `.icango-cc`, i.e. they can only touch the variable form
 * rendered by this card and never other WooCommerce/theme UI.
 */
.icango-cc .quantity {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	justify-content: flex-start;
	gap: 12px;
	width: auto;
	max-width: none;
	min-width: 0;
	height: auto;
	overflow: visible;
	position: static;
	background: transparent;
	margin-bottom: 20px;
	padding-bottom: 20px;
	border-bottom: 1px solid #f0f2f5;
}

.icango-cc .quantity .icango-cc__qty-controls {
	flex: 0 0 auto;
}

.icango-cc .quantity .qty {
	flex: 0 0 auto;
	width: 56px;
	height: 38px;
	padding: 0;
	border: 0;
	border-left: 1px solid #d1d5db;
	border-right: 1px solid #d1d5db;
	background: #ffffff;
	color: #111827;
	font-size: 15px;
	font-weight: 600;
	text-align: center;
}
