/* ============================================================
   MM Quick View popup — compact typography, brand-consistent
   add-to-cart controls, and responsive sizing.

   Blocksy Companion Pro renders this modal with the theme's normal
   single-product typography (h1 title, large price, etc.), sized for a
   full page, not a popup. Scoped to .ct-quick-view-card so the real
   single-product page is untouched.

   The add-to-cart button / quantity input / Buy Now button / variation
   swatches ALSO reuse the exact classes styled in product.css — but
   those rules are scoped to "body.single-product X" and product.css
   only loads on real single-product pages. That made the popup look
   branded (pill button, glow, uppercase, compact type) only when opened
   from a single-product page's related-products carousel, and fall
   back to Blocksy's plain, larger default elsewhere.

   Duplicating the values here fixes the "different everywhere" part,
   but on an actual single-product page BOTH rule sets apply to the
   same popup — and "body.single-product X" (1 tag + N classes) beats a
   plain ".ct-quick-view-card X" (N classes, no tag) in the specificity
   tiebreak once class counts are equal, even though both use
   !important. Every selector below is written as
   ".ct-quick-view-card.ct-quick-view-card" (a valid, harmless repeat —
   it still matches the one class on the element) purely to add one
   extra specificity point, so this file always wins regardless of
   which page the popup was opened from.
   ============================================================ */

/* product.css also nudges the real single-product page's summary column
   with "padding-left: 8px" (for its own layout), which — same
   specificity issue as above — bled into the popup as lopsided
   left/right padding when opened from that page. Pin it back to the
   plugin's own symmetric default. */
.ct-quick-view-card.ct-quick-view-card .woocommerce-product-summary .entry-summary {
	padding-left: 35px !important;
}

/* ── Typography (desktop) ── */
.ct-quick-view-card.ct-quick-view-card .entry-summary .product_title {
	font-size: 1.3rem !important;
	line-height: 1.3 !important;
	margin-bottom: 10px !important;
}

.ct-quick-view-card.ct-quick-view-card .entry-summary .price {
	font-size: 1.05rem !important;
}

.ct-quick-view-card.ct-quick-view-card .entry-summary .woocommerce-product-details__short-description,
.ct-quick-view-card.ct-quick-view-card .entry-summary .woocommerce-product-details__short-description p {
	font-size: 0.88rem !important;
	line-height: 1.55 !important;
}

.ct-quick-view-card.ct-quick-view-card .entry-summary .product_meta,
.ct-quick-view-card.ct-quick-view-card .entry-summary .product_meta * {
	font-size: 0.8rem !important;
}

/* ── Variation label (PKG:) ── */
.ct-quick-view-card.ct-quick-view-card .entry-summary .variations .label label {
	font-size: 0.78rem !important;
	font-weight: 700 !important;
	text-transform: uppercase !important;
	letter-spacing: 0.08em !important;
	color: #222 !important;
}

/* ── Variation swatch buttons (size buttons) ── */
.ct-quick-view-card.ct-quick-view-card .entry-summary [data-swatches-type="button"] .ct-swatch {
	border: 2px solid #e0e0e0 !important;
	border-radius: 8px !important;
	padding: 5px 14px !important;
	font-weight: 700 !important;
	font-size: 0.8rem !important;
	color: #444 !important;
	background: #fff !important;
	transition: all 0.2s ease !important;
	min-height: 32px !important;
}

.ct-quick-view-card.ct-quick-view-card .entry-summary [data-swatches-type="button"] li:not(.ct-out-of-stock):hover .ct-swatch {
	border-color: #E41F21 !important;
	color: #E41F21 !important;
	background: #fff8f8 !important;
}

.ct-quick-view-card.ct-quick-view-card .entry-summary [data-swatches-type="button"] .active .ct-swatch {
	background: #E41F21 !important;
	color: #ffffff !important;
	border-color: #E41F21 !important;
	box-shadow: 0 3px 10px rgba(228, 31, 33, 0.3) !important;
}

.ct-quick-view-card.ct-quick-view-card .entry-summary [data-swatches-type="button"] .ct-out-of-stock .ct-swatch {
	opacity: 0.4 !important;
	cursor: not-allowed !important;
}

.ct-quick-view-card.ct-quick-view-card .entry-summary .reset_variations {
	color: #687279 !important;
	font-size: 0.78rem !important;
	text-decoration: underline !important;
	transition: color 0.2s ease !important;
}

.ct-quick-view-card.ct-quick-view-card .entry-summary .reset_variations:hover {
	color: #E41F21 !important;
}

