/* ==========================================================================
   WaffarCash — Store page
   Source: WaffarCash Design System v1.0.
   All classes use the .wcs- prefix (the coupon page in style.css already owns .wc-*),
   and tokens are re-declared on .wcs-store so this file cannot clash with style.css.
   ========================================================================== */

.wcs-store {
	--wc-primary: #0EA5A4;
	--wc-primary-hover: #087D7C;
	--wc-accent: #F59E0B;
	--wc-accent-hover: #D97706;
	--wc-dark: #163C46;
	--wc-text: #334E55;
	--wc-muted: #6B7F84;
	--wc-bg: #F6FAFA;
	--wc-card: #FFFFFF;
	--wc-soft-primary: #EAF8F7;
	--wc-soft-accent: #FFF7E6;
	--wc-border: #DCE7E8;
	--wc-expired-bg: #F1F3F4;
	--wc-radius-sm: 8px;
	--wc-radius-md: 10px;
	--wc-radius-lg: 14px;
	--wc-radius-xl: 20px;
	--wc-shadow: 0 4px 16px rgba(22, 60, 70, 0.06);

	background: var(--wc-bg);
	color: var(--wc-text);
	font-family: 'Alexandria', 'Cairo', sans-serif;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.9;
	padding: 24px 0 64px;
}

.wcs-store *,
.wcs-store *::before,
.wcs-store *::after { box-sizing: border-box; }

.wcs-store a { color: var(--wc-primary); text-decoration: none; }
.wcs-store a:hover { color: var(--wc-primary-hover); text-decoration: underline; }
.wcs-store .wcs-num { font-family: 'Manrope', sans-serif; }

.wcs-wrap {
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 24px;
}

