/* ==========================================================================
   Chafery – product card (shop, categories, homepage, related products, FAQ)
   One style for every product list on the site.
   ========================================================================== */

/* Grid spacing */
.products.row-small { margin-left: -7px; margin-right: -7px; }
.products.row-small > .product-small.col { padding: 0 7px 16px; }
.cf-home-products.row,
.cf-faq-products .products.row { max-width: none; }

/* Card (same height for every card in a row) */
.product-small.col > .col-inner { height: 100%; }
.product-small.box {
	display: flex;
	flex-direction: column;
	height: 100%;
	border: 1px solid #e6e6e6;
	border-radius: 6px;
	background: #fff;
	overflow: hidden;
	transition: box-shadow .2s, border-color .2s;
}
.product-small.box:hover { border-color: #dcdcdc; box-shadow: 0 8px 22px rgba(0, 0, 0, .08); }
.product-small .box-image { background: #f4f4f4; }
.product-small .box-text {
	flex: 1;
	padding: 16px 16px 14px;
	text-align: left;
	font-family: "Jost", sans-serif;
}

/* Title */
.product-small .title-wrapper { margin: 0; }
.product-small .name,
.product-small .product-title { margin: 0; }
.product-small .name a,
.product-small .product-title a {
	color: #222;
	font-family: "Jost", sans-serif;
	font-size: 15px;
	font-weight: 400;
	line-height: 1.7;
	text-transform: none;
}
.product-small .name a:hover,
.product-small .product-title a:hover { color: #000; }
.product-small .category { display: none; }

/* Price */
.product-small .price-wrapper .price {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0 10px;
	margin: 8px 0 0;
	font-size: 15px;
	line-height: 1.4;
}
.product-small .price del { order: 0; color: #e01e1e; font-size: 14px; opacity: 1; }
.product-small .price del .amount { color: #e01e1e; font-weight: 400; }
.product-small .price ins { order: 1; text-decoration: none; }
.product-small .price ins .amount,
.product-small .price > .amount,
.product-small .price .woocommerce-Price-amount { color: #111; font-weight: 400; }
.product-small .price del .woocommerce-Price-amount { color: #e01e1e; }

/* Rating (Flatsome's own stars are hidden: ours also show when there are no reviews) */
.product-small .star-rating { display: none !important; }
.cf-card-rating {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 8px;
	color: #888;
	font-size: 11px;
}
.cf-card-rating .cf-stars { width: 70px; height: 13px; }
.cf-card-rating .cf-stars::before,
.cf-card-rating .cf-stars__fill::before { font-size: 13px; line-height: 13px; letter-spacing: 1px; }
.cf-card-rating .cf-stars::before { color: #d9d9d9; }
.cf-card-rating .cf-stars__fill::before { color: #f5b301; }

/* Stock */
.cf-stock {
	display: block;
	margin-top: 10px;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: .06em;
	text-transform: uppercase;
}
.cf-stock--in { color: #0b9a55; }
.cf-stock--out { color: #e01e1e; }

/* Labels on the image: SALE!, percentage, Best Seller */
.product-small .badge-container {
	top: 12px;
	left: 12px;
	margin: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
	z-index: 3;
}
.cf-badge {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 6px;
	background: #fff;
	color: #e01e1e;
	font-family: "Jost", sans-serif;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .03em;
	line-height: 1.25;
	text-transform: uppercase;
	box-shadow: 0 1px 4px rgba(0, 0, 0, .12);
}
.cf-badge--pct {
	margin-left: 8px;
	padding: 3px 12px;
	border-radius: 14px;
	background: rgba(17, 17, 17, .88);
	color: #fff;
	text-transform: none;
	box-shadow: none;
}
.cf-badge--best { color: #111; }

/* Image dots */
.cf-card-dots {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 10px;
	z-index: 2;
	display: flex;
	justify-content: center;
	gap: 6px;
	pointer-events: none;
}
.cf-card-dots__dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .55);
	cursor: pointer;
	pointer-events: auto;
	transition: background .2s, transform .2s;
}
.cf-card-dots__dot.is-active { background: #fff; transform: scale(1.1); }

@media (max-width: 849px) {
	.products.row-small { margin-left: -5px; margin-right: -5px; }
	.products.row-small > .product-small.col { padding: 0 5px 12px; }
	.product-small .box-text { padding: 12px 12px 12px; }
	.product-small .name a,
	.product-small .product-title a { font-size: 13px; line-height: 1.55; }
	.product-small .price-wrapper .price { margin-top: 6px; font-size: 13px; gap: 0 8px; }
	.product-small .price del { font-size: 12px; }
	.cf-card-rating { margin-top: 6px; }
	.cf-card-rating .cf-stars { width: 62px; height: 11px; }
	.cf-card-rating .cf-stars::before,
	.cf-card-rating .cf-stars__fill::before { font-size: 11px; line-height: 11px; }
	.cf-stock { margin-top: 8px; font-size: 10px; }
	.product-small .badge-container { top: 8px; left: 8px; gap: 4px; }
	.cf-badge { padding: 3px 8px; font-size: 10px; }
	.cf-badge--pct { margin-left: 6px; padding: 2px 9px; }
	.cf-card-dots { bottom: 8px; gap: 5px; }
	.cf-card-dots__dot { width: 7px; height: 7px; }
}

/* Homepage: one label type per card. SALE! wins, Best Seller only shows on products not on sale. */
.cf-home-products .cf-badge--sale ~ .cf-badge--best { display: none; }

/* Homepage: 5 cards on desktop/tablet, 4 on phones (2 columns, no lonely card) */
@media (max-width: 549px) {
	.cf-home-products > .product-small.col:nth-child(5) { display: none; }
}
