/**
 * SFD Shop Grid Block
 * Product grid with category filter tabs and add-to-cart forms.
 * Matches Figma node 4246:8679.
 */

/* ── Section wrapper ──────────────────────────────────────────── */
.sfd-shop-grid-section {
	max-width: 1280px;
	margin: 0 auto;
	padding: 0;
}

.sfd-shop-grid-inner {
	width: 100%;
}

/* ── Filter tabs (horizontally scrollable) ────────────────────── */
.sfd-shop-filters {
	padding-top: 24px;
	padding-bottom: 24px;
}

.sfd-shop-tabs-scroll-wrap {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}

.sfd-shop-tabs-scroll-wrap::-webkit-scrollbar {
	display: none;
}

.sfd-shop-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    padding: 8px;
    background: #ffffff;
}

.sfd-shop-tab {
	display: inline-flex;
	align-items: center;
	padding: 8px 20px;
	border: 1px solid #D9D9D9;
	border-radius: 100px;
	background: #ffffff;
	font-family: 'Nunito', sans-serif;
	font-size: 14px;
	font-weight: 600;
	color: #646464;
	cursor: pointer;
	transition: all 0.15s;
	white-space: nowrap;
}

.sfd-shop-tab:hover {
	border-color: #8CD933;
	color: #262626;
}

.sfd-shop-tab--active {
	background: #8CD933;
	border-color: #8CD933;
	color: #262626;
	font-weight: 700;
}

/* ── Product grid ─────────────────────────────────────────────── */
.sfd-shop-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
}

.sfd-shop-grid-empty {
	font-family: 'Nunito', sans-serif;
	font-size: 16px;
	color: #646464;
	text-align: center;
	padding: 48px 0;
	grid-column: 1 / -1;
}

/* ── Product card ─────────────────────────────────────────────── */
.sfd-shop-card {
	background: #ffffff;
	border: 1px solid #ebebeb;
	border-radius: 16px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: box-shadow 0.2s;
}

.sfd-shop-card:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Image */
.sfd-shop-card__image {
	position: relative;
	width: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: #f7f7f7;
}

.sfd-shop-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.sfd-shop-card__image a {
	display: block;
	width: 100%;
	height: 100%;
}

/* Body */
.sfd-shop-card__body {
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	flex: 1;
}

/* Category tag */
.sfd-shop-card__tag {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.sfd-shop-card__tag-label {
    font-family: 'Nunito', sans-serif;
    font-size: 12px;
    font-weight: 400;
    color: #808080;
    text-transform: capitalize;
    letter-spacing: 0.04em;
}

/* Content area */
.sfd-shop-card__content {
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 1;
}

.sfd-shop-card__upper {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.sfd-shop-card__title {
	font-family: 'Nunito', sans-serif;
	font-size: 16px;
	font-weight: 700;
	color: #262626;
	margin: 0;
	line-height: 1.3;
}

.sfd-shop-card__title a {
	color: inherit;
	text-decoration: none;
}

.sfd-shop-card__title a:hover {
	color: #56990F;
}

/* Rating */
.sfd-shop-card__rating {
	display: flex;
	align-items: center;
	gap: 6px;
}

.sfd-shop-card__stars {
	display: flex;
	gap: 2px;
}

.sfd-shop-card__review-count {
	font-family: 'Nunito', sans-serif;
	font-size: 12px;
	color: #808080;
}

/* Price */
.sfd-shop-card__price {
	font-family: 'Nunito', sans-serif;
	font-size: 18px;
	font-weight: 800 !important;
	color: #262626;
}

.sfd-shop-card__price .woocommerce-Price-amount {
	font-weight: 800 !important;
}

.sfd-shop-card__price del {
	font-size: 14px;
	font-weight: 600;
	color: #808080;
	margin-right: 6px;
}

.sfd-shop-card__price ins {
	text-decoration: none;
}

/* ── Add to Cart button ────────────────────────────────────────── */
.sfd-shop-card__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #8CD933 !important;
	color: #262626 !important;
	border: 2px solid transparent !important;
	border-radius: 12px !important;
	font-family: 'Nunito', sans-serif !important;
	font-weight: 700 !important;
	font-size: 16px !important;
	line-height: 24px !important;
	padding: 8px 16px !important;
	cursor: pointer !important;
	text-decoration: none !important;
	transition: opacity 0.15s !important;
	box-shadow: 0 1px 2px rgba(10, 13, 18, 0.05) !important;
	min-height: 40px;
	width: auto;
	margin-top: auto;
}

.sfd-shop-card__btn:hover {
	opacity: 0.88 !important;
	color: #262626 !important;
}

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 1024px) {
	.sfd-shop-grid-section {
		padding: 0 40px;
	}

	.sfd-shop-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 640px) {
	.sfd-shop-grid-section {
		padding: 0 16px;
	}

	.sfd-shop-grid {
		grid-template-columns: 1fr;
		gap: 16px;
	}

	.sfd-shop-card__btn {
		width: 100%;
	}
}
