/**
 * Shoes → Socks Cart Upsell — styles.
 * Scoped to #ssu-upsell-section to avoid leaking into theme styles.
 */

.ssu-upsell-section {
	margin: 30px 0;
	padding: 25px 20px;
	background: #fafafa;
	border: 1px solid #e5e5e5;
	border-radius: 8px;
	box-sizing: border-box;
	direction: rtl;
	text-align: center;
}

.ssu-upsell-header {
	margin-bottom: 20px;
}

.ssu-upsell-title {
	margin: 0 0 5px;
	font-size: 20px;
	line-height: 1.3;
	font-weight: 700;
}

.ssu-upsell-subtitle {
	margin: 0;
	color: #666666;
	font-size: 14px;
	line-height: 1.5;
}

.ssu-upsell-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
}

.ssu-upsell-item {
	display: flex;
	flex-direction: column;
	background: #ffffff;
	border: 1px solid #ececec;
	border-radius: 4px;
	overflow: hidden;
	transition: box-shadow 0.2s ease;
}

.ssu-upsell-item:hover {
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.ssu-upsell-image-link {
	position: relative;
	display: block;
	padding: 20px 15px 0;
}

.ssu-upsell-image-link img {
	width: 100%;
	height: auto;
	display: block;
}

.ssu-upsell-details {
	display: flex;
	flex-direction: column;
	flex-grow: 1;
	padding: 12px 15px;
}

.ssu-upsell-name {
	display: block;
	font-size: 14px;
	font-weight: 600;
	color: #333333;
	text-decoration: none;
	margin-bottom: 8px;
	line-height: 1.4;
}

.ssu-upsell-price {
	font-size: 14px;
	margin-top: auto;
}

.ssu-upsell-price del {
	color: #999999;
	margin-inline-end: 6px;
}

.ssu-upsell-price ins {
	color: #c2272d;
	text-decoration: none;
	font-weight: 700;
}

/* Icon add-to-cart button sits centered under the card, like the theme's own product loop */
.ssu-upsell-item .wd-add-btn {
	margin: 0 auto 15px;
}

/* Tablet: 2 columns */
@media (max-width: 768px) {
	.ssu-upsell-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* Mobile: 1 column */
@media (max-width: 480px) {
	.ssu-upsell-grid {
		grid-template-columns: 1fr;
	}
}

/* ------------------------------------------------------------------ */
/* Compact "bar" layout — used on the Checkout page. It sits above the */
/* whole form (full page width) as one slim horizontal strip, with     */
/* each product laid out inline (small image + name + price + icon).   */
/* ------------------------------------------------------------------ */

.ssu-upsell-section--compact {
	padding: 14px 16px;
}

.ssu-upsell-section--compact .ssu-upsell-header {
	margin-bottom: 12px;
}

.ssu-upsell-section--compact .ssu-upsell-title {
	font-size: 16px;
}

.ssu-upsell-section--compact .ssu-upsell-subtitle {
	font-size: 13px;
}

.ssu-upsell-section--compact .ssu-upsell-grid {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	gap: 14px;
}

.ssu-upsell-section--compact .ssu-upsell-item {
	flex: 1 1 0;
	min-width: 0; /* allow shrinking below content size in a flex row */
	flex-direction: row;
	align-items: center;
	padding: 8px 10px;
}

.ssu-upsell-section--compact .ssu-upsell-image-link {
	flex-shrink: 0;
	width: 48px;
	padding: 0;
	margin-inline-end: 10px;
}

.ssu-upsell-section--compact .ssu-upsell-details {
	flex-grow: 1;
	min-width: 0;
	padding: 0;
	text-align: right;
}

.ssu-upsell-section--compact .ssu-upsell-name {
	font-size: 12px;
	margin-bottom: 3px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ssu-upsell-section--compact .ssu-upsell-price {
	font-size: 12px;
	margin-top: 0;
}

.ssu-upsell-section--compact .wd-add-btn {
	flex-shrink: 0;
	transform: scale(0.8);
	margin: 0;
}

/* Below ~640px there isn't room for 3 items side by side — stack instead */
@media (max-width: 640px) {
	.ssu-upsell-section--compact .ssu-upsell-grid {
		flex-direction: column;
	}
}
