/* ============================================================
   CUSTOM PRODUCT CARDS — Woodmart version
   Paste in Appearance > Customize > Additional CSS
   (or Woodmart Theme Settings > Custom CSS > Global)
   ============================================================ */

/* ---------- Card container ---------- */
.c400-product-card {
	background: #fbeedd;
	border: 1px solid #f0d3b4;
	border-radius: 14px;
	padding: 12px;
	display: flex;
	flex-direction: column;
	text-align: left;
	overflow: hidden;
}

/* Neutralize Woodmart hover-shadow/lift effects on our card */
.c400-product-card:hover {
	box-shadow: none;
	transform: none;
}

/* ---------- Image block + tag badge ---------- */
.c400-card-image {
	position: relative;
	background: #ffffff;
	border-radius: 8px;
	overflow: hidden;
	margin-bottom: 16px;
}

.c400-card-image img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 8px;
	margin: 0 !important;
}

.c400-tag-badge {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 2;
	background: #2b2b2b;
	color: #ffffff;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.04em;
	line-height: 1;
	padding: 6px 10px;
	border-radius: 4px;
	white-space: nowrap;
}

/* ---------- Title row ---------- */
.c400-title-row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	padding: 0 4px;
}

.c400-product-title {
	font-size: 20px;
	font-weight: 700;
	color: #de8f4e;
	margin: 0 !important;
	padding: 0 !important;
	line-height: 1.3;
}

.c400-view-details {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #2b2b2b !important;
	text-decoration: underline;
	text-underline-offset: 3px;
	white-space: nowrap;
	flex-shrink: 0;
}

.c400-view-details:hover {
	color: #14463c !important;
}

/* ---------- Category ---------- */
.c400-product-category {
	font-size: 13px;
	color: #3d3d3d;
	margin-top: 6px;
	padding: 0 4px;
}

/* ---------- Dashed divider ---------- */
.c400-divider {
	border-top: 1px dashed #d9bfa2;
	margin: 12px 4px;
}

/* ---------- Short description ---------- */
.c400-short-desc {
	font-size: 13px;
	line-height: 1.55;
	color: #6f6a63;
	padding: 0 4px;
	margin-bottom: 14px;
}

.c400-short-desc p {
	margin: 0;
}

/* ---------- ACF spec boxes: 2x2 grid ---------- */
.c400-product-card .product-acf-info {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	margin-bottom: 14px;
}

.c400-product-card .acf-box {
	background: #fdf9f4;
	border: 1px solid #ecd9c2;
	border-radius: 6px;
	padding: 10px 12px;
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.c400-product-card .acf-box span {
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #4a4a4a;
}

.c400-product-card .acf-box strong {
	font-size: 13px;
	font-weight: 500;
	color: #de8f4e;
	line-height: 1.3;
}

/* ---------- FREE SAMPLE button ---------- */
.c400-product-card .button,
.c400-product-card a.add_to_cart_button {
	display: block;
	width: 100%;
	margin: auto 0 0 0; /* pins button to card bottom on uneven content */
	background: #14463c !important;
	color: #ffffff !important;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-align: center;
	padding: 14px 16px;
	border-radius: 8px;
	border: none;
	min-height: 0;
	line-height: 1.2;
	transition: background 0.2s ease;
}

.c400-product-card .button:hover,
.c400-product-card a.add_to_cart_button:hover {
	background: #0e352d !important;
	color: #ffffff !important;
}

/* Hide Woodmart/Woo "View cart" link after AJAX add */
.c400-product-card .added_to_cart {
	display: none;
}

.c400-product-card .button.loading {
	opacity: 0.7;
}

/* ---------- Grid fallback ----------
   Woodmart 6+ lays out .products with CSS grid, so the cards
   slot in automatically. If cards ever stack full-width
   (very old Woodmart), uncomment:

.products {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
}
@media (max-width: 1024px) {
	.products { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 576px) {
	.products { grid-template-columns: 1fr; }
}
------------------------------------- */

/* ---------- Responsive ---------- */
@media (max-width: 767px) {
	.c400-product-title {
		font-size: 18px;
	}
	.c400-product-card .acf-box strong {
		font-size: 12px;
	}
}

/* ============================================================
   v1.1.0 additions
   ============================================================ */

/* ---------- Whole-card link overlay ---------- */
.c400-product-card {
	position: relative;
}

.c400-card-link {
	position: absolute;
	inset: 0;
	z-index: 1;
}

/* Interactive elements stay above the overlay */
.c400-card-image .c400-tag-badge,
.c400-view-details,
.c400-product-card .button,
.c400-product-card a.add_to_cart_button,
.c400-free-sample-btn {
	position: relative;
	z-index: 2;
}

.c400-product-card:hover .c400-product-title {
	color: #c77a38;
}

/* ---------- One-line title ---------- */
.c400-product-title {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	min-width: 0;
}

.c400-title-row {
	min-width: 0;
}

/* ---------- Two-line short description ---------- */
.c400-short-desc {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ---------- Free Sample popup ---------- */
.c400-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.c400-modal.is-open {
	display: flex;
}

.c400-modal-overlay {
	position: absolute;
	inset: 0;
	background: rgba(20, 30, 27, 0.6);
}

.c400-modal-box {
	position: relative;
	z-index: 1;
	background: #ffffff;
	border-radius: 12px;
	padding: 28px;
	width: 100%;
	max-width: 460px;
	max-height: 90vh;
	overflow-y: auto;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.c400-modal-close {
	position: absolute;
	top: 10px;
	right: 14px;
	background: none;
	border: none;
	font-size: 26px;
	line-height: 1;
	color: #6f6a63;
	cursor: pointer;
	padding: 4px;
}

.c400-modal-close:hover {
	color: #2b2b2b;
}

.c400-modal-heading {
	font-size: 18px;
	font-weight: 700;
	color: #14463c;
	margin-bottom: 16px;
	padding-right: 24px;
}

.c400-modal-product {
	display: block;
	font-size: 13px;
	font-weight: 500;
	color: #de8f4e;
	margin-top: 4px;
}

body.c400-modal-active {
	overflow: hidden;
}
