/* CWCPD Frontend Styles */

/* Modal overlay */
#cwcpd-bogo-popup {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 9999;
	background-color: rgba(0, 0, 0, 0.45);
	backdrop-filter: blur(4px);
}

/* Modal content */
.cwcpd-modal-content {
	position: relative;
	width: min(940px, 92%);
	max-height: 85vh;
	margin: 5vh auto;
	padding: 20px 24px;
	border-radius: 12px;
	background: #ffffff;
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
	overflow-y: auto;
	animation: cwcpd-modal-in 180ms ease-out;
}

@keyframes cwcpd-modal-in {
	from { transform: translateY(10px); opacity: 0; }
	to { transform: translateY(0); opacity: 1; }
}

.cwcpd-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 8px;
}

.cwcpd-modal-title {
	margin: 0;
	font-size: 20px;
	font-weight: 700;
}

.cwcpd-modal-subtitle {
	margin: 0 0 14px;
	color: #666;
	font-size: 14px;
}

.cwcpd-close-popup {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 1px solid #e6e6e6;
	background: #fff;
	cursor: pointer;
	font-size: 20px;
	line-height: 34px;
	text-align: center;
	color: #444;
	transition: all 0.2s ease;
}

.cwcpd-close-popup:hover { background: #f7f7f7; color: #111; }

/* Grid of free products */
.cwcpd-free-products {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 8px;
	margin-top: 10px;
}

.cwcpd-free-product {
	border: 1px solid #eee;
	border-radius: 10px;
	background: #fff;
	padding: 14px;
	text-align: center;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.cwcpd-free-qty{border:1px solid #eee; border-radius:6px; width:45px; text-align: center;}

.cwcpd-free-product:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.cwcpd-product-image img {
	max-width: 60%;
	height: auto;
	border-radius: 8px;
}

.cwcpd-product-title {
	margin: 10px 0 6px;
	font-weight: 400;
    font-size: 11px;
}

.cwcpd-price-badge {
	color: #2e7d32;
	font-weight: 700;
}

.cwcpd-select-free {
	margin-top: 10px;
	width: 100%;
	border: none;
	border-radius: 6px;
	padding: 5px;
	background: #e05b8b;
	color: #fff;
	font-weight: 400;
    font-size: 11px;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.06s ease;
}

.cwcpd-select-free:hover { background: #da255f; }
.cwcpd-select-free:active { transform: translateY(1px); }


.cwcpd-select-free-custom-icecream {
	margin-top: 10px;
	width: 100%;
	border: none;
	border-radius: 6px;
	padding: 5px;
	background: #e05b8b;
	color: #fff;
	font-weight: 400;
    font-size: 11px;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.06s ease;
}

.cwcpd-select-free-custom-icecream:hover { background: #da255f; }
.cwcpd-select-free-custom-icecream:active { transform: translateY(1px); }

@media (max-width: 520px) {
	.cwcpd-modal-content { padding: 16px 16px; }
	.cwcpd-free-products { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}