/* ---------- Buttons ---------- */
.wcs-btn,
.wcs-cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-family: 'Alexandria', 'Cairo', sans-serif;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.4;
	border: 0;
	border-radius: var(--wc-radius-md);
	padding: 14px 28px;
	cursor: pointer;
	text-align: center;
	text-decoration: none !important;
	transition: background-color .15s ease, color .15s ease;
}
.wcs-btn--primary { background: var(--wc-primary); color: #fff !important; }
.wcs-btn--primary:hover { background: var(--wc-primary-hover); color: #fff !important; }

/* Coupon / conversion button — amber is reserved for this + discount badges */
.wcs-cta { width: 100%; background: var(--wc-accent); color: var(--wc-dark) !important; padding: 13px 16px; font-size: 15px; }
.wcs-cta:hover { background: var(--wc-accent-hover); color: var(--wc-dark) !important; }
.wcs-cta--sm { width: auto; flex-shrink: 0; padding: 12px 16px; }
.wcs-cta--disabled { background: var(--wc-expired-bg); color: var(--wc-muted) !important; cursor: default; }
.wcs-cta--disabled:hover { background: var(--wc-expired-bg); }

.wcs-store a:focus-visible,
.wcs-store button:focus-visible { outline: 3px solid rgba(14, 165, 164, .45); outline-offset: 2px; }

/* ---------- Hero ---------- */
.wcs-hero {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 32px;
	background: var(--wc-card);
	border: 1px solid var(--wc-border);
	border-radius: var(--wc-radius-xl);
	box-shadow: var(--wc-shadow);
	padding: 32px;
	margin-bottom: 32px;
}
.wcs-hero__main { display: flex; align-items: center; gap: 24px; min-width: 0; }
.wcs-hero__logo {
	width: 96px; height: 96px; flex-shrink: 0;
	display: flex; align-items: center; justify-content: center;
	background: #fff; border: 1px solid var(--wc-border); border-radius: var(--wc-radius-lg);
	overflow: hidden;
}
.wcs-hero__logo img { max-width: 76px; max-height: 76px; width: auto; height: auto; object-fit: contain; }
.wcs-hero__logo span { font-family: 'Manrope', sans-serif; font-weight: 800; font-size: 28px; color: var(--wc-primary); }
.wcs-hero__text { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.wcs-hero__title { margin: 0; font-size: 36px; line-height: 1.4; font-weight: 700; color: var(--wc-dark); }
.wcs-hero__lead { margin: 0; max-width: 640px; }
.wcs-hero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; font-size: 13px; font-weight: 500; color: var(--wc-muted); line-height: 1.6; }
.wcs-hero__count strong { font-size: 18px; font-weight: 700; color: var(--wc-primary); margin-inline-end: 4px; }
.wcs-hero__sep { width: 1px; height: 16px; background: var(--wc-border); }
.wcs-hero__side { flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.wcs-cashback { margin: 0; font-size: 13px; font-weight: 500; line-height: 1.6; text-align: center; }

/* Store rating widget (keeps the parent's class names for its JS) */
.wcs-rating { text-align: center; font-size: 13px; color: var(--wc-muted); }
.wcs-rating p { margin: 0 0 4px; font-weight: 600; }
.wcs-rating .rate { direction: ltr; }
.wcs-rating .rate input { display: none; }
.wcs-rating .store-rating-star {
	font-size: 0; width: 22px; height: 22px; cursor: pointer; margin: 0;
	background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23DCE7E8'%3E%3Cpath d='M12 2l3 7 7.5.6-5.7 4.9 1.8 7.3L12 17.8 5.4 21.8l1.8-7.3L1.5 9.6 9 9z'/%3E%3C/svg%3E");
}
.wcs-rating .store-rating-star.checked,
.wcs-rating .store-rating-star:hover,
.wcs-rating .store-rating-star:hover ~ .store-rating-star {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23F59E0B'%3E%3Cpath d='M12 2l3 7 7.5.6-5.7 4.9 1.8 7.3L12 17.8 5.4 21.8l1.8-7.3L1.5 9.6 9 9z'/%3E%3C/svg%3E");
}

/* ---------- Sections ---------- */
.wcs-section { margin-bottom: 48px; }
.wcs-section__title { margin: 0 0 20px; font-size: 28px; line-height: 1.5; font-weight: 700; color: var(--wc-dark); }
.wcs-section__subtitle { margin: 0 0 16px; font-size: 22px; line-height: 1.5; font-weight: 600; color: var(--wc-dark); }
.wcs-empty { margin: 0; padding: 24px; background: var(--wc-card); border: 1px dashed var(--wc-border); border-radius: var(--wc-radius-lg); color: var(--wc-muted); }

/* ---------- Coupon grid / cards ---------- */
.wcs-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

.wcs-card {
	display: flex; flex-direction: column; gap: 14px;
	background: var(--wc-card);
	border: 1px solid var(--wc-border);
	border-radius: var(--wc-radius-lg);
	box-shadow: var(--wc-shadow);
	padding: 24px;
	min-width: 0;
}
.wcs-card--expired { opacity: .85; }
.wcs-card__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wcs-card__expiry { font-size: 12px; font-weight: 500; color: var(--wc-muted); line-height: 1.6; }

.wcs-tag { font-size: 12px; font-weight: 600; line-height: 1.6; padding: 4px 12px; border-radius: 999px; }
.wcs-tag--code { background: var(--wc-soft-primary); color: #087D7C; }
.wcs-tag--muted { background: var(--wc-expired-bg); color: var(--wc-text); }

.wcs-soon {
	display: flex; align-items: center; gap: 8px;
	background: var(--wc-soft-accent); color: var(--wc-dark);
	border-radius: var(--wc-radius-sm); padding: 6px 12px;
	font-size: 13px; font-weight: 600; line-height: 1.6;
}
.wcs-soon::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--wc-accent-hover); flex-shrink: 0; }

.wcs-badge {
	align-self: flex-start;
	font-family: 'Manrope', 'Alexandria', sans-serif;
	font-size: 14px; font-weight: 700; line-height: 1.6;
	background: var(--wc-accent); color: var(--wc-dark);
	padding: 4px 12px; border-radius: 999px;
}
.wcs-badge--expired { background: var(--wc-expired-bg); color: var(--wc-muted); }

.wcs-card__title { margin: 0; font-size: 18px; line-height: 1.7; font-weight: 600; color: var(--wc-dark); }
.wcs-card__title a { color: var(--wc-dark); }
.wcs-card__title a:hover { color: var(--wc-primary-hover); text-decoration: none; }

.wcs-chip {
	align-self: flex-start;
	font-size: 12px; font-weight: 500; line-height: 1.6;
	color: var(--wc-text); background: var(--wc-bg);
	border: 1px solid var(--wc-border); border-radius: 999px;
	padding: 3px 10px;
}
.wcs-chip:hover { text-decoration: none !important; border-color: var(--wc-primary); }
.wcs-chip--outline { align-self: auto; font-size: 14px; font-weight: 600; background: #fff; color: var(--wc-primary); border-color: var(--wc-primary); padding: 8px 18px; }
.wcs-chips { display: flex; flex-wrap: wrap; gap: 10px; }

.wcs-action { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.wcs-code { display: flex; align-items: center; gap: 8px; }
.wcs-code__value {
	flex: 1; min-width: 0;
	font-family: 'Manrope', sans-serif; font-size: 20px; font-weight: 700; line-height: 1.4;
	letter-spacing: 1px; text-align: center; color: var(--wc-dark);
	background: var(--wc-soft-primary); border: 1.5px dashed var(--wc-primary); border-radius: var(--wc-radius-md);
	padding: 10px 12px; overflow-wrap: anywhere;
}
.wcs-see { font-size: 12px; text-align: center; }

.wcs-card__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 500; color: var(--wc-muted); line-height: 1.6; }
.wcs-card__foot:empty { display: none; }
.wcs-verified { display: inline-flex; align-items: center; gap: 6px; }
.wcs-verified svg { color: #087D7C; flex-shrink: 0; }
.wcs-vote button { background: none; border: 0; cursor: pointer; padding: 0 4px; font-size: 16px; line-height: 1; }

/* ---------- Pagination ---------- */
.wcs-pagination { margin-top: 28px; }
.wcs-pagination ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; list-style: none; margin: 0; padding: 0; }
.wcs-pagination a,
.wcs-pagination span.page-numbers {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 40px; height: 40px; padding: 0 14px;
	font-size: 14px; font-weight: 600;
	background: #fff; color: var(--wc-text);
	border: 1px solid var(--wc-border); border-radius: 999px; text-decoration: none;
}
.wcs-pagination a:hover { border-color: var(--wc-primary); color: var(--wc-primary); text-decoration: none; }
.wcs-pagination .current { background: var(--wc-primary); border-color: var(--wc-primary); color: #fff; }

/* ---------- Article (+ automatic table of contents) ---------- */
.wcs-article-layout { display: block; }
.wcs-article-layout.has-toc { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; align-items: start; }

.wcs-toc {
	position: sticky; top: 24px;
	background: var(--wc-card); border: 1px solid var(--wc-border); border-radius: var(--wc-radius-lg);
	box-shadow: var(--wc-shadow); padding: 20px;
}
.wcs-toc__title { font-size: 18px; font-weight: 600; line-height: 1.6; color: var(--wc-dark); margin-bottom: 8px; }
.wcs-toc ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.wcs-toc a { display: block; padding: 8px 12px; border-radius: var(--wc-radius-sm); font-size: 14px; font-weight: 600; line-height: 1.6; color: var(--wc-text); }
.wcs-toc a:hover { background: var(--wc-soft-primary); color: var(--wc-primary-hover); text-decoration: none; }

.wcs-article {
	background: var(--wc-card); border: 1px solid var(--wc-border); border-radius: var(--wc-radius-lg);
	box-shadow: var(--wc-shadow); padding: 32px; min-width: 0;
}
.wcs-article__body { max-width: 820px; }
.wcs-article__body > :first-child { margin-top: 0; }
.wcs-article__body > :last-child { margin-bottom: 0; }
.wcs-article__body h2 { font-size: 28px; line-height: 1.5; font-weight: 700; color: var(--wc-dark); margin: 40px 0 12px; scroll-margin-top: 96px; }
.wcs-article__body h3 { font-size: 22px; line-height: 1.5; font-weight: 600; color: var(--wc-dark); margin: 28px 0 8px; }
.wcs-article__body h4 { font-size: 18px; line-height: 1.6; font-weight: 600; color: var(--wc-dark); margin: 20px 0 8px; }
.wcs-article__body p { margin: 0 0 16px; }
.wcs-article__body strong { font-weight: 600; color: var(--wc-dark); }
.wcs-article__body ul,
.wcs-article__body ol { margin: 0 0 16px; padding-inline-start: 24px; }
.wcs-article__body li { margin-bottom: 6px; }
.wcs-article__body img { max-width: 100%; height: auto; border-radius: var(--wc-radius-md); }
.wcs-article__body table { width: 100%; border-collapse: collapse; margin: 0 0 16px; display: block; overflow-x: auto; }
.wcs-article__body th,
.wcs-article__body td { border: 1px solid var(--wc-border); padding: 10px 12px; text-align: start; }
.wcs-article__body th { background: var(--wc-soft-primary); color: var(--wc-dark); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
	.wcs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
	.wcs-article-layout.has-toc { grid-template-columns: minmax(0, 1fr); }
	.wcs-toc { position: static; }
}
@media (max-width: 768px) {
	.wcs-store { padding-top: 16px; }
	.wcs-wrap { padding: 0 16px; }
	.wcs-hero { flex-direction: column; align-items: stretch; padding: 20px; gap: 20px; }
	.wcs-hero__main { flex-direction: column; align-items: flex-start; gap: 16px; }
	.wcs-hero__title { font-size: 28px; }
	.wcs-hero__side { align-items: stretch; }
	.wcs-btn { width: 100%; }
	.wcs-section__title { font-size: 24px; }
	.wcs-card { padding: 16px; }
	.wcs-article { padding: 20px; }
	.wcs-article__body h2 { font-size: 24px; }
	.wcs-article__body h3 { font-size: 20px; }
}
@media (max-width: 640px) {
	.wcs-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
	.wcs-btn, .wcs-cta { transition: none; }
}