/* ── Quantity input ── */
.ct-quick-view-card.ct-quick-view-card .entry-summary .quantity input.qty {
	border: 2px solid #e0e0e0 !important;
	border-radius: 10px !important;
	padding: 8px 12px !important;
	font-weight: 700 !important;
	font-size: 0.9rem !important;
	color: #222 !important;
	background: #fff !important;
	text-align: center !important;
	box-shadow: none !important;
	transition: border-color 0.2s ease !important;
}

.ct-quick-view-card.ct-quick-view-card .entry-summary .quantity input.qty:focus {
	border-color: #E41F21 !important;
	outline: none !important;
	box-shadow: 0 0 0 4px rgba(228, 31, 33, 0.12) !important;
}

.ct-quick-view-card.ct-quick-view-card .entry-summary .quantity[data-type="type-2"] .ct-decrease-value,
.ct-quick-view-card.ct-quick-view-card .entry-summary .quantity[data-type="type-2"] .ct-increase-value {
	color: #E41F21 !important;
	border-color: #e0e0e0 !important;
}

.ct-quick-view-card.ct-quick-view-card .entry-summary .quantity[data-type="type-2"] .ct-decrease-value:hover,
.ct-quick-view-card.ct-quick-view-card .entry-summary .quantity[data-type="type-2"] .ct-increase-value:hover {
	background: #E41F21 !important;
	color: #fff !important;
	border-color: #E41F21 !important;
}

/* ── Add to Cart button ── */
.ct-quick-view-card.ct-quick-view-card .entry-summary .cart {
	--theme-button-max-width: none !important;
	gap: 10px !important;
	align-items: center !important;
}

.ct-quick-view-card.ct-quick-view-card .entry-summary .single_add_to_cart_button,
.ct-quick-view-card.ct-quick-view-card .entry-summary .cart .single_add_to_cart_button {
	background: #E41F21 !important;
	border-radius: 100px !important;
	padding: 12px 32px !important;
	font-size: 0.85rem !important;
	font-weight: 800 !important;
	letter-spacing: 0.04em !important;
	color: #ffffff !important;
	border: none !important;
	min-height: 44px !important;
	box-shadow: 0 6px 24px rgba(228, 31, 33, 0.35) !important;
	transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
	text-transform: uppercase !important;
	cursor: pointer !important;
	flex: 1 !important;
	max-width: none !important;
	width: auto !important;
}

.ct-quick-view-card.ct-quick-view-card .entry-summary .single_add_to_cart_button:hover {
	background: #B81819 !important;
	transform: translateY(-2px) !important;
	box-shadow: 0 10px 32px rgba(228, 31, 33, 0.45) !important;
	color: #fff !important;
}

.ct-quick-view-card.ct-quick-view-card .entry-summary .single_add_to_cart_button.loading {
	opacity: 0.7 !important;
}

.ct-quick-view-card.ct-quick-view-card .entry-summary .ct-quick-more {
	font-size: 0.8rem !important;
}

/* ── Fastrr "Buy Now" button — same layout fix as the real single-
   product page: the plugin stacks 2 rows of content in a single-line
   box, so rebuild it as a proper 2-row column layout. ── */
.ct-quick-view-card.ct-quick-view-card .entry-summary .wc-proceed-to-checkoutt,
.ct-quick-view-card.ct-quick-view-card .entry-summary .shiprocket-headless {
	width: 100% !important;
	margin-top: 10px !important;
}

.ct-quick-view-card.ct-quick-view-card .entry-summary .shiprocket-headless .sr-headless-checkout {
	display: flex !important;
	width: 100% !important;
	height: auto !important;
	min-height: 44px !important;
	padding: 11px 24px !important;
	border-radius: 100px !important;
	background: #E41F21 !important;
	border: none !important;
	box-shadow: 0 6px 24px rgba(228, 31, 33, 0.35) !important;
	transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
	cursor: pointer !important;
	text-transform: none !important;
}

.ct-quick-view-card.ct-quick-view-card .entry-summary .shiprocket-headless .sr-headless-checkout:hover {
	background: #B81819 !important;
	transform: translateY(-2px) !important;
	box-shadow: 0 10px 32px rgba(228, 31, 33, 0.45) !important;
}

.ct-quick-view-card.ct-quick-view-card .entry-summary .shiprocket-headless .sr-headless-checkout > .sr-d-flex.flex-center {
	display: flex !important;
	flex-direction: column !important;
	align-items: center !important;
	justify-content: center !important;
	width: 100% !important;
	gap: 3px !important;
}

.ct-quick-view-card.ct-quick-view-card .entry-summary .shiprocket-headless .sr-headless-checkout .full-width.flex-center {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	flex-wrap: nowrap !important;
	gap: 8px !important;
	width: 100% !important;
}

