/* GrabOn Style Coupons Pro - frontend styles */

.cp-grid { display: grid; gap: 20px; margin: 20px 0; }
.cp-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.cp-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cp-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cp-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cp-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.cp-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

@media (max-width: 900px) {
	.cp-cols-3, .cp-cols-4, .cp-cols-5, .cp-cols-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
	.cp-grid { grid-template-columns: repeat(1, minmax(0, 1fr)) !important; }
}

.cp-empty { text-align: center; color: #777; padding: 20px 0; }

/* ---------- Load More ---------- */
.cp-loadmore-wrap { text-align: center; margin: 24px 0 4px; grid-column: 1 / -1; }
.cp-loadmore-btn {
	background: #fff; color: #2563eb; border: 2px solid #2563eb;
	font-weight: 700; font-size: 14px; padding: 11px 30px; border-radius: 8px;
	cursor: pointer; transition: background-color .15s ease, color .15s ease;
}
.cp-loadmore-btn:hover { background: #2563eb; color: #fff; }
.cp-loadmore-btn:disabled { opacity: .6; cursor: default; }

/* ---------- Carousel ----------
   Track (.cp-grid.cp-carousel) ek flex row hai jiske andar "pages" (.cp-car-page)
   hote hain. Har page khud ek grid hai (columns x rows items), aur poori
   width (100%) leta hai — isliye arrow/dot dabane par ek pura "set" (jaise 4+4=8)
   ek saath slide hoke badalta hai. */
.cp-carousel-wrap { display: flex; align-items: center; gap: 10px; }

.cp-grid.cp-carousel {
	display: flex;
	flex-wrap: nowrap;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	flex: 1 1 auto;
	gap: 0 !important; /* pages ke beech gap nahi, gap sirf cards ke beech (page ke andar) */
	scrollbar-width: none;
	-ms-overflow-style: none;
}
.cp-grid.cp-carousel::-webkit-scrollbar { display: none; }

.cp-car-page.cp-grid {
	flex: 0 0 100%;
	width: 100%;
	margin: 0;
	box-sizing: border-box;
	scroll-snap-align: start;
	align-content: start;
}

@media (max-width: 560px) {
	.cp-car-page.cp-grid.cp-cols-2,
	.cp-car-page.cp-grid.cp-cols-3,
	.cp-car-page.cp-grid.cp-cols-4,
	.cp-car-page.cp-grid.cp-cols-5,
	.cp-car-page.cp-grid.cp-cols-6 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

.cp-car-arrow {
	all: unset;
	box-sizing: border-box;
	flex: 0 0 auto; width: 48px; height: 48px; border-radius: 50%;
	border: 1px solid #ddd; background: #fff; color: #333;
	display: flex; align-items: center; justify-content: center;
	font-size: 30px; line-height: 1; cursor: pointer;
}
.cp-car-arrow:hover:not(:disabled) { background: #f5f5f5; }
.cp-car-arrow:disabled { opacity: .3; cursor: default; }

.cp-car-dots { display: flex; justify-content: center; align-items: center; gap: 6px; margin: 14px 0 4px; }
.cp-car-dot {
	all: unset;
	box-sizing: border-box;
	display: inline-block;
	width: 8px; height: 8px; border-radius: 50%; background: #ddd; cursor: pointer;
	transition: width .15s ease, background-color .15s ease;
}
.cp-car-dot.active { background: #2563eb; width: 20px; border-radius: 4px; }

/* ---------- Common button ---------- */
.cp-btn {
	display: inline-block;
	background: #2563eb;
	color: #fff;
	text-align: center;
	text-decoration: none;
	font-weight: 700;
	font-size: 14px;
	line-height: 1.2;
	padding: 12px 26px;
	border-radius: 8px;
	border: 0;
	cursor: pointer;
	box-sizing: border-box;
	transition: background-color .15s ease, opacity .15s ease;
}
.cp-btn:hover { opacity: .92; color: #fff; }
a.cp-btn, a.cp-btn:hover, a.cp-btn:focus,
a.cp-offer-btn, a.cp-offer-btn:hover, a.cp-sh-btn, a.cp-sh-btn:hover,
a.cp-store-card, a.cp-store-card:hover, a.cp-hl-logo, a.cp-hl-link:focus { text-decoration: none !important; }

/* ---------- Store card ---------- */
.cp-store-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	background: #fff;
	border: 1px solid #eee;
	border-radius: 10px;
	padding: 20px 15px;
	text-decoration: none;
	color: #222;
	transition: box-shadow .2s ease, transform .2s ease;
}
.cp-store-card:hover { box-shadow: 0 6px 18px rgba(0,0,0,.08); transform: translateY(-3px); }
.cp-store-card-logo { max-width: 100%; max-height: 60px; object-fit: contain; margin-bottom: 10px; }
.cp-store-card-name { margin: 0 0 4px; font-size: 16px; color: #222; }
.cp-store-card-count { font-size: 12px; color: #777; }

/* ---------- Classic card ---------- */
.cp-classic {
	position: relative;
	background: #fff;
	border: 1px dashed #d8d8d8;
	border-radius: 10px;
	padding: 22px 20px;
	text-align: center;
}
.cp-classic-badge {
	position: absolute; top: 10px; right: 10px;
	background: #16a34a; color: #fff; font-size: 11px; padding: 3px 8px; border-radius: 20px;
}
.cp-classic-logo { max-width: 100%; max-height: 45px; object-fit: contain; margin-bottom: 10px; }
.cp-classic-title { font-size: 16px; margin: 6px 0; }
.cp-classic-discount { color: #e63946; font-weight: 600; margin: 6px 0 16px; }

/* ---------- Store Highlight card ---------- */
.cp-hl {
	background: #fff;
	border: 1px solid #eee;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 2px 10px rgba(0,0,0,.04);
}
.cp-hl-top { display: flex; align-items: center; gap: 18px; padding: 22px 20px; }
.cp-hl-box { flex: 0 0 auto; text-align: center; display: flex; flex-direction: column; line-height: 1.15; min-width: 64px; }
.cp-hl-prefix, .cp-hl-off { font-size: 12px; font-weight: 700; color: #2563eb; text-transform: uppercase; letter-spacing: .5px; }
.cp-hl-percent { font-size: 26px; font-weight: 800; color: #2563eb; white-space: nowrap; }
.cp-hl-divider { width: 1px; align-self: stretch; background: #e2e2e2; }
.cp-hl-desc { flex: 1 1 auto; font-size: 15px; color: #222; line-height: 1.4; }
.cp-hl-bottom {
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	padding: 14px 20px; border-top: 1px solid #eee; background: #fafafa;
}
.cp-hl-logo {
	background: #111; border-radius: 8px; padding: 8px 14px; box-sizing: border-box;
	display: inline-flex; align-items: center; justify-content: center; min-width: 90px; min-height: 32px;
}
.cp-hl-logo img { max-height: 22px; max-width: 90px; object-fit: contain; }
.cp-hl-logo span { color: #fff; font-size: 12px; font-weight: 600; }
.cp-hl-link { font-size: 13px; font-weight: 600; color: #2563eb; text-decoration: none; }
.cp-hl-link:hover { text-decoration: underline; }

/* ---------- Flash Deal card ---------- */
.cp-fd {
	background: #fff;
	border: 2px solid #f97316;
	border-radius: 10px;
	overflow: hidden;
}
.cp-fd-topbar {
	background: #f97316; color: #fff; font-size: 12px; font-weight: 700;
	letter-spacing: .5px; padding: 6px 16px; text-transform: uppercase;
}
.cp-fd-orange { border-color: #f97316; }
.cp-fd-orange .cp-fd-topbar { background: #f97316; }
.cp-fd-orange .cp-fd-prefix, .cp-fd-orange .cp-fd-percent, .cp-fd-orange .cp-fd-off { color: #f97316; }
.cp-fd-blue { border-color: #2563eb; }
.cp-fd-blue .cp-fd-topbar { background: #2563eb; }
.cp-fd-blue .cp-fd-prefix, .cp-fd-blue .cp-fd-percent, .cp-fd-blue .cp-fd-off { color: #2563eb; }
.cp-fd-green { border-color: #16a34a; }
.cp-fd-green .cp-fd-topbar { background: #16a34a; }
.cp-fd-green .cp-fd-prefix, .cp-fd-green .cp-fd-percent, .cp-fd-green .cp-fd-off { color: #16a34a; }
.cp-fd-purple { border-color: #9333ea; }
.cp-fd-purple .cp-fd-topbar { background: #9333ea; }
.cp-fd-purple .cp-fd-prefix, .cp-fd-purple .cp-fd-percent, .cp-fd-purple .cp-fd-off { color: #9333ea; }

.cp-fd-imgwrap { flex: 0 0 auto; width: 72px; }
.cp-fd-img { display: block; width: 100%; height: 72px; object-fit: contain; border: 1px solid #eee; border-radius: 10px; background: #fff; padding: 4px; box-sizing: border-box; }
.cp-fd-body { display: flex; align-items: center; gap: 20px; padding: 20px; flex-wrap: wrap; }
.cp-fd-box { flex: 0 0 auto; text-align: center; line-height: 1.15; min-width: 84px; display: flex; flex-direction: column; }
.cp-fd-prefix, .cp-fd-off { font-size: 14px; font-weight: 700; text-transform: uppercase; }
.cp-fd-percent { font-size: 30px; font-weight: 800; white-space: nowrap; }
.cp-fd-divider { width: 1px; align-self: stretch; background: repeating-linear-gradient(to bottom, #d6d6d6 0 4px, transparent 4px 8px); }
.cp-fd-mid { flex: 1 1 220px; min-width: 0; }
.cp-fd-desc { font-size: 16px; color: #222; line-height: 1.45; }
.cp-fd-details { margin-top: 8px; font-size: 14px; }
.cp-fd-details summary { color: #2563eb; cursor: pointer; }
.cp-fd-terms { color: #666; margin-top: 8px; font-size: 13px; line-height: 1.5; }
.cp-fd-right { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; min-width: 200px; }
.cp-fd-meta { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 12px; font-size: 12px; color: #666; }
.cp-fd-verified { color: #16a34a; font-weight: 600; }
.cp-fd-right .cp-btn { width: 100%; }

@media (max-width: 700px) {
	.cp-fd-divider { display: none; }
	.cp-fd-right { width: 100%; align-items: stretch; }
	.cp-fd-meta { justify-content: flex-start; }
}

/* ---------- Popular Offer card ---------- */
.cp-offer {
	background: #fff;
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 4px 18px rgba(0,0,0,.08);
	display: flex;
	flex-direction: column;
}
.cp-offer-img { position: relative; height: 180px; background-size: cover; background-position: center; background-repeat: no-repeat; }
.cp-offer-logo {
	position: absolute; left: 18px; bottom: -30px;
	width: 60px; height: 60px; border-radius: 50%; object-fit: contain;
	background: #fff; border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.cp-offer-body { padding: 42px 18px 18px; flex: 1; display: flex; flex-direction: column; }
.cp-offer-tag { font-size: 18px; font-weight: 800; color: #2563eb; margin-bottom: 8px; text-transform: uppercase; }
.cp-offer-desc {
	font-size: 14px; color: #333; line-height: 1.5; margin: 0 0 14px; flex: 1;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.cp-offer-divider { border-top: 1px dashed #e2e2e2; margin-bottom: 16px; }
.cp-offer-btn {
	display: block; width: 100%; text-align: center; background: #2563eb; color: #fff;
	font-weight: 700; font-size: 14px; text-decoration: none; padding: 12px 16px;
	border-radius: 8px; box-sizing: border-box; text-transform: uppercase; letter-spacing: .3px;
}
.cp-offer-btn:hover { opacity: .92; color: #fff; }

/* ---------- Store page / single coupon page ---------- */
.cp-store-head { text-align: center; margin: 10px 0 24px; }
.cp-store-head-logo { max-height: 80px; max-width: 220px; object-fit: contain; margin-bottom: 14px; display: block; margin-left: auto; margin-right: auto; }
.cp-section-title { margin: 30px 0 6px; }
.cp-single-coupon { margin: 20px 0; }

/* ---------- Store Header widget ---------- */
.cp-sh { text-align: center; }
.cp-sh-row { margin-bottom: 14px; }
.cp-sh-logo { display: inline-block; max-height: 90px; max-width: 100%; object-fit: contain; }
.cp-sh-title { margin: 0; font-size: 32px; line-height: 1.2; }
.cp-sh-tagline { margin: 0; color: #666; font-size: 16px; }
.cp-sh-count { display: inline-block; color: #16a34a; font-weight: 600; font-size: 14px; }
.cp-sh-btn {
	display: inline-block; background: #111; color: #fff; padding: 11px 26px;
	border-radius: 8px; font-weight: 600; font-size: 14px; box-sizing: border-box;
}
.cp-sh-btn:hover { opacity: .9; color: #fff; }