.ct-quick-view-card.ct-quick-view-card .entry-summary .shiprocket-headless .sr-headless-checkout span {
	color: #ffffff !important;
	font-size: 0.85rem !important;
	font-weight: 800 !important;
	letter-spacing: 0.03em !important;
	white-space: nowrap !important;
}

.ct-quick-view-card.ct-quick-view-card .entry-summary .shiprocket-headless .sr-headless-checkout img {
	height: 16px !important;
	width: auto !important;
	max-width: 36px !important;
	object-fit: contain !important;
	filter: none !important;
	opacity: 1 !important;
	vertical-align: middle !important;
	margin: 0 !important;
}

.ct-quick-view-card.ct-quick-view-card .entry-summary .shiprocket-headless .sr-headless-checkout > .sr-d-flex.flex-center > div:last-child {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 6px !important;
}

.ct-quick-view-card.ct-quick-view-card .entry-summary .shiprocket-headless .sr-discount-label:empty {
	display: none !important;
}

.ct-quick-view-card.ct-quick-view-card .entry-summary .shiprocket-headless .sr-powered-by {
	opacity: 0.75 !important;
}

.ct-quick-view-card.ct-quick-view-card .entry-summary .shiprocket-headless .sr-powered-by img {
	height: 10px !important;
	filter: brightness(0) invert(1) !important;
	opacity: 0.85 !important;
}

/* ── Tablet ── */
@media (max-width: 1024px) {
	.ct-quick-view-card.ct-quick-view-card .entry-summary {
		padding: 30px 26px !important;
	}

	.ct-quick-view-card.ct-quick-view-card .entry-summary .product_title {
		font-size: 1.2rem !important;
	}

	.ct-quick-view-card.ct-quick-view-card .entry-summary .price {
		font-size: 1rem !important;
	}
}

/* Matches the plugin's own single-column breakpoint (689.98px), so the
   card stacks gallery-then-summary instead of squeezing two columns. */
@media (max-width: 689.98px) {
	.ct-quick-view-card.ct-quick-view-card .entry-summary {
		padding: 6vw !important;
	}

	.ct-quick-view-card.ct-quick-view-card .entry-summary .product_title {
		font-size: 1.1rem !important;
		margin-bottom: 6px !important;
	}

	.ct-quick-view-card.ct-quick-view-card .entry-summary .price {
		font-size: 0.95rem !important;
	}

	.ct-quick-view-card.ct-quick-view-card .entry-summary .woocommerce-product-details__short-description,
	.ct-quick-view-card.ct-quick-view-card .entry-summary .woocommerce-product-details__short-description p {
		font-size: 0.82rem !important;
	}

	.ct-quick-view-card.ct-quick-view-card .entry-summary .cart {
		flex-wrap: wrap !important;
	}

	.ct-quick-view-card.ct-quick-view-card .entry-summary .single_add_to_cart_button,
	.ct-quick-view-card.ct-quick-view-card .entry-summary .cart .single_add_to_cart_button {
		font-size: 0.8rem !important;
		padding: 10px 20px !important;
		min-height: 40px !important;
	}

	.ct-quick-view-card.ct-quick-view-card .entry-summary .ct-quick-more {
		font-size: 0.78rem !important;
	}

	.ct-quick-view-card.ct-quick-view-card .entry-summary .shiprocket-headless .sr-headless-checkout {
		min-height: 40px !important;
		padding: 9px 18px !important;
	}

	.ct-quick-view-card.ct-quick-view-card .entry-summary .shiprocket-headless .sr-headless-checkout span {
		font-size: 0.8rem !important;
	}
}

/* Small phones */
@media (max-width: 480px) {
	.quick-view-modal .ct-panel-content {
		padding: 16px !important;
	}

	.ct-quick-view-card.ct-quick-view-card .entry-summary {
		padding: 20px 16px !important;
	}

	.ct-quick-view-card.ct-quick-view-card .entry-summary .product_title {
		font-size: 1rem !important;
	}

	.ct-quick-view-card.ct-quick-view-card .entry-summary .price {
		font-size: 0.9rem !important;
	}

	.ct-quick-view-card.ct-quick-view-card .entry-summary .product_meta,
	.ct-quick-view-card.ct-quick-view-card .entry-summary .product_meta * {
		font-size: 0.75rem !important;
	}

	.ct-quick-view-card.ct-quick-view-card .entry-summary .single_add_to_cart_button,
	.ct-quick-view-card.ct-quick-view-card .entry-summary .cart .single_add_to_cart_button {
		padding: 9px 16px !important;
		min-height: 38px !important;
	}
}
